LLaMA-Factory-Mirror/examples
hiyouga 2efd9b6ba0 update examples 2024-04-23 18:29:46 +08:00
..
accelerate update examples 2024-04-23 18:29:46 +08:00
deepspeed support fsdp + qlora 2024-03-21 00:36:06 +08:00
extras update readme and examples 2024-04-22 00:37:32 +08:00
full_multi_gpu update examples 2024-04-23 18:29:46 +08:00
inference fix mod stuff 2024-04-21 18:11:10 +08:00
lora_multi_gpu update examples 2024-04-23 18:29:46 +08:00
lora_single_gpu update examples 2024-04-02 21:09:25 +08:00
merge_lora update examples 2024-04-15 22:14:34 +08:00
qlora_single_gpu add examples 2024-02-28 23:19:25 +08:00
README.md update examples 2024-04-23 18:29:46 +08:00
README_zh.md update examples 2024-04-23 18:29:46 +08:00

README.md

We provide diverse examples about fine-tuning LLMs.

examples/
├── lora_single_gpu/
│   ├── pretrain.sh: Do continuous pre-training using LoRA
│   ├── sft.sh: Do supervised fine-tuning using LoRA
│   ├── reward.sh: Do reward modeling using LoRA
│   ├── ppo.sh: Do PPO training using LoRA
│   ├── dpo.sh: Do DPO training using LoRA
│   ├── orpo.sh: Do ORPO training using LoRA
│   ├── prepare.sh: Save tokenized dataset
│   └── predict.sh: Do batch predict and compute BLEU and ROUGE scores after LoRA tuning
├── qlora_single_gpu/
│   ├── bitsandbytes.sh: Fine-tune 4/8-bit BNB models using QLoRA
│   ├── gptq.sh: Fine-tune 4/8-bit GPTQ models using QLoRA
│   ├── awq.sh: Fine-tune 4-bit AWQ models using QLoRA
│   └── aqlm.sh: Fine-tune 2-bit AQLM models using QLoRA
├── lora_multi_gpu/
│   ├── single_node.sh: Fine-tune model with Accelerate on single node using LoRA
│   ├── multi_node.sh: Fine-tune model with Accelerate on multiple nodes using LoRA
│   └── ds_zero3.sh: Fine-tune model with DeepSpeed ZeRO-3 using LoRA (weight sharding)
├── full_multi_gpu/
│   ├── single_node.sh: Full fine-tune model with DeepSpeed on single node
│   ├── multi_node.sh: Full fine-tune model with DeepSpeed on multiple nodes
│   └── predict.sh: Do parallel batch predict and compute BLEU and ROUGE scores after full tuning
├── merge_lora/
│   ├── merge.sh: Merge LoRA weights into the pre-trained models
│   └── quantize.sh: Quantize the fine-tuned model with AutoGPTQ
├── inference/
│   ├── cli_demo.sh: Launch a command line interface with LoRA adapters
│   ├── api_demo.sh: Launch an OpenAI-style API with LoRA adapters
│   ├── web_demo.sh: Launch a web interface with LoRA adapters
│   └── evaluate.sh: Evaluate model on the MMLU/CMMLU/C-Eval benchmarks with LoRA adapters
└── extras/
    ├── galore/
    │   └── sft.sh: Fine-tune model with GaLore
    ├── badam/
    │   └── sft.sh: Fine-tune model with BAdam
    ├── loraplus/
    │   └── sft.sh: Fine-tune model using LoRA+
    ├── mod/
    │   └── sft.sh: Fine-tune model using Mixture-of-Depths
    ├── llama_pro/
    │   ├── expand.sh: Expand layers in the model
    │   └── sft.sh: Fine-tune the expanded model
    └── fsdp_qlora/
        └── sft.sh: Fine-tune quantized model with FSDP+QLoRA