-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from huggingface/nouamane/docs
Quick refactos
- Loading branch information
Showing
7 changed files
with
84 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
# ⚡️ Nanotron | ||
<h1 align="center">⚡️ Nanotron</h1> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/huggingface/nanotron/releases"> | ||
<img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/nanotron.svg"> | ||
</a> | ||
<a href="https://arxiv.org/abs/2210.07316"> | ||
<img alt="GitHub release" src="https://img.shields.io/badge/arXiv-2305.14251-b31b1b.svg"> | ||
</a> | ||
<a href="https://github.com/huggingface/nanotron/blob/master/LICENSE"> | ||
<img alt="License" src="https://img.shields.io/github/license/huggingface/nanotron.svg?color=green"> | ||
</a> | ||
</p> | ||
|
||
<h4 align="center"> | ||
<p> | ||
<a href="#Philosophy">Philosophy</a> • | ||
<a href="#Core-Features">Core Features</a> • | ||
<a href="#Installation">Installation</a> • | ||
<a href="#Quick-examples">Usage</a> • | ||
<a href="#Development-guidelines">Contributions</a> | ||
<p> | ||
</h4> | ||
|
||
<h3 align="center"> | ||
<a href="https://huggingface.co/nanotron"><img style="float: middle; padding: 10px 10px 10px 10px;" width="60" height="55" src="https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.png" /></a> | ||
</h3> | ||
|
||
|
||
|
||
# | ||
|
||
The objective of this library is to provide easy distributed primitives in order to train a variety of models efficiently using 3D parallelism. For more information about the internal design of the library or 3D parallelism in general, please check out [[docs.md]](./docs/docs.md) and [[3d_parallelism.md]](./docs/3d_parallelism.md). | ||
|
||
|
@@ -28,12 +58,10 @@ To install (in a new env): | |
```bash | ||
pip install torch | ||
pip install packaging; pip install "flash-attn>=2.5.0" --no-build-isolation | ||
git clone [email protected]:huggingface/nanotron.git | ||
cd nanotron | ||
pip install -e . | ||
pip install nanotron | ||
``` | ||
|
||
Also nice to have `transformers` `datasets` `python-etcd` `tensorboardX`: `pip install transformers datasets python-etcd tensorboardX` | ||
Also nice to have: `pip install transformers datasets python-etcd tensorboardX` | ||
|
||
We also support a set of flavors that you can install using `pip install -e [$FLAVOR]`: | ||
- `dev`: Used is you are developping in `nanotron`. It installs in particular our linter mechanism. On top of that you have to run `pre-commit install` afterwards. | ||
|
@@ -68,7 +96,6 @@ pre-commit run --config .pre-commit-config.yaml --all-files | |
|
||
Features we would like to add: | ||
- [ ] Support `torch.compile` | ||
- [ ] Support `torch.distributed.rpc` | ||
- [ ] More optimized kernels | ||
- [ ] Support Zero3 | ||
- [ ] Other PP schedules (such as Interleaved 1f1b...) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "nanotron" | ||
version = "0.2" | ||
version = "0.4" | ||
description = "Minimalistic Large Language Model Training and Finetuning" | ||
authors = [ | ||
{name = "Nouamane Tazi", email="[email protected]"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.2" | ||
__version__ = "0.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from nanotron.parallel.pipeline_parallel.engine import PipelineEngine | ||
from nanotron.parallel.pipeline_parallel.tensor_pointer import TensorPointer | ||
from nanotron.parallel.pipeline_parallel.utils import get_pp_rank_of | ||
|
||
__all__ = ["PipelineEngine", "TensorPointer", "get_pp_rank_of"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters