Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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 is a pre-release and requires spaCy v3 (nightly). 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-nightly[transformers] --pre

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

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

pip install spacy-transformers --pre -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.0.0rc3.dev1

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.0.0rc3.dev1
File Size Uploaded
spacy-transformers-1.0.0rc3.dev1.tar.gz 31.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spacy-transformers 1.0.0rc3.dev1
File Interpreter ABI Platform
spacy_transformers-1.0.0rc3.dev1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 68.8 kB

Release files / spacy-transformers-1.0.0rc3.dev1.tar.gz

Download URL spacy-transformers-1.0.0rc3.dev1.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e5d7844f897f89cab36b01f4c543e2a1db4f12826a81805f14a64ee67acfb2a8
BLAKE2b-256 checksum
How to use checksums
b60e6c3649d059d59a9b5bd0188405e89279c5fc8f7bf7978a7832149ac37485
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

Release files / spacy_transformers-1.0.0rc3.dev1-py2.py3-none-any.whl

Download URL spacy_transformers-1.0.0rc3.dev1-py2.py3-none-any.whl
Size 37.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
21a601ab740a7a89a2b1c33e0f4b7deeefccc230d5be0477115095747ddfd0c3
BLAKE2b-256 checksum
How to use checksums
5154a8239be4c68abf740987a86d9ae117eb0c6476b283a8168887fced106db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 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

1.2.0

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

This release

1.0.0rc3.dev1 This release

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