From bbebc16c6facb655d8139f541aa5d430300944b0 Mon Sep 17 00:00:00 2001 From: pppppM Date: Thu, 20 Jun 2024 13:28:45 +0800 Subject: [PATCH] add llama-factory and swift examples --- ecosystem/README.md | 14 ++++++++++++++ ecosystem/README_zh-CN.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ecosystem/README.md b/ecosystem/README.md index 4a5ce7b..39bc015 100644 --- a/ecosystem/README.md +++ b/ecosystem/README.md @@ -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) diff --git a/ecosystem/README_zh-CN.md b/ecosystem/README_zh-CN.md index de2f30b..06a2538 100644 --- a/ecosystem/README_zh-CN.md +++ b/ecosystem/README_zh-CN.md @@ -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)的训练、推理、评估和部署。 ## 推理