feat: implemented native ctok tokenization engine with model scopes
- Implemented the `ctok` Rust native tokenization engine with offline support for Claude V3, V47, V5, and V5Sonnet families. - Replaced global token estimation with model-scoped `Tokenizer` instances and provider-anchored transcript accounting across packages. - Added vocabulary generation scripts, test fixtures, and comprehensive unit tests for tokenizer routing and matching modes.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
"test": "bun test --parallel",
|
||||
"fix": "biome check --write --unsafe .",
|
||||
"fmt": "biome format --write .",
|
||||
"gen:ctok": "bun scripts/gen-ctok-vocab.ts",
|
||||
"gen:native": "bun scripts/embed-native.ts",
|
||||
"gen:native:reset": "bun scripts/embed-native.ts --reset",
|
||||
"gen:npm": "bun scripts/gen-npm-packages.ts",
|
||||
|
||||
Reference in New Issue
Block a user