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.6.tar.gz (9.0 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.6-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unit_tokenizer-0.1.6.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for unit_tokenizer-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bb09365677ba6e17cacbc1e9fb3fdddf3e8fc694cbfd096572e984b8135b78d1
MD5 f8067d300bef2e983733c7e76766a99c
BLAKE2b-256 212a678ea81b87bc0c08c991a716f9415527cd546b6cd66e98e001867e1c189b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unit_tokenizer-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for unit_tokenizer-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fdcaeb672ce1295e77367ae25351f7acbe53b5dae3c462d79e7e0d7c14f8ffcc
MD5 ffde0251bd21a303ddf1a7bf3d57b098
BLAKE2b-256 76d1c9bb810d78363ea64771e73241b2d1922d1030729f7affaaa524dda5c9c4

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