Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

fix(recipes): drop the recipes that cannot load; MiniMax-M3 SFT loads through the vision path (#1145) (#1398)

Srinivasan R4b5f4a3cda36
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b29eba09..a54128c3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -123,7 +123,7 @@ src/soup_cli/
experiment/ - SQLite experiment tracking
eval/ - Eval platform (custom tasks, LLM judge, human eval, leaderboard)
migrate/ - Config migration (LLaMA-Factory, Axolotl, Unsloth)
- recipes/ - Ready-made configs for popular models (173 recipes)
+ recipes/ - Ready-made configs for popular models (170 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/1398.fixed.md b/changelog.d/0.75.1/1398.fixed.md
new file mode 100644
index 00000000..23a4c82a
--- /dev/null
+++ b/changelog.d/0.75.1/1398.fixed.md
@@ -0,0 +1,2 @@
+- **Recipes that could not load their model are fixed or removed (#1145 by @Srinivasan8888 in #1398).**
+ `mistral-large-3-sft` and `mistral-large-3-dpo` are removed: `mistralai` publishes Mistral-Large-3 in the native `params.json` + `consolidated-*` layout with no `config.json`, which `AutoConfig` cannot read (`docs/models.md` names the Hugging Face-format conversion that exists on the Hub). `minimax-m3-sft` now sets `modality: vision`, so SFT builds its vision-language wrapper and LoRA stays on the language tower; its processor is custom code, so it needs `soup train --trust-remote-code`. `minimax-m3-dpo` is removed, since the DPO trainer cannot load that wrapper (#1393). The catalog loses three recipes.
diff --git a/docs/commands.md b/docs/commands.md
index a23f0e35..4602819d 100644
--- a/docs/commands.md
+++ b/docs/commands.md
@@ -181,7 +181,7 @@ soup migrate --from llamafactory config.yaml Import config from LLaMA-Factory
soup migrate --from axolotl config.yml Import config from Axolotl
soup migrate --from unsloth notebook.ipynb Import config from Unsloth notebook
soup migrate --from llamafactory c.yaml --dry-run Preview without writing
-soup recipes list List all 173 ready-made recipes
+soup recipes list List all 170 ready-made recipes
soup recipes show llama3.1-8b-sft Print recipe YAML
soup recipes use llama3.1-8b-sft Copy recipe to soup.yaml
soup recipes search "reasoning" Search by keyword/task/size
diff --git a/docs/models.md b/docs/models.md
index ef334019..8e04b45c 100644
--- a/docs/models.md
+++ b/docs/models.md
@@ -26,7 +26,7 @@ Soup works with **any** of the **340,000+** text-generation models on [HuggingFa
| **Kimi** | Kimi-K2, Kimi-K2.5, Kimi-K2.6 | ~1T (MoE) | Long-context agentic, MoE |
| **MiniMax** | MiniMax-M2, MiniMax-M3 | 230B–428B | Agentic, MoE (community license) |
| **Phi-4** | Phi-4-14B, Phi-4-mini-reasoning | 3.8B–14B | Compact reasoning |
-| **Mistral** | Mistral-7B-Instruct-v0.3, Mistral-Small-24B, Mistral-Large-3 | 7B–675B | Fast, efficient, MoE |
+| **Mistral** | Mistral-7B-Instruct-v0.3, Mistral-Small-24B | 7B–24B | Fast, efficient |
| **Mixtral** | Mixtral-8x7B-Instruct-v0.1, Mixtral-8x22B | 47B–141B | MoE architecture |
| **CodeLlama** | CodeLlama-7b-Instruct-hf, CodeLlama-34b-Instruct | 7B–34B | Code generation |
| **StarCoder 2** | StarCoder2-15B, StarCoder2-7B | 3B–15B | Code completion |
@@ -34,6 +34,8 @@ Soup works with **any** of the **340,000+** text-generation models on [HuggingFa
| **InternLM 3** | InternLM3-8B-Instruct | 8B | Chinese + English |
| **Falcon** | Falcon-11B, Falcon-40B-Instruct | 7B–180B | Open-weight |
+**Mistral-Large-3 is not shipped as a recipe.** `mistralai` publishes it in Mistral's native layout (`params.json` + `consolidated-*.safetensors`), with no `config.json`, which `AutoConfig` cannot read, and no flag changes that. A Hugging Face-format conversion exists on the Hub as `FriendliAI/Mistral-Large-3-675B-Instruct-2512-BF16`; it is a third party's re-upload, so Soup does not point a recipe at it (#1145).
+
Qwen3.5, Qwen3.6, and Qwen3.8 checkpoints advertise a multimodal conditional-generation
architecture on the Hub, but Soup's catalog recipes are deliberately text-only.
Their explicit `modality: text` selects `AutoModelForCausalLM`, which instantiates the
diff --git a/docs/performance-and-quantization.md b/docs/performance-and-quantization.md
index 2e8d8686..3cb579cf 100644
--- a/docs/performance-and-quantization.md
+++ b/docs/performance-and-quantization.md
@@ -1171,7 +1171,7 @@ Both reject silently-no-op combinations: setting either flag without `moe_lora=t
**`moe_lora` on the remaining LoRA tasks (#1099).** #798 left it loading but unread on `ipo`, `bco`, `reward_model`, `ppo` and `embedding`, and `online_dpo` had the same gap. All six build their adapter through the same `build_lora_config` path, so they were wired to the same helper rather than refused. On `embedding` it applies only with `lora.r >= 1`; at `r: 0` that trainer full-fine-tunes and builds no adapter for the flag to select. #1151 closed the remainder: `distill` and `unlearn` build their adapter the same way and are wired to the same helper, and so is `classifier` / `reranker` / `cross_encoder` (one trainer) on its opt-in adapter path. Without `classifier_lora: true` and `lora.r > 0` that trainer full-fine-tunes and builds no adapter, so there the flag is refused at config load; `asr`, which trains only Whisper (no experts), `moe_lora_routing`, which builds no LoRA adapter, and `prm`, which fine-tunes every base parameter, refuse the flag at config load. Two paths refuse it whatever the task: `task: sft` with `modality: vision` or `audio`, whose setup builds its adapter without the MoE step, and `backend: unsloth`. On unsloth the reason depends on the task (#1264): the thirteen tasks with an unsloth setup attach its fixed attention list and never read the flag, while the rest have no unsloth setup at all, so there it is the backend that goes unapplied. Both messages point to `backend: transformers`, where the flag is read. The other `moe_lora` refusals in the same check come first, so `asr`, `prm`, `moe_lora_routing` and SFT vision/audio get one refusal whatever the backend. Every path now either reads `moe_lora` or refuses it, except `backend: mlx`, where it loads and `soup doctor --config` reports it as ignored; a source ratchet keeps a new adapter-building trainer from missing it. `train_router_only` and `moe_expert_quant` require `moe_lora: true`, so on `backend: unsloth` they now fail to load with the same message. `preference` is covered through the trainers it dispatches to, and `tts` through the SFT trainer it subclasses.
-**`moe_lora` requires `lora.dropout: 0.0` on a fused-expert MoE.** transformers 5.x keeps a Qwen3-MoE's experts as fused 3-D parameters (`mlp.experts.gate_up_proj`), which peft adapts through `lora.ParamWrapper`, and that wrapper raises `lora.ParamWrapper does not work with lora_dropout != 0.` With the schema default of `0.05` the LoRA attach failed outright, so `moe_lora` did not work on any task - including `sft`. Soup now stops at the attach with a message naming the flag, instead of letting peft's reach the user, and all 33 shipped MoE recipes pin `lora.dropout: 0.0`. The check is made against the loaded model, not at config load: whether the experts are fused depends on the checkpoint and the transformers version, and a model with one module per expert takes dropout normally. A dense base is untouched - there the flag is a no-op.
+**`moe_lora` requires `lora.dropout: 0.0` on a fused-expert MoE.** transformers 5.x keeps a Qwen3-MoE's experts as fused 3-D parameters (`mlp.experts.gate_up_proj`), which peft adapts through `lora.ParamWrapper`, and that wrapper raises `lora.ParamWrapper does not work with lora_dropout != 0.` With the schema default of `0.05` the LoRA attach failed outright, so `moe_lora` did not work on any task - including `sft`. Soup now stops at the attach with a message naming the flag, instead of letting peft's reach the user, and all 29 shipped recipes that set `moe_lora` pin `lora.dropout: 0.0`. The check is made against the loaded model, not at config load: whether the experts are fused depends on the checkpoint and the transformers version, and a model with one module per expert takes dropout normally. A dense base is untouched - there the flag is a no-op.
**`moe_lora` does not reach every MoE family (measured, v0.75.0).** `get_moe_target_modules` picks module names, and whether peft turns those into adapters on the fused expert parameters depends on the architecture. On tiny stand-ins with transformers 5.16.1 / peft 0.20.0:
@@ -1180,11 +1180,11 @@ Both reject silently-no-op combinations: setting either flag without `moe_lora=t
| `qwen3_moe` | yes | 11 |
| `deepseek_v3` | yes | 8 |
| `glm4_moe` | yes | 3 |
-| `minimax` | **no — attention-only** | 2 (`minimax-m3-sft`, `minimax-m3-dpo`) |
+| `minimax` | **no — attention-only** | 0 |
| `mixtral` | **no — attention-only** | — |
-| `kimi_k2`, `mistral-large-3` | **not measured** (no stand-in builds here) | 9 |
+| `kimi_k2` | **not measured** (no stand-in builds here) | 7 |
-So `minimax-m3-sft` and `minimax-m3-dpo` still train attention-only LoRA: peft has no v4→v5 conversion mapping for those model types, so their experts are never targeted and the attach succeeds quietly. Extending target resolution per architecture is #1070. The nine `kimi-k2.x` and `mistral-large-3` recipes are untested rather than known-good — no tiny stand-in for those configs exists in the installed transformers.
+So `minimax-m3-sft` trains attention-only LoRA: it sets no `moe_lora`, since it loads through SFT's vision path, which never runs the MoE step, and `minimax-m3-dpo` was removed because DPO cannot build the `minimax_m3_vl` wrapper (#1145). Neither could have reached the experts anyway: peft has no v4→v5 conversion mapping for the MiniMax model types, so their experts are never targeted and the attach succeeds quietly. Extending target resolution per architecture is #1070. The seven `kimi-k2.x` recipes that set `moe_lora` are untested rather than known-good — no tiny stand-in for those configs exists in the installed transformers.
**`target_modules: auto` on a MoE base.** Until #1070 `resolve_lora_target_modules` had no mapping for any MoE architecture Soup ships, so `auto` resolved to `None` and peft refused with `No target_modules passed but also no target_parameters found`. Those architectures now resolve to their attention projections (see `docs/peft-and-efficiency.md`); a MoE architecture neither Soup nor peft maps is refused at setup, naming it. With `moe_lora: true` the targets come from the model scan instead, and that is applied *before* the refusal is decided, so `moe_lora` still works on an unmapped MoE such as `qwen2_moe`.
diff --git a/docs/serving-and-export.md b/docs/serving-and-export.md
index 30541425..e9fe1c90 100644
--- a/docs/serving-and-export.md
+++ b/docs/serving-and-export.md
@@ -653,7 +653,7 @@ soup ui
**Pages:**
- **Dashboard** — view all experiment runs, loss charts, system info, multi-run comparison
-- **New Training** — create configs from templates or 173 ready-made recipes, validate, start training with live SSE log streaming and progress bar
+- **New Training** — create configs from templates or 170 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
@@ -662,7 +662,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 (173 recipes), config schema API for dynamic form generation
+- **Config Builder** — recipe dropdown (170 recipes), config schema API for dynamic form generation
Gradient norm is nullable: backends or steps that do not report it store and
stream `null`, and the Web UI chart leaves a gap instead of drawing a false
diff --git a/scripts/check_recipe_attach.py b/scripts/check_recipe_attach.py
index 1180b029..520d8b78 100644
--- a/scripts/check_recipe_attach.py
+++ b/scripts/check_recipe_attach.py
@@ -55,8 +55,6 @@ EXCEPTIONS: dict[str, str] = {
"qwen2-audio-7b-sft": _NO_PEFT_DEFAULT,
"templates/audio.yaml": _NO_PEFT_DEFAULT,
"voxtral-sft": _NO_PEFT_DEFAULT,
- "minimax-m3-sft": _VL_WRAPPER + " (#1145)",
- "minimax-m3-dpo": _VL_WRAPPER + " (#1145)",
"mistral-medium-3-5-sft": _VL_WRAPPER + " (mistral3)",
}
diff --git a/src/soup_cli/recipes/catalog.py b/src/soup_cli/recipes/catalog.py
index c1e5d992..79d4afd8 100644
--- a/src/soup_cli/recipes/catalog.py
+++ b/src/soup_cli/recipes/catalog.py
@@ -48,7 +48,7 @@ def search_recipes(
# ---------------------------------------------------------------------------
-# Recipe catalog (173 recipes)
+# Recipe catalog (170 recipes)
# ---------------------------------------------------------------------------
RECIPES: Dict[str, RecipeMeta] = {
@@ -4924,11 +4924,18 @@ output: ./output
tags=("minimax", "sft", "moe", "large", "multi-gpu"),
description=(
"MiniMax M3 MoE SFT (428B / 23B active). MiniMax Community License "
- "- commercial use requires a separate agreement. Multi-GPU recommended."
+ "- commercial use requires a separate agreement. Multi-GPU recommended. "
+ "Loads through the vision path, whose processor is custom code: run "
+ "soup train --trust-remote-code."
),
yaml_str="""\
base: MiniMaxAI/MiniMax-M3
task: sft
+# A vision-language checkpoint (minimax_m3_vl): only the image-text class builds
+# it. target_modules: auto attaches to the language tower alone (#1102), so the
+# fine-tune stays textual (#1145). The vision collator supervises every token,
+# prompt included: train_on_responses_only is not applied on this path (#1156).
+modality: vision
data:
train: ./data/train.jsonl
@@ -4941,132 +4948,11 @@ training:
batch_size: 1
gradient_accumulation_steps: 16
lora:
- dropout: 0.0 # peft's ParamWrapper refuses dropout on fused MoE experts (#798)
+ dropout: 0.0 # kept from the moe_lora version; this recipe now targets no experts (#1145)
r: 32
alpha: 64
target_modules: auto
quantization: 4bit
- moe_lora: true
- moe_aux_loss_coeff: 0.01
- gradient_checkpointing: true
-
-output: ./output
-""",
- ),
- "minimax-m3-dpo": RecipeMeta(
- model="MiniMaxAI/MiniMax-M3",
- task="dpo",
- size="428B",
- tags=("minimax", "dpo", "alignment", "preference", "moe", "large", "multi-gpu"),
- description=(
- "MiniMax M3 MoE DPO alignment (428B / 23B active). MiniMax Community License "
- "- commercial use requires a separate agreement. Multi-GPU recommended."
- ),
- yaml_str="""\
-base: MiniMaxAI/MiniMax-M3
-task: dpo
-
-data:
- train: ./data/preference_train.jsonl
- format: dpo
- max_length: 4096
-
-training:
- epochs: 1
- lr: 5e-6
- batch_size: 1
- gradient_accumulation_steps: 16
- lora:
- dropout: 0.0 # peft's ParamWrapper refuses dropout on fused MoE experts (#798)
- r: 32
- alpha: 64
- target_modules: auto
- quantization: 4bit
- dpo_beta: 0.1
- moe_lora: true
- moe_aux_loss_coeff: 0.01
- gradient_checkpointing: true
-
-output: ./output
-""",
- ),
- "mistral-large-3-sft": RecipeMeta(
- model="mistralai/Mistral-Large-3-675B-Instruct-2512",
- task="sft",
- size="675B",
- tags=("mistral", "mistral-large", "sft", "moe", "large", "multi-gpu"),
- description=(
- "Mistral Large 3 MoE SFT (Apache-2.0, 675B / 41B active, multimodal). "
- "Requires multi-node DeepSpeed."
- ),
- yaml_str="""\
-base: mistralai/Mistral-Large-3-675B-Instruct-2512
-task: sft
-
-data:
- train: ./data/train.jsonl
- format: auto
- max_length: 4096
-
-training:
- epochs: 1
- lr: 5e-6
- batch_size: 1
- gradient_accumulation_steps: 32
- lora:
- dropout: 0.0 # peft's ParamWrapper refuses dropout on fused MoE experts (#798)
- r: 32
- alpha: 64
- target_modules: auto
- quantization: 4bit
- moe_lora: true
- moe_aux_loss_coeff: 0.01
- gradient_checkpointing: true
-
-output: ./output
-""",
- ),
- "mistral-large-3-dpo": RecipeMeta(
- model="mistralai/Mistral-Large-3-675B-Instruct-2512",
- task="dpo",
- size="675B",
- tags=(
- "mistral",
- "mistral-large",
- "dpo",
- "alignment",
- "preference",
- "moe",
- "large",
- "multi-gpu",
- ),
- description=(
- "Mistral Large 3 MoE DPO alignment "
- "(Apache-2.0, 675B / 41B active, multimodal). Requires multi-node DeepSpeed."
- ),
- yaml_str="""\
-base: mistralai/Mistral-Large-3-675B-Instruct-2512
-task: dpo
-
-data:
- train: ./data/preference_train.jsonl
- format: dpo
- max_length: 4096
-
-training:
- epochs: 1
- lr: 5e-6
- batch_size: 1
- gradient_accumulation_steps: 32
- lora:
- dropout: 0.0 # peft's ParamWrapper refuses dropout on fused MoE experts (#798)
- r: 32
- alpha: 64
- target_modules: auto
- quantization: 4bit
- dpo_beta: 0.1
- moe_lora: true
- moe_aux_loss_coeff: 0.01
gradient_checkpointing: true
output: ./output
diff --git a/tests/fixtures/recipe_base_architectures.json b/tests/fixtures/recipe_base_architectures.json
index d02635dd..a7b5ca98 100644
--- a/tests/fixtures/recipe_base_architectures.json
+++ b/tests/fixtures/recipe_base_architectures.json
@@ -432,10 +432,6 @@
"parameters": 7248023552,
"routed_experts": 0
},
- "mistralai/Mistral-Large-3-675B-Instruct-2512": {
- "parameters_unavailable": "no safetensors metadata on the Hub",
- "unresolvable": "the repo has no config.json"
- },
"mistralai/Mistral-Medium-3.5-128B": {
"model_type": "mistral3",
"parameters": 127704210176,
diff --git a/tests/fixtures/recipe_config_snapshots.json b/tests/fixtures/recipe_config_snapshots.json
index 5475e503..a0b46e0d 100644
--- a/tests/fixtures/recipe_config_snapshots.json
+++ b/tests/fixtures/recipe_config_snapshots.json
@@ -1236,27 +1236,12 @@
"training.lora.r": 16,
"training.lr": 0.0002
},
- "minimax-m3-dpo": {
- "base": "MiniMaxAI/MiniMax-M3",
- "data.format": "dpo",
- "data.max_length": 4096,
- "data.train": "./data/preference_train.jsonl",
- "task": "dpo",
- "training.batch_size": 1,
- "training.epochs": 1,
- "training.gradient_accumulation_steps": 16,
- "training.gradient_checkpointing": true,
- "training.lora.alpha": 64,
- "training.lora.dropout": 0.0,
- "training.lora.r": 32,
- "training.lr": 5e-06,
- "training.moe_lora": true
- },
"minimax-m3-sft": {
"base": "MiniMaxAI/MiniMax-M3",
"data.format": "auto",
"data.max_length": 4096,
"data.train": "./data/train.jsonl",
+ "modality": "vision",
"training.batch_size": 1,
"training.epochs": 1,
"training.gradient_accumulation_steps": 16,
@@ -1264,8 +1249,7 @@
"training.lora.alpha": 64,
"training.lora.dropout": 0.0,
"training.lora.r": 32,
- "training.lr": 1e-05,
- "training.moe_lora": true
+ "training.lr": 1e-05
},
"ministral-sft": {
"base": "mistralai/Ministral-8B-Instruct-2410",
@@ -1293,37 +1277,6 @@
"training.lora.r": 16,
"training.lr": 0.0002
},
- "mistral-large-3-dpo": {
- "base": "mistralai/Mistral-Large-3-675B-Instruct-2512",
- "data.format": "dpo",
- "data.max_length": 4096,
- "data.train": "./data/preference_train.jsonl",
- "task": "dpo",
- "training.batch_size": 1,
- "training.epochs": 1,
- "training.gradient_accumulation_steps": 32,
- "training.gradient_checkpointing": true,
- "training.lora.alpha": 64,
- "training.lora.dropout": 0.0,
- "training.lora.r": 32,
- "training.lr": 5e-06,
- "training.moe_lora": true
- },
- "mistral-large-3-sft": {
- "base": "mistralai/Mistral-Large-3-675B-Instruct-2512",
- "data.format": "auto",
- "data.max_length": 4096,
- "data.train": "./data/train.jsonl",
- "training.batch_size": 1,
- "training.epochs": 1,
- "training.gradient_accumulation_steps": 32,
- "training.gradient_checkpointing": true,
- "training.lora.alpha": 64,
- "training.lora.dropout": 0.0,
- "training.lora.r": 32,
- "training.lr": 5e-06,
- "training.moe_lora": true
- },
"mistral-medium-3-5-sft": {
"base": "mistralai/Mistral-Medium-3.5-128B",
"data.format": "auto",
diff --git a/tests/recipe_count.py b/tests/recipe_count.py
index 515cf4f8..13603236 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 = 173
+EXPECTED_RECIPE_COUNT = 170
def recipe_count_hint(actual: int) -> str:
diff --git a/tests/test_issue1070_moe_target_modules.py b/tests/test_issue1070_moe_target_modules.py
index f8cbd6d7..7e078c64 100644
--- a/tests/test_issue1070_moe_target_modules.py
+++ b/tests/test_issue1070_moe_target_modules.py
@@ -433,12 +433,9 @@ EXCLUDED_MOE_BASES = {
#: Bases a MoE-flagged recipe names whose config.json cannot be read. Their
#: recipes keep failing, now with Soup's named refusal instead of peft's.
-UNRESOLVABLE_MOE_RECIPE_BASES = {
- "mistralai/Mistral-Large-3-675B-Instruct-2512": (
- "the repo exists and lists consolidated-*.safetensors but has no "
- "config.json (404), so AutoConfig cannot load it at all"
- ),
-}
+#: Mistral-Large-3 was the one entry: its repo has no config.json, and #1145
+#: removed its two recipes rather than point them at a third-party conversion.
+UNRESOLVABLE_MOE_RECIPE_BASES: dict = {}
def _record():
@@ -528,18 +525,22 @@ 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) == 1
+ assert len(UNRESOLVABLE_MOE_RECIPE_BASES) == 0 # #1145
def test_the_record_has_the_measured_shape(self):
"""If regeneration silently lost bases or experts, the tests above would
pass while checking less. Pinned to the numbers the reviewer derived
- independently: 113 bases, 23 MoE, 8 of them flagless, 13 model types."""
+ independently: 113 bases, 23 MoE, 8 of them flagless, 13 model types.
+ #1145 removed the Mistral-Large-3 recipes, whose base was unreadable
+ (not MoE-counted), so 112 bases; and MiniMax-M3 became flagless (its SFT
+ recipe loads through the vision path without moe_lora, its DPO recipe was
+ removed), so 9 flagless."""
moe = _moe_bases()
flagless = [b for b in moe if b not in _flagged_bases()]
- assert len(_record()) == 113
+ assert len(_record()) == 112
assert len(moe) == 23
- assert len(flagless) == 8, sorted(flagless)
+ assert len(flagless) == 9, sorted(flagless)
assert len({info["model_type"] for info in moe.values()}) == 13
diff --git a/tests/test_issue798_moe_flags_per_task.py b/tests/test_issue798_moe_flags_per_task.py
index 17fd9ebf..ef622c2b 100644
--- a/tests/test_issue798_moe_flags_per_task.py
+++ b/tests/test_issue798_moe_flags_per_task.py
@@ -354,7 +354,9 @@ class TestShippedConfigs:
training = cfg.get("training") or {}
if training.get("moe_lora") and cfg.get("task") in _MOE_TASKS:
tasks.append(cfg["task"])
- assert sorted(tasks) == ["dpo"] * 9 + ["grpo"] * 8, sorted(tasks)
+ # #1145 removed mistral-large-3-dpo (its repo has no config.json) and
+ # minimax-m3-dpo (DPO cannot build its VL wrapper): 9 -> 7 dpo.
+ assert sorted(tasks) == ["dpo"] * 7 + ["grpo"] * 8, sorted(tasks)
@@ -654,16 +656,17 @@ class TestPerArchitectureCoverage:
assert bool(experts) is self.EXPECTED[arch], (arch, experts)
def test_the_uncovered_families_are_named_in_the_docs(self):
- """MiniMax gets zero expert adapters, so `minimax-m3-sft` and
- `minimax-m3-dpo` still train attention-only after this PR. That has to be
- written down where a user looks, not only in a test."""
+ """MiniMax gets zero expert adapters, so `minimax-m3-sft` trains
+ attention-only. That has to be written down where a user looks, not only
+ in a test. (`minimax-m3-dpo` was removed in #1145: DPO cannot build the
+ `minimax_m3_vl` wrapper.)"""
from pathlib import Path
docs = (Path(__file__).resolve().parents[1]
/ "docs" / "performance-and-quantization.md").read_text(encoding="utf-8")
lowered = docs.lower()
- assert "minimax-m3-sft" in lowered and "minimax-m3-dpo" in lowered, (
- "the two recipes the wiring does not reach must be named in the docs"
+ assert "minimax-m3-sft" in lowered, (
+ "the recipe the wiring does not reach must be named in the docs"
)
assert "attention-only" in lowered, "and what they do instead"
@@ -737,4 +740,6 @@ class TestEveryMoeRecipeCanAttach:
1 for r in RECIPES.values()
if (yaml.safe_load(r.yaml_str).get("training") or {}).get("moe_lora")
)
- assert counted >= 31, counted
+ # 33 until #1145 removed mistral-large-3-sft/-dpo and minimax-m3-dpo, and took
+ # moe_lora off minimax-m3-sft (SFT's vision path never reads it).
+ assert counted >= 29, counted
diff --git a/tests/test_recipe_sizes.py b/tests/test_recipe_sizes.py
index 661763fe..eda7b1a1 100644
--- a/tests/test_recipe_sizes.py
+++ b/tests/test_recipe_sizes.py
@@ -45,7 +45,6 @@ _FIXTURE_PATH = (
EXCLUDED_SIZE_BASES = {
"BioMistral/BioMistral-7B",
"baichuan-inc/Baichuan2-13B-Chat",
- "mistralai/Mistral-Large-3-675B-Instruct-2512",
"mistralai/Pixtral-12B-2409",
"nvidia/Nemotron-4-340B-Instruct",
}
diff --git a/tests/test_recipes.py b/tests/test_recipes.py
index f8de608f..88913b84 100644
--- a/tests/test_recipes.py
+++ b/tests/test_recipes.py
@@ -860,115 +860,6 @@ class TestDeepSeekV4ProGrpoRecipe:
assert "task: grpo" in written
-class TestIssue849LargeMoeDpoRecipes:
- """Regression coverage for the MiniMax M3 and Mistral Large 3 DPO recipes."""
-
- RECIPES = {
- "minimax-m3-dpo": {
- "model": "MiniMaxAI/MiniMax-M3",
- "sft": "minimax-m3-sft",
- "gradient_accumulation_steps": 16,
- "size": "428B",
- "license": "MiniMax Community License",
- },
- "mistral-large-3-dpo": {
- "model": "mistralai/Mistral-Large-3-675B-Instruct-2512",
- "sft": "mistral-large-3-sft",
- "gradient_accumulation_steps": 32,
- "size": "675B",
- "license": "Apache-2.0",
- },
- }
-
- @pytest.mark.parametrize("name,expected", list(RECIPES.items()))
- def test_recipe_meta_pins_the_model_id(self, name: str, expected: dict) -> None:
- """Surface 1: pin the catalog metadata without reading the YAML."""
- from soup_cli.recipes.catalog import get_recipe
-
- recipe = get_recipe(name)
- assert recipe is not None, f"{name} is missing from the catalog"
- assert recipe.model == expected["model"]
- assert recipe.task == "dpo"
- assert recipe.size == expected["size"]
- assert expected["license"] in recipe.description
-
- @pytest.mark.parametrize("name,expected", list(RECIPES.items()))
- def test_yaml_base_pins_the_model_id(self, name: str, expected: dict) -> None:
- """Surface 2: pin the YAML base independently of ``RecipeMeta.model``."""
- import yaml
-
- from soup_cli.recipes.catalog import get_recipe
-
- recipe = get_recipe(name)
- assert recipe is not None
- parsed = yaml.safe_load(recipe.yaml_str)
- assert parsed["base"] == expected["model"]
- assert parsed["task"] == "dpo"
-
- @pytest.mark.parametrize("name,expected", list(RECIPES.items()))
- def test_recipe_loads_with_expected_dpo_moe_shape(
- self, name: str, expected: dict
- ) -> None:
- from soup_cli.config.loader import load_config_from_string
- from soup_cli.recipes.catalog import get_recipe
-
- recipe = get_recipe(name)
- assert recipe is not None
- config = load_config_from_string(recipe.yaml_str)
-
- assert config.base == expected["model"]
- assert config.task == "dpo"
- assert config.data.train == "./data/preference_train.jsonl"
- assert config.data.format == "dpo"
- assert config.data.max_length == 4096
- assert config.training.epochs == 1
- assert config.training.lr == 5e-6
- assert config.training.batch_size == 1
- assert (
- config.training.gradient_accumulation_steps
- == expected["gradient_accumulation_steps"]
- )
- assert config.training.lora.r == 32
- assert config.training.lora.alpha == 64
- assert config.training.quantization == "4bit"
- assert config.training.moe_lora is True
- assert config.training.gradient_checkpointing is True
- # These equal schema defaults, so deleting either is an equivalent mutation.
- assert config.training.dpo_beta == 0.1
- assert config.training.moe_aux_loss_coeff == 0.01
-
- @pytest.mark.parametrize("name,expected", list(RECIPES.items()))
- def test_dpo_recipe_matches_its_sft_sibling(self, name: str, expected: dict) -> None:
- from soup_cli.recipes.catalog import get_recipe
-
- dpo = get_recipe(name)
- sft = get_recipe(expected["sft"])
- assert dpo is not None and sft is not None
- assert dpo.model == sft.model
- assert dpo.size == sft.size
- assert dpo.task == "dpo"
- assert sft.task == "sft"
-
- @pytest.mark.parametrize("name,expected", list(RECIPES.items()))
- def test_show_and_use_recipe(
- self,
- name: str,
- expected: dict,
- tmp_path: Path,
- monkeypatch: pytest.MonkeyPatch,
- ) -> None:
- show_result = runner.invoke(app, ["recipes", "show", name])
- assert show_result.exit_code == 0
- assert expected["model"] in strip_ansi(show_result.output)
-
- monkeypatch.chdir(tmp_path)
- use_result = runner.invoke(app, ["recipes", "use", name, "--yes"])
- assert use_result.exit_code == 0
- written = (tmp_path / "soup.yaml").read_text(encoding="utf-8")
- assert expected["model"] in written
- assert "task: dpo" in written
-
-
class TestIssue271SmolLM3Recipe:
"""Regression coverage for the smollm3-3b-sft recipe (#271)."""
@@ -1918,6 +1809,8 @@ class TestV025NewRecipes:
Issue #825 retires the unusable Falcon-E BitNet training recipe -> 175.
PR #1112 removes sesame-csm-tts -> 174.
Issue #850 added 2 (deepseek-v4-pro-dpo, deepseek-v4-pro-grpo) -> 176.
+ PR #1113 removes spark-tts -> 173.
+ Issue #1145 removed 3 (mistral-large-3-sft, mistral-large-3-dpo, minimax-m3-dpo) -> 170.
"""
from soup_cli.recipes.catalog import RECIPES
from tests.recipe_count import EXPECTED_RECIPE_COUNT, recipe_count_hint
diff --git a/tests/test_v07124.py b/tests/test_v07124.py
index b5df4b26..266228dc 100644
--- a/tests/test_v07124.py
+++ b/tests/test_v07124.py
@@ -8,6 +8,8 @@ Kimi-K2.5/K2.6 / MiniMax-M3 / Mistral-Large-3), plus a stale-repo-ID fix for
"""
from __future__ import annotations
+from pathlib import Path
+
import pytest
import yaml
@@ -42,8 +44,7 @@ V07124_RECIPE_NAMES = [
"kimi-k2.6-sft",
# MiniMax (MiniMax Community License)
"minimax-m3-sft",
- # Mistral Large 3 (Apache-2.0)
- "mistral-large-3-sft",
+ # Mistral Large 3 was removed in #1145: its repo has no config.json.
]
# name -> expected base repo-ID (the verified Hugging Face repo)
@@ -64,7 +65,6 @@ V07124_RECIPE_BASES = {
"kimi-k2.5-sft": "moonshotai/Kimi-K2.5",
"kimi-k2.6-sft": "moonshotai/Kimi-K2.6",
"minimax-m3-sft": "MiniMaxAI/MiniMax-M3",
- "mistral-large-3-sft": "mistralai/Mistral-Large-3-675B-Instruct-2512",
}
# The MoE bases added in v0.71.24 — each recipe must enable moe_lora + aux loss.
@@ -80,14 +80,23 @@ V07124_MOE_RECIPES = [
"glm-5.1-sft",
"kimi-k2.5-sft",
"kimi-k2.6-sft",
- "minimax-m3-sft",
- "mistral-large-3-sft",
]
+# A MoE checkpoint published as a vision-language wrapper (minimax_m3_vl): it loads
+# only through SFT's vision path, which never runs the MoE target step, so it
+# declares modality: vision and no moe_lora (#1145; #1179 refuses the pair).
+V07124_VL_MOE_RECIPES = ["minimax-m3-sft"]
+
class TestV07124Recipes:
def test_recipe_count_target(self) -> None:
- assert len(V07124_RECIPE_NAMES) == 17
+ # 17 shipped in v0.71.24; #1145 removed mistral-large-3-sft (no config.json).
+ assert len(V07124_RECIPE_NAMES) == 16
+
+ def test_docs_models_md_says_why_mistral_large_3_is_not_shipped(self) -> None:
+ # #1145: the paragraph is the one place the reason is written down for users.
+ docs = Path(__file__).resolve().parents[1] / "docs" / "models.md"
+ assert "**Mistral-Large-3 is not shipped as a recipe.**" in docs.read_text(encoding="utf-8")
@pytest.mark.parametrize("name", V07124_RECIPE_NAMES)
def test_recipe_registered(self, name: str) -> None:
@@ -161,7 +170,10 @@ class TestV07124Recipes:
f"{cfg.training.moe_aux_loss_coeff}"
)
- @pytest.mark.parametrize("name", sorted(set(V07124_RECIPE_NAMES) - set(V07124_MOE_RECIPES)))
+ @pytest.mark.parametrize(
+ "name",
+ sorted(set(V07124_RECIPE_NAMES) - set(V07124_MOE_RECIPES) - set(V07124_VL_MOE_RECIPES)),
+ )
def test_dense_recipes_do_not_set_moe_lora(self, name: str) -> None:
# The complement of the MoE list: a dense recipe must NOT enable moe_lora
# (guards against pasting a MoE block into a dense recipe).
@@ -170,6 +182,15 @@ class TestV07124Recipes:
f"{name} is a dense recipe but has moe_lora: true"
)
+ @pytest.mark.parametrize("name", V07124_VL_MOE_RECIPES)
+ def test_vl_moe_recipes_load_through_the_vision_path(self, name: str) -> None:
+ cfg = load_config_from_string(RECIPES[name].yaml_str)
+ assert cfg.modality == "vision"
+ assert cfg.training.moe_lora is not True
+ assert "moe" in RECIPES[name].tags
+ # the vision path loads AutoProcessor, which is remote code for this base
+ assert "--trust-remote-code" in RECIPES[name].description
+
@pytest.mark.parametrize("name", V07124_MOE_RECIPES)
def test_moe_recipes_tagged_moe(self, name: str) -> None:
assert "moe" in RECIPES[name].tags, (
@@ -202,11 +223,6 @@ class TestV07124Recipes:
# commercial-use caveat must be surfaced
assert "commercial" in desc
- def test_mistral_large_3_notes_apache_license(self) -> None:
- # Plan guessed MRL; the published card is Apache-2.0 — describe accurately.
- desc = RECIPES["mistral-large-3-sft"].description.lower()
- assert "apache" in desc
-
@pytest.mark.parametrize("name", ["kimi-k2.5-sft", "kimi-k2.6-sft"])
def test_kimi_recipes_note_modified_mit(self, name: str) -> None:
assert "mit" in RECIPES[name].description.lower()