Views
No views yet
| Variant | Parameters | Layers | Embed Dim | Heads | KV Heads | Intermediate Dim | Max Seq Len |
|---|---|---|---|---|---|---|---|
| tiny | 7M | 18 | 192 | 6 | 2 | 512 | 2048 |
| small | 16M | 18 | 288 | 9 | 3 | 768 | 2048 |
| base | 43M | 12 | 576 | 9 | 3 | 1536 | 2048 |
| large | 101M | 30 | 576 | 9 | 3 | 1536 | 2048 |
1from bytellama.tokenizer import OctetTokenizer
2
3tokenizer = OctetTokenizer()
4
5# Encode with a language tag
6tokens = tokenizer.encode("Hello world!", langs=["eng"], add_bos=True, add_eos=True)
7
8# Encode without a language tag
9tokens = tokenizer.encode("Hello world!", add_bos=True, add_eos=True)[BOS, LANG, byte1, byte2, ..., EOS].pip install .bytellama CLI:1bytellama --device cuda:0 --precision bf16-mixed train \
2 --dataset <hf_dataset_or_path> \
3 --model-variant base \
4 --batch-size 128 \
5 --max-steps 100000 \
6 --accumulate-grad-batches 4 \
7 -o /path/to/checkpointsbytellama --config experiment.yaml train --dataset <hf_dataset_or_path>infer command with a prompt and one or more language tokens:1bytellama --device cuda:0 infer \
2 --model models/model.safetensors \
3 --max-new-tokens 200 \
4 "Blaue Blasen sind" deueng) or language names that
map to supported tokenizer languages.