Aucune description

Max Ryabinin e96f4149e8 Bump the version to 1.1.0 il y a 3 ans
.github 724cdfe5e2 Convert hivemind.server to libp2p backend (#470) il y a 3 ans
benchmarks bc2cccfdb0 Clean up imports, remove unused utils (#486) il y a 3 ans
docs 5ea21a75f4 Simplify ExpertBackend interface (#483) il y a 3 ans
examples 4a3d8fb843 Remove deprecated code in hivemind.optim and hivemind.averaging before the 1.1.0 release (#480) il y a 3 ans
hivemind e96f4149e8 Bump the version to 1.1.0 il y a 3 ans
tests bc2cccfdb0 Clean up imports, remove unused utils (#486) il y a 3 ans
.gitignore 4890a75036 Optimize unary handlers with persistent connections to P2P daemon (#328) il y a 4 ans
.readthedocs.yml c450a43fd0 Fix flaky test_remote_module_call, extract requirements for docs/tests (#118) il y a 4 ans
CONTRIBUTING.md bedfa6eefb Reorder imports with isort (#326) il y a 4 ans
Dockerfile dfbc401196 Add Dockerfile, refactor tests (#245) il y a 4 ans
LICENSE f386fb4d42 Create LICENSE il y a 5 ans
README.md c6b2b2d84c Bump Black to 22.3.0, pin Golang version (#466) il y a 3 ans
codecov.yml fdf92e5dc4 Fix Codecov integration with Github Actions (#291) il y a 4 ans
pyproject.toml c6b2b2d84c Bump Black to 22.3.0, pin Golang version (#466) il y a 3 ans
requirements-dev.txt c6b2b2d84c Bump Black to 22.3.0, pin Golang version (#466) il y a 3 ans
requirements-docs.txt 40726cd56a Improve Optimizer docs, update quickstart to use Optimizer (#416) il y a 3 ans
requirements.txt 712e4286cf Remove gRPC services and grpcio requirement (#485) il y a 3 ans
setup.py 712e4286cf Remove gRPC services and grpcio requirement (#485) il y a 3 ans

README.md

Hivemind: decentralized deep learning in PyTorch

Documentation Status PyPI version Discord CI status Codecov Black

Hivemind is a PyTorch library for decentralized deep learning across the Internet. Its intended usage is training one large model on hundreds of computers from different universities, companies, and volunteers.

img

Live Demo

Check out our NeurIPS 2021 demonstration "Training Transformers Together" to see hivemind in action, join an ongoing collaborative experiment, and learn more about the technologies behind it!

Key Features

  • Distributed training without a master node: Distributed Hash Table allows connecting computers in a decentralized network.
  • Fault-tolerant backpropagation: forward and backward passes succeed even if some nodes are unresponsive or take too long to respond.
  • Decentralized parameter averaging: iteratively aggregate updates from multiple workers without the need to synchronize across the entire network (paper).
  • Train neural networks of arbitrary size: parts of their layers are distributed across the participants with the Decentralized Mixture-of-Experts (paper).

To learn more about the ideas behind this library, see the full list of our papers below.

Installation

Before installing, make sure that your environment has Python 3.7+ and PyTorch 1.6.0 or newer. They can be installed either natively or with Anaconda.

You can get the latest release with pip or build hivemind from source.

With pip

If your versions of Python and PyTorch match the requirements, you can install hivemind from pip:

pip install hivemind

From source

To install hivemind from source, simply run the following:

git clone https://github.com/learning-at-home/hivemind.git
cd hivemind
pip install .

If you would like to verify that your installation is working properly, you can install with pip install .[dev] instead. Then, you can run the tests with pytest tests/.

By default, hivemind uses the precompiled binary of the go-libp2p-daemon library. If you face compatibility issues or want to build the binary yourself, you can recompile it by running pip install . --global-option="--buildgo". Before running the compilation, please ensure that your machine has a recent version of Go toolchain (1.15 or 1.16 are supported).

System requirements

  • Linux is the default OS for which hivemind is developed and tested. We recommend Ubuntu 18.04+ (64-bit), but other 64-bit distros should work as well. Legacy 32-bit is not recommended.
  • macOS 10.x can run hivemind using Docker. We recommend using our Docker image.
  • Windows 10+ (experimental) can run hivemind using WSL. You can configure WSL to use GPU by following sections 1–3 of this guide by NVIDIA. After that, you can simply follow the instructions above to install with pip or from source.

Documentation

If you have any questions about installing and using hivemind, feel free to ask them in our Discord chat or file an issue.

Contributing

Hivemind is currently at the active development stage, and we welcome all contributions. Everything, from bug fixes and documentation improvements to entirely new features, is appreciated.

If you want to contribute to hivemind but don't know where to start, take a look at the unresolved issues. Open a new issue or join our chat room in case you want to discuss new functionality or report a possible bug. Bug fixes are always welcome, but new features should be preferably discussed with maintainers beforehand.

If you want to start contributing to the source code of hivemind, please see the contributing guidelines first. To learn more about other ways to contribute, read our guide.

Citation

If you found hivemind or its underlying algorithms useful for your research, please cite the following source:

@misc{hivemind,
  author = {Learning{@}home team},
  title = {{H}ivemind: a {L}ibrary for {D}ecentralized {D}eep {L}earning},
  year = 2020,
  howpublished = {\url{https://github.com/learning-at-home/hivemind}},
}

Also, you can cite the paper that inspired the creation of this library (prototype implementation of hivemind available at mryab/learning-at-home):

@inproceedings{ryabinin2020crowdsourced,
  author = {Ryabinin, Max and Gusev, Anton},
  booktitle = {Advances in Neural Information Processing Systems},
  editor = {H. Larochelle and M. Ranzato and R. Hadsell and M. F. Balcan and H. Lin},
  pages = {3659--3672},
  publisher = {Curran Associates, Inc.},
  title = {Towards Crowdsourced Training of Large Neural Networks using Decentralized Mixture-of-Experts},
  url = {https://proceedings.neurips.cc/paper/2020/file/25ddc0f8c9d3e22e03d3076f98d83cb2-Paper.pdf},
  volume = {33},
  year = {2020}
}
Additional publications ["Moshpit SGD: Communication-Efficient Decentralized Training on Heterogeneous Unreliable Devices"](https://arxiv.org/abs/2103.03239) ```bibtex @misc{ryabinin2021moshpit, title = {Moshpit SGD: Communication-Efficient Decentralized Training on Heterogeneous Unreliable Devices}, author = {Max Ryabinin and Eduard Gorbunov and Vsevolod Plokhotnyuk and Gennady Pekhimenko}, year = {2021}, eprint = {2103.03239}, archivePrefix = {arXiv}, primaryClass = {cs.LG} } ``` ["Distributed Deep Learning in Open Collaborations"](https://arxiv.org/abs/2106.10207) ```bibtex @misc{diskin2021distributed, title = {Distributed Deep Learning in Open Collaborations}, author = {Michael Diskin and Alexey Bukhtiyarov and Max Ryabinin and Lucile Saulnier and Quentin Lhoest and Anton Sinitsin and Dmitry Popov and Dmitry Pyrkin and Maxim Kashirin and Alexander Borzunov and Albert Villanova del Moral and Denis Mazur and Ilia Kobelev and Yacine Jernite and Thomas Wolf and Gennady Pekhimenko}, year = {2021}, eprint = {2106.10207}, archivePrefix = {arXiv}, primaryClass = {cs.LG} } ``` ["Secure Distributed Training at Scale"](https://arxiv.org/abs/2106.11257) ```bibtex @misc{gorbunov2021secure, title = {Secure Distributed Training at Scale}, author = {Eduard Gorbunov and Alexander Borzunov and Michael Diskin and Max Ryabinin}, year = {2021}, eprint = {2106.11257}, archivePrefix = {arXiv}, primaryClass = {cs.LG} } ```

We also maintain a list of related projects and acknowledgements.