Model loading and adapters

From VectorSpaceLab/AREX-Skill · View interactive version

Model loading and adapters is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Guides agents choosing and troubleshooting Axolotl model configs, tokenizer or processor loading, LoRA and QLoRA adapters, quantization, multimodal models, and architecture quirks.

How to use this skill

Skill file

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

Quick Workflow

  1. Identify the model family and wrapper first: text-only causal LM, multimodal ForConditionalGeneration, MoE/hybrid model, pre-quantized checkpoint, or new/remote-code architecture.
  2. Set model-loading fields before training-method fields: base_model, optional base_model_config, tokenizer_config, tokenizer_type, processor_type, trust_remote_code, attn_implementation, and chat_template.
  3. Choose adapter and quantization together: full fine-tune has no adapter; LoRA usually targets explicit modules; QLoRA requires adapter: qlora plus load_in_4bit: true; MoE expert LoRA uses lora_target_parameters with lora_dropout: 0.
  4. 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-appropriate chat_template.
  5. Run python scripts/check_model_config.py config.yaml for local structural warnings, then use axolotl preprocess config.yaml or axolotl preprocess config.yaml --debug in the user's Axolotl environment for real tokenizer/model-schema validation.
  6. Only after config and preprocessing are consistent, route method-specific tuning to the SFT, preference, RL, or distributed sibling sub-skills.

Boundaries

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.