技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
llama-factory【数据与研究】Use for LlamaFactory repository workflows: training configs, dataset/template preparation, model loading/export, inference/API/Web UI operations, and experimental USE_V1 flows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a user asks for help with LlamaFactory (llamafactory package, llamafactory-cli, or lmf) rather than generic Hugging Face training. The default architecture is v0; route to v1-experimental only when the user explicitly sets or asks about USE_V1=1 or v1-style configs.
--help before starting training, downloads, API servers, or distributed launches.references/troubleshooting.md for cross-cutting install/import, dependency, CLI, data/config, backend, and environment-variable issues.| User request | Use |
|---|---|
Registering datasets, fixing dataset_info.json, Alpaca/ShareGPT/OpenAI rows, multimodal columns, tool-calling rows, templates, preprocessing, packed data | sub-skills/data-and-templates/ |
Writing or debugging llamafactory-cli train YAML/JSON, CLI overrides, LoRA/QLoRA/full/freeze, SFT/PT/RM/PPO/DPO/KTO, distributed launch, logging | sub-skills/training-and-configs/ |
Using ChatModel, chat, webchat, api, OpenAI-compatible endpoints, streaming, scores, infer_backend, vLLM or SGLang inference | sub-skills/inference-and-serving/ |
| Loading tokenizers/models/processors, adapter setup, LoRA merge/export, quantization, checkpoint conversion/init utilities, hub mirror behavior | sub-skills/model-loading-and-export/ |
Installing/running LlamaFactory, help, version, env, LlamaBoard webui, operational env vars, monitors, Docker/backend notes | sub-skills/webui-and-ops/ |
Experimental v1 trainer/core/plugin/config flows selected with USE_V1=1 | sub-skills/v1-experimental/ |
llamafactory.0.9.6.dev0.llamafactory-cli and lmf, both dispatch to llamafactory.cli:main.train, chat, api, export, webchat, webui, env, version, and help.torchrun automatically when multiple devices are visible, or forced with FORCE_TORCHRUN=1.USE_V1=1 switches the launcher to the experimental v1 architecture and changes supported commands/config shape.Use these checks after installing LlamaFactory in a real environment:
python - <<'PY'
import llamafactory
print(llamafactory.__version__)
PY
llamafactory-cli help
If the package is only partially installed, root imports may succeed while workflow imports fail later. Run the sanity helper in sub-skills/webui-and-ops/scripts/llamafactory_sanity_check.py to distinguish metadata/import/CLI/dependency problems.
sub-skills/data-and-templates/scripts/validate_dataset_entry.py checks dataset registry entries and tiny row files without importing LlamaFactory.sub-skills/training-and-configs/scripts/render_train_command.py merges simple YAML/JSON overrides and prints a safe training command.sub-skills/training-and-configs/scripts/eval_bleu_rouge.py provides dependency-light prediction metric checks for generated JSONL outputs.sub-skills/inference-and-serving/scripts/openai_api_smoke.py probes an OpenAI-compatible local API when the user supplies server details.sub-skills/inference-and-serving/scripts/vllm_batch_infer.py wraps batch inference intent and requires the caller to provide an installed inference environment.sub-skills/model-loading-and-export/scripts/check_export_config.py flags static export/merge/quantization config pitfalls.sub-skills/webui-and-ops/scripts/llamafactory_sanity_check.py checks Python/package/CLI availability and common optional modules.sub-skills/v1-experimental/scripts/check_v1_config_keys.py warns about mixed v0/v1 config keys without importing LlamaFactory.references/repo-provenance.md records the source snapshot and evidence paths used to build this skill.references/troubleshooting.md covers cross-cutting failures and points to the nearest owning sub-skill.