You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/installation.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,12 +32,32 @@ Install 🤗 Transformers for whichever deep learning library you're working wit
32
32
33
33
You should install 🤗 Transformers in a [virtual environment](https://docs.python.org/3/library/venv.html). If you're unfamiliar with Python virtual environments, take a look at this [guide](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/). A virtual environment makes it easier to manage different projects, and avoid compatibility issues between dependencies.
34
34
35
-
Now you're ready to install 🤗 Transformers with the following command:
35
+
Create a virtual environment with [uv](https://docs.astral.sh/uv/) (refer to [Installation](https://docs.astral.sh/uv/getting-started/installation/) for installation instructions), a fast Rust-based Python package and project manager.
36
+
37
+
```bash
38
+
uv venv my-env
39
+
source my-env/bin/activate
40
+
```
41
+
42
+
Now you're ready to install 🤗 Transformers with pip or uv.
43
+
44
+
<hfoptionsid="install">
45
+
<hfoptionid="uv">
46
+
47
+
```bash
48
+
uv pip install transformers
49
+
```
50
+
51
+
</hfoption>
52
+
<hfoptionid="pip">
36
53
37
54
```bash
38
55
pip install transformers
39
56
```
40
57
58
+
</hfoption>
59
+
</hfoptions>
60
+
41
61
For GPU acceleration, install the appropriate CUDA drivers for [PyTorch](https://pytorch.org/get-started/locally) and TensorFlow(https://www.tensorflow.org/install/pip).
42
62
43
63
Run the command below to check if your system detects an NVIDIA GPU.
0 commit comments