# modelscope/swift

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/modelscope-swift).**

14,633 stars · 1,496 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/modelscope/swift
- Homepage: https://swift.readthedocs.io/zh-cn/latest/
- awesome-repositories: https://awesome-repositories.com/repository/modelscope-swift.md

## Description

Swift is a toolkit for the full-parameter and parameter-efficient fine-tuning of large language and multimodal models. It functions as a multimodal model trainer for text, image, video, and audio data, and includes specialized tools for model compression and reinforcement learning from human feedback.

The framework provides an alignment toolkit for optimizing model behavior using preference learning algorithms and reinforcement learning. It integrates parameter-efficient fine-tuning methods to adapt models with minimal memory and compute requirements, alongside utilities for reducing hardware overhead through weight quantization and compression.

The system covers a broad training surface including specialized workflows for embeddings, rerankers, and sequence classification. It incorporates distributed training acceleration via parallelism, memory optimization for long-text sequences, and integrated modules for measuring model performance and reliability.

The project includes tools for model deployment and serving using hardware acceleration backends.

## Tags

### Artificial Intelligence & ML

- [Parameter Efficient Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/parameter-efficient-fine-tuning.md) — Provides a comprehensive suite of parameter-efficient fine-tuning methods, including adapters and low-rank approximations.
- [Distributed Training Accelerators](https://awesome-repositories.com/f/artificial-intelligence-ml/distributed-training-accelerators.md) — Accelerates training for large models by distributing workloads across multiple processors using advanced parallelism. ([source](https://github.com/modelscope/swift#readme))
- [Distributed Training](https://awesome-repositories.com/f/artificial-intelligence-ml/distributed-training-frameworks/distributed-training.md) — Scales the training of large models across multiple processors via data and model parallelism.
- [LLM Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/full-parameter-fine-tuning/custom-data-fine-tunings/llm-fine-tuning.md) — Serves as a full-featured toolkit for both full-parameter and parameter-efficient fine-tuning of LLMs and multimodal models.
- [Multimodal Model Trainers](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-trainers/multimodal-training-interfaces/multimodal-model-trainers.md) — Functions as a training system for models processing mixed modalities including text, image, video, and audio.
- [Large Language Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/large-language-model-fine-tuning.md) — Adapts large language and multimodal models to specific tasks using flexible training methods. ([source](https://github.com/modelscope/swift#readme))
- [Preference-Based Model Alignments](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/fine-tuning-and-alignment/preference-based-model-alignments.md) — Refines model behavior using preference-based alignment algorithms like DPO and GRPO.
- [Reinforcement Learning Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/pipelines-and-orchestration/training-orchestration-systems/training-methodologies/reinforcement-learning-integrations.md) — Integrates reinforcement learning from human feedback and extensible reward functions to refine model intelligence. ([source](https://github.com/modelscope/swift#readme))
- [Preference Alignment](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning/fine-tuning-benchmarking/preference-alignment.md) — Improves model behavior and alignment with human values using preference learning algorithms.
- [Model Parallelism](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/training-frameworks/model-training-pipelines/model-parallelism.md) — Implements data, pipeline, and tensor parallelism to distribute massive model weights and computation across multiple GPUs.
- [Alignment Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training-toolkits/alignment-toolkits.md) — Offers a dedicated toolkit for optimizing model behavior via RLHF and algorithms like DPO and GRPO.
- [Multimodal Training](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-training.md) — Provides specialized workflows and data packing for training models across text, image, video, and audio modalities. ([source](https://github.com/modelscope/swift#readme))
- [Weight Quantization](https://awesome-repositories.com/f/artificial-intelligence-ml/quantized-inference-runtimes/weight-quantization.md) — Reduces model memory footprint and hardware requirements through weight quantization.
- [Attention Memory Optimizations](https://awesome-repositories.com/f/artificial-intelligence-ml/attention-mechanisms/attention-memory-optimizations.md) — Manages attention mechanisms and memory allocation to support long-text inputs without exceeding video memory.
- [Model Compression Suites](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/compression-techniques/model-pruning/model-compression-suites.md) — Provides utilities for reducing the size and hardware requirements of large models via quantization and compression.
- [LLM Performance Evaluators](https://awesome-repositories.com/f/artificial-intelligence-ml/model-performance-evaluators/llm-performance-evaluators.md) — Includes integrated evaluation modules to measure the accuracy and reliability of large language models. ([source](https://github.com/modelscope/swift#readme))
- [Specialized Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/specialized-model-training.md) — Implements specialized training workflows for creating high-performance embedding models, rerankers, and sequence classifiers. ([source](https://github.com/modelscope/swift#readme))

### Data & Databases

- [Data Packing](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-processing/ml-data-pipelines/training-data-pipelines/multimodal-training-data-formatters/data-packing.md) — Optimizes multimodal training throughput by packing diverse data types into sequences to prevent padding waste.
- [Training Memory Optimizers](https://awesome-repositories.com/f/data-databases/memory-optimization-strategies/training-memory-optimizers.md) — Optimizes attention and sequence data handling to reduce video memory consumption during long-text training. ([source](https://github.com/modelscope/swift#readme))

### Part of an Awesome List

- [Fine-Tuning Frameworks](https://awesome-repositories.com/f/awesome-lists/ai/fine-tuning-frameworks.md) — PEFT and full-parameter fine-tuning for diverse models.
- [Fine-Tuning Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/fine-tuning-frameworks.md) — Framework for PEFT and full-parameter fine-tuning.
- [Training Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/training-frameworks.md) — Lightweight framework for model fine-tuning and deployment.
