MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / default_bpe

Function default_bpe

vtp/tokenizers/text_tokenizer.py:59–72  ·  view source on GitHub ↗

Get default BPE file path.

()

Source from the content-addressed store, hash-verified

57
58
59def default_bpe():
60 """Get default BPE file path."""
61 bpe_path = _find_bpe_file()
62 if bpe_path is None:
63 # Try to use open_clip's default if available
64 try:
65 from open_clip.tokenizer import default_bpe as _default_bpe
66 return _default_bpe()
67 except ImportError:
68 raise FileNotFoundError(
69 "BPE vocabulary file not found. Please ensure bpe_simple_vocab_16e6.txt.gz "
70 "is available in one of the expected locations, or install open_clip."
71 )
72 return bpe_path
73
74
75@lru_cache()

Callers 1

__init__Method · 0.85

Calls 1

_find_bpe_fileFunction · 0.85

Tested by

no test coverage detected