Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Update pulp version (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy authored Aug 16, 2022
1 parent 5eff300 commit 9802b3b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 46 deletions.
30 changes: 2 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ The key features of Alpa include:

**Tight Integration with Machine Learning Ecosystem**. Alpa is backed by open-source, high-performance, and production-ready libraries such as [Jax](https://github.com/google/jax), [XLA](https://www.tensorflow.org/xla), and [Ray](https://github.com/ray-project/ray).


## 🌟Try Alpa-served OPT-175B!
## 👉 Try Alpa-served OPT-175B!
Alpa provides a free, unlimited [OPT-175B](https://github.com/facebookresearch/metaseq/tree/main/projects/OPT) text generation service. Try our service at [https://opt.alpa.ai/](https://opt.alpa.ai/)
and share your [prompting results](examples/opt_serving/service/img.png)!

Join [Alpa slack](https://forms.gle/YEZTCrtZD6EAVNBQ7) and let us know any new features you want!

## Quick Start
Use Alpa's decorator ``@parallelize`` to scale your single-device training code to distributed clusters.

```python
import alpa

Expand All @@ -49,32 +49,6 @@ for batch in data_loader:

Check out the [Alpa Documentation](https://alpa-projects.github.io) site for installation instructions, tutorials, examples, and more.

## Installation
The quickest way to get started with Alpa is via pip. We push the latest Alpa wheels to the [PyPI index](https://pypi.org/project/alpa/#description) and the Alpa-modified jaxlib to
our [GitHub-hosted index](https://alpa-projects.github.io/wheels.html).

```bash
# Install alpa
pip install alpa

# install alpa-jaxlib compatible with CUDA >= 11.1 and cuDNN >= 8.0.5,
pip install jaxlib==0.3.5+cuda111.cudnn805 -f https://alpa-projects.github.io/wheels.html

# You can install for other CUDA versions via:
pip install jaxlib==0.3.5+cuda{cuda_version}.cudnn{cudnn_version} -f https://alpa-projects.github.io/wheels.html
```
All supported CUDA and cuDNN versions are listed on the [index page](https://alpa-projects.github.io/wheels.html).

After installation, validate the installation works as expected:
```bash
# Start the ray cluster first
ray start --head
python -m alpa.test_install
```

You can also install Alpa from source for development or other CUDA versions.
Follow this [detailed guide](https://alpa.ai/install.html#method-2-install-from-source) to install Alpa from source or troubleshooting if you meet any errors during the process.

## Learning more
- [Alpa OSDI 2022 paper](https://www.usenix.org/system/files/osdi22-zheng-lianmin.pdf)
- [Google AI blog](https://ai.googleblog.com/2022/05/alpa-automated-model-parallel-deep.html)
Expand Down
9 changes: 3 additions & 6 deletions alpa/shard_parallel/auto_sharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,17 +837,14 @@ def get_non_zero_index(binary_vector):

msg = verbose
time_limit = 600
assert "COIN_CMD" in pulp.listSolvers(onlyAvailable=True), (
assert "PULP_CBC_CMD" in pulp.listSolvers(onlyAvailable=True), (
"Please install ILP solvers by 'sudo apt install coinor-cbc'")

with warnings.catch_warnings(): # disable CBC warnings
warnings.simplefilter("ignore")
solver = pulp.COIN_CMD(mip=True,
solver = pulp.PULP_CBC_CMD(mip=True,
msg=msg,
timeLimit=time_limit,
threads=multiprocessing.cpu_count())
# solver = pulp.GLPK_CMD(mip=True, msg=msg, timeLimit=time_limit)
prob.solve(solver)
prob.solve(solver)

status = prob.status
objective = pulp.value(prob.objective)
Expand Down
12 changes: 1 addition & 11 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,7 @@ Regardless of installing from wheels or from source, there are a few prerequisit
Follow the official guides to install `CUDA <https://developer.nvidia.com/cuda-toolkit>`_ and `cuDNN <https://developer.nvidia.com/cudnn>`_.
Alpa requires CUDA >= 11.1 and cuDNN >= 8.0.5.

2. Install the ILP solver used by Alpa:

If you have sudo permission, use

.. code:: bash
sudo apt install coinor-cbc
Otherwise, please try to install via `binary <https://projects.coin-or.org/Cbc#DownloadandInstall>`_ or `conda <https://anaconda.org/conda-forge/coincbc>`_.

3. Update pip version and install cupy:
2. Update pip version and install cupy:

.. code:: bash
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_cuda_version_str(no_dot=False):
"ray>=1.13.0",
"jax==0.3.5",
"flax==0.4.1",
"pulp",
"pulp>=2.6.0",
"numpy>=1.20",
"numba",
]
Expand Down

0 comments on commit 9802b3b

Please sign in to comment.