Spaces:
Runtime error
Runtime error
Update constants/models.py
Browse files- constants/models.py +57 -47
constants/models.py
CHANGED
|
@@ -4,16 +4,17 @@ MODEL_MAP = {
|
|
| 4 |
"mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2",
|
| 5 |
"yi-1.5-34b": "01-ai/Yi-1.5-34B-Chat",
|
| 6 |
"gemma-7b": "google/gemma-1.1-7b-it",
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
"default": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
AVAILABLE_MODELS = list(MODEL_MAP.keys())
|
| 15 |
|
| 16 |
-
PRO_MODELS = ["command-r-plus", "llama3-70b", "zephyr-141b"]
|
| 17 |
|
| 18 |
STOP_SEQUENCES_MAP = {
|
| 19 |
# https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1/blob/main/tokenizer_config.json#L33
|
|
@@ -26,8 +27,9 @@ STOP_SEQUENCES_MAP = {
|
|
| 26 |
"yi-1.5-34b": "<|im_end|>",
|
| 27 |
# https://huggingface.co/google/gemma-1.1-7b-it/blob/main/tokenizer_config.json#L1509
|
| 28 |
"gemma-7b": "<eos>",
|
| 29 |
-
|
| 30 |
-
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
TOKEN_LIMIT_MAP = {
|
|
@@ -36,11 +38,12 @@ TOKEN_LIMIT_MAP = {
|
|
| 36 |
"mistral-7b": 32768,
|
| 37 |
"yi-1.5-34b": 4096,
|
| 38 |
"gemma-7b": 8192,
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
TOKEN_RESERVED = 20
|
|
@@ -83,39 +86,46 @@ AVAILABLE_MODELS_DICTS = [
|
|
| 83 |
"created": 1700000000,
|
| 84 |
"owned_by": "Google",
|
| 85 |
},
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
]
|
|
|
|
| 4 |
"mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2",
|
| 5 |
"yi-1.5-34b": "01-ai/Yi-1.5-34B-Chat",
|
| 6 |
"gemma-7b": "google/gemma-1.1-7b-it",
|
| 7 |
+
"openchat-3.5": "openchat/openchat-3.5-0106",
|
| 8 |
+
"command-r-plus": "CohereForAI/c4ai-command-r-plus",
|
| 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-Instruct": "Qwen/Qwen2-72B-Instruct",
|
| 13 |
}
|
| 14 |
|
| 15 |
AVAILABLE_MODELS = list(MODEL_MAP.keys())
|
| 16 |
|
| 17 |
+
PRO_MODELS = ["command-r-plus", "llama3-70b", "zephyr-141b", "Qwen/Qwen2-72B-Instruct"]
|
| 18 |
|
| 19 |
STOP_SEQUENCES_MAP = {
|
| 20 |
# https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1/blob/main/tokenizer_config.json#L33
|
|
|
|
| 27 |
"yi-1.5-34b": "<|im_end|>",
|
| 28 |
# https://huggingface.co/google/gemma-1.1-7b-it/blob/main/tokenizer_config.json#L1509
|
| 29 |
"gemma-7b": "<eos>",
|
| 30 |
+
"openchat-3.5": "<|end_of_turn|>",
|
| 31 |
+
"command-r-plus": "<|END_OF_TURN_TOKEN|>",
|
| 32 |
+
"Qwen2-72B-Instruct": "<|im_end|>",
|
| 33 |
}
|
| 34 |
|
| 35 |
TOKEN_LIMIT_MAP = {
|
|
|
|
| 38 |
"mistral-7b": 32768,
|
| 39 |
"yi-1.5-34b": 4096,
|
| 40 |
"gemma-7b": 8192,
|
| 41 |
+
"openchat-3.5": 8192,
|
| 42 |
+
"command-r-plus": 32768,
|
| 43 |
+
"llama3-70b": 8192,
|
| 44 |
+
"zephyr-141b": 2048,
|
| 45 |
+
"gpt-3.5-turbo": 8192,
|
| 46 |
+
"Qwen2-72B-Instruct": 32768
|
| 47 |
}
|
| 48 |
|
| 49 |
TOKEN_RESERVED = 20
|
|
|
|
| 86 |
"created": 1700000000,
|
| 87 |
"owned_by": "Google",
|
| 88 |
},
|
| 89 |
+
{
|
| 90 |
+
"id": "openchat-3.5",
|
| 91 |
+
"description": "[openchat/openchat-3.5-0106]: https://huggingface.co/openchat/openchat-3.5-0106",
|
| 92 |
+
"object": "model",
|
| 93 |
+
"created": 1700000000,
|
| 94 |
+
"owned_by": "openchat"
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"id": "command-r-plus",
|
| 98 |
+
"description": "[CohereForAI/c4ai-command-r-plus]: https://huggingface.co/CohereForAI/c4ai-command-r-plus",
|
| 99 |
+
"object": "model",
|
| 100 |
+
"created": 1700000000,
|
| 101 |
+
"owned_by": "CohereForAI"
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"id": "llama3-70b",
|
| 105 |
+
"description": "[meta-llama/Meta-Llama-3-70B]: https://huggingface.co/meta-llama/Meta-Llama-3-70B",
|
| 106 |
+
"object": "model",
|
| 107 |
+
"created": 1700000000,
|
| 108 |
+
"owned_by": "Meta"
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"id": "zephyr-141b",
|
| 112 |
+
"description": "[HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1]: https://huggingface.co/HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
|
| 113 |
+
"object": "model",
|
| 114 |
+
"created": 1700000000,
|
| 115 |
+
"owned_by": "Huggingface"
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"id": "gpt-3.5-turbo",
|
| 119 |
+
"description": "[openai/gpt-3.5-turbo]: https://platform.openai.com/docs/models/gpt-3-5-turbo",
|
| 120 |
+
"object": "model",
|
| 121 |
+
"created": 1700000000,
|
| 122 |
+
"owned_by": "OpenAI"
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"id": "gpt-3.5-turbo",
|
| 126 |
+
"description": "[Qwen/Qwen2-72B-Instruct]: https://huggingface.co/Qwen/Qwen2-72B-Instruct",
|
| 127 |
+
"object": "model",
|
| 128 |
+
"created": 1700000000,
|
| 129 |
+
"owned_by": "Qwen"
|
| 130 |
+
}
|
| 131 |
]
|