ColossalAI README

The project's README from github.com/hpcaitech/ColossalAI. As one markdown file: README.md.

Colossal-AI

logo

Colossal-AI: Making large AI models cheaper, faster, and more accessible

Paper | Documentation | Examples | Forum | GPU Cloud Playground | Blog

GitHub Repo stars Build Documentation CodeFactor HuggingFace badge slack badge WeChat badge

| English | 中文 |

Instantly Run Colossal-AI on Enterprise-Grade GPUs

Skip the setup. Access a powerful, pre-configured Colossal-AI environment on HPC-AI Cloud.

Train your models and scale your AI workload in one click!

Get Started Now & Claim Your Free Credits →

Instant Access Top Open Models at Half the Cost

Skip the hassle. Access powerful, long-context LLMs seamlessly through HPC-AI Model APIs.

Build your AI agents, chatbots, and RAG applications with HPC-AI Model APIs!

Get Started Now & Claim Your $4 Free Credits →

Colossal-AI Benchmark

To 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.

GPU GPUs Model Size Parallelism Batch Size per DP Seqlen Throughput TFLOPS/GPU Peak Mem(MiB)
H200 8 7B zero2(dp8) 36 4096 17.13 samp/s 534.18 119040.02
H200 16 70B zero2 48 4096 3.27 samp/s 469.1 150032.23
B200 8 7B zero1(dp2)+tp2+pp4 128 4096 25.83 samp/s 805.69 100119.77
H200 16 70B zero1(dp2)+tp2+pp4 128 4096 5.66 samp/s 811.79 100072.02

The 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.

Latest News

Table of Contents

Why Colossal-AI

Prof. James Demmel (UC Berkeley): Colossal-AI makes training AI models efficient, easy, and scalable.

(back to top)

Features

Colossal-AI provides a collection of parallel components for you. We aim to support you to write your distributed deep learning models just like how you write your model on your laptop. We provide user-friendly tools to kickstart distributed training and inference in a few lines.

(back to top)

Colossal-AI in the Real World

Open-Sora

Open-Sora:Revealing Complete Model Parameters, Training Details, and Everything for Sora-like Video Generation Models [code] [blog] [Model weights] [Demo] [GPU Cloud Playground] [OpenSora Image]

(back to top)

Colossal-LLaMA-2

[GPU Cloud Playground] [LLaMA3 Image]

Model Backbone Tokens Consumed MMLU (5-shot) CMMLU (5-shot) AGIEval (5-shot) GAOKAO (0-shot) CEval (5-shot)
Baichuan-7B - 1.2T 42.32 (42.30) 44.53 (44.02) 38.72 36.74 42.80
Baichuan-13B-Base - 1.4T 50.51 (51.60) 55.73 (55.30) 47.20 51.41 53.60
Baichuan2-7B-Base - 2.6T 46.97 (54.16) 57.67 (57.07) 45.76 52.60 54.00
Baichuan2-13B-Base - 2.6T 54.84 (59.17) 62.62 (61.97) 52.08 58.25 58.10
ChatGLM-6B - 1.0T 39.67 (40.63) 41.17 (-) 40.10 36.53 38.90
ChatGLM2-6B - 1.4T 44.74 (45.46) 49.40 (-) 46.36 45.49 51.70
InternLM-7B - 1.6T 46.70 (51.00) 52.00 (-) 44.77 61.64 52.80
Qwen-7B - 2.2T 54.29 (56.70) 56.03 (58.80) 52.47 56.42 59.60
Llama-2-7B - 2.0T 44.47 (45.30) 32.97 (-) 32.60 25.46 -
Linly-AI/Chinese-LLaMA-2-7B-hf Llama-2-7B 1.0T 37.43 29.92 32.00 27.57 -
wenge-research/yayi-7b-llama2 Llama-2-7B - 38.56 31.52 30.99 25.95 -
ziqingyang/chinese-llama-2-7b Llama-2-7B - 33.86 34.69 34.52 25.18 34.2
TigerResearch/tigerbot-7b-base Llama-2-7B 0.3T 43.73 42.04 37.64 30.61 -
LinkSoul/Chinese-Llama-2-7b Llama-2-7B - 48.41 38.31 38.45 27.72 -
FlagAlpha/Atom-7B Llama-2-7B 0.1T 49.96 41.10 39.83 33.00 -
IDEA-CCNL/Ziya-LLaMA-13B-v1.1 Llama-13B 0.11T 50.25 40.99 40.04 30.54 -
Colossal-LLaMA-2-7b-base Llama-2-7B 0.0085T 53.06 49.89 51.48 58.82 50.2
Colossal-LLaMA-2-13b-base Llama-2-13B 0.025T 56.42 61.80 54.69 69.53 60.3

ColossalChat

ColossalChat: An open-source solution for cloning ChatGPT with a complete RLHF pipeline. [code] [blog] [demo] [tutorial]

(back to top)

AIGC

Acceleration of AIGC (AI-Generated Content) models such as Stable Diffusion v1 and Stable Diffusion v2.

ColossalAI (hpcaitech/ColossalAI)

Searching Database…

这是什么?Colossal-AI 是一个开源系统,通过提供一套并行训练和内存优化技术的工具箱,帮助人们更省钱、更快速、用更少的硬件训练和运行大型 AI 模型。
这是我用来构建模型的框架,还是一个独立的应用?它是一个 Python 框架/工具箱,包含并行训练组件(数据并行、流水线并行、张量并行、序列并行、ZeRO),你可以把它接入自己的 PyTorch 训练代码中,它本身并不是成品应用。
我该如何安装 Colossal-AI?你可以通过 PyPI 安装、从源码构建,或者通过 Docker 运行,具体方法见项目安装说明部分。
这是给小型爱好项目用的,还是用于大规模的正式训练?它主要面向大规模/基础模型的训练和推理,支持多 GPU 和多节点集群;要真正发挥其价值,需要有足够的 GPU 硬件,而官方公布的基准测试通常使用 8–16 块 GPU 的配置。
这个项目到底是为谁打造的?面向研究人员和企业,适用于训练或微调大型基础模型(如大语言模型、扩散模型、视频生成模型),希望降低 GPU 成本和训练时间;其效果已通过加州大学伯克利分校的基准测试及行业资助得到验证。
ColossalChat 是什么?ColossalChat 是一个开源方案,用于复刻 ChatGPT,包含完整的 RLHF(PPO)训练流程,据称在 PPO Stage3 训练阶段最高可快 10 倍。
Colossal-LLaMA-2 有什么用途?这是一套低成本构建特定领域大语言模型的方案:基于 LLaMA-2,仅需约半天训练、花费几百美元,就能在主流模型基准测试中达到相当的水平。
Open-Sora 与本项目是什么关系?Open-Sora 是一个基于 Colossal-AI 构建的开源项目,复现了类似 Sora 的文生视频模型,包括代码、模型权重和训练细节。
Colossal-AI 能将 Stable Diffusion 的训练成本降低多少?据项目披露,Stable Diffusion 的内存占用最多可降低 5.6 倍,硬件成本最多可降低 46 倍,使训练可以从 A100 迁移到 RTX 3060 上进行。
Creator
hpcaitech
Size
65.4 MB
Stars
41.4K
Age
4y
Commits · 90 Days