|
1 |
| -# LiBai |
2 |
| -Li Bai : components for large pretrain language models. |
| 1 | +<!-- 配图 --> |
| 2 | + |
| 3 | +<h2 align="center">LiBai: Toolbox for Large Scale Pretraining</h2> |
| 4 | +<p align="center"> |
| 5 | + <a href="https://pypi.org/project/LiBai/"> |
| 6 | + <img alt="PyPI" src="https://img.shields.io/pypi/v/libai"> |
| 7 | + </a> |
| 8 | + <a href="https://libai.readthedocs.io/en/latest/index.html"> |
| 9 | + <img alt="docs" src="https://img.shields.io/badge/docs-latest-blue"> |
| 10 | + </a> |
| 11 | + <a href="https://github.com/Oneflow-Inc/libai/blob/master/LICENSE"> |
| 12 | + <img alt="GitHub" src="https://img.shields.io/github/license/Oneflow-Inc/libai.svg?color=blue"> |
| 13 | + </a> |
| 14 | + <a href="https://github.com/Oneflow-Inc/libai/releases"> |
| 15 | + <img alt="GitHub release" src="https://img.shields.io/github/release/Oneflow-Inc/libai.svg"> |
| 16 | + </a> |
| 17 | + <a href="https://github.com/Oneflow-Inc/libai/issues"> |
| 18 | + <img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-pink.svg"> |
| 19 | + </a> |
| 20 | +</p> |
| 21 | + |
| 22 | +<h4 align="center"> |
| 23 | + <p> |
| 24 | + <b>English</b> | |
| 25 | + <a href="https://github.com/Oneflow-Inc/libai/blob/main/README_zh-CN.md">简体中文</a> |
| 26 | + <p> |
| 27 | +</h4> |
| 28 | + |
| 29 | + |
| 30 | +## Introduction |
| 31 | +LiBai is an open-source large-scale model pretraining toolbox with efficient parallelization techniques based on OneFlow. The main branch works with OneFlow 0.7.0. |
| 32 | + |
| 33 | +<details open> |
| 34 | +<summary> <b> Highlights </b> </summary> |
| 35 | + |
| 36 | +- **Support a collection of parallel training components** |
| 37 | + |
| 38 | + LiBai provides multiple parallelisms, e.g. Data Parallelism, Tensor Parallelism, and Pipeline Parallelism. Besides, it's extensible for new parallelism. |
| 39 | + |
| 40 | +- **Varied training techniques** |
| 41 | + |
| 42 | + LiBai provides some out-of-the-box training techniques, e.g. Distributed Training, Mixed Precision Training, Activation Checkpointing, Recomputation, Gradient Accumulation, and Zero Redundancy Optimizer(ZeRO). |
| 43 | + |
| 44 | +- **Support for both CV and NLP tasks** |
| 45 | + |
| 46 | + Predifined data process for both CV and NLP datasets, e.g. CIFAR, ImageNet, BERT Dataset. |
| 47 | + |
| 48 | +- **Easy Usage** |
| 49 | + |
| 50 | + Components are designed to be modular in LiBai for better and easier usage as follows: |
| 51 | + - LazyConfig system for more flexible syntax and no predefined structures |
| 52 | + - Friendly trainer and engine |
| 53 | + - Used as a library to support building research projects on top of it. Please see [projects/](/projects) for some projects that are built on top of LiBai. |
| 54 | + |
| 55 | +- **High Efficience** |
| 56 | + |
| 57 | +</details> |
| 58 | + |
| 59 | +## Installation |
| 60 | +Please refer to [Getting Started.md](https://libai.readthedocs.io/en/latest/tutorials/Getting%20Started.html) for installation |
| 61 | + |
| 62 | +## Getting Started |
| 63 | +Please refer to [Getting Started.md](https://libai.readthedocs.io/en/latest/tutorials/Getting%20Started.html) for basic usage of LiBai |
| 64 | + |
| 65 | +## Documentation |
| 66 | +Please refer to [docs](https://libai.readthedocs.io/en/latest/index.html) for full API documentation and tutorials |
| 67 | + |
| 68 | +## ChangeLog |
| 69 | + |
| 70 | +**Beta 0.1.0** was released in 15/2/2022: |
| 71 | +- Support 3D parallelism [BERT](https://arxiv.org/abs/1810.04805) models for pretraining. |
| 72 | +- Support 2D Parallelism [ViT](https://arxiv.org/abs/2010.11929) models for Image Classification. |
| 73 | + |
| 74 | +Please refer to [changelog.md](./changelog.md) for details and release history. |
| 75 | + |
| 76 | +## Contributing |
| 77 | +We appreciate all contributions to improve LiBai. Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for the contributing guideline. |
| 78 | + |
| 79 | +## License |
| 80 | +This project is released under the [Apache 2.0 license](LICENSE). |
| 81 | + |
| 82 | +## Citation |
| 83 | +If you find this project useful for your research, please consider cite: |
| 84 | +```BibTeX |
| 85 | +@misc{of2021libai, |
| 86 | + author = {Xingyu Liao and Peng Cheng and Tianhe Ren and Depeng Liang and |
| 87 | + Kai Dang and Yi Wang and Xiaoyu Xu}, |
| 88 | + title = {LiBai}, |
| 89 | + howpublished = {\url{https://github.com/Oneflow-Inc/libai}}, |
| 90 | + year = {2021} |
| 91 | +} |
| 92 | +``` |
0 commit comments