Skip to content
Back to skills

Model Loading And Export

ASecurity

"Use for LlamaFactory model/tokenizer/processor loading, model

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
businessrustapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill model-loading-and-export --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Loading And Export?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Loading And Export
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-model-loading-and-export/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-model-loading-and-export)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-loading-and-export
description: "Use for LlamaFactory model/tokenizer/processor loading, model
  patches, LoRA adapter loading/merge/export, export-time GPTQ quantization,
  on-the-fly quantization backends, value-head export, checkpoint utilities, and
  hub/cache/revision/trust settings."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Model Loading and Export

Use this sub-skill when an agent needs to load, patch, merge, quantize, export, or diagnose LlamaFactory v0 model artifacts for source behavior `0.9.6.dev0`.

## Route Here For

- `model_name_or_path`, `adapter_name_or_path`, tokenizer/processor loading, `trust_remote_code`, `cache_dir`, `model_revision`, and hub tokens.
- LoRA/OFT adapter load, resume, merge, export, `create_new_adapter`, `pissa_init`, `pissa_convert`, value-head/RM checkpoints, and `additional_target` interactions.
- `llamafactory-cli export CONFIG.yaml` or `lmf export CONFIG.yaml`, including adapter merge, full-model export, Ollama `Modelfile`, tokenizer/processor saving, and hub push settings.
- Quantization choices for PTQ models, QLoRA/on-the-fly training or inference, and export-time GPTQ quantization.
- Model patches and utilities such as vocab resize, RoPE/attention/kv-cache/kernel switches, MoD, Unsloth, Liger, KTransformers, and checkpoint conversion/init planning.

## Boundaries

- Route training launch mechanics, dataset sampling, optimizers, distributed training, CLI overrides, and experiment tracking to `training-and-configs`.
- Route dataset registration, prompt templates, multimodal data schemas, and tokenizer-template fixes to `data-and-templates` unless the failure is directly in model/tokenizer/processor loading.
- Route chat/API/Web UI/vLLM/SGLang serving behavior to `inference-and-serving` unless the issue is model loading, adapter, or quantization setup.
- Treat source checkpoint conversion and initialization utilities as reference-only plans unless the user explicitly authorizes large CPU/GPU and disk operations.

## Start With

1. Identify the operation: load, train-time adapter setup, export/merge, export quantization, or checkpoint utility.
2. Read `references/model-loading.md` for loader arguments, tokenizer/processor behavior, patches, adapters, and value-head concerns.
3. Read `references/export-and-quantization.md` before editing export YAML or choosing a quantization backend.
4. Read `references/checkpoint-utilities.md` before recommending PiSSA/LoftQ/LLaMA-Pro/DCP/other checkpoint conversions.
5. Read `references/troubleshooting.md` when errors mention tokenizer/processor loading, remote code, hub access, quantized vocab resize, adapter merge, optional dependencies, or hub mirrors.

## Bundled Helper

- `scripts/check_export_config.py` statically checks YAML/JSON export configs for common LlamaFactory pitfalls without importing LlamaFactory, Transformers, PyTorch, or downloading models.

## Safety

- Never run model downloads, adapter merges, export quantization, checkpoint conversion, or hub pushes without explicit user approval and a concrete output path.
- Do not put secrets in config files; prefer environment variables for hub tokens and mirror controls.
- Warn that quantized model merge/export operations are constrained: adapters must be merged before export quantization, and adapters cannot be merged into an already quantized model.

Files in this skill

  • SKILL.md3.3 KB
  • references/checkpoint-utilities.md4.2 KB
  • references/export-and-quantization.md6 KB
  • references/model-loading.md7.2 KB
  • references/troubleshooting.md6.1 KB
  • scripts/check_export_config.py11.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.