Spaces:
Sleeping
Sleeping
jonathanjordan21
commited on
Commit
•
55ab28a
1
Parent(s):
6f4d127
Update constants/models.py
Browse files- constants/models.py +86 -24
constants/models.py
CHANGED
@@ -9,10 +9,12 @@ MODEL_MAP = {
|
|
9 |
"llama3-70b": "meta-llama/Meta-Llama-3-70B-Instruct",
|
10 |
"zephyr-141b": "HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
|
11 |
"default": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
|
12 |
-
"
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"llama3-8b" : "meta-llama/Meta-Llama-3-8B-Instruct"
|
|
|
|
|
16 |
}
|
17 |
|
18 |
AVAILABLE_MODELS = list(MODEL_MAP.keys())
|
@@ -36,12 +38,14 @@ STOP_SEQUENCES_MAP = {
|
|
36 |
# https://huggingface.co/CohereForAI/c4ai-command-r-plus-4bit/blob/main/tokenizer_config.json#L305
|
37 |
"command-r-plus": "<|END_OF_TURN_TOKEN|>",
|
38 |
# https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/tokenizer_config.json#L30
|
39 |
-
"
|
40 |
-
"
|
41 |
-
"
|
42 |
|
43 |
"llama3-8b" : "<|eot_id|>",
|
44 |
-
"llama3-70b" : "<|eot_id|>"
|
|
|
|
|
45 |
}
|
46 |
|
47 |
TOKEN_LIMIT_MAP = {
|
@@ -55,23 +59,24 @@ TOKEN_LIMIT_MAP = {
|
|
55 |
"llama3-70b": 8192,
|
56 |
"zephyr-141b": 2048,
|
57 |
"gpt-3.5-turbo": 8192,
|
58 |
-
"
|
59 |
-
"
|
60 |
-
"
|
61 |
"llama3-8b": 8192,
|
|
|
|
|
62 |
}
|
63 |
|
64 |
TOKEN_RESERVED = 20
|
65 |
|
66 |
-
|
67 |
-
# https://platform.openai.com/docs/api-reference/models/list
|
68 |
-
AVAILABLE_MODELS_DICTS = [
|
69 |
{
|
70 |
"id": "mixtral-8x7b",
|
71 |
"description": "[mistralai/Mixtral-8x7B-Instruct-v0.1]: https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1",
|
72 |
"object": "model",
|
73 |
"created": 1700000000,
|
74 |
"owned_by": "mistralai",
|
|
|
75 |
},
|
76 |
{
|
77 |
"id": "nous-mixtral-8x7b",
|
@@ -79,6 +84,7 @@ AVAILABLE_MODELS_DICTS = [
|
|
79 |
"object": "model",
|
80 |
"created": 1700000000,
|
81 |
"owned_by": "NousResearch",
|
|
|
82 |
},
|
83 |
{
|
84 |
"id": "mistral-7b",
|
@@ -86,6 +92,7 @@ AVAILABLE_MODELS_DICTS = [
|
|
86 |
"object": "model",
|
87 |
"created": 1700000000,
|
88 |
"owned_by": "mistralai",
|
|
|
89 |
},
|
90 |
{
|
91 |
"id": "yi-1.5-34b",
|
@@ -93,6 +100,7 @@ AVAILABLE_MODELS_DICTS = [
|
|
93 |
"object": "model",
|
94 |
"created": 1700000000,
|
95 |
"owned_by": "01-ai",
|
|
|
96 |
},
|
97 |
{
|
98 |
"id": "gemma-7b",
|
@@ -100,63 +108,92 @@ AVAILABLE_MODELS_DICTS = [
|
|
100 |
"object": "model",
|
101 |
"created": 1700000000,
|
102 |
"owned_by": "Google",
|
|
|
103 |
},
|
104 |
{
|
105 |
"id": "openchat-3.5",
|
106 |
"description": "[openchat/openchat-3.5-0106]: https://huggingface.co/openchat/openchat-3.5-0106",
|
107 |
"object": "model",
|
108 |
"created": 1700000000,
|
109 |
-
"owned_by": "openchat"
|
|
|
110 |
},
|
111 |
{
|
112 |
"id": "command-r-plus",
|
113 |
"description": "[CohereForAI/c4ai-command-r-plus]: https://huggingface.co/CohereForAI/c4ai-command-r-plus",
|
114 |
"object": "model",
|
115 |
"created": 1700000000,
|
116 |
-
"owned_by": "CohereForAI"
|
|
|
117 |
},
|
118 |
{
|
119 |
"id": "llama3-70b",
|
120 |
"description": "[meta-llama/Meta-Llama-3-70B]: https://huggingface.co/meta-llama/Meta-Llama-3-70B",
|
121 |
"object": "model",
|
122 |
"created": 1700000000,
|
123 |
-
"owned_by": "Meta"
|
|
|
124 |
},
|
125 |
{
|
126 |
"id": "zephyr-141b",
|
127 |
"description": "[HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1]: https://huggingface.co/HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
|
128 |
"object": "model",
|
129 |
"created": 1700000000,
|
130 |
-
"owned_by": "Huggingface"
|
|
|
131 |
},
|
132 |
{
|
133 |
"id": "gpt-3.5-turbo",
|
134 |
"description": "[openai/gpt-3.5-turbo]: https://platform.openai.com/docs/models/gpt-3-5-turbo",
|
135 |
"object": "model",
|
136 |
"created": 1700000000,
|
137 |
-
"owned_by": "OpenAI"
|
|
|
138 |
},
|
139 |
{
|
140 |
-
"id": "
|
141 |
"description": "[Qwen/Qwen2-72B]: https://huggingface.co/Qwen/Qwen2-72B",
|
142 |
"object": "model",
|
143 |
"created": 1700000000,
|
144 |
-
"owned_by": "Qwen"
|
|
|
145 |
},
|
146 |
{
|
147 |
"id": "llama3-8b",
|
148 |
"description": "[meta-llama/Meta-Llama-3-8B]: https://huggingface.co/meta-llama/Meta-Llama-3-8B",
|
149 |
"object": "model",
|
150 |
"created": 1700000000,
|
151 |
-
"owned_by": "Meta"
|
|
|
152 |
},
|
153 |
{
|
154 |
-
"id": "
|
155 |
"description": "[Qwen/Qwen2-1.5B-Instruct]: https://huggingface.co/Qwen/Qwen2-1.5B-Instruct",
|
156 |
"object": "model",
|
157 |
"created": 1700000000,
|
158 |
-
"owned_by": "Qwen"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
},
|
|
|
|
|
|
|
|
|
160 |
{
|
161 |
"id": "nomic-text-embed",
|
162 |
"description": "[nomic-ai/nomic-embed-text-v1.5]: https://huggingface.co/nomic-ai/nomic-embed-text-v1.5",
|
@@ -171,4 +208,29 @@ AVAILABLE_MODELS_DICTS = [
|
|
171 |
"created": 1700000000,
|
172 |
"owned_by": "mixedbread-ai"
|
173 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
]
|
|
|
|
|
|
|
|
|
|
9 |
"llama3-70b": "meta-llama/Meta-Llama-3-70B-Instruct",
|
10 |
"zephyr-141b": "HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
|
11 |
"default": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
|
12 |
+
"qwen2-72b": "Qwen/Qwen2-72B-Instruct",
|
13 |
+
"qwen2-7b-instruct": "Qwen/Qwen2-7B-Instruct",
|
14 |
+
"qwen2-1.5b-instruct" : "Qwen/Qwen2-1.5B-Instruct",
|
15 |
+
"llama3-8b" : "meta-llama/Meta-Llama-3-8B-Instruct",
|
16 |
+
"mistral-nemo-instruct":"mistralai/Mistral-Nemo-Instruct-2407",
|
17 |
+
"zephyr-7b-beta":"HuggingFaceH4/zephyr-7b-beta"
|
18 |
}
|
19 |
|
20 |
AVAILABLE_MODELS = list(MODEL_MAP.keys())
|
|
|
38 |
# https://huggingface.co/CohereForAI/c4ai-command-r-plus-4bit/blob/main/tokenizer_config.json#L305
|
39 |
"command-r-plus": "<|END_OF_TURN_TOKEN|>",
|
40 |
# https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/tokenizer_config.json#L30
|
41 |
+
"qwen2-72b": "<|im_end|>",
|
42 |
+
"qwen2-7b-instruct": "<|im_end|>",
|
43 |
+
"qwen2-1.5b-instruct": "<|im_end|>",
|
44 |
|
45 |
"llama3-8b" : "<|eot_id|>",
|
46 |
+
"llama3-70b" : "<|eot_id|>",
|
47 |
+
"mistral-nemo-instruct": "</s>",
|
48 |
+
"zephyr-7b-beta":"</s>"
|
49 |
}
|
50 |
|
51 |
TOKEN_LIMIT_MAP = {
|
|
|
59 |
"llama3-70b": 8192,
|
60 |
"zephyr-141b": 2048,
|
61 |
"gpt-3.5-turbo": 8192,
|
62 |
+
"qwen2-72b": 32768,
|
63 |
+
"qwen2-7b-instruct": 32768,
|
64 |
+
"qwen2-1.5b-instruct": 32768,
|
65 |
"llama3-8b": 8192,
|
66 |
+
"mistral-nemo-instruct":128000,
|
67 |
+
"zephyr-7b-beta":32768,
|
68 |
}
|
69 |
|
70 |
TOKEN_RESERVED = 20
|
71 |
|
72 |
+
LLM_MODELS_DICTS = [
|
|
|
|
|
73 |
{
|
74 |
"id": "mixtral-8x7b",
|
75 |
"description": "[mistralai/Mixtral-8x7B-Instruct-v0.1]: https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1",
|
76 |
"object": "model",
|
77 |
"created": 1700000000,
|
78 |
"owned_by": "mistralai",
|
79 |
+
"type": "basic",
|
80 |
},
|
81 |
{
|
82 |
"id": "nous-mixtral-8x7b",
|
|
|
84 |
"object": "model",
|
85 |
"created": 1700000000,
|
86 |
"owned_by": "NousResearch",
|
87 |
+
"type": "basic",
|
88 |
},
|
89 |
{
|
90 |
"id": "mistral-7b",
|
|
|
92 |
"object": "model",
|
93 |
"created": 1700000000,
|
94 |
"owned_by": "mistralai",
|
95 |
+
"type": "basic",
|
96 |
},
|
97 |
{
|
98 |
"id": "yi-1.5-34b",
|
|
|
100 |
"object": "model",
|
101 |
"created": 1700000000,
|
102 |
"owned_by": "01-ai",
|
103 |
+
"type": "pro",
|
104 |
},
|
105 |
{
|
106 |
"id": "gemma-7b",
|
|
|
108 |
"object": "model",
|
109 |
"created": 1700000000,
|
110 |
"owned_by": "Google",
|
111 |
+
"type": "basic",
|
112 |
},
|
113 |
{
|
114 |
"id": "openchat-3.5",
|
115 |
"description": "[openchat/openchat-3.5-0106]: https://huggingface.co/openchat/openchat-3.5-0106",
|
116 |
"object": "model",
|
117 |
"created": 1700000000,
|
118 |
+
"owned_by": "openchat",
|
119 |
+
"type": "basic",
|
120 |
},
|
121 |
{
|
122 |
"id": "command-r-plus",
|
123 |
"description": "[CohereForAI/c4ai-command-r-plus]: https://huggingface.co/CohereForAI/c4ai-command-r-plus",
|
124 |
"object": "model",
|
125 |
"created": 1700000000,
|
126 |
+
"owned_by": "CohereForAI",
|
127 |
+
"type": "pro",
|
128 |
},
|
129 |
{
|
130 |
"id": "llama3-70b",
|
131 |
"description": "[meta-llama/Meta-Llama-3-70B]: https://huggingface.co/meta-llama/Meta-Llama-3-70B",
|
132 |
"object": "model",
|
133 |
"created": 1700000000,
|
134 |
+
"owned_by": "Meta",
|
135 |
+
"type": "pro",
|
136 |
},
|
137 |
{
|
138 |
"id": "zephyr-141b",
|
139 |
"description": "[HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1]: https://huggingface.co/HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
|
140 |
"object": "model",
|
141 |
"created": 1700000000,
|
142 |
+
"owned_by": "Huggingface",
|
143 |
+
"type": "pro",
|
144 |
},
|
145 |
{
|
146 |
"id": "gpt-3.5-turbo",
|
147 |
"description": "[openai/gpt-3.5-turbo]: https://platform.openai.com/docs/models/gpt-3-5-turbo",
|
148 |
"object": "model",
|
149 |
"created": 1700000000,
|
150 |
+
"owned_by": "OpenAI",
|
151 |
+
"type": "subscription",
|
152 |
},
|
153 |
{
|
154 |
+
"id": "qwen2-72b",
|
155 |
"description": "[Qwen/Qwen2-72B]: https://huggingface.co/Qwen/Qwen2-72B",
|
156 |
"object": "model",
|
157 |
"created": 1700000000,
|
158 |
+
"owned_by": "Qwen",
|
159 |
+
"type": "pro",
|
160 |
},
|
161 |
{
|
162 |
"id": "llama3-8b",
|
163 |
"description": "[meta-llama/Meta-Llama-3-8B]: https://huggingface.co/meta-llama/Meta-Llama-3-8B",
|
164 |
"object": "model",
|
165 |
"created": 1700000000,
|
166 |
+
"owned_by": "Meta",
|
167 |
+
"type": "basic",
|
168 |
},
|
169 |
{
|
170 |
+
"id": "qwen2-1.5b-instruct",
|
171 |
"description": "[Qwen/Qwen2-1.5B-Instruct]: https://huggingface.co/Qwen/Qwen2-1.5B-Instruct",
|
172 |
"object": "model",
|
173 |
"created": 1700000000,
|
174 |
+
"owned_by": "Qwen",
|
175 |
+
"type": "basic",
|
176 |
+
},
|
177 |
+
{
|
178 |
+
"id": "mistral-nemo-instruct",
|
179 |
+
"description": "[mistralai/Mistral-Nemo-Instruct-2407]: https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407",
|
180 |
+
"object": "model",
|
181 |
+
"created": 1700000000,
|
182 |
+
"owned_by": "mistralai",
|
183 |
+
"type": "basic",
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"id": "zephyr-7b-beta",
|
187 |
+
"description": "[HuggingFaceH4/zephyr-7b-beta]: https://huggingface.co/HuggingFaceH4/zephyr-7b-beta",
|
188 |
+
"object": "model",
|
189 |
+
"created": 1700000000,
|
190 |
+
"owned_by": "HuggingFaceH4",
|
191 |
+
"type": "basic",
|
192 |
},
|
193 |
+
]
|
194 |
+
|
195 |
+
|
196 |
+
EMBEDDINGS_MODELS_DICTS = [
|
197 |
{
|
198 |
"id": "nomic-text-embed",
|
199 |
"description": "[nomic-ai/nomic-embed-text-v1.5]: https://huggingface.co/nomic-ai/nomic-embed-text-v1.5",
|
|
|
208 |
"created": 1700000000,
|
209 |
"owned_by": "mixedbread-ai"
|
210 |
},
|
211 |
+
{
|
212 |
+
"id": "mixbread-ai/mxbai-embed-large-v1",
|
213 |
+
"description": "[mixedbread-ai/mxbai-embed-large-v1]: https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1",
|
214 |
+
"object": "embeddings",
|
215 |
+
"created": 1700000000,
|
216 |
+
"owned_by": "mixedbread-ai"
|
217 |
+
},
|
218 |
+
{
|
219 |
+
"id": "multilingual-e5-large-instruct",
|
220 |
+
"description": "[intfloat/multilingual-e5-large-instruct]: https://huggingface.co/intfloat/multilingual-e5-large-instruct",
|
221 |
+
"object": "embeddings",
|
222 |
+
"created": 1700000000,
|
223 |
+
"owned_by": "intfloat"
|
224 |
+
},
|
225 |
+
{
|
226 |
+
"id": "intfloat/multilingual-e5-large-instruct",
|
227 |
+
"description": "[intfloat/multilingual-e5-large-instruct]: https://huggingface.co/intfloat/multilingual-e5-large-instruct",
|
228 |
+
"object": "embeddings",
|
229 |
+
"created": 1700000000,
|
230 |
+
"owned_by": "intfloat"
|
231 |
+
},
|
232 |
]
|
233 |
+
|
234 |
+
|
235 |
+
# https://platform.openai.com/docs/api-reference/models/list
|
236 |
+
AVAILABLE_MODELS_DICTS = LLM_MODELS_DICTS + EMBEDDINGS_MODELS_DICTS
|