spaCy/spacy/ml/models
Daniël de Kok e5debc68e4
Tagger: use unnormalized probabilities for inference (#10197)
* Tagger: use unnormalized probabilities for inference

Using unnormalized softmax avoids use of the relatively expensive exp function,
which can significantly speed up non-transformer models (e.g. I got a speedup
of 27% on a German tagging + parsing pipeline).

* Add spacy.Tagger.v2 with configurable normalization

Normalization of probabilities is disabled by default to improve
performance.

* Update documentation, models, and tests to spacy.Tagger.v2

* Move Tagger.v1 to spacy-legacy

* docs/architectures: run prettier

* Unnormalized softmax is now a Softmax_v2 option

* Require thinc 8.0.14 and spacy-legacy 3.0.9
2022-03-15 14:15:31 +01:00
..
__init__.py Tidy up code 2021-06-28 12:08:15 +02:00
entity_linker.py Fix entity linker batching (#9669) 2022-03-04 09:17:36 +01:00
multi_task.py Auto-format code with black (#10209) 2022-02-06 16:30:30 +01:00
parser.py Replace use_ops("numpy") by use_ops("cpu") in the parser (#9501) 2021-10-21 11:22:45 +02:00
spancat.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
tagger.py Tagger: use unnormalized probabilities for inference (#10197) 2022-03-15 14:15:31 +01:00
textcat.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
tok2vec.py MultiHashEmbed vector docs correction (#9918) 2021-12-27 11:18:08 +01:00