Skip to content

Commit dca0575

Browse files
authored
update fasttokenizer readme (#7684)
1 parent 29a94d3 commit dca0575

File tree

9 files changed

+21
-13
lines changed

9 files changed

+21
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ PaddleNLP针对信息抽取、语义检索、智能问答、情感分析等高
285285
AutoTokenizer.from_pretrained("ernie-3.0-medium-zh", use_fast=True)
286286
```
287287

288-
为了实现更极致的模型部署性能,安装FastTokenizers后只需在`AutoTokenizer` API上打开 `use_fast=True`选项,即可调用C++实现的高性能分词算子,轻松获得超Python百余倍的文本处理加速,更多使用说明可参考[FastTokenizer文档](./fast_tokenizer)
288+
为了实现更极致的模型部署性能,安装FastTokenizer后只需在`AutoTokenizer` API上打开 `use_fast=True`选项,即可调用C++实现的高性能分词算子,轻松获得超Python百余倍的文本处理加速,更多使用说明可参考[FastTokenizer文档](./fast_tokenizer)
289289

290290
#### ⚡️ FastGeneration:高性能生成加速库
291291

applications/text_classification/hierarchical/deploy/paddle_serving/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ pip install paddle-serving-server-gpu==0.8.3.post112 -i https://pypi.tuna.tsingh
5555
- 更多wheel包请参考[serving官网文档](https://github.com/PaddlePaddle/Serving/blob/develop/doc/Latest_Packages_CN.md)
5656

5757
### 安装FastTokenizer文本处理加速库(可选)
58-
推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能。
58+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库。
59+
60+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
5961
```shell
6062
pip install fast-tokenizer-python
6163
```

applications/text_classification/hierarchical/deploy/predictor/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ python -m pip install onnxruntime psutil
2020
```
2121

2222
安装FastTokenizer文本处理加速库(可选)
23-
推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能。
23+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库。
24+
25+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
2426
```shell
2527
pip install fast-tokenizer-python
2628
```

applications/text_classification/hierarchical/deploy/triton_serving/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ python3 -m pip install paddlepaddle-gpu paddlenlp -i https://mirror.baidu.com/py
4848
3. 更多关于PaddleNLP安装的详细教程请查看[Installation](https://github.com/PaddlePaddle/PaddleNLP/blob/develop/docs/get_started/installation.rst)
4949

5050

51-
### 安装FastTokenizers文本处理加速库(可选)
51+
### 安装FastTokenizer文本处理加速库(可选)
5252

53-
推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能
53+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库
5454
55-
在容器内安装 fast_tokenizer
55+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
5656
```shell
5757
python3 -m pip install fast-tokenizer-python
5858
```

applications/text_classification/multi_class/deploy/triton_serving/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ python3 -m pip install paddlepaddle-gpu paddlenlp -i https://mirror.baidu.com/py
5050

5151
### 安装FastTokenizer文本处理加速库(可选)
5252

53-
部署环境是Linux,推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能
53+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库
5454
55-
在容器内安装 fast_tokenizer
55+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
5656
```shell
5757
python3 -m pip install fast-tokenizer-python
5858
```

applications/text_classification/multi_label/deploy/paddle_serving/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pip install paddle-serving-server-gpu==0.8.3.post112 -i https://pypi.tuna.tsingh
5252
- 更多wheel包请参考[serving官网文档](https://github.com/PaddlePaddle/Serving/blob/develop/doc/Latest_Packages_CN.md)
5353

5454
### 安装FastTokenizer文本处理加速库(可选)
55-
推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能。
55+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库。
56+
57+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
5658
```shell
5759
pip install fast-tokenizer-python
5860
```

applications/text_classification/multi_label/deploy/predictor/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ python -m pip install onnxruntime
2121
```
2222

2323
安装FastTokenizer文本处理加速库(可选)
24-
推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能。
24+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库。
25+
26+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
2527
```shell
2628
pip install fast-tokenizer-python
2729
```

applications/text_classification/multi_label/deploy/triton_serving/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ python3 -m pip install paddlepaddle-gpu paddlenlp -i https://mirror.baidu.com/py
5050

5151
### 安装FastTokenizer文本处理加速库(可选)
5252

53-
推荐安装fast_tokenizer可以得到更极致的文本处理效率,进一步提升服务性能
53+
> 重要提示:由于FastTokenizer长时间未得到维护,因此可能会遇到训练(基于Python实现的tokenizer)与部署(基于C++实现的tokenizer)阶段分词不一致的问题。为了确保稳定性和一致性,我们建议避免安装该库
5454
55-
在容器内安装 fast_tokenizer
55+
如果想要安装fast_tokenizer,以获得更高的文本处理效率,从而显著提升服务性能。您可以通过以下命令进行安装:
5656
```shell
5757
python3 -m pip install fast-tokenizer-python
5858
```

pipelines/pipelines/utils/tokenization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def tokenize_batch_question_answering(pre_baskets, tokenizer, indices):
3535
Tokenizes text data for question answering tasks. Tokenization means splitting words into subwords, depending on the
3636
tokenizer's vocabulary.
3737
38-
- We first tokenize all documents in batch mode. (When using FastTokenizers Rust multithreading can be enabled by TODO add how to enable rust mt)
38+
- We first tokenize all documents in batch mode. (When using FastTokenizer Rust multithreading can be enabled by TODO add how to enable rust mt)
3939
- Then we tokenize each question individually
4040
- We construct dicts with question and corresponding document text + tokens + offsets + ids
4141

0 commit comments

Comments
 (0)