Skip to main content

Tokenizers that operate on integer sequences.

Project description

Unit Tokenizer

pytest

Tokenizers that operate on integer sequences.

Requirements

  • Python >= 3.9 (because of type hinting syntax)

Features

  • BPETokenizer

    • Byte-pair encoding algorithm
  • RLETokenizer

    • Run-length encoding algorithm
  • PackBitsTokenizer

    • Modified run-length encoding algorithm
  • NaivePackBitsTokenizer

    • PackBitsTokenizer that allows negative units

Installation

pip install unit-tokenizer

Installation for development

poetry install
pre-commit install

Test

poetry run pytest

Usage

See tests/*.py.

Project details


Download files

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

Source Distribution

unit_tokenizer-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

unit_tokenizer-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file unit_tokenizer-0.1.0.tar.gz.

File metadata

  • Download URL: unit_tokenizer-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for unit_tokenizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 27e8386660daa3ddd9497d1748ed45e4d6987baa16c462c412cb5dc106452013
MD5 ff5b0cb8a7ea87664779fc84c173f32e
BLAKE2b-256 c463a88857120de5d5b247fb3b4838e7ea2fb5b5f14a181c0330e317c5519857

See more details on using hashes here.

File details

Details for the file unit_tokenizer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: unit_tokenizer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for unit_tokenizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 976e4818db829d343846501b5847d9d70bbf106cb86cd597068819b1e36af17f
MD5 0be8cc4b055d1ff9083e7125ecef5fb8
BLAKE2b-256 8e718967a509a4778e3042944e38e979217d7ccfaa01398d3aa415911d557901

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