2 个版本
0.2.1 | 2023 年 7 月 31 日 |
---|---|
0.2.0 | 2023 年 5 月 4 日 |
0.1.0 |
|
757 在 机器学习 中
57KB
1K SLoC
tiktoken-rust
状态:开发中。
tiktoken 是一个用于 OpenAI 模型的快速 BPE 分词器。它提供了用于与之交互的 Python 接口。
此项目是原始存储库的分支,为 Rust 世界带来了该功能。
use tiktoken_rust as tt;
let enc = tt::get_encoding("cl100k_base").unwrap();
assert_eq!(
"hello world",
enc.decode(&enc.encode_ordinary("hello world"), tt::DecodeMode::Strict).unwrap()
)
lib.rs
:
tiktoken_rust
此包是一个用于 OpenAI 模型的分词器。
依赖关系
~9–26MB
~367K SLoC