Skip to content

Commit 574ea86

Browse files
authored
Merge pull request #760 from AaltoSciComp/yu/update-llms
update llms
2 parents 85c6bea + 7328702 commit 574ea86

File tree

1 file changed

+15
-101
lines changed

1 file changed

+15
-101
lines changed

triton/apps/llms.rst

Lines changed: 15 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -19,118 +19,38 @@ HuggingFace Models
1919
The simplest way to use an open-source LLM(Large Language Model) is through the tools and pre-trained models hub from huggingface.
2020
Huggingface is a popular platform for NLP(Natural Language Processing) tasks. It provides a user-friendly interface through the transformers library to load and run various pre-trained models.
2121
Most open-source models from Huggingface are widely supported and integrated with the transformers library.
22-
We are keeping our eyes on the latest models and have downloaded some of them for you.
23-
The full list of all the available models are located at ``/scratch/shareddata/dldata/huggingface-hub-cache/models.txt``. Please contact us if you need any other models.
24-
The following table lists only a few example from the hosted models:
22+
We are keeping our eyes on the latest models and have downloaded some of them for you. If you need any other models, please contact us.
2523

26-
.. list-table::
27-
:header-rows: 1
28-
:widths: 1 1
29-
30-
* * Model type
31-
* Huggingface model identifier
32-
33-
* * Text Generation
34-
* meta-llama/Meta-Llama-3-8B
35-
36-
* * Text Generation
37-
* meta-llama/Meta-Llama-3-8B-Instruct
38-
39-
* * Text Generation
40-
* mistralai/Mixtral-8x22B-v0.1
41-
42-
* * Text Generation
43-
* mistralai/Mixtral-8x22B-Instruct-v0.1
44-
45-
* * Text Generation
46-
* tiiuae/falcon-40b
47-
48-
* * Text Generation
49-
* tiiuae/falcon-40b-instruct
50-
51-
* * Text Generation
52-
* google/gemma-2b-it
53-
54-
* * Text Generation
55-
* google/gemma-7b
56-
57-
* * Text Generation
58-
* google/gemma-7b-it
59-
60-
* * Text Generation
61-
* google/gemma-7b
62-
63-
* * Text Generation
64-
* LumiOpen/Poro-34B
65-
66-
67-
* * Text Generation
68-
* meta-llama/Llama-2-7b-hf
69-
70-
* * Text Generation
71-
* meta-llama/Llama-2-13b-hf
72-
73-
* * Text Generation
74-
* meta-llama/Llama-2-70b-hf
24+
Run command ``ls /scratch/shareddata/dldata/huggingface-hub-cache/hub`` to see the full list of all the available models.
7525

76-
* * Text Generation
77-
* codellama/CodeLlama-7b-hf
78-
79-
* * Text Generation
80-
* codellama/CodeLlama-13b-hf
81-
82-
* * Text Generation
83-
* codellama/CodeLlama-34b-hf
84-
85-
* * Translation
86-
* Helsinki-NLP/opus-mt-en-fi
87-
88-
* * Translation
89-
* Helsinki-NLP/opus-mt-fi-en
90-
91-
* * Translation
92-
* t5-base
93-
94-
* * Fill Mask
95-
* bert-base-uncased
96-
97-
* * Fill Mask
98-
* bert-base-cased
99-
100-
* * Fill Mask
101-
* distilbert-base-uncased
102-
103-
* * Text to Speech
104-
* microsoft/speecht5_hifigan
105-
106-
* * Text to Speech
107-
* facebook/hf-seamless-m4t-large
108-
109-
* * Automatic Speech Recognition
110-
* openai/whisper-large-v3
111-
112-
* * Token Classification
113-
* dslim/bert-base-NER-uncased
11426

11527
To access Huggingface models:
11628

11729
.. tabs::
11830

119-
.. group-tab:: slurm script
31+
.. group-tab:: slurm/shell script
12032

121-
Load the module to setup the environment variable HF_HOME:
33+
Load the module for huggingface models and setup environment variables:
12234

12335
.. code-block:: bash
124-
125-
module load model-huggingface/all
36+
12637
# this will set HF_HOME to /scratch/shareddata/dldata/huggingface-hub-cache
38+
module load model-huggingface/all
39+
40+
# this will force transformer to load model(s) from local hub instead of download and load model(s) from remote hub.
41+
export TRANSFORMERS_OFFLINE=1
42+
export HF_HUB_OFFLINE=1
43+
44+
python your_script.py
12745
12846
.. group-tab:: jupyter notebook
12947

130-
In jupyter notebook, one can set up HF_HOME directly:
48+
In jupyter notebook, one can set up all necessary environment variables directly:
13149

13250
.. code-block:: python
13351
52+
## Force transformer to load model(s) from local hub instead of download and load model(s) from remote hub.
53+
## IMPORTANT: This must be executed before importing the transformers library
13454
import os
13555
os.environ['TRANSFORMERS_OFFLINE'] = '1'
13656
os.environ['HF_HUB_OFFLINE'] = '1'
@@ -141,12 +61,6 @@ Here is a Python script using huggingface model.
14161

14262
.. code-block:: python
14363
144-
## Force transformer to load model(s) from local hub instead of download and load model(s) from remote hub.
145-
## !!!!!! NOTE: this must be in front of import transformers.
146-
import os
147-
os.environ['TRANSFORMERS_OFFLINE'] = '1'
148-
os.environ['HF_HUB_OFFLINE'] = '1'
149-
15064
from transformers import AutoModelForCausalLM, AutoTokenizer
15165
15266
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")

0 commit comments

Comments
 (0)