Skip to main content

spacy-transformers: Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy

This package provides spaCy components and architectures to use transformer models via Hugging Face's transformers in spaCy. The result is convenient access to state-of-the-art transformer architectures, such as BERT, GPT-2, XLNet, etc.

This release requires spaCy v3. For the previous version of this library, see the v0.6.x branch.

Azure Pipelines PyPi GitHub Code style: black

Features

  • Use pretrained transformer models like BERT, RoBERTa and XLNet to power your spaCy pipeline.
  • Easy multi-task learning: backprop to one transformer model from several pipeline components.
  • Train using spaCy v3's powerful and extensible config system.
  • Automatic alignment of transformer output to spaCy's tokenization.
  • Easily customize what transformer data is saved in the Doc object.
  • Easily customize how long documents are processed.
  • Out-of-the-box serialization and model packaging.

🚀 Installation

Installing the package from pip will automatically install all dependencies, including PyTorch and spaCy. Make sure you install this package before you install the models. Also note that this package requires Python 3.6+, PyTorch v1.5+ and spaCy v3.0+.

pip install 'spacy[transformers]'

For GPU installation, find your CUDA version using nvcc --version and add the version in brackets, e.g. spacy[transformers,cuda92] for CUDA9.2 or spacy[transformers,cuda100] for CUDA10.0.

If you are having trouble installing PyTorch, follow the instructions on the official website for your specific operating system and requirements, or try the following:

pip install spacy-transformers -f https://download.pytorch.org/whl/torch_stable.html

📖 Documentation

⚠️ Important note: This package has been extensively refactored to take advantage of spaCy v3.0. Previous versions that were built for spaCy v2.x worked considerably differently. Please see previous tagged versions of this README for documentation on prior versions.

Metadata

Release files for spacy-transformers 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spacy-transformers 1.2.0
File Size Uploaded
spacy-transformers-1.2.0.tar.gz 45.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for spacy-transformers 1.2.0
File
spacy_transformers-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
spacy_transformers-1.2.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
spacy_transformers-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
spacy_transformers-1.2.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
spacy_transformers-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
spacy_transformers-1.2.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
spacy_transformers-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
spacy_transformers-1.2.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
spacy_transformers-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
spacy_transformers-1.2.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
spacy_transformers-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
spacy_transformers-1.2.0-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details
spacy_transformers-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
spacy_transformers-1.2.0-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
spacy_transformers-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
spacy_transformers-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details
spacy_transformers-1.2.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
spacy_transformers-1.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 3.9 MB

Release files / spacy-transformers-1.2.0.tar.gz

Download URL spacy-transformers-1.2.0.tar.gz
Size 45.3 kB
Tags Source
SHA-256 checksum
How to use checksums
81e9127dbc62ea979ac01b999cbf03d63fd0720317793c158c8b9ab8d44ad437
BLAKE2b-256 checksum
How to use checksums
c1d728d37b3da4e3b1d5bee3c9cd44f5b470dd606ad196795165ac8b919fdb6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spacy_transformers-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 187.5 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
00f5f99e1cba8ffc7708f12ea253c6d76abed99c5116dd878ce8e1c552c29420
BLAKE2b-256 checksum
How to use checksums
c148174a1f6d09853243798c01651966c9fddfc1db60284986fdab6c309fd148
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp310-cp310-win_amd64.whl

Download URL spacy_transformers-1.2.0-cp310-cp310-win_amd64.whl
Size 298.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c7e2d35441dfa23377dce1783071e3e55f983c57692aace4ed4e3e1b18e3c032
BLAKE2b-256 checksum
How to use checksums
1ee4681bda502ce39f1b3381f7e9ac89e2e561762eb9c082ce9c2c6e7d86f7cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spacy_transformers-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 187.7 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
47b352629db0f2471b4abd4abb9e5f602eea2c51408f1fede1301f725f7b66a7
BLAKE2b-256 checksum
How to use checksums
1c9715e91d4c55c17eb5213a35fbbd861835b610e89b4d7d7fbebd3a2a4e0f3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL spacy_transformers-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Size 171.0 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
81c0c3d50d126135f4656edf50ebf346c370595baef2b57cf08e1ef0ad1f8cd7
BLAKE2b-256 checksum
How to use checksums
26bd45ee711f2e5c35c4ea98b5e0224dd1ed8395bf6d331e931976a449780036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl

Download URL spacy_transformers-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Size 176.7 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d1ecf351e609eda165b5ecbad97ab53c7cc050931730e3ead72f022309c2849b
BLAKE2b-256 checksum
How to use checksums
49d6e23e2616b792f66c9e0e26979ee6374536769e50c35a5b01c378477e9bba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp39-cp39-win_amd64.whl

