-
Notifications
You must be signed in to change notification settings - Fork 4
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 #5 from openpsi-project/opensource
Testing before open-source
- Loading branch information
Showing
5 changed files
with
52 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' # Specify the Python version you need | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements.txt | ||
- name: Build package | ||
run: python3 -m build -n --sdist | ||
|
||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PIP_TOKEN }} | ||
run: | | ||
python3 -m pip install twine | ||
twine upload dist/* |
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 |
---|---|---|
|
@@ -42,7 +42,22 @@ If you prefer not to use Docker, you can also install ReaL from PyPI or from the | |
|
||
We don't upload a pre-built wheel to PyPI, so the installation will require compiling the C++ and CUDA extensions. If CUDA is not available on your machine, only the C++ extension will be installed. | ||
|
||
Install from PyPI: | ||
First, clone the repository and install all dependencies: | ||
|
||
.. code-block:: console | ||
$ git clone https://github.com/openpsi-project/ReaLHF | ||
$ cd ReaLHF | ||
$ python3 -m pip install -r requirements.txt | ||
On a GPU machine, also install the requirement CUDA runtime packages: | ||
|
||
.. code-block:: console | ||
$ python3 -m pip install git+https://github.com/NVIDIA/[email protected] --no-deps | ||
$ python3 -m pip install flash_attn --no-build-isolation | ||
Install ReaLHF from PyPI: | ||
|
||
.. code-block:: console | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" | |
name = "realhf" | ||
description = "ReaL: Efficient RLHF Training of Large Language Models with Parameter Reallocation" | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
requires-python = ">=3.10,<3.12" | ||
dynamic = ["version"] | ||
authors = [ | ||
{ name = "Zhiyu Mei", 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