llama-factory

Guide LLaMA-Factory fine-tuning and deployment workflows for large language models.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/ricable/mcai --skill llama-factory-ricable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llama-factory
Source: https://github.com/ricable/mcai/tree/main/.agents/skills/llama-factory
Command: npx skills add https://github.com/ricable/mcai --skill llama-factory-ricable

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill turns LLaMA-Factory documentation into practical guidance for fine-tuning, evaluating, and serving large language models without forcing you to piece together setup steps on your own.

Core Features & Use Cases

  • End-to-end LLM tuning: Covers pre-training, supervised fine-tuning, reward modeling, DPO, KTO, and inference workflows.
  • Efficiency and scaling: Explains LoRA, QLoRA, freeze, full fine-tuning, quantization, acceleration, and distributed training options.
  • Practical example: Use it to configure a multimodal Qwen or LLaVA run, prepare Alpaca or ShareGPT data, and launch training on CUDA or Ascend NPU hardware.

Quick Start

Ask for a step-by-step LLaMA-Factory plan for my model, dataset, and hardware, including the right training stage, adapter setup, and launch command.

Frequently Asked Questions about llama-factory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fine-tune a large language model using LLaMA-Factory?

Fine-tune large language models by configuring supervised fine-tuning, pretraining, or preference optimization stages with LLaMA-Factory. Specify your dataset, model, and hardware to generate the correct adapter setup and launch command for end-to-end tuning workflows.

Can I use LLaMA-Factory for multimodal training on Ascend NPU hardware?

Yes, LLaMA-Factory supports multimodal training on both CUDA and Ascend NPU hardware. You can configure multimodal runs for models like Qwen or LLaVA by specifying your hardware environment and generating the appropriate distributed execution commands.

What is the difference between LoRA and QLoRA for distributed training?

LoRA and QLoRA are adapter methods for efficient large language model tuning. LoRA applies low-rank adaptation to reduce trainable parameters, while QLoRA combines quantization with LoRA to further minimize memory usage during distributed training and acceleration workflows.

How do I prepare Alpaca or ShareGPT datasets for reward modeling?

Prepare Alpaca or ShareGPT datasets for reward modeling by formatting your input data to match LLaMA-Factory templates. The workflow guides dataset configuration and adapter setup to ensure your preference optimization data aligns with the training stage requirements.

Does LLaMA-Factory support DPO and KTO preference optimization workflows?

Yes, LLaMA-Factory supports Direct Preference Optimization (DPO) and KTO workflows. It provides configuration guidance for reward modeling and preference optimization stages, allowing you to align large language models with human preferences during the fine-tuning process.

What are the limitations of using quantization for large language model inference?

Quantization reduces memory usage for large language model inference but may impact model accuracy. LLaMA-Factory provides configuration guidance for quantization and acceleration options, helping you balance efficiency trade-offs when deploying fine-tuned models in production environments.