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.2.tar.gz (46.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.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.2-cp310-cp310-win_amd64.whl (299.5 kB view details)

Uploaded CPython 3.10Windows x86-64

spacy_transformers-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (180.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.2-cp310-cp310-macosx_11_0_arm64.whl (172.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

spacy_transformers-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl (177.8 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

spacy_transformers-1.2.2-cp39-cp39-win_amd64.whl (302.6 kB view details)

Uploaded CPython 3.9Windows x86-64

spacy_transformers-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (192.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (183.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.2-cp39-cp39-macosx_11_0_arm64.whl (174.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

spacy_transformers-1.2.2-cp39-cp39-macosx_10_9_x86_64.whl (180.1 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

spacy_transformers-1.2.2-cp38-cp38-win_amd64.whl (302.9 kB view details)

Uploaded CPython 3.8Windows x86-64

spacy_transformers-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (185.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.2-cp38-cp38-macosx_11_0_arm64.whl (170.8 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

spacy_transformers-1.2.2-cp38-cp38-macosx_10_9_x86_64.whl (176.5 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

spacy_transformers-1.2.2-cp37-cp37m-win_amd64.whl (300.1 kB view details)

Uploaded CPython 3.7mWindows x86-64

spacy_transformers-1.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (190.2 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.7 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

spacy_transformers-1.2.2-cp37-cp37m-macosx_10_9_x86_64.whl (174.6 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

spacy_transformers-1.2.2-cp36-cp36m-win_amd64.whl (310.4 kB view details)

Uploaded CPython 3.6mWindows x86-64

spacy_transformers-1.2.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (190.1 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

spacy_transformers-1.2.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.0 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: spacy-transformers-1.2.2.tar.gz
  • Upload date:
  • Size: 46.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.2.tar.gz
Algorithm Hash digest
SHA256 529f5994b9403340835c460323de4ab0bcc0d13073fee645a848192e63480010
MD5 4cc7caf08495c0a4838b0e0a2a59b48a
BLAKE2b-256 a1fa711780a25596a4254c81734a5ea3aa09874732a24b02cf36503e5399a407

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47719cef262cb2a1cf707290bb05582b3c4e28c04068230cab38cd50ba478ef7
MD5 09d2423699f3c912c89a991bc777cce9
BLAKE2b-256 d591172b078bf1bacf0f712d4eca1e7527e82432d7ce974a9a2950021b4fa870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ef8e6cc5f9c004f01620e3387f16a4b561a32c76ba5c108682cf8b3905220a9b
MD5 7bc0a1632df763a7005228c0b89654b7
BLAKE2b-256 bb00d1c0b957fc06922312c87ab2c9ddd659bd49562d1f801920733baae2ad4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 def1f19581a018e1d70ffdbcb4130aa4bb1247479d45af7c55abe0be6e510951
MD5 0ba7054581b116d7c5df26c62862e637
BLAKE2b-256 f3dc28913e51c90ed5130c9e6a50a5b967796c70b4723453233b7a31c4304055

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3d46b89b826690f750086b46d687d8f569933704d0a2fc23a932f784ff427fcb
MD5 f421c8f406c3812e52854d09c6b454ca
BLAKE2b-256 f29f7af9925444a57e26292ba64ae5c486d15d90a80e0a2d7f79ed363cd0a52b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26799a57c848095d1194cf53a549793919654aa579ef07ed0b1819f02a333ceb
MD5 1e0e348a9660b378f012ebcd16b8b5ee
BLAKE2b-256 d8f74785575f4c7372121243bb50f4fe210e98ee0335f415bd7d93432cef7266

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 391edd028071bd0e90e061c7ad572e0530966882abf98d1336d1f9df8af39e53
MD5 f97de2d59c44b1ba4bfd53dfe31306bb
BLAKE2b-256 7eecc11fdbe317e412ac2b792c793d8e21634ebf14ff1ce8b30a830826418005

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 662cb7383dff5a6c85e7ee73c3d3eb749c2168e245c48370bb1115d615d87f86
MD5 5393905f7f36d31bd2d35cc97b396e13
BLAKE2b-256 c3511322f8cd69ce525177afd0bb931c5f28d75328d7394571518a8c77f7e938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1bd0822ee16fafffb8c4641500ad2cbc0f9076723542ef05a46b774113877d5
MD5 afa75b5d6e4d56584c7268d4a2900476
BLAKE2b-256 1528f26a61de4e09687aeb537d0b65027c9787ae90dc1bd50d3bad3a08ed1309

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7e04e2ace77e712ad2e7739bae4cf22a4f87026b4e09b4abebcf179af2fdfdde
MD5 b0b0e257ee0011593eed34d8587c5b33
BLAKE2b-256 ddd19f6dd86772b86562a84309f7a1ab261e12d59f77fbc4bd921f1b860f589b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 19d23cbb903c3c6ca8eaa807e481d469aea16a1a03d9c387cde6185a07e7425b
MD5 f2e4b2a8317b3ccb53d2c619d54fe4b3
BLAKE2b-256 da34fbd56e9dc022f3804f1b91dc34f36e3160628856a57d1ac567708169b461

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fb80f90d5d89f91ff2134eeb8bc408afc5f884b73bd55059d5940f7b45430c9d
MD5 761817d8923f5fdd4a95d457de05fb4f
BLAKE2b-256 2a9f0bfcbd343b8f56add06e8ec91fd8a2c7b97d1a7a32e68cc30fb508771518

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6b0fe2b3dc9791697940c84d61d916771e4a458cbfb669138e0eb7c17b15c06d
MD5 c325e20c59347792f0dadb6ebae2e33b
BLAKE2b-256 2260f97ade8a826e26b3a16329c34b1121eb3e2531f7096a3cd6409a85bd9b82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0fff8dcf6523a48fd445c40d84fbbc40acab39a9be00a5e6a48b4046fd229690
MD5 8c82e01afa4f4102bab4dbc76522f897
BLAKE2b-256 f301614154316ffce9f946221b5c8c172bbec46f10ce06b0d666f4eb698325be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f14223f068105882b7a6a695d263b7ccf0137e46aaf81d9bb9819802cd51982f
MD5 838c9f3f4ac2c08aaa98ba3f37c4cf04
BLAKE2b-256 dbd1c1557e5dd4ad6a5ce64927d98b174b02c4b354ab119f92c13bc792c29f00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7106b92c6d8c4b8e335e83caa22db2736fca6406c8c527722f43f7ad8ad24dce
MD5 56a5ffb8c9d1db7f392f7045ae948bc4
BLAKE2b-256 4e91344df1483a9ecf30d043d2266e5430beabaf424edf8af4b6a140d564e622

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fa4538dc64d18cf61b71337354bd32e4505fd99f0df835b50a0931b667003f18
MD5 3d089f5a7ff1e7b3975e03f0b86d25b0
BLAKE2b-256 26c426c51ff53e101e24fc5c95498308f7534f038f43898bfcf88c17ebbbbfc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c6e2663013b88054bb1a15cb75863ee16b18627828461801cb881840ad913de7
MD5 aa67ab23c746e06fb1cf35d4515e0062
BLAKE2b-256 8fb8b20723b8f7971a8f8bd5303468aa80968f30275e495f97c6fcb7919ac9d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 225e45998259c1debba488e9501877fae737454069b81c9e3694ec3c13f80531
MD5 30d63cbc4b7894270ac7586b72d3b7be
BLAKE2b-256 0692e25b219d12e6f5b95bd22703ac1e292a90caccac02a6a24ed59e948681b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 99591687bb364444b57c382be0a22ecc40306c962b362b87e04c0a1bdd2d783a
MD5 20cff0ac91a5af454bbfd37d0591efe2
BLAKE2b-256 d6e6738d96da26ff08e891ae32ac2786555ccb5fa6aba55b26a8ffe4561b97f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6579bd022b36cb5de7cc8f8be95b3e29cf0e87d22de8a3a5d1cd55616624f779
MD5 dbdd196c6a518fd13a09c03b8495d7bf
BLAKE2b-256 0aa165d25f356bf6fff18f8215a5d375edc31f2d672bf530f19922074aeca75d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c189553bb92d695e94f77058631338a60f25d47d524fe5557dda168c1aec644d
MD5 d93a031b30e78f1e53c5d4878e1c1749
BLAKE2b-256 6bbae174c9afeaf0008ee0baadd2d83ae3549d82030d851e2ebd201e5eaa852b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f717e18ea6eb7150ccf3fe4732d90e1c03dc7858ae133208727d3659d3d9372
MD5 f2f6b273c802f19f6897b0ea28c77f63
BLAKE2b-256 b41364fa3b7e798589fcd9a2af87b82d44916ae89fed6cf4e4fd3c9b2e29fc2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_transformers-1.2.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cfc31b73ec85ed59e642f1d324166bad5afa42a6acd7839e9eb3ba25eef4e58c
MD5 ba6d59072388581b9100468e9a2932d8
BLAKE2b-256 564f3bee6aaed425415f315484aa89141d9a7e5d42bb1c3a963b9dfb8be4dd17

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