#3890·axolotl

model support system follow-ups

Author: thad0ctorCreated Jul 28, 2026Updated Aug 10, 2026
Labelsenhancement

Tracking: model support system follow-ups

Follow-up tracker for the deferred items from #3869 (profile system) and #3884 (transformers registry seams). Status below re-verified against main at 93dcd622f, as of 2026-08-09. Every item is still open; the only substantive movement is row 2 below (the Liger per-arch chain grew again).

Open question for maintainers

Should already-implemented models migrate onto the profile system? This is the one item that gates others — the migration skill (below) and the subsystem rows only make sense if the answer is yes. Today _BUILTIN_MODULES holds the two descriptors that shipped with #3869 (kimi_linear, paddleocr_vl), and loaders/patch_manager.py still carries 21 model_config_type branches. Either answer is workable; the branches are not urgent, but leaving the question open means the profile system and the branch chain both stay live in parallel.

Ready to pick up

  • Additional family templates. templates.py currently has VANILLA_CAUSAL_LM and IMAGE_TEXT_TO_TEXT; scope was deliberately held down for #3869. More templates want the descriptor inventory that migration would produce, so this is partly downstream of the question above.
  • Save-time weight-conversion reversal. #3884 landed the load side plus _warn_irreversible_weight_transforms, which reports at registration time that a transform has no reverse_op. The save boundary itself is still open: there is no save-phase hook, and save_pretrained(save_original_format=True) reverses whatever is registered at save time, which is not guaranteed to be what the profile declared.
  • Let weight_conversions read current registrations, and re-apply post-build. Registrations are applied once in apply_pre_model_load_patches, and the provider returns a mapping that is registered with overwrite=True — so it cannot inspect or filter what transformers already has under a key, and a model whose __init__ re-registers with overwrite=True clobbers it. The in-tree case is _fix_nemotron_h_conversion_mapping (patch_manager.py:676), which removes one entry from the mapping the nvidia Hub model registers itself and must run after build. #3884 names nemotron_h as precedent that should migrate onto this seam; as built it can't, so the hardcoded fix and the declarative path currently coexist.
  • Deprecate ModelHookContext.tokenizer toward processor. transformers v5 is processor-first; the context still exposes both fields. Deferred until hook consumers migrate.

Subsystem migration

Candidates to become typed profile strategies, in recommended order — earlier rows have a ready seam and grow the descriptor inventory later rows depend on. All are gated on the migration question.

# Subsystem Where it lives today Becomes a strategy when Status
1 Remaining model_type branches loaders/patch_manager.py, monkeypatch/ each branch migrates into a phase hook on its architecture's descriptor seam shipped in #3869; 21 branches remain
2 Loss adaptation CCE / Liger integrations, loss patches loss-patch dispatch consults capabilities rather than per-arch patch lists partial, and drifting — both integrations call check_capability as a guard, but dispatch is still a per-arch chain, which has since grown from 7 to 8 hand-patch branches in integrations/liger/plugin.py (mistral3/ministral3, added by #3922)
3 Batch preparation utils/collators/, packing utils collator choice is profile-driven alongside the already-typed processing strategy not started
4 Adapter loading loaders/adapter.py PEFT wrapping exposes a stable pre/post boundary; near-term win is per-arch lora_target_modules defaults not started
5 Optimizer construction core/trainers/mixins/optimizer.py + builders optimizer factory selection is decoupled from trainer mixin wiring not started (rarely arch-specific today)
6 Trainer selection core/builders/ (causal.py, rl.py) builder choice has a generic seam instead of RL-type/arch branching not started (hardest seam; few arch-specific consumers yet)

Rows 1 and 2 are the ones with real payoff today; 5 and 6 are listed for completeness and may never be worth doing.

Source: axolotl-ai-cloud/axolotl