Instructions to use VeroLM/NoTokenLM-Gen-5.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VeroLM/NoTokenLM-Gen-5.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VeroLM/NoTokenLM-Gen-5.5", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("VeroLM/NoTokenLM-Gen-5.5", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VeroLM/NoTokenLM-Gen-5.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VeroLM/NoTokenLM-Gen-5.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VeroLM/NoTokenLM-Gen-5.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/VeroLM/NoTokenLM-Gen-5.5
- SGLang
How to use VeroLM/NoTokenLM-Gen-5.5 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "VeroLM/NoTokenLM-Gen-5.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VeroLM/NoTokenLM-Gen-5.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "VeroLM/NoTokenLM-Gen-5.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VeroLM/NoTokenLM-Gen-5.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use VeroLM/NoTokenLM-Gen-5.5 with Docker Model Runner:
docker model run hf.co/VeroLM/NoTokenLM-Gen-5.5
NoTokenLM-Gen-5.5
NoTokenLM-Gen-5.5 is a tokenizer-free, byte-level language model, trained on about 100 B bytes. There is no vocabulary and no BPE: UTF-8 bytes go in, UTF-8 bytes come out. Instead of spending a whole forward pass on every byte, the model groups bytes into variable-length patches (about 6 bytes on average) and runs its large trunk only once per patch.
It is a base model (it continues text; it is not instruction-tuned). Benchmark results are listed in the Evaluation section.
An earlier mid-training checkpoint was released as NoTokenLM-Gen-5.5-Preview.
| Parameters | 168.9 M in total (incl. a 19.9 M hash-embedding table and a frozen 4.5 M entropy patcher) |
| Input / output | raw UTF-8 bytes (0..255), byte 0 = end of document |
| Context window | 4,096 bytes (the training window) |
| Trunk | 20 layers, d = 768, 5 × [RWKV-7, gated attention, RWKV-7, RWKV-7] |
| Training data | ≈ 100 B bytes: English-heavy text mix + math, code and French (see below) |
| Weights | EMA weights, fp32 |
| License | Apache-2.0 |
Architecture
bytes ─► byte embedding + hashed n-gram embedding (orders 3-8) + ROSA suffix-match features
─► local encoder (conv, conv, windowed attention; d = 256)
─► entropy-based patching (avg ≈ 6 bytes, max 16) ─► attention pooling
─► trunk over patches: 5 × [RWKV-7 · NoPE gated attention · RWKV-7 · RWKV-7] (d = 768, SwiGLU)
─► local decoder (4 windowed-attention blocks; d = 256) ─► 256-way next-byte logits
- Entropy patching. A small frozen causal convolutional byte model predicts the next byte; wherever its entropy is above a calibrated threshold (
theta, stored inconfig.json), a new patch starts. Boundaries only depend on bytes that were already seen, so they are reproducible at generation time. - Hybrid trunk. RWKV-7 layers (with value residual) carry most of the sequence mixing, with one gated, QK-normed, position-free attention layer in every block.
- Past-only hashed n-gram embeddings (orders 3–8) give the byte encoder cheap access to local context.
- ROSA. An online suffix automaton finds the longest earlier match of the current suffix and feeds the predicted next byte and the match length into the encoder, and as a small logit boost into the output (a copy mechanism in the spirit of the RWKV-8 ideas).
- DeepEmbed (per-byte scaling of the local FFN activations).
Only closed patches are passed from the trunk to the decoder, which is what makes generation cheap: the trunk state is cached and advanced by one patch step whenever a patch closes.
Quick start
Requires torch, transformers and safetensors. trust_remote_code=True is needed because the architecture ships with the weights.
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("VeroLM/NoTokenLM-Gen-5.5", trust_remote_code=True).eval()
text = model.generate_text("The French Revolution began in 1789 when",
max_new_tokens=300, temperature=0.8, seed=42)
print(text)
Working with raw byte ids (this is what generate_text does internally):
import torch
ids = torch.tensor([list("Once upon a time, there was a little rabbit".encode("utf-8"))])
out = model.generate(ids, max_new_tokens=200, temperature=0.8, top_p=0.95, seed=0) # LongTensor (1, T + new)
print(bytes(b for b in out[0].tolist() if b != 0).decode("utf-8", errors="replace"))
generate supports temperature, top_k, top_p, do_sample=False (greedy), seed and stop_at_eod. Generation stops when the model emits byte 0 (end of document). Because the model works on bytes, a cut-off multi-byte character is possible at the end of a generation; decode with errors="replace".
There is also an interactive Colab/Kaggle/Jupyter playground in notebook.ipynb.
Notes
- Run in float32 (the default). The PyTorch implementation was checked against the original JAX training code on random weights of the full configuration: logits agree to ≈ 3e-5 and the argmax matches everywhere.
- Tested with
transformers4.46 and 5.23.
Sample generations
One sample per prompt, temperature 0.8, at most 300 new bytes, seed 42, top-k and top-p off, shown as produced. The 300-byte limit is why most texts end mid-word. The prompt is in bold.
The samples were produced with the original JAX implementation. The PyTorch code in this repository reproduces its logits closely, but its random number stream is different, so the same seed gives different text there.
Wikipedia-style
Photosynthesis is an attractive biomass, unlike the carbon footprint of other biomass materials, which is generally too strong. For this reason, composing short-lived products with low-carbon biomass is challenging. Industrial production of composite products is likely to occur in a decade or two and may be tempting
Educational web text
The French Revolution began in 1789 when a massive uprising of the Bourbon band of Royalist revolutionaries against the feudal one started to overthrow the monarchy in England with the conscription of the army. This put the new monarch in a very difficult position that forced him to retire to Royalist France and the real deal was that the
Story
Once upon a time, there was a little rabbit named Milo who loved to hop. He would hop and hop all day long. He would hop and hop all day long all day long.
One day, Milo heard a noise from the bush. He was scared and hopped over to help. Milo saw a big bird with a hole in it. The bird was very sad. Milo thought that he could be a new friend.
Milo asked the
Textbook style (the prompt is Chapter 3: Introduction to Fractions, a blank line, and In this chapter, we will learn)
Chapter 3: Introduction to Fractions
In this chapter, we will learn about the topic and its components and its symbolic representation.
### 3.1 Introduction
In the study of composition, the idea of composition is important. This is the law involving the combination of a composition with two or more parts. In the expression $\frac{1}{1+1}$, the components of two p
Math
To solve the equation 2x + 6 = 14, we first need to isolate the variable on one side of the equation. Once we do isolate the variable on one side of the equation, we can solve for x.
First, solve for x:
2x + 6 = 14 - 6 = 2x + 6
Next, divide the equation by 2:
2x/2x = 14 / 2 = 0
Then, divide both sides by 2 to isolate x:
x = 0 / 2 = 1
Python (the prompt is the def fibonacci(n): line and its docstring)
def fibonacci(n):
"""Return the n-th Fibonacci number."""
for i in range(2, n+1):
if i == 1:
return i
def fibonacci(n):
"""Fibonacci number calculation."""
i = 1
while i < n:
print(i)
i += 1
fibonacci(0)
def main():
print("fibonacci(0)")
print("fibonacci(1)")
print("fibonacci(2)")
Python (the prompt is the def is_palindrome(s: str) -> bool: line)
def is_palindrome(s: str) -> bool:
"""
Input string:
if s is only a palindrome then return true
Else return false
"""
seq = s for _ in range(len(s))
seq = [list(c for c in seq if not c.isdigit()]):
for c in seq]
return len(seq) == 0
if __name__ == '__main__':
solut
French
La Révolution française est une période de l'histoire de France qui commence le 30 janvier 1660 et qui a duré plus de quatre cents ans entre 1675 et 1679. Elle commence à la suite de la mort de Louis XV, clôture de l'Empire byzantin sous l'extrême politique de Maxime III et de sa succession ambitieuse à la mort de Louis XV.
Related Articles⟨EOD⟩
(⟨EOD⟩ marks the end-of-document byte emitted by the model; generation stopped there after 280 bytes.)
Facts
The capital of France is also the city of the world convention of the Paris Peace Conference for UN Peace and Security Cooperation (Pepena de Paris) in 1959. This bill of rights became the foundation of the French republic during its political development until 1987, when it was rejected by a coalition between the ranks of
Pattern continuation
apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, banana, cherry, apple, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, cherry, che
Question / answer format
Question: What is the capital of Italy?
Answer: Since the start of the first world war, the capital of Italy is Rome.
Question: What is the capital of the Czech Republic?
Answer: Since the start of the first world war, the capital of Czech Republic is Prague.
Question: What is the capital of the Russian Federation?
Answer: Since the start of the
What these samples show
- The model produces fluent, well-formed English and French, with paragraph and dialogue structure, Markdown headings and LaTeX in textbook-style text, and web-text artifacts such as the trailing
Related Articles. - The content is mostly not reliable. Dates, places and facts are often invented (the French Revolution in England, a 1660 start date for it, a capital of France that is never named), and arithmetic is wrong even when the approach is right: the math sample starts by isolating the variable and then computes
x = 1. - Longer passages can repeat themselves ("all day long all day long").
- The pattern prompt is continued correctly for about 25 repetitions of apple, banana, cherry before it degenerates into repeating cherry.
- In the question/answer format it keeps the format going and answers the first two questions correctly (Rome, Prague), in a slightly odd phrasing, and then continues with further questions of its own. It is a base model, not a chat model.
- Generated Python has the right overall shape (a function, a docstring, a main guard) but is not correct: the Fibonacci sample repeats the definition, and the palindrome sample contains syntax errors.
Evaluation
| Benchmark | Score |
|---|---|
| HellaSwag | 34.32 |
| ARC-Easy | 38.68 |
| PIQA | 60.77 |
| ArithMark3 | 37.20 |
| Tiny ToM | 38.15 |
| BananaMind Base Bench | 54.57 |
Intended use and limitations
- Intended for: research on byte-level / tokenizer-free and patch-based models, looking at the architecture and code, and experiments with a small base model.
- Not for: factual question answering, advice, code you intend to run without review, math, translation, or any chat or instruction-following use. There is no safety tuning or instruction tuning of any kind.
- The training data is English and French; other languages are not part of the training data.
- The training data is web text, so the model can reproduce biases and inaccuracies present in it.
Training
- Data: an English-heavy mixture of educational and high-quality web text (FineWeb-Edu, FineWeb-HQ), Wikipedia, synthetic textbooks (Cosmopedia), simple stories (SimpleStories / TinyStories), math (FineMath), code (Stack-Edu Python and other languages) and French (web text and Wikipedia). About 100 B bytes in total were seen during training.
- Setup: 4,096-byte windows, TPU v5e-8, Muon + AdamW, exponential moving average of the weights, with part of the steps using a masked (GPT-BERT-style) objective. This repository contains the causal model only.
- Weights in this repository: the EMA weights of the final model.
Repository contents
| File | What it is |
|---|---|
model.safetensors |
EMA weights (fp32), including the frozen entropy patcher under the patcher. prefix |
config.json |
architecture hyper-parameters, calibrated patch threshold theta, training step |
configuration_notoken_gen55.py, modeling_notoken_gen55.py |
PyTorch implementation (inference) |
tokenization_notoken_gen55.py, tokenizer_config.json |
trivial byte "tokenizer" (id == byte value) |
convert_checkpoint.py |
turns a training checkpoint into model.safetensors + config.json |
notebook.ipynb |
interactive playground |
License
Apache-2.0 (see LICENSE).
- Downloads last month
- 190
