Merge pull request #75 from huggingface/doc_parallelism

Added doc for setting tokenizers level of parallelism.
This commit is contained in:
MOI Anthony
2020-01-15 09:42:22 -05:00
committed by GitHub

View File

@ -54,3 +54,10 @@ fn main() -> Result<()> {
Ok(())
}
```
## Additional information
- tokenizers is designed to leverage CPU parallelism when possible. The level of parallelism is determined
by the total number of core/threads your CPU provides but this can be tuned by setting the `RAYON_RS_NUM_CPUS`
environment variable. As an example setting `RAYON_RS_NUM_CPUS=4` will allocate a maximum of 4 threads.
**_Please note this behavior may evolve in the future_**