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.5.tar.gz (8.9 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.5-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unit_tokenizer-0.1.5.tar.gz
  • Upload date:
  • Size: 8.9 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.5.tar.gz
Algorithm Hash digest
SHA256 25391ce5159a2ff4f32799c460d446705b18c50fd5a8f6a1482220212695e22a
MD5 db041b3ccaa992a735cc597fda3e767b
BLAKE2b-256 29e743e3e5f11ddc8bf2c394b7e45b3b0237ba43711304dd1f33a92c38575030

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unit_tokenizer-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7c590c021a6b032609e99fe6d2b7fd318191521ec16e080bbc57cb26398392
MD5 e71833b0c70150192b34d28f9586afc7
BLAKE2b-256 a2065896a9162a1d65341e78fc95d9cf65fdf28e8ae07c882a59a8cb0a73c0b4

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