You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@
36
36
-[WeChat Group](#-Wechat-Group)
37
37
38
38
## 📝 Introduction
39
-
SWIFT supports training, inference, evaluation and deployment of **300+ LLMs and 40+ MLLMs** (multimodal large models). Developers can directly apply our framework to their own research and production environments to realize the complete workflow from model training and evaluation to application. In addition to supporting the lightweight training solutions provided by [PEFT](https://github.com/huggingface/peft), we also provide a complete **Adapters library** to support the latest training techniques such as NEFTune, LoRA+, LLaMA-PRO, etc. This adapter library can be used directly in your own custom workflow without our training scripts.
39
+
SWIFT supports training, inference, evaluation and deployment of **300+ LLMs and 50+ MLLMs** (multimodal large models). Developers can directly apply our framework to their own research and production environments to realize the complete workflow from model training and evaluation to application. In addition to supporting the lightweight training solutions provided by [PEFT](https://github.com/huggingface/peft), we also provide a complete **Adapters library** to support the latest training techniques such as NEFTune, LoRA+, LLaMA-PRO, etc. This adapter library can be used directly in your own custom workflow without our training scripts.
40
40
41
41
To facilitate use by users unfamiliar with deep learning, we provide a Gradio web-ui for controlling training and inference, as well as accompanying deep learning courses and best practices for beginners.
42
42
@@ -47,6 +47,10 @@ SWIFT has rich documentations for users, please check [here](https://github.com/
47
47
SWIFT web-ui is available both on [Huggingface space](https://huggingface.co/spaces/tastelikefeet/swift) and [ModelScope studio](https://www.modelscope.cn/studios/iic/Scalable-lightWeight-Infrastructure-for-Fine-Tuning/summary), please feel free to try!
48
48
49
49
## 🎉 News
50
+
- 2024.07.08: Support internlm-xcomposer2_5-7b-chat. You can check the best practice [here](docs/source_en/Multi-Modal/internlm-xcomposer2-best-practice.md).
51
+
- 2024.07.06: Support for the llava-next-video series models: llava-next-video-7b-instruct, llava-next-video-7b-32k-instruct, llava-next-video-7b-dpo-instruct, llava-next-video-34b-instruct. You can refer to [llava-video best practice](docs/source_en/Multi-Modal/llava-video-best-practice.md) for more information.
52
+
- 2024.07.06: Support internvl2 series: internvl2-2b, internvl2-4b, internvl2-8b, internvl2-26b.
53
+
- 2024.07.06: Support codegeex4-9b-chat.
50
54
- 2024.07.04: Support internlm2_5-7b series: internlm2_5-7b, internlm2_5-7b-chat, internlm2_5-7b-chat-1m.
51
55
- 2024.07.02: Support for using vLLM for accelerating inference and deployment of multimodal large models such as the llava series and phi3-vision models. You can refer to the [Multimodal & vLLM Inference Acceleration Documentation](docs/source_en/Multi-Modal/vllm-inference-acceleration.md) for more information.
52
56
- 2024.07.02: Support for `llava1_6-vicuna-7b-instruct`, `llava1_6-vicuna-13b-instruct` and other llava-hf models. For best practices, refer to [here](docs/source_en/Multi-Modal/llava-best-practice.md).
@@ -61,6 +65,8 @@ SWIFT web-ui is available both on [Huggingface space](https://huggingface.co/spa
61
65
- 🔥2024.06.01: Supports **SimPO** training! See [document](https://github.com/modelscope/swift/blob/main/docs/source_en/LLM/SimPO.md) to start training!
62
66
- 🔥2024.06.01: Support for deploying large multimodal models, please refer to the [Multimodal Deployment Documentation](docs/source_en/Multi-Modal/mutlimodal-deployment.md) for more information.
63
67
- 2024.05.31: Supports Mini-Internvl model, Use model_type `mini-internvl-chat-2b-v1_5` and `mini-internvl-chat-4b-v1_5`to train.
68
+
<details><summary>More</summary>
69
+
64
70
- 2024.05.24: Supports Phi3-vision model, Use model_type `phi3-vision-128k-instruct` to train.
65
71
- 2024.05.22: Supports DeepSeek-V2-Lite series models, model_type are `deepseek-v2-lite` and `deepseek-v2-lite-chat`
66
72
- 2024.05.22: Supports TeleChat-12B-v2 model with quantized version, model_type are `telechat-12b-v2` and `telechat-12b-v2-gptq-int4`
@@ -77,8 +83,6 @@ SWIFT web-ui is available both on [Huggingface space](https://huggingface.co/spa
77
83
- 2024.04.29: Supports inference and fine-tuning of InternVL-Chat-V1.5 model. For best practice, you can refer to [here](https://github.com/modelscope/swift/tree/main/docs/source_en/Multi-Modal/internvl-best-practice.md).
78
84
- 🔥2024.04.26: Support **LISA** and **unsloth** training! Specify `--lisa_activated_layers=2` to use LISA(to reduce the memory cost to 30 percent!), specify `--tuner_backend unsloth` to use unsloth to train a huge model(full or lora) with lesser memory(30 percent or lesser) and faster speed(5x)!
79
85
- 🔥2024.04.26: Support the fine-tuning and inference of Qwen1.5-110B and Qwen1.5-110B-Chat model, use [this script](https://github.com/modelscope/swift/blob/main/examples/pytorch/llm/scripts/qwen1half_110b_chat/lora_ddp_ds/sft.sh) to start training!
80
-
<details><summary>More</summary>
81
-
82
86
- 2024.04.24: Support for inference and fine-tuning of Phi3 series models. Including: [phi3-4b-4k-instruct](examples/pytorch/llm/scripts/phi3_4b_4k_instruct/lora), phi3-4b-128k-instruct.
83
87
- 2024.04.22: Support for inference, fine-tuning, and deployment of **chinese-llama-alpaca-2** series models. This includes:chinese-llama-2-1.3b, chinese-llama-2-7b, chinese-llama-2-13b, chinese-alpaca-2-1.3b, chinese-alpaca-2-7b and chinese-alpaca-2-13b along with their corresponding 16k and 64k long text versions.
84
88
- 2024.04.22: Support for inference and fine-tuning of Llama3 GPTQ-Int4, GPTQ-Int8, and AWQ series models. Support for inference and fine-tuning of chatglm3-6b-128k, Openbuddy-Llama3.
@@ -387,6 +391,7 @@ swift sft \
387
391
388
392
#### Multi-node Multi-GPU
389
393
```shell
394
+
# If multiple machines share a disk, please additionally specify `--save_on_each_node false`.
390
395
# node0
391
396
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
392
397
NNODES=2 \
@@ -507,7 +512,7 @@ The complete list of supported models and datasets can be found at [Supported Mo
507
512
| Model Type | Model Introduction | Language | Model Size | Model Type |
| Qwen<br>Qwen1.5<br>Qwen2 |[Tongyi Qwen 1.0 and 1.5 series models](https://github.com/QwenLM)| Chinese<br>English | 0.5B-110B<br>including quantized versions | base model<br>chat model<br>MoE model<br>code model |
510
-
| ChatGLM2<br>ChatGLM3<br>Codegeex2<br>GLM4 |[Zhipu ChatGLM series models](https://github.com/THUDM)| Chinese<br>English | 6B-9B | base model<br>chat model<br>code model<br>long text model |
515
+
| ChatGLM2<br>ChatGLM3<br>Codegeex2<br>GLM4<br>Codegeex4|[Zhipu ChatGLM series models](https://github.com/THUDM)| Chinese<br>English | 6B-9B | base model<br>chat model<br>code model<br>long text model |
511
516
| Baichuan<br>Baichuan2 |[Baichuan 1 and Baichuan 2](https://github.com/baichuan-inc)| Chinese<br>English | 7B-13B<br>including quantized versions | base model<br>chat model |
512
517
| Yuan2 |[Langchao Yuan series models](https://github.com/IEIT-Yuan)| Chinese<br>English | 2B-102B | instruct model |
513
518
| XVerse |[XVerse series models](https://github.com/xverse-ai)| Chinese<br>English | 7B-65B | base model<br>chat model<br>long text model<br>MoE model |
@@ -550,14 +555,14 @@ The complete list of supported models and datasets can be found at [Supported Mo
550
555
| Qwen-VL |[Tongyi Qwen vision model](https://github.com/QwenLM)| Chinese<br>English | 7B<br>including quantized versions | base model<br>chat model |
551
556
| Qwen-Audio |[Tongyi Qwen speech model](https://github.com/QwenLM)| Chinese<br>English | 7B | base model<br>chat model |
552
557
| YI-VL |[01AI's YI series vision models](https://github.com/01-ai)| Chinese<br>English | 6B-34B | chat model |
553
-
| XComposer2 |[Pujiang AI Lab InternLM vision model](https://github.com/InternLM/InternLM)| Chinese<br>English | 7B | chat model |
558
+
| XComposer2<br>XComposer2.5|[Pujiang AI Lab InternLM vision model](https://github.com/InternLM/InternLM-XComposer)| Chinese<br>English | 7B | chat model |
554
559
| DeepSeek-VL |[DeepSeek series vision models](https://github.com/deepseek-ai)| Chinese<br>English | 1.3B-7B | chat model |
| CogVLM<br>CogVLM2<br>CogAgent<br>GLM4V |[Zhipu ChatGLM visual QA and Agent model](https://github.com/THUDM/)| Chinese<br>English | 9B-19B | chat model |
557
562
| Llava1.5<br>Llava1.6 |[Llava series models](https://github.com/haotian-liu/LLaVA)| English | 7B-34B | chat model |
558
-
| Llava-Next |[Llava-Next series models](https://github.com/LLaVA-VL/LLaVA-NeXT)| Chinese<br>English |8B-110B | chat model |
563
+
| Llava-Next<br>Llava-Next-Video|[Llava-Next series models](https://github.com/LLaVA-VL/LLaVA-NeXT)| Chinese<br>English |7B-110B | chat model |
559
564
| mPLUG-Owl |[mPLUG-Owl series models](https://github.com/X-PLUG/mPLUG-Owl)| English | 11B | chat model |
560
-
| InternVL |[InternVL](https://github.com/OpenGVLab/InternVL)| Chinese<br>English | 2B-25.5B<br>including quantized version | chat model |
565
+
| InternVL<br>Mini-Internvl<br>Internvl2|[InternVL](https://github.com/OpenGVLab/InternVL)| Chinese<br>English | 2B-25.5B<br>including quantized version | chat model |
561
566
| Llava-llama3 |[xtuner](https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers)| English | 8B | chat model |
562
567
| Phi3-Vision | Microsoft | English | 4B | chat model |
563
568
| PaliGemma | Google | English | 3B | chat model |
@@ -619,6 +624,19 @@ The complete list of supported models and datasets can be found at [Supported Mo
619
624
| Computing cards A10/A100, etc. | Support BF16 and FlashAttn |
620
625
| Huawei Ascend NPU ||
621
626
627
+
### Environment variables
628
+
629
+
- DATASET_ENABLE_CACHE: Enable cache when preprocess dataset, you can use `1/True` or `0/False`, default `False`
630
+
- WEBUI_SHARE: Share your web-ui, you can use `1/True` or `0/False`, default `False`
631
+
- SWIFT_UI_LANG: web-ui language, you can use `en` or `zh`, default `zh`
632
+
- WEBUI_SERVER: web-ui host ip,`0.0.0.0` for all routes,`127.0.0.1` for local network only. Default `127.0.0.1`
633
+
- WEBUI_PORT: web-ui port
634
+
- USE_HF: Use huggingface endpoint or ModelScope endpoint to download models and datasets. you can use `1/True` or `0/False`, default `False`
635
+
- FORCE_REDOWNLOAD: Force to re-download the dataset
636
+
637
+
Other variables like `CUDA_VISIBLE_DEVICES` are also supported, which are not listed here.
0 commit comments