Merge pull request #1 from pppppM/eco-train

[Docs] Add Llama-Factory and Swift examples
pull/745/head
Lyu Han 2024-06-29 15:56:35 +08:00 committed by GitHub
commit a226283898
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

View File

@ -24,10 +24,24 @@ You can find the best practice of finetuing the internlm2 model in the [README](
LLaMA-Factory is an open-source, easy-to-use fine-tuning and training framework for LLMs
```bash
llamafactory-cli train \
--model_name_or_path internlm/internlm2-chat-1_8b \
--quantization_bit 4 --stage sft --lora_target all \
--dataset 'identity,alpaca_en_demo' --template intern2 \
--output_dir output --do_train
```
### [swift](https://github.com/modelscope/swift)
SWIFT supports training, inference, evaluation and deployment of LLMs and MLLMs (multimodal large models).
```bash
swift sft --model_type internlm2-1_8b-chat \
--model_id_or_path Shanghai_AI_Laboratory/internlm2-chat-1_8b \
--dataset AI-ModelScope/blossom-math-v2 --output_dir output
```
## Inference
### [LMDeploy](https://github.com/InternLM/lmdeploy)

View File

@ -24,8 +24,22 @@ XTuner 是一个高效、灵活、全能的轻量化大模型微调工具库。
LLaMA-Factory 是一个开源的、易于使用的 LLMs 微调和训练框架。
```bash
llamafactory-cli train \
--model_name_or_path internlm/internlm2-chat-1_8b \
--quantization_bit 4 --stage sft --lora_target all \
--dataset 'identity,alpaca_en_demo' --template intern2 \
--output_dir output --do_train
```
### [swift](https://github.com/modelscope/swift)
```bash
swift sft --model_type internlm2-1_8b-chat \
--model_id_or_path Shanghai_AI_Laboratory/internlm2-chat-1_8b \
--dataset AI-ModelScope/blossom-math-v2 --output_dir output
```
SWIFT 支持 LLMs 和多模态大型模型MLLMs的训练、推理、评估和部署。
## 推理