TRL documentation

インストール

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v1.17.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

インストール

TRLは、PyPIからでもソースからでもインストールできます:

PyPI

pipまたはuvでライブラリをインストールします:

uv
pip

uvは、Rust製の高速なPythonパッケージおよびプロジェクトマネージャーです。インストール手順については、インストールを参照してください。

uv pip install trl

ソース

ソースから最新バージョンをインストールすることもできます。まずリポジトリをクローンし、pipでインストールを実行します。

git clone https://github.com/huggingface/trl.git
cd trl/
pip install -e .

開発用のインストールを行いたい場合は、pip installを以下に置き換えてください。

pip install -e ".[dev]"
Update on GitHub