Skip to main content

spaCy pipelines for pre-trained BERT and other transformers

Project description

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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spacy-transformers-1.2.1.tar.gz (45.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spacy_transformers-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (187.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.1-cp310-cp310-win_amd64.whl (298.3 kB view details)

Uploaded CPython 3.10Windows x86-64

spacy_transformers-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (187.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (179.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.1-cp310-cp310-macosx_11_0_arm64.whl (171.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

spacy_transformers-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl (176.7 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

spacy_transformers-1.2.1-cp39-cp39-win_amd64.whl (301.3 kB view details)

Uploaded CPython 3.9Windows x86-64

spacy_transformers-1.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (190.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.1-cp39-cp39-macosx_11_0_arm64.whl (173.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

spacy_transformers-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl (179.0 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

spacy_transformers-1.2.1-cp38-cp38-win_amd64.whl (301.6 kB view details)

Uploaded CPython 3.8Windows x86-64

spacy_transformers-1.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (193.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (184.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.1-cp38-cp38-macosx_11_0_arm64.whl (169.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

spacy_transformers-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl (175.4 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

spacy_transformers-1.2.1-cp37-cp37m-win_amd64.whl (298.9 kB view details)

Uploaded CPython 3.7mWindows x86-64

spacy_transformers-1.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.0 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (180.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl (173.5 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

spacy_transformers-1.2.1-cp36-cp36m-win_amd64.whl (309.2 kB view details)

Uploaded CPython 3.6mWindows x86-64

spacy_transformers-1.2.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.0 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (180.8 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ ARM64

File details

Details for the file spacy-transformers-1.2.1.tar.gz.

File metadata

  • Download URL: spacy-transformers-1.2.1.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for spacy-transformers-1.2.1.tar.gz
Algorithm Hash digest
SHA256 6fc0e0da2391974630c93ddea86ec2dc4941c95555a2f3416aa96fd507415c86
MD5 ffa008616c966a2171736f8183a4f1ad
BLAKE2b-256 e27a43b76a726a6f82620beb5e201d06d4a6db637e67f3b9467b8aa10e992847

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0a5348f85ad1e516be731da1a1f470c0bdb6200295ca6d98d1e3133c1bc500b
MD5 0a10a78d645da812fcb695fe0d8b5122
BLAKE2b-256 6f0accd389655df49697031abff0066b23ba5776fac9a6623d65e8dcef2a1c08

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cccc0e5691281eef3be4302c5f94527b3c25da07577e47f43e73d7b7263b60ef
MD5 330217aae38726d91ffc52bd0d0270b8
BLAKE2b-256 c2dc970ebc55c7b0560ee79fec7c356627c51ca0d5b96ae9de3cb4302f0c436b

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30e09695d2955acb689c06b98e20cec75f80d6da8dbef9cbed9f4dde87f7fd72
MD5 d66d00020c1d834557a76f3ab8525881
BLAKE2b-256 904370948fac6a1255b94b4f0e88c6b19a38fc77a4aa1d6994cf5dd4372a80cc

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d93b5345f588d8d9a1bf6f6e3d01bcb0dda6bee880368c80de637a649b56eb9f
MD5 c9e5a5db26ca91a803c33198b96a4434
BLAKE2b-256 b99655f8ab73adea10d5d1adf0bacbff2245a3ad519bdab12fb678f8cb311795

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3eca407f38cdd4fb41ccddecdbb9d13eff6bfd1a9e59a7230983130bf228ce01
MD5 0557d478c5a13507da55ea80fae302a7
BLAKE2b-256 5fba10b19887f6f9f50ca7a66923986c35623de0b59be9ff1b5ea6c581d1451f

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2f2fdcac0322c2962c544100194e2af711f6cde38740e5bf5fb7501680f3d98d
MD5 7bf5fce7f0ea27517f8d4c9a01f5175c
BLAKE2b-256 67481618f195e55d2587d4ef044291842e5ca3657cb9ba61e02e4f1d4f19e69e

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d1d2f4157086d24de95cad28be4abaa75812bfc009d26ca9350f23862f1a6f4f
MD5 2c257e2a2cc235112744fd828c2800a3
BLAKE2b-256 8f0172b2dc4e8aeec07ebdfb9a0e7f22e1f19a6cb08b864529e7d39e2bfb2f5c

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2a5ec35be42571221535cffab89fce54a19a05b1df823520a18ecc5faa0d01d
MD5 96559bbea513183f3991b04d212546a5
BLAKE2b-256 9267cb8d5bd8af5b8b75757c81bd46a5acfb99a5539abf66240e53ea8728296c

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0b620d401059f480608e6e27f1c723ea42c1a773cccd4443809a6a14e17613f4
MD5 6f5da0a053f98bb125d25e4e067e11ec
BLAKE2b-256 fc54a5ff66a622712350f45c1b5bc2c2fb55a4a7ca8fa9d73c3e512323a321ac

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 413ff314933c340dcd5f780be685ad38e97d619c7adb9d07da5b936492749baf
MD5 ca98bcc71ba94049f8dd0863782224f9
BLAKE2b-256 b9ddcba321a1a422c969aeeadb536574d024303f9548399c7cb19e61fceef3b9

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7eddfb16f01f8a6e4ccc16d6f39712188b8ce8b0532158251531d7885cd229ac
MD5 adf342dfc0234d1d211c0b21d838ada3
BLAKE2b-256 585b1f0bfe2cff5f49aa19b9e522ad6bc84f99acfae4dbed104a33fe2f0f410f

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 acd6381e69e561a0a3c7708fcb0be835f577419b8b5661edfa19f8b953ff4081
MD5 1ae1d63a104d5e369d2789a607d0dd65
BLAKE2b-256 03fd38de14a67d94d5ac34860e9400df247f992e6d9c32302467c32deed36f58

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6c7703b8ce9050a8a1ac9ee41f482fe411e2d6af48f49a2bb8e84c33861bcce
MD5 93391b844d01a6555b23e1e9d4284ba3
BLAKE2b-256 b03f0ae059ee71290ab40b7d60802cc058fc6aed47d2de840409875a40728d75

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 127836a19a0ed8d2e011e509c7496f0f15234706f469b9319e21ca9a5652c189
MD5 8154ddb8fdfa2c3ad79729de2e6553b3
BLAKE2b-256 78687cc7963f881e8e4582227239852cc1f19231b87483000451ef977ef4c07b

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91ac46f811864374f54589f4b4bca9bef1ace76fbfcb6bcb50ac21fcdc569d8a
MD5 b8a2dbbd8ee9edc184cbd5da21e9d05c
BLAKE2b-256 3f2648b55db5d34e37bb92c58e38ec0e32a68a52aba5b5d101d7e92cdfb1277a

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a0589938dc500bfa3763c305b7b89e343824dcf6e16ffc3b099b6f6576ae1f1
MD5 5d64c43ec03d2096b2de480e9a275796
BLAKE2b-256 1e7b1f0299d4c9570ac7369f9ebf64408f994b2c6e1c238d43f4e31fe0ec39a2

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2fe59bf8403da06873a00ba7ae2ef85a7411e9895a49f450f2717f8699f86fd0
MD5 83b9fe4936a83163f198b0a4a527cabb
BLAKE2b-256 f0de8474580953cf5bab645950372dfb0056fa02cb5c97b04549dcb1783f2c4b

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1c10eb5fe7c7d952be8a6c20cebbbef4bfa49a89020353c7f65467878b50fe50
MD5 722a3973bd2d9d8fe41c7c25ac77f02e
BLAKE2b-256 f6430c412ef5f019dbf4ffeb4e632e81561a6fa9e7b55b59f8846269702ec4a3

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c1615c4f8b704a5befb5a91516ce89f5e43dedaf2badb08b149b392301b077d6
MD5 cdc2c848355322b6099fad6acfcdfe4b
BLAKE2b-256 970ab001acafcf5352807adfd1af0f93287b64a5080c16796c00fa9d9d8cfbac

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 59e027b1389a7229416af6048fd4415fdf81d862d715822b411c4129571ea8ed
MD5 a419f87dfb4a44894f36d5b42f95a8a8
BLAKE2b-256 bbe79e1d0fb8bc191cde2a6365d10d8f0599156695aff7c864da1f05bce36313

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 af7023e81f0e5d7f36210e50782607f42da87bacea3e102e0bba071eb9bdb400
MD5 b555d4619782e50df918f9eea85c55cc
BLAKE2b-256 2e1ecfcabf7e6a3cd79d1d8291ddde7c56964b51500f8163a612860d5f458eaf

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b913e21e73d576b23b946006cf714b041f9bf1a8ec27d073af488ae51629c018
MD5 25d2693ea896896de0519c86a9c89efe
BLAKE2b-256 e240b63b81933eb43ffc3db81804a8ff5f4da6a80d5997fc51f030278b490547

See more details on using hashes here.

File details

Details for the file spacy_transformers-1.2.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for spacy_transformers-1.2.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 31b846476a65250bde7807aefad24ae21b1519a4a07559b75737354fd725266d
MD5 7429bb7d4a630024d3b383e45d8c1f9a
BLAKE2b-256 6c119d8c81ca1d63f4725936703de2dc2d328e27831fcae5a09d133efdcbadae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page