tokenizers

Форк
0
42 строки · 1.5 Кб
1
🤗 Tokenizers is tested on Python 3.5+.
2

3
You should install 🤗 Tokenizers in a
4
`virtual environment <https://docs.python.org/3/library/venv.html>`_. If you're unfamiliar with
5
Python virtual environments, check out the
6
`user guide <https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>`__.
7
Create a virtual environment with the version of Python you're going to use and activate it.
8

9
Installation with pip
10
----------------------------------------------------------------------------------------------------
11

12
🤗 Tokenizers can be installed using pip as follows::
13

14
    pip install tokenizers
15

16

17
Installation from sources
18
----------------------------------------------------------------------------------------------------
19

20
To use this method, you need to have the Rust language installed. You can follow
21
`the official guide <https://www.rust-lang.org/learn/get-started>`__ for more information.
22

23
If you are using a unix based OS, the installation should be as simple as running::
24

25
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
26

27
Or you can easiy update it with the following command::
28

29
    rustup update
30

31
Once rust is installed, we can start retrieving the sources for 🤗 Tokenizers::
32

33
    git clone https://github.com/huggingface/tokenizers
34

35
Then we go into the python bindings folder::
36

37
    cd tokenizers/bindings/python
38

39
At this point you should have your `virtual environment`_ already activated. In order to
40
compile 🤗 Tokenizers, you need to::
41

42
    pip install -e .
43

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.