An example package. Generated with cookiecutter-pylibrary.
Project description
Input Sequence Length Transformer models like BERT / RoBERTa / DistilBERT etc. the runtime and the memory requirement grows quadratic with the input length. This limits transformers to inputs of certain lengths. A common value for BERT & Co. are 512 word pieces, which corresponde to about 300-400 words (for English). Longer texts than this are truncated to the first x word pieces.
By default, the provided methods use a limit fo 128 word pieces, longer inputs will be truncated. You can get and set the maximal sequence length like this:
An example package. Generated with cookiecutter-pylibrary.
Free software: MIT license
Installation
pip install nka
You can also install the in-development version with:
pip install https://github.com/tobibias/neural-keyword-assignment/archive/main.zip
Documentation
Development
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append tox |
|---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox |
Changelog
0.0.0 (2022-06-22)
First release on PyPI.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nka-1.0.2.tar.gz.
File metadata
- Download URL: nka-1.0.2.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6484d49fba60f37306586b8c5a8b3c6a155d2132dd1802768bab726d49347fc1
|
|
| MD5 |
7df41405131a408c742f6901da72e862
|
|
| BLAKE2b-256 |
73327515d08b764b314c204f392bcf1edffa3f29c9bd7f46260075a37698c1c2
|
File details
Details for the file nka-1.0.2-py3-none-any.whl.
File metadata
- Download URL: nka-1.0.2-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5231903cc4f39aeae8ae2c0d76eebf24b57988d8b18db9d32af56597c1e4a76e
|
|
| MD5 |
9947ac360e493b10c5c3d4d2ddf3db49
|
|
| BLAKE2b-256 |
83ef4f7ff5b10501a8b65eccabe88779bda101c33d2449ac79cebeb8d6e9df88
|