MODEL_MAP = { "mixtral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1", "default": "meta-llama/Llama-3.3-70B-Instruct", "Llama-3.3-70B-Instruct": "meta-llama/Llama-3.3-70B-Instruct", "Qwen2.5-72B-Instruct": "Qwen/Qwen2.5-72B-Instruct", "c4ai-command-r-plus-08-2024": "CohereForAI/c4ai-command-r-plus-08-2024", "DeepSeek-R1-Distill-Qwen-32B": "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", "Llama-3.1-Nemotron-70B-Instruct-HF": "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF", "QwQ-32B-Preview": "Qwen/QwQ-32B-Preview", "Qwen2.5-Coder-32B-Instruct": "Qwen/Qwen2.5-Coder-32B-Instruct", "Llama-3.2-11B-Vision-Instruct": "meta-llama/Llama-3.2-11B-Vision-Instruct", "Hermes-3-Llama-3.1-8B": "NousResearch/Hermes-3-Llama-3.1-8B", "Mistral-Nemo-Instruct-2407": "mistralai/Mistral-Nemo-Instruct-2407", "Phi-3.5-mini-instruct": "microsoft/Phi-3.5-mini-instruct", "nous-mixtral-8x7b": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO", "mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2", "yi-1.5-34b": "01-ai/Yi-1.5-34B-Chat", "gemma-7b": "google/gemma-1.1-7b-it", } # { # "mixtral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1", # [Recommended] # "nous-mixtral-8x7b": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO", # "mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2", # "yi-1.5-34b": "01-ai/Yi-1.5-34B-Chat", # "gemma-7b": "google/gemma-1.1-7b-it", # # "openchat-3.5": "openchat/openchat-3.5-0106", # # "command-r-plus": "CohereForAI/c4ai-command-r-plus", # # "llama3-70b": "meta-llama/Meta-Llama-3-70B-Instruct", # # "zephyr-141b": "HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1", # "default": "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO", # } AVAILABLE_MODELS = list(MODEL_MAP.keys()) PRO_MODELS = ["command-r-plus", "llama3-70b", "zephyr-141b"] STOP_SEQUENCES_MAP = { # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1/blob/main/tokenizer_config.json#L33 "mixtral-8x7b": "", # https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO/blob/main/tokenizer_config.json#L50 "nous-mixtral-8x7b": "<|im_end|>", # https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2/blob/main/tokenizer_config.json#L33 "mistral-7b": "", # https://huggingface.co/01-ai/Yi-1.5-34B-Chat/blob/main/tokenizer_config.json#L42 "yi-1.5-34b": "<|im_end|>", # https://huggingface.co/google/gemma-1.1-7b-it/blob/main/tokenizer_config.json#L1509 "gemma-7b": "", # https://huggingface.co/huihui-ai/Llama-3.3-70B-Instruct-abliterated/blob/fa13334669544bab573e0e5313cad629a9c02e2c/tokenizer_config.json#L2055 "Llama-3.3-70B-Instruct": "<|eot_id|>", # https://huggingface.co/google/gemma-1.1-7b-it/blob/main/tokenizer_config.json#L1509 "c4ai-command-r-plus-08-2024": "<|END_OF_TURN_TOKEN|>", # https://huggingface.co/unsloth/Qwen2.5-72B-Instruct/blob/main/tokenizer_config.json "Qwen2.5-72B-Instruct":"<|im_end|>", # https://huggingface.co/unsloth/DeepSeek-R1-Distill-Qwen-32B/blob/main/tokenizer_config.json "DeepSeek-R1-Distill-Qwen-32B":"<|end▁of▁sentence|>", # "openchat-3.5": "<|end_of_turn|>", # "command-r-plus": "<|END_OF_TURN_TOKEN|>", } TOKEN_LIMIT_MAP = { "mixtral-8x7b": 32768, "nous-mixtral-8x7b": 32768, "mistral-7b": 32768, "yi-1.5-34b": 4096, "gemma-7b": 8192, "Llama-3.3-70B-Instruct": 131072, "c4ai-command-r-plus-08-2024":1000000000000000019884624838656, "Qwen2.5-72B-Instruct":131072, "DeepSeek-R1-Distill-Qwen-32B":131072, # "openchat-3.5": 8192, # "command-r-plus": 32768, # "llama3-70b": 8192, # "zephyr-141b": 2048, # "gpt-3.5-turbo": 8192, } TOKEN_RESERVED = 20 # https://platform.openai.com/docs/api-reference/models/list AVAILABLE_MODELS_DICTS = [ { "id": "Llama-3.3-70B-Instruct", "description": "[meta-llama/Llama-3.3-70B-Instruct]: https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct", "object": "model", "created": 1700000000, "owned_by": "meta-llama" }, { "id": "Qwen2.5-72B-Instruct", "description": "[Qwen/Qwen2.5-72B-Instruct]: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct", "object": "model", "created": 1700000000, "owned_by": "Qwen" }, { "id": "c4ai-command-r-plus-08-2024", "description": "[CohereForAI/c4ai-command-r-plus-08-2024]: https://huggingface.co/CohereForAI/c4ai-command-r-plus-08-2024", "object": "model", "created": 1700000000, "owned_by": "CohereForAI" }, { "id": "DeepSeek-R1-Distill-Qwen-32B", "description": "[deepseek-ai/DeepSeek-R1-Distill-Qwen-32B]: https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", "object": "model", "created": 1700000000, "owned_by": "deepseek-ai" }, { "id": "Llama-3.1-Nemotron-70B-Instruct-HF", "description": "[nvidia/Llama-3.1-Nemotron-70B-Instruct-HF]: https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF", "object": "model", "created": 1700000000, "owned_by": "nvidia" }, { "id": "QwQ-32B-Preview", "description": "[Qwen/QwQ-32B-Preview]: https://huggingface.co/Qwen/QwQ-32B-Preview", "object": "model", "created": 1700000000, "owned_by": "Qwen" }, { "id": "Qwen2.5-Coder-32B-Instruct", "description": "[Qwen/Qwen2.5-Coder-32B-Instruct]: https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct", "object": "model", "created": 1700000000, "owned_by": "Qwen" }, { "id": "Llama-3.2-11B-Vision-Instruct", "description": "[meta-llama/Llama-3.2-11B-Vision-Instruct]: https://huggingface.co/meta-llama/Llama-3.2-11B-Vision-Instruct", "object": "model", "created": 1700000000, "owned_by": "meta-llama" }, { "id": "Hermes-3-Llama-3.1-8B", "description": "[NousResearch/Hermes-3-Llama-3.1-8B]: https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B", "object": "model", "created": 1700000000, "owned_by": "NousResearch" }, { "id": "Mistral-Nemo-Instruct-2407", "description": "[mistralai/Mistral-Nemo-Instruct-2407]: https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407", "object": "model", "created": 1700000000, "owned_by": "mistralai" }, { "id": "Phi-3.5-mini-instruct", "description": "[microsoft/Phi-3.5-mini-instruct]: https://huggingface.co/microsoft/Phi-3.5-mini-instruct", "object": "model", "created": 1700000000, "owned_by": "microsoft" } ] ''' https://huggingface.co/chat/models var links = document.querySelectorAll('div.relative a'); var mlist=[]; links.forEach(link=>{ mlist.push(link.href.split('https://huggingface.co/chat/models/')[1]) }) p_MODEL_MAP(mlist); p_AVAILABLE_MODELS_DICTS(mlist); function p_MODEL_MAP(mlist){ let d = {} mlist.forEach(m=>{ d[m.split('/')[1]]=m }); console.log(d) return d } function p_AVAILABLE_MODELS_DICTS(mlist){ let d = [] mlist.forEach(m=>{ d.push({ "id": m.split('/')[1], "description": `[${m}]: https://huggingface.co/${m}`, "object": "model", "created": 1700000000, "owned_by": m.split('/')[0], },) }); console.log(d) return d } '''