dev-python/tiktoken (bentoo)

Search

Install

Install this package:

emerge -a dev-python/tiktoken

Package Information

Description:
tiktoken is a byte pair encoding (BPE) tokeniser from OpenAI. It splits text into the integer tokens that GPT-family models actually consume, and decodes them back, which is what token counting, context-window budgeting and prompt truncation are built on. The hot loop is a Rust extension module bound through pyo3, so it is roughly an order of magnitude faster than pure-Python tokenisers. Encoding tables (r50k_base, p50k_base, cl100k_base, o200k_base, o200k_harmony) are downloaded on first use and cached locally.
Homepage:
https://github.com/openai/tiktoken/ https://pypi.org/project/tiktoken/
License:
MIT Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0

Versions

Version EAPI Keywords Slot
0.14.0 8 ~amd64 ~arm64 0

Metadata

Description

Maintainers

Upstream

Raw Metadata XML
<pkgmetadata>
	<maintainer type="person">
		<email>lucascs@proton.me</email>
		<name>Lucas C.S.</name>
	</maintainer>
	<longdescription lang="en">
		tiktoken is a byte pair encoding (BPE) tokeniser from OpenAI. It splits
		text into the integer tokens that GPT-family models actually consume, and
		decodes them back, which is what token counting, context-window budgeting
		and prompt truncation are built on. The hot loop is a Rust extension
		module bound through pyo3, so it is roughly an order of magnitude faster
		than pure-Python tokenisers. Encoding tables (r50k_base, p50k_base,
		cl100k_base, o200k_base, o200k_harmony) are downloaded on first use and
		cached locally.
	</longdescription>
	<upstream>
		<changelog>https://github.com/openai/tiktoken/blob/main/CHANGELOG.md</changelog>
		<bugs-to>https://github.com/openai/tiktoken/issues</bugs-to>
		<remote-id type="github">openai/tiktoken</remote-id>
		<remote-id type="pypi">tiktoken</remote-id>
	</upstream>
</pkgmetadata>

Lint Warnings

Manifest

Type File Size Versions
Unmatched Entries
Type File Size
DIST aho-corasick-1.1.5.crate 184315 bytes
DIST bit-set-0.8.0.crate 16289 bytes
DIST bit-vec-0.8.0.crate 24132 bytes
DIST bstr-1.13.1.crate 356631 bytes
DIST fancy-regex-0.17.0.crate 109054 bytes
DIST heck-0.5.0.crate 11517 bytes
DIST libc-0.2.189.crate 851502 bytes
DIST memchr-2.8.3.crate 99165 bytes
DIST once_cell-1.21.4.crate 35010 bytes
DIST portable-atomic-1.15.0.crate 202705 bytes
DIST proc-macro2-1.0.107.crate 59588 bytes
DIST pyo3-0.28.3.crate 1204476 bytes
DIST pyo3-build-config-0.28.3.crate 35961 bytes
DIST pyo3-ffi-0.28.3.crate 80881 bytes
DIST pyo3-macros-0.28.3.crate 8963 bytes
DIST pyo3-macros-backend-0.28.3.crate 88063 bytes
DIST quote-1.0.47.crate 31622 bytes
DIST regex-1.13.1.crate 157118 bytes
DIST regex-automata-0.4.18.crate 628707 bytes
DIST regex-syntax-0.8.11.crate 359055 bytes
DIST rustc-hash-2.1.3.crate 14811 bytes
DIST serde_core-1.0.229.crate 63100 bytes
DIST serde_derive-1.0.229.crate 59864 bytes
DIST syn-2.0.119.crate 307407 bytes
DIST syn-3.0.3.crate 312999 bytes
DIST target-lexicon-0.13.5.crate 26928 bytes
DIST tiktoken-0.14.0.tar.gz 38898 bytes
DIST unicode-ident-1.0.24.crate 49298 bytes