[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1164":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":16,"starSnapshotCount":16,"syncStatus":42,"lastSyncTime":43,"discoverSource":44},1164,"ColossalAI","hpcaitech\u002FColossalAI","hpcaitech","Making large AI models cheaper, faster and more accessible","https:\u002F\u002Fwww.colossalai.org",null,"Python",41395,4511,378,443,0,1,13,36,7,45,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38],"ai","big-model","data-parallelism","deep-learning","distributed-computing","foundation-models","heterogeneous-training","hpc","inference","large-scale","model-parallelism","pipeline-parallelism","2026-06-12 02:00:24","# Colossal-AI\n\u003Cdiv id=\"top\" align=\"center\">\n\n   [![logo](https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002Fcolossal-ai_logo_vertical.png)](https:\u002F\u002Fwww.colossalai.org\u002F)\n\n   Colossal-AI: Making large AI models cheaper, faster, and more accessible\n\n   \u003Ch3> \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2110.14883\"> Paper \u003C\u002Fa> |\n   \u003Ca href=\"https:\u002F\u002Fwww.colossalai.org\u002F\"> Documentation \u003C\u002Fa> |\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\"> Examples \u003C\u002Fa> |\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fdiscussions\"> Forum \u003C\u002Fa> |\n   \u003Ca href=\"https:\u002F\u002Fcolossalai.org\u002Fzh-Hans\u002Fdocs\u002Fget_started\u002Fbonus\u002F\">GPU Cloud Playground \u003C\u002Fa> |\n   \u003Ca href=\"https:\u002F\u002Fhpc-ai.com\u002Fblog\"> Blog \u003C\u002Fa>\u003C\u002Fh3>\n\n   [![GitHub Repo stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fhpcaitech\u002FColossalAI?style=social)](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fstargazers)\n   [![Build](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Factions\u002Fworkflows\u002Fbuild_on_schedule.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Factions\u002Fworkflows\u002Fbuild_on_schedule.yml)\n   [![Documentation](https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fcolossalai\u002Fbadge\u002F?version=latest)](https:\u002F\u002Fcolossalai.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n   [![CodeFactor](https:\u002F\u002Fwww.codefactor.io\u002Frepository\u002Fgithub\u002Fhpcaitech\u002Fcolossalai\u002Fbadge)](https:\u002F\u002Fwww.codefactor.io\u002Frepository\u002Fgithub\u002Fhpcaitech\u002Fcolossalai)\n   [![HuggingFace badge](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97HuggingFace-Join-yellow)](https:\u002F\u002Fhuggingface.co\u002Fhpcai-tech)\n   [![slack badge](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSlack-join-blueviolet?logo=slack&amp)](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002Fpublic_assets\u002Ftree\u002Fmain\u002Fcolossalai\u002Fcontact\u002Fslack)\n   [![WeChat badge](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F微信-加入-green?logo=wechat&amp)](https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FWeChat.png)\n\n\n   | [English](README.md) | [中文](docs\u002FREADME-zh-Hans.md) |\n\n\u003C\u002Fdiv>\n\n## Instantly Run Colossal-AI on Enterprise-Grade GPUs\n\nSkip the setup. Access a powerful, pre-configured Colossal-AI environment on [**HPC-AI Cloud**](https:\u002F\u002Fhpc-ai.com\u002F?utm_source=github&utm_medium=social&utm_campaign=promotion-colossalai).\n\nTrain your models and scale your AI workload in one click!\n\n* **NVIDIA Blackwell B200s**: Experience the next generation of AI performance ([See Benchmarks](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fb200)). Now available on cloud from **$2.47\u002Fhr**.\n* **Cost-Effective H200 Cluster**: Get premier performance with on-demand rental from just **$1.99\u002Fhr**.\n\n[**Get Started Now & Claim Your Free Credits →**](https:\u002F\u002Fhpc-ai.com\u002F?utm_source=github&utm_medium=social&utm_campaign=promotion-colossalai)\n\n\u003Cdiv align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fhpc-ai.com\u002F?utm_source=github&utm_medium=social&utm_campaign=promotion-colossalai\">\n   \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002Fpublic_assets\u002Fblob\u002Fmain\u002Fcolossalai\u002Fimg\u002F2-3.png\" width=\"850\" \u002F>\n   \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## Instant Access Top Open Models at Half the Cost\n\nSkip the hassle. Access powerful, long-context LLMs seamlessly through [**HPC-AI Model APIs**](https:\u002F\u002Fhpc-ai.com\u002Fmodel-apis?utm_source=github&utm_medium=social&utm_campaign=promotion-colossalai).\n\nBuild your AI agents, chatbots, and RAG applications with HPC-AI Model APIs!\n\n* **Latest & Greatest Models**: Experience state-of-the-art performance with Kimi 2.5, MiniMax 2.5, and GLM 5.1. Perfect for massive 2M+ context windows and complex coding tasks.\n\n* **Unbeatable Pricing**: Stop overpaying for API endpoints. Get premier inference speed at up to 50% cheaper than OpenRouter.\n\n[**Get Started Now & Claim Your $4 Free Credits →**](https:\u002F\u002Fwww.hpc-ai.com\u002Faccount\u002Fsignup?redirectUrl=\u002Fmodels-console\u002Fmodels&invitation_code=HPCAI-MAPI&utm_source=google&utm_medium=social&utm_id=newlaunch)\n\n\u003Cdiv align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fhpc-ai.com\u002Fmodel-apis?utm_source=github&utm_medium=social&utm_campaign=promotion-colossalai\">\n   \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002Fpublic_assets\u002Fblob\u002Fmain\u002Fcolossalai\u002Fimg\u002Fmodel%20APIs.png\" width=\"850\" \u002F>\n   \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n### Colossal-AI Benchmark\n\nTo see how these performance gains translate to real-world applications, we conducted a large language model training benchmark using Colossal-AI on Llama-like models. The tests were run on both 8-card and 16-card configurations for 7B and 70B models, respectively.\n\n|              GPU              |  GPUs  | Model Size |    Parallelism    | Batch Size per DP | Seqlen | Throughput | TFLOPS\u002FGPU  | Peak Mem(MiB)  |\n| :-----------------------------: | :--------: | :-------------: | :------------------: | :-----------: | :--------------: | :-------------: | :-------------: | :-------------: |\n|         H200            |     8     |      7B       |   zero2(dp8)     | 36 |        4096     |       17.13 samp\u002Fs     |       534.18     |       119040.02     |\n|         H200            |     16     |      70B       |   zero2     | 48 |        4096     |       3.27 samp\u002Fs     |       469.1     |       150032.23     |\n|         B200            |     8     |      7B       |   zero1(dp2)+tp2+pp4     | 128 |        4096     |       25.83 samp\u002Fs     |       805.69     |       100119.77     |\n|         H200            |     16     |      70B       |   zero1(dp2)+tp2+pp4     | 128 |        4096     |       5.66 samp\u002Fs     |       811.79     |       100072.02     |\n\nThe results from the Colossal-AI benchmark provide the most practical insight. For the 7B model on 8 cards, the **B200 achieved a 50% higher throughput** and a significant increase in TFLOPS per GPU. For the 70B model on 16 cards, the B200 again demonstrated a clear advantage, with **over 70% higher throughput and TFLOPS per GPU**. These numbers show that the B200's performance gains translate directly to faster training times for large-scale models.\n\n## Latest News\n* [2025\u002F02] [DeepSeek 671B Fine-Tuning Guide Revealed—Unlock the Upgraded DeepSeek Suite with One Click, AI Players Ecstatic!](https:\u002F\u002Fcompany.hpc-ai.com\u002Fblog\u002Fshocking-release-deepseek-671b-fine-tuning-guide-revealed-unlock-the-upgraded-deepseek-suite-with-one-click-ai-players-ecstatic)\n* [2024\u002F12] [The development cost of video generation models has saved by 50%! Open-source solutions are now available with H200 GPU vouchers](https:\u002F\u002Fcompany.hpc-ai.com\u002Fblog\u002Fthe-development-cost-of-video-generation-models-has-saved-by-50-open-source-solutions-are-now-available-with-h200-gpu-vouchers) [[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FOpen-Sora\u002Fblob\u002Fmain\u002Fscripts\u002Ftrain.py) [[vouchers]](https:\u002F\u002Fcolossalai.org\u002Fzh-Hans\u002Fdocs\u002Fget_started\u002Fbonus\u002F)\n* [2024\u002F10] [How to build a low-cost Sora-like app? Solutions for you](https:\u002F\u002Fcompany.hpc-ai.com\u002Fblog\u002Fhow-to-build-a-low-cost-sora-like-app-solutions-for-you)\n* [2024\u002F09] [Singapore Startup HPC-AI Tech Secures 50 Million USD in Series A Funding to Build the Video Generation AI Model and GPU Platform](https:\u002F\u002Fcompany.hpc-ai.com\u002Fblog\u002Fsingapore-startup-hpc-ai-tech-secures-50-million-usd-in-series-a-funding-to-build-the-video-generation-ai-model-and-gpu-platform)\n* [2024\u002F09] [Reducing AI Large Model Training Costs by 30% Requires Just a Single Line of Code From FP8 Mixed Precision Training Upgrades](https:\u002F\u002Fcompany.hpc-ai.com\u002Fblog\u002Freducing-ai-large-model-training-costs-by-30-requires-just-a-single-line-of-code-from-fp8-mixed-precision-training-upgrades)\n* [2024\u002F06] [Open-Sora Continues Open Source: Generate Any 16-Second 720p HD Video with One Click, Model Weights Ready to Use](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fopen-sora-from-hpc-ai-tech-team-continues-open-source-generate-any-16-second-720p-hd-video-with-one-click-model-weights-ready-to-use)\n* [2024\u002F05] [Large AI Models Inference Speed Doubled, Colossal-Inference Open Source Release](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fcolossal-inference)\n* [2024\u002F04] [Open-Sora Unveils Major Upgrade: Embracing Open Source with Single-Shot 16-Second Video Generation and 720p Resolution](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fopen-soras-comprehensive-upgrade-unveiled-embracing-16-second-video-generation-and-720p-resolution-in-open-source)\n* [2024\u002F04] [Most cost-effective solutions for inference, fine-tuning and pretraining, tailored to LLaMA3 series](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fmost-cost-effective-solutions-for-inference-fine-tuning-and-pretraining-tailored-to-llama3-series)\n\n## Table of Contents\n\u003Cul>\n \u003Cli>\u003Ca href=\"#Why-Colossal-AI\">Why Colossal-AI\u003C\u002Fa> \u003C\u002Fli>\n \u003Cli>\u003Ca href=\"#Features\">Features\u003C\u002Fa> \u003C\u002Fli>\n \u003Cli>\n   \u003Ca href=\"#Colossal-AI-in-the-Real-World\">Colossal-AI for Real World Applications\u003C\u002Fa>\n   \u003Cul>\n     \u003Cli>\u003Ca href=\"#Open-Sora\">Open-Sora: Revealing Complete Model Parameters, Training Details, and Everything for Sora-like Video Generation Models\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#Colossal-LLaMA-2\">Colossal-LLaMA-2: One Half-Day of Training Using a Few Hundred Dollars Yields Similar Results to Mainstream Large Models, Open-Source and Commercial-Free Domain-Specific Llm Solution\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#ColossalChat\">ColossalChat: An Open-Source Solution for Cloning ChatGPT With a Complete RLHF Pipeline\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#AIGC\">AIGC: Acceleration of Stable Diffusion\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#Biomedicine\">Biomedicine: Acceleration of AlphaFold Protein Structure\u003C\u002Fa>\u003C\u002Fli>\n   \u003C\u002Ful>\n \u003C\u002Fli>\n \u003Cli>\n   \u003Ca href=\"#Parallel-Training-Demo\">Parallel Training Demo\u003C\u002Fa>\n   \u003Cul>\n     \u003Cli>\u003Ca href=\"#LLaMA3\">LLaMA 1\u002F2\u002F3 \u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#MoE\">MoE\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#GPT-3\">GPT-3\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#GPT-2\">GPT-2\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#BERT\">BERT\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#PaLM\">PaLM\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#OPT\">OPT\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#ViT\">ViT\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#Recommendation-System-Models\">Recommendation System Models\u003C\u002Fa>\u003C\u002Fli>\n   \u003C\u002Ful>\n \u003C\u002Fli>\n \u003Cli>\n   \u003Ca href=\"#Single-GPU-Training-Demo\">Single GPU Training Demo\u003C\u002Fa>\n   \u003Cul>\n     \u003Cli>\u003Ca href=\"#GPT-2-Single\">GPT-2\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#PaLM-Single\">PaLM\u003C\u002Fa>\u003C\u002Fli>\n   \u003C\u002Ful>\n \u003C\u002Fli>\n \u003Cli>\n   \u003Ca href=\"#Inference\">Inference\u003C\u002Fa>\n   \u003Cul>\n     \u003Cli>\u003Ca href=\"#Colossal-Inference\">Colossal-Inference: Large AI  Models Inference Speed Doubled\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#Grok-1\">Grok-1: 314B model of PyTorch + HuggingFace Inference\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#SwiftInfer\">SwiftInfer:Breaks the Length Limit of LLM for Multi-Round Conversations with 46% Acceleration\u003C\u002Fa>\u003C\u002Fli>\n   \u003C\u002Ful>\n \u003C\u002Fli>\n \u003Cli>\n   \u003Ca href=\"#Installation\">Installation\u003C\u002Fa>\n   \u003Cul>\n     \u003Cli>\u003Ca href=\"#PyPI\">PyPI\u003C\u002Fa>\u003C\u002Fli>\n     \u003Cli>\u003Ca href=\"#Install-From-Source\">Install From Source\u003C\u002Fa>\u003C\u002Fli>\n   \u003C\u002Ful>\n \u003C\u002Fli>\n \u003Cli>\u003Ca href=\"#Use-Docker\">Use Docker\u003C\u002Fa>\u003C\u002Fli>\n \u003Cli>\u003Ca href=\"#Community\">Community\u003C\u002Fa>\u003C\u002Fli>\n \u003Cli>\u003Ca href=\"#Contributing\">Contributing\u003C\u002Fa>\u003C\u002Fli>\n \u003Cli>\u003Ca href=\"#Cite-Us\">Cite Us\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\n## Why Colossal-AI\n\u003Cdiv align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FKnXSfjqkKN0\">\n   \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FJamesDemmel_Colossal-AI.png\" width=\"600\" \u002F>\n   \u003C\u002Fa>\n\n   Prof. James Demmel (UC Berkeley): Colossal-AI makes training AI models efficient, easy, and scalable.\n\u003C\u002Fdiv>\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Features\n\nColossal-AI provides a collection of parallel components for you. We aim to support you to write your\ndistributed deep learning models just like how you write your model on your laptop. We provide user-friendly tools to kickstart\ndistributed training and inference in a few lines.\n\n- Parallelism strategies\n  - Data Parallelism\n  - Pipeline Parallelism\n  - 1D, [2D](https:\u002F\u002Farxiv.org\u002Fabs\u002F2104.05343), [2.5D](https:\u002F\u002Farxiv.org\u002Fabs\u002F2105.14500), [3D](https:\u002F\u002Farxiv.org\u002Fabs\u002F2105.14450) Tensor Parallelism\n  - [Sequence Parallelism](https:\u002F\u002Farxiv.org\u002Fabs\u002F2105.13120)\n  - [Zero Redundancy Optimizer (ZeRO)](https:\u002F\u002Farxiv.org\u002Fabs\u002F1910.02054)\n  - [Auto-Parallelism](https:\u002F\u002Farxiv.org\u002Fabs\u002F2302.02599)\n\n- Heterogeneous Memory Management\n  - [PatrickStar](https:\u002F\u002Farxiv.org\u002Fabs\u002F2108.05818)\n\n- Friendly Usage\n  - Parallelism based on the configuration file\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Colossal-AI in the Real World\n### Open-Sora\n\n[Open-Sora](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FOpen-Sora)：Revealing Complete Model Parameters, Training Details, and Everything for Sora-like Video Generation Models\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FOpen-Sora)\n[[blog]](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fopen-sora-from-hpc-ai-tech-team-continues-open-source-generate-any-16-second-720p-hd-video-with-one-click-model-weights-ready-to-use)\n[[Model weights]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FOpen-Sora?tab=readme-ov-file#model-weights)\n[[Demo]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FOpen-Sora?tab=readme-ov-file#-latest-demo)\n[[GPU Cloud Playground]](https:\u002F\u002Fcloud.luchentech.com\u002F)\n[[OpenSora Image]](https:\u002F\u002Fcloud.luchentech.com\u002Fdoc\u002Fdocs\u002Fimage\u002Fopen-sora\u002F)\n\n\u003Cdiv align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FilMQpU71ddI?si=J4JSPzZ03ycYmlki\">\n   \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fapplications\u002Fsora\u002Fopensora-v1.2.png\" width=\"700\" \u002F>\n   \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n### Colossal-LLaMA-2\n\n[[GPU Cloud Playground]](https:\u002F\u002Fcloud.luchentech.com\u002F)\n[[LLaMA3 Image]](https:\u002F\u002Fcloud.luchentech.com\u002Fdoc\u002Fdocs\u002Fimage\u002Fllama)\n\n- 7B: One half-day of training using a few hundred dollars yields similar results to mainstream large models, open-source and commercial-free domain-specific LLM solution.\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fapplications\u002FColossal-LLaMA-2)\n[[blog]](https:\u002F\u002Fwww.hpc-ai.tech\u002Fblog\u002Fone-half-day-of-training-using-a-few-hundred-dollars-yields-similar-results-to-mainstream-large-models-open-source-and-commercial-free-domain-specific-llm-solution)\n[[HuggingFace model weights]](https:\u002F\u002Fhuggingface.co\u002Fhpcai-tech\u002FColossal-LLaMA-2-7b-base)\n[[Modelscope model weights]](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fcolossalai\u002FColossal-LLaMA-2-7b-base\u002Fsummary)\n\n- 13B: Construct refined 13B private model with just $5000 USD.\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fapplications\u002FColossal-LLaMA-2)\n[[blog]](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fcolossal-llama-2-13b)\n[[HuggingFace model weights]](https:\u002F\u002Fhuggingface.co\u002Fhpcai-tech\u002FColossal-LLaMA-2-13b-base)\n[[Modelscope model weights]](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fcolossalai\u002FColossal-LLaMA-2-13b-base\u002Fsummary)\n\n|              Model              |  Backbone  | Tokens Consumed |     MMLU (5-shot)    | CMMLU (5-shot)| AGIEval (5-shot) | GAOKAO (0-shot) | CEval (5-shot)  |\n| :-----------------------------: | :--------: | :-------------: | :------------------: | :-----------: | :--------------: | :-------------: | :-------------: |\n|          Baichuan-7B            |     -      |      1.2T       |    42.32 (42.30)     | 44.53 (44.02) |        38.72     |       36.74     |       42.80     |\n|       Baichuan-13B-Base         |     -      |      1.4T       |    50.51 (51.60)     | 55.73 (55.30) |        47.20     |       51.41     |       53.60     |\n|       Baichuan2-7B-Base         |     -      |      2.6T       |    46.97 (54.16)     | 57.67 (57.07) |        45.76     |       52.60     |       54.00     |\n|       Baichuan2-13B-Base        |     -      |      2.6T       |    54.84 (59.17)     | 62.62 (61.97) |        52.08     |       58.25     |       58.10     |\n|           ChatGLM-6B            |     -      |      1.0T       |    39.67 (40.63)     |   41.17 (-)   |        40.10     |       36.53     |       38.90     |\n|          ChatGLM2-6B            |     -      |      1.4T       |    44.74 (45.46)     |   49.40 (-)   |        46.36     |       45.49     |       51.70     |\n|          InternLM-7B            |     -      |      1.6T       |    46.70 (51.00)     |   52.00 (-)   |        44.77     |       61.64     |       52.80     |\n|            Qwen-7B              |     -      |      2.2T       |    54.29 (56.70)     | 56.03 (58.80) |        52.47     |       56.42     |       59.60     |\n|           Llama-2-7B            |     -      |      2.0T       |    44.47 (45.30)     |   32.97 (-)   |        32.60     |       25.46     |         -       |\n| Linly-AI\u002FChinese-LLaMA-2-7B-hf  | Llama-2-7B |      1.0T       |        37.43         |     29.92     |        32.00     |       27.57     |         -       |\n| wenge-research\u002Fyayi-7b-llama2   | Llama-2-7B |        -        |        38.56         |     31.52     |        30.99     |       25.95     |         -       |\n| ziqingyang\u002Fchinese-llama-2-7b   | Llama-2-7B |        -        |        33.86         |     34.69     |        34.52     |       25.18     |        34.2     |\n| TigerResearch\u002Ftigerbot-7b-base  | Llama-2-7B |      0.3T       |        43.73         |     42.04     |        37.64     |       30.61     |         -       |\n|  LinkSoul\u002FChinese-Llama-2-7b    | Llama-2-7B |        -        |        48.41         |     38.31     |        38.45     |       27.72     |         -       |\n|       FlagAlpha\u002FAtom-7B         | Llama-2-7B |      0.1T       |        49.96         |     41.10     |        39.83     |       33.00     |         -       |\n| IDEA-CCNL\u002FZiya-LLaMA-13B-v1.1   | Llama-13B  |      0.11T      |        50.25         |     40.99     |        40.04     |       30.54     |         -       |\n|  **Colossal-LLaMA-2-7b-base**   | Llama-2-7B |   **0.0085T**   |        53.06         |     49.89     |        51.48     |       58.82     |        50.2     |\n|  **Colossal-LLaMA-2-13b-base**  | Llama-2-13B |   **0.025T**    |        56.42         |     61.80     |        54.69     |       69.53     |        60.3     |\n\n\n### ColossalChat\n\n\u003Cdiv align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=HcTiHzApHm0\">\n   \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fapplications\u002Fchat\u002FColossalChat%20YouTube.png\" width=\"700\" \u002F>\n   \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n[ColossalChat](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fapplications\u002FChat): An open-source solution for cloning [ChatGPT](https:\u002F\u002Fopenai.com\u002Fblog\u002Fchatgpt\u002F) with a complete RLHF pipeline.\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fapplications\u002FChat)\n[[blog]](https:\u002F\u002Fmedium.com\u002F@yangyou_berkeley\u002Fcolossalchat-an-open-source-solution-for-cloning-chatgpt-with-a-complete-rlhf-pipeline-5edf08fb538b)\n[[demo]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=HcTiHzApHm0)\n[[tutorial]](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=-qFBZFmOJfg)\n\n\u003Cp id=\"ColossalChat-Speed\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fapplications\u002Fchat\u002FColossalChat%20Speed.jpg\" width=450\u002F>\n\u003C\u002Fp>\n\n- Up to 10 times faster for RLHF PPO Stage3 Training\n\n\u003Cp id=\"ColossalChat_scaling\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fapplications\u002Fchatgpt\u002FChatGPT%20scaling.png\" width=800\u002F>\n\u003C\u002Fp>\n\n- Up to 7.73 times faster for single server training and 1.42 times faster for single-GPU inference\n\n\u003Cp id=\"ColossalChat-1GPU\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fapplications\u002Fchatgpt\u002FChatGPT-1GPU.jpg\" width=450\u002F>\n\u003C\u002Fp>\n\n- Up to 10.3x growth in model capacity on one GPU\n- A mini demo training process requires only 1.62GB of GPU memory (any consumer-grade GPU)\n\n\u003Cp id=\"ColossalChat-LoRA\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fapplications\u002Fchatgpt\u002FLoRA%20data.jpg\" width=600\u002F>\n\u003C\u002Fp>\n\n- Increase the capacity of the fine-tuning model by up to 3.7 times on a single GPU\n- Keep at a sufficiently high running speed\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n\n### AIGC\nAcceleration of AIGC (AI-Generated Content) models such as [Stable Diffusion v1](https:\u002F\u002Fgithub.com\u002FCompVis\u002Fstable-diffusion) and [Stable Diffusion v2](https:\u002F\u002Fgithub.com\u002FStability-AI\u002Fstablediffusion).\n\u003Cp id=\"diffusion_train\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FStable%20Diffusion%20v2.png\" width=800\u002F>\n\u003C\u002Fp>\n\n- [Training](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Fimages\u002Fdiffusion): Reduce Stable Diffusion memory consumption by up to 5.6x and hardware cost by up to 46x (from A100 to RTX3060).\n\n\u003Cp id=\"diffusion_demo\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FDreamBooth.png\" width=800\u002F>\n\u003C\u002Fp>\n\n- [DreamBooth Fine-tuning](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Fimages\u002Fdreambooth): Personalize your model using just 3-5 images of the desired subject.\n\n\u003Cp id=\"inference-sd\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FStable%20Diffusion%20Inference.jpg\" width=800\u002F>\n\u003C\u002Fp>\n\n- [Inference](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Fimages\u002Fdiffusion): Reduce inference GPU memory consumption by 2.5x.\n\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n### Biomedicine\nAcceleration of [AlphaFold Protein Structure](https:\u002F\u002Falphafold.ebi.ac.uk\u002F)\n\n\u003Cp id=\"FastFold\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FFastFold.jpg\" width=800\u002F>\n\u003C\u002Fp>\n\n- [FastFold](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FFastFold): Accelerating training and inference on GPU Clusters, faster data processing, inference sequence containing more than 10000 residues.\n\n\u003Cp id=\"FastFold-Intel\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002Fdata%20preprocessing%20with%20Intel.jpg\" width=600\u002F>\n\u003C\u002Fp>\n\n- [FastFold with Intel](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FFastFold): 3x inference acceleration and 39% cost reduce.\n\n\u003Cp id=\"xTrimoMultimer\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FxTrimoMultimer_Table.jpg\" width=800\u002F>\n\u003C\u002Fp>\n\n- [xTrimoMultimer](https:\u002F\u002Fgithub.com\u002Fbiomap-research\u002FxTrimoMultimer): accelerating structure prediction of protein monomers and multimer by 11x.\n\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Parallel Training Demo\n### LLaMA3\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fexamples\u002Fimages\u002FLLaMA3-70B-H100.png\" width=600\u002F>\n\u003C\u002Fp>\n\n- 70 billion parameter LLaMA3 model training accelerated by 18%\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fllama)\n[[GPU Cloud Playground]](https:\u002F\u002Fcloud.luchentech.com\u002F)\n[[LLaMA3 Image]](https:\u002F\u002Fcloud.luchentech.com\u002Fdoc\u002Fdocs\u002Fimage\u002Fllama)\n\n### LLaMA2\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002Fllama2_pretraining.png\" width=600\u002F>\n\u003C\u002Fp>\n\n- 70 billion parameter LLaMA2 model training accelerated by 195%\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fllama)\n[[blog]](https:\u002F\u002Fwww.hpc-ai.tech\u002Fblog\u002F70b-llama2-training)\n\n### LLaMA1\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fexamples\u002Fimages\u002FLLaMA_pretraining.png\" width=600\u002F>\n\u003C\u002Fp>\n\n- 65-billion-parameter large model pretraining accelerated by 38%\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fllama)\n[[blog]](https:\u002F\u002Fwww.hpc-ai.tech\u002Fblog\u002Flarge-model-pretraining)\n\n### MoE\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fexamples\u002Fimages\u002FMOE_training.png\" width=800\u002F>\n\u003C\u002Fp>\n\n- Enhanced MoE parallelism, Open-source MoE model training can be 9 times more efficient\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fopenmoe)\n[[blog]](https:\u002F\u002Fwww.hpc-ai.tech\u002Fblog\u002Fenhanced-moe-parallelism-open-source-moe-model-training-can-be-9-times-more-efficient)\n\n### GPT-3\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FGPT3-v5.png\" width=700\u002F>\n\u003C\u002Fp>\n\n- Save 50% GPU resources and 10.7% acceleration\n\n### GPT-2\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FGPT2.png\" width=800\u002F>\n\n- 11x lower GPU memory consumption, and superlinear scaling efficiency with Tensor Parallelism\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002F(updated)GPT-2.png\" width=800>\n\n- 24x larger model size on the same hardware\n- over 3x acceleration\n### BERT\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FBERT.png\" width=800\u002F>\n\n- 2x faster training, or 50% longer sequence length\n\n### PaLM\n- [PaLM-colossalai](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FPaLM-colossalai): Scalable implementation of Google's Pathways Language Model ([PaLM](https:\u002F\u002Fai.googleblog.com\u002F2022\u002F04\u002Fpathways-language-model-palm-scaling-to.html)).\n\n### OPT\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FOPT_update.png\" width=800\u002F>\n\n- [Open Pretrained Transformer (OPT)](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fmetaseq), a 175-Billion parameter AI language model released by Meta, which stimulates AI programmers to perform various downstream tasks and application deployments because of public pre-trained model weights.\n- 45% speedup fine-tuning OPT at low cost in lines. [[Example]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fopt) [[Online Serving]](https:\u002F\u002Fcolossalai.org\u002Fdocs\u002Fadvanced_tutorials\u002Fopt_service)\n\nPlease visit our [documentation](https:\u002F\u002Fwww.colossalai.org\u002F) and [examples](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples) for more details.\n\n### ViT\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FViT.png\" width=\"450\" \u002F>\n\u003C\u002Fp>\n\n- 14x larger batch size, and 5x faster training for Tensor Parallelism = 64\n\n### Recommendation System Models\n- [Cached Embedding](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FCachedEmbedding), utilize software cache to train larger embedding tables with a smaller GPU memory budget.\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Single GPU Training Demo\n\n### GPT-2\n\u003Cp id=\"GPT-2-Single\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FGPT2-GPU1.png\" width=450\u002F>\n\u003C\u002Fp>\n\n- 20x larger model size on the same hardware\n\n\u003Cp id=\"GPT-2-NVME\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FGPT2-NVME.png\" width=800\u002F>\n\u003C\u002Fp>\n\n- 120x larger model size on the same hardware (RTX 3080)\n\n### PaLM\n\u003Cp id=\"PaLM-Single\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FPaLM-GPU1.png\" width=450\u002F>\n\u003C\u002Fp>\n\n- 34x larger model size on the same hardware\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n\n## Inference\n### Colossal-Inference\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002Finference\u002Fcolossal-inference-v1-1.png\" width=1000\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002Finference\u002Fcolossal-inference-v1-2.png\" width=1000\u002F>\n\u003C\u002Fp>\n\n - Large AI models inference speed doubled, compared to the offline inference performance of vLLM in some cases.\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fcolossalai\u002Finference)\n[[blog]](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002Fcolossal-inference)\n[[GPU Cloud Playground]](https:\u002F\u002Fcloud.luchentech.com\u002F)\n[[LLaMA3 Image]](https:\u002F\u002Fcloud.luchentech.com\u002Fdoc\u002Fdocs\u002Fimage\u002Fllama)\n\n### Grok-1\n\u003Cp id=\"Grok-1\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fexamples\u002Fimages\u002Fgrok-1-inference.jpg\" width=600\u002F>\n\u003C\u002Fp>\n\n - 314 Billion Parameter Grok-1 Inference Accelerated by 3.8x, an easy-to-use Python + PyTorch + HuggingFace version for Inference.\n\n[[code]](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fgrok-1)\n[[blog]](https:\u002F\u002Fhpc-ai.com\u002Fblog\u002F314-billion-parameter-grok-1-inference-accelerated-by-3.8x-efficient-and-easy-to-use-pytorchhuggingface-version-is-here)\n[[HuggingFace Grok-1 PyTorch model weights]](https:\u002F\u002Fhuggingface.co\u002Fhpcai-tech\u002Fgrok-1)\n[[ModelScope Grok-1 PyTorch model weights]](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fcolossalai\u002Fgrok-1-pytorch\u002Fsummary)\n\n### SwiftInfer\n\u003Cp id=\"SwiftInfer\" align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FSwiftInfer.jpg\" width=800\u002F>\n\u003C\u002Fp>\n\n- [SwiftInfer](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FSwiftInfer): Inference performance improved by 46%, open source solution breaks the length limit of LLM for multi-round conversations\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Installation\n\nRequirements:\n- PyTorch >= 2.2\n- Python >= 3.7\n- CUDA >= 11.0\n- [NVIDIA GPU Compute Capability](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-gpus) >= 7.0 (V100\u002FRTX20 and higher)\n- Linux OS\n\nIf you encounter any problem with installation, you may want to raise an [issue](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fissues\u002Fnew\u002Fchoose) in this repository.\n\n### Install from PyPI\n\nYou can easily install Colossal-AI with the following command. **By default, we do not build PyTorch extensions during installation.**\n\n```bash\npip install colossalai\n```\n\n**Note: only Linux is supported for now.**\n\nHowever, if you want to build the PyTorch extensions during installation, you can set `BUILD_EXT=1`.\n\n```bash\nBUILD_EXT=1 pip install colossalai\n```\n\n**Otherwise, CUDA kernels will be built during runtime when you actually need them.**\n\nWe also keep releasing the nightly version to PyPI every week. This allows you to access the unreleased features and bug fixes in the main branch.\nInstallation can be made via\n\n```bash\npip install colossalai-nightly\n```\n\n### Download From Source\n\n> The version of Colossal-AI will be in line with the main branch of the repository. Feel free to raise an issue if you encounter any problems. :)\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI.git\ncd ColossalAI\n\n# install colossalai\npip install .\n```\n\nBy default, we do not compile CUDA\u002FC++ kernels. ColossalAI will build them during runtime.\nIf you want to install and enable CUDA kernel fusion (compulsory installation when using fused optimizer):\n\n```shell\nBUILD_EXT=1 pip install .\n```\n\nFor Users with CUDA 10.2, you can still build ColossalAI from source. However, you need to manually download the cub library and copy it to the corresponding directory.\n\n```bash\n# clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI.git\ncd ColossalAI\n\n# download the cub library\nwget https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fcub\u002Farchive\u002Frefs\u002Ftags\u002F1.8.0.zip\nunzip 1.8.0.zip\ncp -r cub-1.8.0\u002Fcub\u002F colossalai\u002Fkernel\u002Fcuda_native\u002Fcsrc\u002Fkernels\u002Finclude\u002F\n\n# install\nBUILD_EXT=1 pip install .\n```\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Use Docker\n\n### Pull from DockerHub\n\nYou can directly pull the docker image from our [DockerHub page](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fhpcaitech\u002Fcolossalai). The image is automatically uploaded upon release.\n\n\n### Build On Your Own\n\nRun the following command to build a docker image from Dockerfile provided.\n\n> Building Colossal-AI from scratch requires GPU support, you need to use Nvidia Docker Runtime as the default when doing `docker build`. More details can be found [here](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F59691207\u002Fdocker-build-with-nvidia-runtime).\n> We recommend you install Colossal-AI from our [project page](https:\u002F\u002Fwww.colossalai.org) directly.\n\n\n```bash\ncd ColossalAI\ndocker build -t colossalai .\u002Fdocker\n```\n\nRun the following command to start the docker container in interactive mode.\n\n```bash\ndocker run -ti --gpus all --rm --ipc=host colossalai bash\n```\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n## Community\n\nJoin the Colossal-AI community on [Forum](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fdiscussions),\n[Slack](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fcolossalaiworkspace\u002Fshared_invite\u002Fzt-z7b26eeb-CBp7jouvu~r0~lcFzX832w),\nand [WeChat(微信)](https:\u002F\u002Fraw.githubusercontent.com\u002Fhpcaitech\u002Fpublic_assets\u002Fmain\u002Fcolossalai\u002Fimg\u002FWeChat.png \"qrcode\") to share your suggestions, feedback, and questions with our engineering team.\n\n## Contributing\nReferring to the successful attempts of [BLOOM](https:\u002F\u002Fbigscience.huggingface.co\u002F) and [Stable Diffusion](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStable_Diffusion), any and all developers and partners with computing powers, datasets, models are welcome to join and build the Colossal-AI community, making efforts towards the era of big AI models!\n\nYou may contact us or participate in the following ways:\n1. [Leaving a Star ⭐](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fstargazers) to show your like and support. Thanks!\n2. Posting an [issue](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fissues\u002Fnew\u002Fchoose), or submitting a PR on GitHub follow the guideline in [Contributing](https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fblob\u002Fmain\u002FCONTRIBUTING.md)\n3. Send your official proposal to email contact@hpcaitech.com\n\nThanks so much to all of our amazing contributors!\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=hpcaitech\u002FColossalAI\"  width=\"800px\"\u002F>\n\u003C\u002Fa>\n\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n\n\n## CI\u002FCD\n\nWe leverage the power of [GitHub Actions](https:\u002F\u002Fgithub.com\u002Ffeatures\u002Factions) to automate our development, release and deployment workflows. Please check out this [documentation](.github\u002Fworkflows\u002FREADME.md) on how the automated workflows are operated.\n\n\n## Cite Us\n\nThis project is inspired by some related projects (some by our team and some by other organizations). We would like to credit these amazing projects as listed in the [Reference List](.\u002Fdocs\u002FREFERENCE.md).\n\nTo cite this project, you can use the following BibTeX citation.\n\n```\n@inproceedings{10.1145\u002F3605573.3605613,\nauthor = {Li, Shenggui and Liu, Hongxin and Bian, Zhengda and Fang, Jiarui and Huang, Haichen and Liu, Yuliang and Wang, Boxiang and You, Yang},\ntitle = {Colossal-AI: A Unified Deep Learning System For Large-Scale Parallel Training},\nyear = {2023},\nisbn = {9798400708435},\npublisher = {Association for Computing Machinery},\naddress = {New York, NY, USA},\nurl = {https:\u002F\u002Fdoi.org\u002F10.1145\u002F3605573.3605613},\ndoi = {10.1145\u002F3605573.3605613},\nabstract = {The success of Transformer models has pushed the deep learning model scale to billions of parameters, but the memory limitation of a single GPU has led to an urgent need for training on multi-GPU clusters. However, the best practice for choosing the optimal parallel strategy is still lacking, as it requires domain expertise in both deep learning and parallel computing. The Colossal-AI system addressed the above challenge by introducing a unified interface to scale your sequential code of model training to distributed environments. It supports parallel training methods such as data, pipeline, tensor, and sequence parallelism and is integrated with heterogeneous training and zero redundancy optimizer. Compared to the baseline system, Colossal-AI can achieve up to 2.76 times training speedup on large-scale models.},\nbooktitle = {Proceedings of the 52nd International Conference on Parallel Processing},\npages = {766–775},\nnumpages = {10},\nkeywords = {datasets, gaze detection, text tagging, neural networks},\nlocation = {Salt Lake City, UT, USA},\nseries = {ICPP '23}\n}\n```\n\nColossal-AI has been accepted as official tutorial by top conferences [NeurIPS](https:\u002F\u002Fnips.cc\u002F), [SC](https:\u002F\u002Fsc22.supercomputing.org\u002F), [AAAI](https:\u002F\u002Faaai.org\u002FConferences\u002FAAAI-23\u002F),\n[PPoPP](https:\u002F\u002Fppopp23.sigplan.org\u002F), [CVPR](https:\u002F\u002Fcvpr2023.thecvf.com\u002F), [ISC](https:\u002F\u002Fwww.isc-hpc.com\u002F), [NVIDIA GTC](https:\u002F\u002Fwww.nvidia.com\u002Fen-us\u002Fon-demand\u002Fsession\u002Fgtcspring23-S51482\u002F) ,etc.\n\n\u003Cp align=\"right\">(\u003Ca href=\"#top\">back to top\u003C\u002Fa>)\u003C\u002Fp>\n","Colossal-AI 是一个旨在降低大规模AI模型训练成本、提高速度并增强可访问性的开源项目。它通过数据并行、模型并行和流水线并行等技术，支持深度学习模型在分布式计算环境中的高效训练与推理。该项目采用Python语言开发，具备强大的异构训练能力，能够在多种硬件平台上实现高性能计算。适用于需要处理大规模数据集或复杂模型的企业级应用场景，如自然语言处理、计算机视觉等领域的大规模预训练模型训练任务。",2,"2026-06-11 02:42:03","top_all"]