diff --git a/README.md b/README.md index 13757eece7db..0a007bf1ce18 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ [](https://raw.githubusercontent.com/hpcaitech/public_assets/main/colossalai/img/WeChat.png) - | [English](README.md) | [中文](docs/README-zh-Hans.md) | + | [English](README.md) | [中文](docs/README-zh-Hans.md) | [日本語](docs/README-ja-Jp.md) diff --git a/docs/README-ja-Jp.md b/docs/README-ja-Jp.md new file mode 100644 index 000000000000..e5e10532df43 --- /dev/null +++ b/docs/README-ja-Jp.md @@ -0,0 +1,536 @@ +# Colossal-AI +
(トップへ戻る)
+ +## 特徴 + +Colossal-AI は、あなたのために並列コンポーネントのコレクションを提供します。 +私たちは、ノートパソコン上でモデルを書くのと同じように、分散ディープラーニングモデルを書くことをサポートすることを目指しています。 +数行で分散学習と推論を開始できる、ユーザーフレンドリーなツールを提供します。 + +- 並列化戦略 + - データ並列 + - パイプライン並列 + - 1D, [2D](https://arxiv.org/abs/2104.05343), [2.5D](https://arxiv.org/abs/2105.14500), [3D](https://arxiv.org/abs/2105.14450) テンソル並列 + - [シーケンス並列](https://arxiv.org/abs/2105.13120) + - [ゼロ冗長オプティマイザ (ZeRO)](https://arxiv.org/abs/1910.02054) + - [自動並列m](https://arxiv.org/abs/2302.02599) + +- 異種メモリ管理 + - [PatrickStar](https://arxiv.org/abs/2108.05818) + +- フレンドリーな使い方 + - 設定ファイルに基づく並列性 + +(トップへ戻る)
+ +## 現実世界における Colossal-AI + +### Colossal-LLaMA-2 + +- 7B: 数百ドルを使った半日のトレーニングで、主流の大規模モデル、オープンソース、商用フリーのドメイン特化型 LLM ソリューションと同様の結果が得られます。 +[[コード]](https://github.com/hpcaitech/ColossalAI/tree/main/applications/Colossal-LLaMA-2) +[[ブログ]](https://www.hpc-ai.tech/blog/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) +[[HuggingFace モデルウェイト]](https://huggingface.co/hpcai-tech/Colossal-LLaMA-2-7b-base) +[[Modelscope モデルウェイト]](https://www.modelscope.cn/models/colossalai/Colossal-LLaMA-2-7b-base/summary) + +- 13B: わずか 5000 ドルで、洗練された 13B のプライベートモデルを建設。 +[[コード]](https://github.com/hpcaitech/ColossalAI/tree/main/applications/Colossal-LLaMA-2) +[[ブログ]](https://hpc-ai.com/blog/colossal-llama-2-13b) +[[HuggingFace モデルウェイト]](https://huggingface.co/hpcai-tech/Colossal-LLaMA-2-13b-base) +[[Modelscope モデルウェイト]](https://www.modelscope.cn/models/colossalai/Colossal-LLaMA-2-13b-base/summary) + +| 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 + +
+
+
+
+
+
+
+
+
(トップへ戻る)
+ + +### AIGC +[Stable Diffusion v1](https://github.com/CompVis/stable-diffusion) や [Stable Diffusion v2](https://github.com/Stability-AI/stablediffusion) などの AIGC(AI 生成コンテンツ)モデルの高速化。 +
+
+
+
+
+
+
(トップへ戻る)
+ +### Biomedicine +[AlphaFold Protein Structure](https://alphafold.ebi.ac.uk/) の加速 + +
+
+
+
+
+
+
(トップへ戻る)
+ +## パラレルトレーニングデモ +### LLaMA2 +
+
+
+
+
+
+
+
+
+
+
(トップへ戻る)
+ +## シングル GPU トレーニングデモ + +### GPT-2 +
+
+
+
+
+
+
(トップへ戻る)
+ + +## 推論 +
+
+
+
+
+
+
+
+
(トップへ戻る)
+ +## インストール + +必要条件: +- PyTorch >= 1.11 及び PyTorch <= 2.1 +- Python >= 3.7 +- CUDA >= 11.0 +- [NVIDIA GPU コンピューティング能力](https://developer.nvidia.com/cuda-gpus) >= 7.0 (V100/RTX20 以上) +- Linux OS + +インストールで何か問題が発生した場合は、このリポジトリで [issue](https://github.com/hpcaitech/ColossalAI/issues/new/choose) を提起してください。 + +### PyPI からインストール + +Colossal-AI は以下のコマンドで簡単にインストールできます。**デフォルトでは、インストール時に PyTorch の拡張機能はビルドされません。** + +```bash +pip install colossalai +``` + +**注: 今のところ Linux のみがサポートされています。** + +しかし、インストール中に PyTorch の拡張機能をビルドしたい場合は、 `CUDA_EXT=1` を設定します。 + +```bash +CUDA_EXT=1 pip install colossalai +``` + +**そうでなければ、CUDAカーネルは実際に必要なときに実行時にビルドされることになる。** + +また、毎週ナイトリーバージョンを PyPI にリリースしています。これにより、メインブランチの未リリースの機能やバグ修正にアクセスできるようになります。 +インストールは以下の方法 + +```bash +pip install colossalai-nightly +``` + +### ソースからダウンロード + +> Colossal-AI のバージョンはリポジトリのメインブランチに合わせます。何か問題が発生したら、遠慮なく issue を送信してください。 :) + +```shell +git clone https://github.com/hpcaitech/ColossalAI.git +cd ColossalAI + +# colossalai のインストール +pip install . +``` + +デフォルトでは、CUDA/C++ カーネルはコンパイルされません。ColossalAI は実行時にそれらをビルドします。 +CUDA カーネルフュージョンをインストールして有効にする場合(フューズドオプティマイザを使用する場合、インストールは必須です): + +```shell +CUDA_EXT=1 pip install . +``` + +CUDA 10.2 を使っているユーザーは、ソースから ColossalAI をビルドすることができます。ただし、cub ライブラリを手動でダウンロードし、対応するディレクトリにコピーする必要があります。 + +```bash +# リポジトリをクローン +git clone https://github.com/hpcaitech/ColossalAI.git +cd ColossalAI + +# cub ライブラリをダウンロード +wget https://github.com/NVIDIA/cub/archive/refs/tags/1.8.0.zip +unzip 1.8.0.zip +cp -r cub-1.8.0/cub/ colossalai/kernel/cuda_native/csrc/kernels/include/ + +# インストール +CUDA_EXT=1 pip install . +``` + +(トップへ戻る)
+ +## Docker の使用 + +### DockerHub からのプル + +私たちの [DockerHub ページ](https://hub.docker.com/r/hpcaitech/colossalai)から直接 Docker イメージをプルすることができます。イメージはリリース時に自動的にアップロードされます。 + + +### 自分でビルドする + +以下のコマンドを実行し、提供された Dockerfile から Docker イメージをビルドする。 + +> Colossal-AI をゼロからビルドするには GPU サポートが必要で、`docker build` を実行する際に Nvidia Docker Runtime をデフォルトとして使用する必要があります。詳細は[こちら](https://stackoverflow.com/questions/59691207/docker-build-with-nvidia-runtime)を参照にして下さい。 +> 私たちの[プロジェクトページ](https://www.colossalai.org)から直接 Colossal-AI をインストールすることをお勧めします。 + + +```bash +cd ColossalAI +docker build -t colossalai ./docker +``` + +以下のコマンドを実行して、対話モードで docker コンテナを起動する。 + +```bash +docker run -ti --gpus all --rm --ipc=host colossalai bash +``` + +(トップへ戻る)
+ +## コミュニティ + +[フォーラム](https://github.com/hpcaitech/ColossalAI/discussions)、[Slack](https://join.slack.com/t/colossalaiworkspace/shared_invite/zt-z7b26eeb-CBp7jouvu~r0~lcFzX832w)、[WeChat (微信)](https://raw.githubusercontent.com/hpcaitech/public_assets/main/colossalai/img/WeChat.png "qrcode") の Colossal-AI コミュニティに参加し、提案、フィードバック、質問をエンジニアリングチームと共有しましょう。 + +## コントリビュート +[BLOOM](https://bigscience.huggingface.co/) や [Stable Diffusion](https://en.wikipedia.org/wiki/Stable_Diffusion) の成功例を参考に、計算能力、データセット、モデルを持つ開発者やパートナーは誰でも、Colossal-AI コミュニティに参加し、大 AI モデルの時代に向けて努力することを歓迎します! + +以下の方法でご連絡またはご参加いただけます: +1. [Leaving a Star ⭐](https://github.com/hpcaitech/ColossalAI/stargazers) をクリックし、「いいね!」や「応援しています!」の意思表示をしてください。ありがとう! +2. [issue](https://github.com/hpcaitech/ColossalAI/issues/new/choose) を投稿したり、GitHub に PR を投稿したりする場合は、[Contributing](https://github.com/hpcaitech/ColossalAI/blob/main/CONTRIBUTING.md) のガイドラインに従ってください +3. 正式な提案書をEメール contact@hpcaitech.com までお送りください。 + +素晴らしいコントリビューターの皆さん、本当にありがとう! + + +(トップへ戻る)
+ + +## CI/CD + +私たちは、[GitHub Actions](https://github.com/features/actions) の力を借りて、開発、リリース、デプロイのワークフローを自動化しています。自動化されたワークフローがどのように運用されているかについては、こちらの[ドキュメント](../.github/workflows/README.md)をご覧ください。 + + +## 引用 + +このプロジェクトは、いくつかの関連プロジェクト(我々のチームによるものもあれば、他の組織によるものもある)に触発されている。[参考文献リスト](./REFERENCE.md)に記載されているように、これらの素晴らしいプロジェクトに謝意を表したいと思います。 + +このプロジェクトを引用するには、以下のBibTeX引用を使用できます。 + +``` +@inproceedings{10.1145/3605573.3605613, +author = {Li, Shenggui and Liu, Hongxin and Bian, Zhengda and Fang, Jiarui and Huang, Haichen and Liu, Yuliang and Wang, Boxiang and You, Yang}, +title = {Colossal-AI: A Unified Deep Learning System For Large-Scale Parallel Training}, +year = {2023}, +isbn = {9798400708435}, +publisher = {Association for Computing Machinery}, +address = {New York, NY, USA}, +url = {https://doi.org/10.1145/3605573.3605613}, +doi = {10.1145/3605573.3605613}, +abstract = {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.}, +booktitle = {Proceedings of the 52nd International Conference on Parallel Processing}, +pages = {766–775}, +numpages = {10}, +keywords = {datasets, gaze detection, text tagging, neural networks}, +location = {Salt Lake City, UT, USA}, +series = {ICPP '23} +} +``` + +Colossal-AI は、トップカンファレンス [NeurIPS](https://nips.cc/)、[SC](https://sc22.supercomputing.org/)、[AAAI](https://aaai.org/Conferences/AAAI-23/)、[PPoPP](https://ppopp23.sigplan.org/)、[CVPR](https://cvpr2023.thecvf.com/)、[ISC](https://www.isc-hpc.com/)、[NVIDIA GTC](https://www.nvidia.com/en-us/on-demand/session/gtcspring23-S51482/) などで公式チュートリアルとして採用されています。 + +(トップへ戻る)
diff --git a/docs/README-zh-Hans.md b/docs/README-zh-Hans.md index 0c438c726baa..8c8747a73535 100644 --- a/docs/README-zh-Hans.md +++ b/docs/README-zh-Hans.md @@ -19,7 +19,7 @@ [](https://github.com/hpcaitech/public_assets/tree/main/colossalai/contact/slack) [](https://raw.githubusercontent.com/hpcaitech/public_assets/main/colossalai/img/WeChat.png) - | [English](README.md) | [中文](README-zh-Hans.md) | + | [English](README.md) | [中文](README-zh-Hans.md) | [日本語](README-ja-Jp.md)