Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.
Python cliconsumer-gpudpofine-tuningggufhuggingfacellmllmopslocal-ailocal-llmloralow-vrammachine-learningollamapeftpythonpytorchqlorasfttransformers
fix: repair invalid recipe Hugging Face repo IDs (#1122) (#1132)
Parnika S Mb0b77cbabb61
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex d6b4008a..2d13bc6c 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -123,7 +123,7 @@ src/soup_cli/experiment/ - SQLite experiment trackingeval/ - Eval platform (custom tasks, LLM judge, human eval, leaderboard)migrate/ - Config migration (LLaMA-Factory, Axolotl, Unsloth)- recipes/ - Ready-made configs for popular models (174 recipes)+ recipes/ - Ready-made configs for popular models (172 recipes)autopilot/ - Zero-config decision engine (v0.25.0)registry/ - Model Registry (hashing, store, diff, attach) (v0.26.0 + v0.33.0)cans/ - Shareable .can artifact format + run/publish orchestrator (v0.26.0 + v0.33.0)diff --git a/changelog.d/0.75.1/1132.fixed.md b/changelog.d/0.75.1/1132.fixed.mdnew file mode 100644index 00000000..e5aad819--- /dev/null+++ b/changelog.d/0.75.1/1132.fixed.md@@ -0,0 +1 @@+- **Fix invalid Hugging Face base model IDs in shipped recipes (#1122).** Updated `devstral-sft` to `mistralai/Devstral-Small-2507`, `glm-4.6-sft` to `zai-org/GLM-4.6`, `granite-4-sft` to `ibm-granite/granite-4.0-h-tiny-base`, `internvl-3-5-sft` to `OpenGVLab/InternVL3_5-8B`, `kimi-k2-sft` to `moonshotai/Kimi-K2-Base`, `mistral-medium-3-5-sft` to `mistralai/Mistral-Medium-3.5-128B`, and `voxtral-sft` to `mistralai/Voxtral-Mini-3B-2507`. Removed `cogito-v2-sft` and `gemma3-9b-sft` because no compatible replacement base exists for their shipped recipe definitions. (#1122 by @parnika0110 in #1132)diff --git a/docs/commands.md b/docs/commands.mdindex e190b72c..13aec5dc 100644--- a/docs/commands.md+++ b/docs/commands.md@@ -178,7 +178,7 @@ soup migrate --from llamafactory config.yaml Import config from LLaMA-Factorysoup migrate --from axolotl config.yml Import config from Axolotlsoup migrate --from unsloth notebook.ipynb Import config from Unsloth notebooksoup migrate --from llamafactory c.yaml --dry-run Preview without writing-soup recipes list List all 174 ready-made recipes+soup recipes list List all 172 ready-made recipessoup recipes show llama3.1-8b-sft Print recipe YAMLsoup recipes use llama3.1-8b-sft Copy recipe to soup.yamlsoup recipes search "reasoning" Search by keyword/task/sizediff --git a/docs/serving-and-export.md b/docs/serving-and-export.mdindex af22afc5..ead1091b 100644--- a/docs/serving-and-export.md+++ b/docs/serving-and-export.md@@ -648,7 +648,7 @@ soup ui**Pages:**- **Dashboard** — view all experiment runs, loss charts, system info, multi-run comparison-- **New Training** — create configs from templates or 174 ready-made recipes, validate, start training with live SSE log streaming and progress bar+- **New Training** — create configs from templates or 172 ready-made recipes, validate, start training with live SSE log streaming and progress bar- **Data Explorer** — browse and inspect datasets (JSONL, JSON, CSV, Parquet)- **Model Chat** — chat with streaming responses, configurable temperature/top_p/max_tokens, system prompt, adapter selection, markdown rendering, chat export@@ -657,7 +657,7 @@ soup ui- **Enhanced Metrics** — 2x2 chart grid (loss, LR, grad_norm, throughput) + GPU memory chart, eval results table- **Multi-Run Compare** — overlay loss curves from up to 5 runs side-by-side- **Chat Upgrade** — SSE streaming via proxy, typing indicator, cancel button, markdown renderer (bold, italic, code blocks), chat export as JSON-- **Config Builder** — recipe dropdown (174 recipes), config schema API for dynamic form generation+- **Config Builder** — recipe dropdown (172 recipes), config schema API for dynamic form generationGradient norm is nullable: backends or steps that do not report it store andstream `null`, and the Web UI chart leaves a gap instead of drawing a falsediff --git a/src/soup_cli/recipes/catalog.py b/src/soup_cli/recipes/catalog.pyindex 1ed02591..9f02bd70 100644--- a/src/soup_cli/recipes/catalog.py+++ b/src/soup_cli/recipes/catalog.py@@ -48,7 +48,7 @@ def search_recipes(# ----------------------------------------------------------------------------# Recipe catalog (174 recipes)+# Recipe catalog (172 recipes)# ---------------------------------------------------------------------------RECIPES: Dict[str, RecipeMeta] = {@@ -515,34 +515,6 @@ training:quantization: 4bitdpo_beta: 0.1-output: ./output-""",- ),- "gemma3-9b-sft": RecipeMeta(- model="google/gemma-3-9b-it",- task="sft",- size="9B",- tags=("gemma", "google", "sft", "chat"),- description="Gemma 3 9B instruction tuning",- yaml_str="""\-base: google/gemma-3-9b-it-task: sft--data:- train: ./data/train.jsonl- format: auto- max_length: 2048--training:- epochs: 3- lr: 2e-4- batch_size: auto- lora:- r: 16- alpha: 32- target_modules: auto- quantization: 4bit-output: ./output""",),@@ -2796,13 +2768,13 @@ output: ./output""",),"glm-4.6-sft": RecipeMeta(- model="THUDM/glm-4.6",+ model="zai-org/GLM-4.6",task="sft",size="9B",- tags=("glm", "thudm", "chat", "instruction"),+ tags=("glm", "zai-org", "chat", "instruction"),description="GLM 4.6 instruction tuning with LoRA",yaml_str="""\-base: THUDM/glm-4.6+base: zai-org/GLM-4.6task: sftdata:@@ -2852,13 +2824,13 @@ output: ./output""",),"kimi-k2-sft": RecipeMeta(- model="moonshotai/Kimi-K2",+ model="moonshotai/Kimi-K2-Base",task="sft",size="N/A",tags=("kimi", "moonshot", "moe", "long-context"),description="Kimi K2 SFT (Moonshot MoE, long-context-aware)",yaml_str="""\-base: moonshotai/Kimi-K2+base: moonshotai/Kimi-K2-Basetask: sftdata:@@ -3012,13 +2984,13 @@ output: ./output# v0.51.0 Part B — Small / edge / specialist (~6 model families)# ------------------------------------------------------------------"granite-4-sft": RecipeMeta(- model="ibm-granite/granite-4.0-tiny-base",+ model="ibm-granite/granite-4.0-h-tiny-base",task="sft",- size="3B",+ size="7B",tags=("granite", "ibm", "small", "instruction"),description="IBM Granite 4.0 tiny SFT",yaml_str="""\-base: ibm-granite/granite-4.0-tiny-base+base: ibm-granite/granite-4.0-h-tiny-basetask: sftdata:@@ -3064,34 +3036,6 @@ training:target_modules: autoquantization: 4bit-output: ./output-""",- ),- "cogito-v2-sft": RecipeMeta(- model="deepcogito/cogito-v2-preview",- task="sft",- size="14B",- tags=("cogito", "deepcogito", "instruction"),- description="Cogito v2 preview SFT",- yaml_str="""\-base: deepcogito/cogito-v2-preview-task: sft--data:- train: ./data/train.jsonl- format: auto- max_length: 4096--training:- epochs: 3- lr: 2e-4- batch_size: auto- lora:- r: 16- alpha: 32- target_modules: auto- quantization: 4bit-output: ./output""",),@@ -3124,13 +3068,13 @@ output: ./output""",),"mistral-medium-3-5-sft": RecipeMeta(- model="mistralai/Mistral-Medium-3.5",+ model="mistralai/Mistral-Medium-3.5-128B",task="sft",- size="N/A",+ size="128B",tags=("mistral", "medium", "instruction", "large"),description="Mistral Medium 3.5 SFT",yaml_str="""\-base: mistralai/Mistral-Medium-3.5+base: mistralai/Mistral-Medium-3.5-128Btask: sftdata:@@ -3181,13 +3125,13 @@ output: ./output""",),"devstral-sft": RecipeMeta(- model="mistralai/Devstral-Small",+ model="mistralai/Devstral-Small-2507",task="sft",size="24B",tags=("mistral", "devstral", "code", "agent"),description="Devstral Small code/agent SFT",yaml_str="""\-base: mistralai/Devstral-Small+base: mistralai/Devstral-Small-2507task: sftdata:@@ -3328,13 +3272,13 @@ output: ./output""",),"internvl-3-5-sft": RecipeMeta(- model="OpenGVLab/InternVL3-5",+ model="OpenGVLab/InternVL3_5-8B",task="sft",size="8B",tags=("internvl", "vision", "multimodal", "opengvlab"),description="InternVL 3.5 vision SFT",yaml_str="""\-base: OpenGVLab/InternVL3-5+base: OpenGVLab/InternVL3_5-8Btask: sftmodality: vision@@ -3359,13 +3303,13 @@ output: ./output""",),"voxtral-sft": RecipeMeta(- model="mistralai/Voxtral-Mini-3B",+ model="mistralai/Voxtral-Mini-3B-2507",task="sft",size="3B",tags=("mistral", "voxtral", "audio", "multimodal"),description="Voxtral Mini 3B audio SFT",yaml_str="""\-base: mistralai/Voxtral-Mini-3B+base: mistralai/Voxtral-Mini-3B-2507task: sftmodality: audiodiff --git a/tests/fixtures/recipe_base_architectures.json b/tests/fixtures/recipe_base_architectures.jsonindex b179a809..a311f58b 100644--- a/tests/fixtures/recipe_base_architectures.json+++ b/tests/fixtures/recipe_base_architectures.json@@ -43,8 +43,9 @@"model_type": "internvl_chat","routed_experts": 0},- "OpenGVLab/InternVL3-5": {- "unresolvable": "repo not found or not publicly readable (see #677)"+ "OpenGVLab/InternVL3_5-8B": {+ "model_type": "internvl_chat",+ "routed_experts": 0},"OuteAI/OuteTTS-0.3-500M": {"model_type": "qwen2",@@ -196,9 +197,6 @@"SparkAudio/Spark-TTS-0.5B": {"unresolvable": "the repo has no config.json"},- "THUDM/glm-4.6": {- "unresolvable": "repo not found or not publicly readable (see #677)"- },"baichuan-inc/Baichuan2-13B-Chat": {"model_type": "baichuan","routed_experts": 0@@ -214,9 +212,6 @@"model_type": "llama","routed_experts": 0},- "deepcogito/cogito-v2-preview": {- "unresolvable": "repo not found or not publicly readable (see #677)"- },"deepseek-ai/DeepSeek-OCR": {"model_type": "deepseek_vl_v2","routed_experts": 64@@ -280,14 +275,12 @@"google/gemma-3-27b-it": {"unresolvable": "gated; set HF_TOKEN to classify"},- "google/gemma-3-9b-it": {- "unresolvable": "repo not found or not publicly readable (see #677)"- },"google/medgemma-4b-it": {"unresolvable": "gated; set HF_TOKEN to classify"},- "ibm-granite/granite-4.0-tiny-base": {- "unresolvable": "repo not found or not publicly readable (see #677)"+ "ibm-granite/granite-4.0-h-tiny-base": {+ "model_type": "granitemoehybrid",+ "routed_experts": 64},"ise-uiuc/Magicoder-S-DS-6.7B": {"model_type": "llama",@@ -332,8 +325,9 @@"model_type": "phi3","routed_experts": 0},- "mistralai/Devstral-Small": {- "unresolvable": "repo not found or not publicly readable (see #677)"+ "mistralai/Devstral-Small-2507": {+ "model_type": "mistral",+ "routed_experts": 0},"mistralai/Magistral-Small": {"model_type": "mistral",@@ -354,8 +348,9 @@"mistralai/Mistral-Large-3-675B-Instruct-2512": {"unresolvable": "the repo has no config.json"},- "mistralai/Mistral-Medium-3.5": {- "unresolvable": "repo not found or not publicly readable (see #677)"+ "mistralai/Mistral-Medium-3.5-128B": {+ "model_type": "mistral3",+ "routed_experts": 0},"mistralai/Mistral-Small-24B-Instruct-2501": {"model_type": "mistral",@@ -364,8 +359,9 @@"mistralai/Pixtral-12B-2409": {"unresolvable": "the repo has no config.json"},- "mistralai/Voxtral-Mini-3B": {- "unresolvable": "repo not found or not publicly readable (see #677)"+ "mistralai/Voxtral-Mini-3B-2507": {+ "model_type": "voxtral",+ "routed_experts": 0},"mlx-community/Llama-3.1-8B-Instruct-4bit": {"model_type": "llama",@@ -379,8 +375,9 @@"model_type": "gemma3","routed_experts": 0},- "moonshotai/Kimi-K2": {- "unresolvable": "repo not found or not publicly readable (see #677)"+ "moonshotai/Kimi-K2-Base": {+ "model_type": "kimi_k2",+ "routed_experts": 384},"moonshotai/Kimi-K2-Thinking": {"model_type": "kimi_k2",@@ -424,6 +421,10 @@"model_type": "mpnet","routed_experts": 0},+ "zai-org/GLM-4.6": {+ "model_type": "glm4_moe",+ "routed_experts": 160+ },"zai-org/GLM-5": {"model_type": "glm_moe_dsa","routed_experts": 256diff --git a/tests/fixtures/recipe_config_snapshots.json b/tests/fixtures/recipe_config_snapshots.jsonindex 516a1f7c..71d1c6d6 100644--- a/tests/fixtures/recipe_config_snapshots.json+++ b/tests/fixtures/recipe_config_snapshots.json@@ -346,15 +346,6 @@"training.lora.r": 32,"training.lr": 5e-06},- "cogito-v2-sft": {- "base": "deepcogito/cogito-v2-preview",- "data.format": "auto",- "data.max_length": 4096,- "data.train": "./data/train.jsonl",- "training.lora.alpha": 32,- "training.lora.r": 16,- "training.lr": 0.0002- },"deepseek-ocr-sft": {"base": "deepseek-ai/DeepSeek-OCR","data.format": "llava",@@ -544,7 +535,7 @@"training.moe_lora": true},"devstral-sft": {- "base": "mistralai/Devstral-Small",+ "base": "mistralai/Devstral-Small-2507","data.format": "auto","data.max_length": 8192,"data.train": "./data/code_train.jsonl",@@ -604,16 +595,8 @@"training.lora.r": 16,"training.lr": 0.0001},- "gemma3-9b-sft": {- "base": "google/gemma-3-9b-it",- "data.format": "auto",- "data.train": "./data/train.jsonl",- "training.lora.alpha": 32,- "training.lora.r": 16,- "training.lr": 0.0002- },"glm-4.6-sft": {- "base": "THUDM/glm-4.6",+ "base": "zai-org/GLM-4.6","data.format": "auto","data.max_length": 4096,"data.train": "./data/train.jsonl",@@ -699,7 +682,7 @@"training.lr": 0.0001},"granite-4-sft": {- "base": "ibm-granite/granite-4.0-tiny-base",+ "base": "ibm-granite/granite-4.0-h-tiny-base","data.format": "auto","data.train": "./data/train.jsonl","training.lora.alpha": 32,@@ -767,7 +750,7 @@"training.lr": 1e-05},"internvl-3-5-sft": {- "base": "OpenGVLab/InternVL3-5",+ "base": "OpenGVLab/InternVL3_5-8B","data.format": "llava","data.image_dir": "./data/images","data.max_length": 4096,@@ -779,7 +762,7 @@"training.lr": 1e-05},"kimi-k2-sft": {- "base": "moonshotai/Kimi-K2",+ "base": "moonshotai/Kimi-K2-Base","data.format": "auto","data.max_length": 8192,"data.train": "./data/train.jsonl",@@ -1310,7 +1293,7 @@"training.moe_lora": true},"mistral-medium-3-5-sft": {- "base": "mistralai/Mistral-Medium-3.5",+ "base": "mistralai/Mistral-Medium-3.5-128B","data.format": "auto","data.max_length": 4096,"data.train": "./data/train.jsonl",@@ -2162,7 +2145,7 @@"training.tts_family": "spark"},"voxtral-sft": {- "base": "mistralai/Voxtral-Mini-3B",+ "base": "mistralai/Voxtral-Mini-3B-2507","data.audio_dir": "./data/audio","data.format": "audio","data.train": "./data/audio_train.jsonl",diff --git a/tests/recipe_count.py b/tests/recipe_count.pyindex c98e7494..0bcf0a76 100644--- a/tests/recipe_count.py+++ b/tests/recipe_count.py@@ -9,7 +9,7 @@ the catalog, in ``tests/test_recipe_count_is_synced.py``.from __future__ import annotations-EXPECTED_RECIPE_COUNT = 174+EXPECTED_RECIPE_COUNT = 172def recipe_count_hint(actual: int) -> str:diff --git a/tests/test_issue1070_moe_target_modules.py b/tests/test_issue1070_moe_target_modules.pyindex df61be09..dac6f770 100644--- a/tests/test_issue1070_moe_target_modules.py+++ b/tests/test_issue1070_moe_target_modules.py@@ -438,10 +438,6 @@ UNRESOLVABLE_MOE_RECIPE_BASES = {"the repo exists and lists consolidated-*.safetensors but has no ""config.json (404), so AutoConfig cannot load it at all"),- "moonshotai/Kimi-K2": (- "401 unauthenticated, while moonshotai/Kimi-K2.5 and Kimi-K2.6 resolve "- "from the same org -- gated or gone, not decidable from here"- ),}@@ -532,19 +528,19 @@ class TestTheRatchet:assert all("unresolvable" in record[b] for b in UNRESOLVABLE_MOE_RECIPE_BASES)assert set(UNRESOLVABLE_MOE_RECIPE_BASES) <= _flagged_bases()assert len(EXCLUDED_MOE_BASES) == 1- assert len(UNRESOLVABLE_MOE_RECIPE_BASES) == 2+ assert len(UNRESOLVABLE_MOE_RECIPE_BASES) == 1def test_the_record_has_the_measured_shape(self):"""If regeneration silently lost bases or experts, the tests above wouldpass while checking less. Pinned to the numbers the reviewer derived- independently: 117 bases, 20 MoE, 6 of them flagless, 11 model types."""+ independently: 114 bases, 23 MoE, 8 of them flagless, 13 model types."""moe = _moe_bases()flagless = [b for b in moe if b not in _flagged_bases()]- assert len(_record()) == 116- assert len(moe) == 20- assert len(flagless) == 6, sorted(flagless)- assert len({info["model_type"] for info in moe.values()}) == 11+ assert len(_record()) == 114+ assert len(moe) == 23+ assert len(flagless) == 8, sorted(flagless)+ assert len({info["model_type"] for info in moe.values()}) == 13#: Text SFT/pretrain and the preference/RL trainers; #1148's six are driven in test_issue1099.diff --git a/tests/test_recipes.py b/tests/test_recipes.pyindex 70f374ae..b9b8379c 100644--- a/tests/test_recipes.py+++ b/tests/test_recipes.py@@ -108,6 +108,19 @@ class TestRecipeCatalog:f"Recipe '{name}' task mismatch: meta={recipe.task}, yaml={yaml_task}")+ def test_recipe_models_match_yaml_base(self):+ """Recipe.model matches the base model in the YAML content."""+ import yaml++ from soup_cli.recipes.catalog import RECIPES++ for name, recipe in RECIPES.items():+ parsed = yaml.safe_load(recipe.yaml_str)+ yaml_base = parsed.get("base")+ assert recipe.model == yaml_base, (+ f"Recipe '{name}' model mismatch: "+ f"meta={recipe.model}, yaml={yaml_base}"+ )# ---------------------------------------------------------------------------# CLI testsdiff --git a/tests/test_v0510.py b/tests/test_v0510.pyindex 1274539f..50cddde6 100644--- a/tests/test_v0510.py+++ b/tests/test_v0510.py@@ -471,7 +471,7 @@ V0510_RECIPE_NAMES = ["kimi-k2-sft", "kimi-k2-thinking-grpo", "minimax-m2-sft","qwq-32b-grpo", "qvq-72b-sft",# Part B — small / specialist- "granite-4-sft", "lfm2-sft", "cogito-v2-sft", "mistral-small-3-sft",+ "granite-4-sft", "lfm2-sft", "mistral-small-3-sft","mistral-medium-3-5-sft", "magistral-small-sft", "devstral-sft","ministral-sft", "medgemma-sft", "embedding-gemma-sft",# Part C — vision / multimodal