Download URL spacy_transformers-1.2.0-cp39-cp39-win_amd64.whl
Size 301.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
13fa10286a46375ba167e85bebd0554bc23c23f112a1c40326215d70c2507c9b
BLAKE2b-256 checksum
How to use checksums
48783be172ae3deb84acb3beafd3aacaefe24cb2b20f27c4cb3b1510d4b9a074
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spacy_transformers-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 190.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ddadd05fc232c2958b19c76fdd8acfdf8c96047c3abc488ac7c1740a9c19e29d
BLAKE2b-256 checksum
How to use checksums
6b8dba906fedb27e1ae30a71462b03098109f864d0b95b23366c1bc29284c01b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL spacy_transformers-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Size 173.2 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4a552c0887c56ee7bdf655f8ba11d904546608049e4adcfa25f52c3cbe6a2152
BLAKE2b-256 checksum
How to use checksums
3b2c9ca9d45f9a702c6540b7af2143883ae81e6335986b7eab311ce97a55ef5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl

Download URL spacy_transformers-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Size 179.0 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
592ef0989a17cbd6a433f239af8d68a1e5d6cf4de2b0d4a759a71cbfd64e08ef
BLAKE2b-256 checksum
How to use checksums
a03da1618d05f0ea35fcf66485535ccc289273e9ec3559a1c631875b16d395ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp38-cp38-win_amd64.whl

Download URL spacy_transformers-1.2.0-cp38-cp38-win_amd64.whl
Size 301.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
303d35a64c4d93fc2889e871eba019f8ff07deb421f89cda842589b811e901f2
BLAKE2b-256 checksum
How to use checksums
c6a27dda2d51c5913554fdef5bcfc67a997d91a0faf73dc632bcc8139e7704ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spacy_transformers-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 193.5 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8a5c9fb1de664b7436d139aa671a6c9886eeb230b61b605d0a28139a83aea1e4
BLAKE2b-256 checksum
How to use checksums
e67b76f5c99679170a477ac282cfc38549f9e2270e5d0c0066d0d75c9bccc804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp38-cp38-macosx_11_0_arm64.whl

Download URL spacy_transformers-1.2.0-cp38-cp38-macosx_11_0_arm64.whl
Size 169.7 kB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1ea81cfebaf84fdded1249b58b7f0700c4e43dfc7e5b9f5ba7a7dc61ed7b21d2
BLAKE2b-256 checksum
How to use checksums
29615219db2e29acb8980301bc1661a91184064ef53b26261bcda389de572d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl

Download URL spacy_transformers-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Size 175.4 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
15c600d38c8dcfb9de1bbc62ab98311a5e203dc6921ed01c1792674f8efb72a7
BLAKE2b-256 checksum
How to use checksums
880a7fd1eab18d17d597894463e6b380dd1bcc30b2d8f1b65595ab2a4034857c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp37-cp37m-win_amd64.whl

Download URL spacy_transformers-1.2.0-cp37-cp37m-win_amd64.whl
Size 298.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
71219299ff6fb3af3102c38b967861984abf5c430ac5153b9cf4add21334d953
BLAKE2b-256 checksum
How to use checksums
41e33dd5e80dfda2e878b3b8369381dfa08d28d2dfdb50963134644638b4f39c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spacy_transformers-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 189.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c239034360cd12fec23b4613dd61a9b178d1852770273d53343d466605253754
BLAKE2b-256 checksum
How to use checksums
8904afa830f4662c78b30ed4ed64525219c024aa7766e5326d2723a64f6368d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL spacy_transformers-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Size 173.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
eca2e36b98564ca6a657aba37694bcd21d81f81eda793c1f567d7c7ad19b5625
BLAKE2b-256 checksum
How to use checksums
ec51a10b1ff78d24d2ef6375758d325071800826f849314d5e2934843cad068c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp36-cp36m-win_amd64.whl

Download URL spacy_transformers-1.2.0-cp36-cp36m-win_amd64.whl
Size 309.2 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
eca4ebdb854bd2c47b5d215d83922aa7ea0d3188557a78c6f98eb1c5d7f1e7eb
BLAKE2b-256 checksum
How to use checksums
7e927b15072f3512662ee39b99b45c4c28fda80a85a2c1411fc96f2fb66b1e36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / spacy_transformers-1.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spacy_transformers-1.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 189.0 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fab1b55e6d2094c7a6b4d0e292f2a60473a5df47484c42bcdaa66d9ffeea96a0
BLAKE2b-256 checksum
How to use checksums
ceac93b3895db461a7469bbd313c65dc907e87e375675ba4908dd7e4656a7843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release history Release notifications | RSS feed

1.4.0

40 release files

1.3.9

36 release files

1.3.7

7 release files

1.3.5

29 release files

1.3.4

25 release files

1.3.2

29 release files

1.3.1

29 release files

1.2.5

28 release files

1.2.4

28 release files

1.2.3

27 release files

1.2.2

24 release files

1.2.1

24 release files

This release

1.2.0 This release

19 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.2

2 release files

0.6.1

1 release file

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page