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.1.tar.gz (8.4 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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for unit_tokenizer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3d6f49eb16d4a71edec396e3b922160bd026ae10d1825db9b746a25d93bde196
MD5 ce771c3719a01739de273b1da8457bc7
BLAKE2b-256 1dea13d1e6dacd0d23f5d4cfc13d08f05fe4a75f7c646f78ed89729347e205d5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for unit_tokenizer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce71b6be99665b22b707cf61aa3734c8178f1a87a5e11621ee487f01819b8836
MD5 e4c268512ee9b49e2ddedc87be512497
BLAKE2b-256 8e7f162f6d7c1f5d6c987159021fd3d43d0c889735f212162087a25d2055cdfb

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