Model Loading and Adapters
Use this sub-skill when the task is about Axolotl base_model, tokenizer or processor loading, chat_template mismatches, LoRA/QLoRA target modules, bitsandbytes or torchao quantization, multimodal/VLM config, Gemma/Qwen/Mistral/Llama quirks, attention backend selection, or adding support for a new model architecture.
Read First
- references/model-selection.md for
base_model, tokenizer, processor, chat template, attention backend, multimodal, and architecture-family choices. - references/adapters-and-quantization.md for LoRA, QLoRA, ReLoRA,
lora_target_modules,lora_target_parameters, bitsandbytes, MoE expert quantization, QAT, and PTQ. - references/new-model-support.md for unsupported architecture debugging, user-agent touchpoints, validation order, and patch/test planning.
- references/troubleshooting.md for symptom-driven fixes around gated models, tokenizer trust, chat templates, LoRA targets, QLoRA backends, multimodal processors, attention kernels, and new-model failures.
- scripts/check_model_config.py for a safe static YAML check before
axolotl preprocess; it never downloads, loads a model, imports Axolotl, or starts training.
Quick Workflow
- Identify the model family and wrapper first: text-only causal LM, multimodal
ForConditionalGeneration, MoE/hybrid model, pre-quantized checkpoint, or new/remote-code architecture. - Set model-loading fields before training-method fields:
base_model, optionalbase_model_config,tokenizer_config,tokenizer_type,processor_type,trust_remote_code,attn_implementation, andchat_template. - Choose adapter and quantization together: full fine-tune has no
adapter; LoRA usually targets explicit modules; QLoRA requiresadapter: qloraplusload_in_4bit: true; MoE expert LoRA useslora_target_parameterswithlora_dropout: 0. - For multimodal models, include the processor path: usually
processor_type: AutoProcessor,skip_prepare_dataset: true,remove_unused_columns: false,sample_packing: false, and a model-appropriatechat_template. - Run
python scripts/check_model_config.py config.yamlfor local structural warnings, then useaxolotl preprocess config.yamloraxolotl preprocess config.yaml --debugin the user's Axolotl environment for real tokenizer/model-schema validation. - Only after config and preprocessing are consistent, route method-specific tuning to the SFT, preference, RL, or distributed sibling sub-skills.
Boundaries
- This sub-skill owns model/tokenizer/processor loading choices, adapter config, quantization fields, architecture-specific notes, multimodal support, attention backend selection, and new-model debugging guidance.
- Route SFT and continual pretraining recipes to
sft-and-pretraining. - Route DPO, IPO, KTO, ORPO, SimPO, reward-model, GRPO, and EBFT method recipes to
preference-tuningorrl-and-rewards. - Route generic dataset formats, column mappings, and YAML schema mechanics to
data-and-configs. - Route DeepSpeed, FSDP, launch topology, memory budgets, vLLM serving, and performance tuning to
distributed-and-performance. - Route complete CLI operations, installation, fetching examples, and operational command catalogs to the root Axolotl skill or
cli-and-operationswhen present.
Evidence Notes
This guidance is distilled from Axolotl model architecture docs, multimodal/quantization/attention/LoRA docs, loader and schema behavior, model-specific monkeypatches, examples, and tests. The inspection environment proved package metadata and namespace import only; do not claim live model downloads, training, inference, or GPU runtime verification unless the user runs those checks separately.