Spaces:
Running
Running
Husnain
commited on
Commit
•
7db5a18
1
Parent(s):
8cfcd80
♻️ [Refactor] Move AVAILABLE_MODELS(_DICTS) to constants
Browse files- constants/models.py +75 -0
constants/models.py
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MODEL_MAP = {
|
2 |
+
"mixtral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1", # [Recommended]
|
3 |
+
"nous-mixtral-8x7b": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
|
4 |
+
"mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2",
|
5 |
+
"openchat-3.5": "openchat/openchat-3.5-0106",
|
6 |
+
"gemma-7b": "google/gemma-7b-it",
|
7 |
+
"default": "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
8 |
+
}
|
9 |
+
|
10 |
+
|
11 |
+
STOP_SEQUENCES_MAP = {
|
12 |
+
"mixtral-8x7b": "</s>",
|
13 |
+
"nous-mixtral-8x7b": "<|im_end|>",
|
14 |
+
"mistral-7b": "</s>",
|
15 |
+
"openchat-3.5": "<|end_of_turn|>",
|
16 |
+
"gemma-7b": "<eos>",
|
17 |
+
}
|
18 |
+
|
19 |
+
TOKEN_LIMIT_MAP = {
|
20 |
+
"mixtral-8x7b": 32768,
|
21 |
+
"nous-mixtral-8x7b": 32768,
|
22 |
+
"mistral-7b": 32768,
|
23 |
+
"openchat-3.5": 8192,
|
24 |
+
"gemma-7b": 8192,
|
25 |
+
}
|
26 |
+
|
27 |
+
TOKEN_RESERVED = 20
|
28 |
+
|
29 |
+
|
30 |
+
AVAILABLE_MODELS = [
|
31 |
+
"mixtral-8x7b",
|
32 |
+
"nous-mixtral-8x7b",
|
33 |
+
"mistral-7b",
|
34 |
+
"openchat-3.5",
|
35 |
+
"gemma-7b",
|
36 |
+
]
|
37 |
+
|
38 |
+
# https://platform.openai.com/docs/api-reference/models/list
|
39 |
+
AVAILABLE_MODELS_DICTS = [
|
40 |
+
{
|
41 |
+
"id": "mixtral-8x7b",
|
42 |
+
"description": "[mistralai/Mixtral-8x7B-Instruct-v0.1]: https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1",
|
43 |
+
"object": "model",
|
44 |
+
"created": 1700000000,
|
45 |
+
"owned_by": "mistralai",
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"id": "nous-mixtral-8x7b",
|
49 |
+
"description": "[NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO]: https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
|
50 |
+
"object": "model",
|
51 |
+
"created": 1700000000,
|
52 |
+
"owned_by": "NousResearch",
|
53 |
+
},
|
54 |
+
{
|
55 |
+
"id": "mistral-7b",
|
56 |
+
"description": "[mistralai/Mistral-7B-Instruct-v0.2]: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2",
|
57 |
+
"object": "model",
|
58 |
+
"created": 1700000000,
|
59 |
+
"owned_by": "mistralai",
|
60 |
+
},
|
61 |
+
{
|
62 |
+
"id": "openchat-3.5",
|
63 |
+
"description": "[openchat/openchat-3.5-0106]: https://huggingface.co/openchat/openchat-3.5-0106",
|
64 |
+
"object": "model",
|
65 |
+
"created": 1700000000,
|
66 |
+
"owned_by": "openchat",
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"id": "gemma-7b",
|
70 |
+
"description": "[google/gemma-7b-it]: https://huggingface.co/google/gemma-7b-it",
|
71 |
+
"object": "model",
|
72 |
+
"created": 1700000000,
|
73 |
+
"owned_by": "Google",
|
74 |
+
},
|
75 |
+
]
|