Repository navigation
tokenizer set_vocab
GitHub Action edited this page Jul 9, 2026
·
1 revision
void set_vocab(std::vector<std::string> vocab)Sets the vocab.
Returns void
| Parameter | Type | Use | Optional |
|---|---|---|---|
token |
std::vector<std::string> |
New vocab | ❌ |
// Calling the set_vocab() function
tokenizer t("bestvocab.txt");
t.set_vocab({"i'm", "a", "super", "short", "vocab", "list", "that", "sux"});- AIUsage
- Block
- Embedder
- Introduction
- Layer
- Model
- NeuralNetwork
- PositionalEncoding
- SelfAttention
- Tokenizer
- Utility