llama-stack-mirror/llama_stack
Sébastien Han b45cc42202
chore: remove usage of load_tiktoken_bpe
The `load_tiktoken_bpe()` function depends on blobfile to load
tokenizer.model files. However, blobfile brings in pycryptodomex, which
is primarily used for JWT signing in GCP - functionality we don’t
require, as we always load tokenizers from local files. pycryptodomex
implements its own cryptographic primitives, which are known to be
problematic and insecure. While blobfile could potentially switch to the
more secure PyCA cryptography library, the project appears inactive, so
this transition may not happen soon. Fortunately, `load_tiktoken_bpe()`
is a simple function that just reads a BPE file and returns a dictionary
mapping byte sequences to their mergeable ranks. It’s straightforward
enough for us to implement ourselves.

Signed-off-by: Sébastien Han <seb@redhat.com>
2025-05-27 20:47:06 +02:00
..
apis chore: removed unused class (#2268) 2025-05-26 08:41:37 -07:00
cli fix: handle None external_providers_dir in build with run arg (#2269) 2025-05-27 09:41:12 +02:00
distribution fix: index non-MCP toolgroups at registration time (#2272) 2025-05-26 20:33:36 -07:00
models chore: remove usage of load_tiktoken_bpe 2025-05-27 20:47:06 +02:00
providers chore: remove usage of load_tiktoken_bpe 2025-05-27 20:47:06 +02:00
strong_typing chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
templates chore: remove dependencies.json (#2281) 2025-05-27 10:26:57 -07:00
ui feat: start ui server in llama stack run (#2170) 2025-05-23 20:00:09 -07:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
schema_utils.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00