|
Download README.md from AMFORGE/cofos_tok_v2: direct link, hf CLI and curl.
- Browser
- Download file 864 Bytes
-
https://huggingface.co/AMFORGE/cofos_tok_v2/resolve/main/README.md
- Command line
-
hf download hf://AMFORGE/cofos_tok_v2/README.md
-
curl -L -o README.md https://huggingface.co/AMFORGE/cofos_tok_v2/resolve/main/README.md
864 Bytes
metadata
license: apache-2.0
tags:
- tokenizers
- BPE
- sentencepiece
- code-generation
cofos_tokenizer
Specialized SentencePiece BPE tokenizer for the cofos programming and logic language model.
Configuration
- Vocabulary size: 16384
- Model type: BPE
- Byte fallback: enabled
- Digit splitting: enabled (digits 0-9 are guaranteed atomic)
- Whitespace normalization: disabled (
identityrule) — indentation preserved
Special atomic tokens
Keywords (def, class, fn, struct, impl, return, async, …),
operators (==, !=, =>, ->, ::, ///, …) and structural tags
(<python>, <code>, <explanation>, …) are all guaranteed single tokens.
Usage
import sentencepiece as spm
sp = spm.SentencePieceProcessor()
sp.Load("cofos_tokenizer.model")
print(sp.EncodeAsPieces("def hello():\n return 42"))