Datasets:
Download scripts/make_models_spec.py from divy123/sequential-router-v2: direct link, hf CLI and curl.
- Browser
- Download file 1.86 kB
-
https://huggingface.co/datasets/divy123/sequential-router-v2/resolve/main/scripts/make_models_spec.py
- Command line
-
hf download hf://datasets/divy123/sequential-router-v2/scripts/make_models_spec.py
-
curl -L -o make_models_spec.py https://huggingface.co/datasets/divy123/sequential-router-v2/resolve/main/scripts/make_models_spec.py
1.86 kB
| import json | |
| req = {m["id"]: m for m in json.load(open("/mnt/localssd/seqroute1m/scripts/models_requested.json"))} | |
| NOTHINK = {"enable_thinking": False} | |
| MM = ["--limit-mm-per-prompt", json.dumps({"image": 0, "video": 0, "audio": 0})] | |
| over = { | |
| "qwen3_0p6b": dict(ctk=NOTHINK), "qwen3_1p7b": dict(ctk=NOTHINK), "qwen3_4b": dict(ctk=NOTHINK), "qwen3_8b": dict(ctk=NOTHINK), "qwen3_14b": dict(ctk=NOTHINK), | |
| "qwen3_32b": dict(ctk=NOTHINK, tp=2), | |
| "r1_distill_qwen_7b": dict(temperature=0.6, top_p=0.95), "r1_distill_qwen_14b": dict(temperature=0.6, top_p=0.95), | |
| "phi4_mini_reasoning": dict(temperature=0.8, top_p=0.95), | |
| "gpt_oss_20b": dict(temperature=1.0, ctk={"reasoning_effort": "low"}, serve_args=["--reasoning-parser", "openai_gptoss"]), | |
| "olmo3_7b": dict(serve_args=["--chat-template", "/mnt/localssd/seqroute1m/templates/olmo3_7b.jinja"]), | |
| "gemma3_4b": dict(serve_args=MM), "gemma3_12b": dict(serve_args=MM), "ministral3_8b": dict(serve_args=MM), | |
| "magistral_small_24b": dict(temperature=0.7, top_p=0.95, serve_args=["--tokenizer-mode", "mistral", "--reasoning-parser", "mistral"] + MM, system=open("/mnt/localssd/models/magistral_small_24b/SYSTEM_PROMPT.txt").read()), | |
| } | |
| out = [] | |
| for mid, m in req.items(): | |
| o = over.get(mid, {}) | |
| out.append(dict(id=mid, family=m["family"], repo=m["repo"], requested=m["requested"], replacement_reason=m.get("reason"), params_b=m["params_b"], active_params_b=m.get("active_params_b", m["params_b"]), | |
| reasoning=m["reasoning"], tp=o.get("tp", 1), temperature=o.get("temperature", 0.0), top_p=o.get("top_p", 1.0), chat_template_kwargs=o.get("ctk", {}), | |
| serve_args=o.get("serve_args", []), max_model_len=16384, system=o.get("system"), fallback=m.get("fallback"))) | |
| json.dump(out, open("/mnt/localssd/seqroute1m/scripts/models_spec.json", "w"), indent=1) | |
| print(len(out), "models") | |