Utilitab Rewriter v1
A small sentence rewriter that runs in the browser. It rewords one sentence at a time in new words while keeping the meaning, the names, the numbers and the facts. It powers the on-device "Full" mode of the Paraphrase text tool on Utilitab, where the text never leaves the visitor's device.
- Base: SmolLM2-360M-Instruct (360 million parameters), fine-tuned for faithful paraphrasing
- Format: ONNX, 4-bit weights, one 228 MB file, built for ONNX Runtime Web on WebGPU
- Language: English
- Licence: CC BY-NC 4.0 (see Licence)
Files
| File | Size | What it is |
|---|---|---|
model.onnx |
228 MB | The model. 4-bit weights in blocks of 32; takes inputs_embeds and a beam_idx input that reorders its own key and value cache on the GPU |
word-table.json |
0.5 KB | Where the 4-bit word table sits inside model.onnx, so word vectors are read from the model's own output layer instead of a second download |
tokenizer.json |
1.1 MB | Byte-level BPE vocabulary and merges (SmolLM2's tokenizer, trimmed) |
manifest.json |
1 KB | Version, every file's size and SHA-256, the prompt, the stop token and the decode settings |
Check a download against manifest.json before use. The Utilitab page refuses any file whose fingerprint does not match.
How it is used
Each sentence is sent on its own, in the prompt the model was trained on:
### Instruction:
Rewrite the following text to be clear and fluent while keeping the exact same subject performing each action:
{sentence}
### Response:
Decoding: beam search with 4 beams, length penalty 1, no repetition penalty, stop at token id 2 (<|im_end|>), at most max(65, min(120, words ร 2.2 + 16)) new tokens. Keep the first line of the answer and strip an opening "Rewritten:" or "Paraphrase:" if the model adds one.
The code around the model does the rest, and the model expects it to:
- Text is split into sentences by code. Line breaks, list markers and headings are put back by code. Headings, code, quotations, tables and lines of five words or fewer are copied unchanged.
- An answer that drops a number, a quoted phrase, a piece of code or a capitalised name from its sentence is refused, and the original sentence is kept.
The reference implementation (tokenizer, beam search, word lookup and download checks) is TypeScript running in a Web Worker. Its answers are identical to Python's ONNX Runtime answers on 20 of 20 test sentences.
Results
Hard test set: 300 cases, 405 sentences, across casual speech, conditions, dosage and safety instructions, negations, dense numbers, Markdown, code-bearing text and long multi-clause sentences. A sentence counts as faithful only when automated checks find no dropped or invented fact, no flipped negation or condition, nothing lost from quotes, numbers or code, and a two-way entailment check agrees.
| Setting | Sentences faithful |
|---|---|
| 4 beams (default) | 355 of 405 (87.7%) |
| 1 beam | 338 of 405 (83.5%) |
| Larger 416 MB build, 4 beams | 353 of 405 (87.2%) |
| The teacher model it learned from, for reference | 87.2% |
Speed on an Apple M2 with WebGPU: about 2 to 4 seconds a sentence with 4 beams, and about 2 seconds to start from the browser's cache.
Training
- Distillation. About 11,900 sentence pairs were written by a larger model (
openai/gpt-4o-minithrough OpenRouter) and kept only when they passed fact checks, a two-way entailment check and a judge. Pairs that changed meaning, invented facts or altered Markdown were dropped (38% of the 19,300 generated). - Fine-tuning. LoRA on SmolLM2-360M-Instruct, merged.
- Self-selection. The model rewrote 14,377 unseen sentences, and was trained again on its own 10,766 answers that passed the same checks and a strict meaning check.
- Export. ONNX, 4-bit weights in blocks of 32, with the word table tied to the output layer so the file is 228 MB instead of 416 MB, at no measured loss.
Limits
- English only. Other languages are untested.
- One sentence at a time, with no context from the sentences around it.
- About 1 in 8 sentences on the hard test is not faithful. Most are small shifts in meaning (a softened condition, a dropped "only"), so the output should be read before it is relied on, especially for medical, legal or financial text.
- It mostly changes words and short phrases; it restructures sentences sometimes, not always.
- It is a paraphraser. It is not built or tested for translation, summarising, grammar correction or any other task.
- Needs a browser with WebGPU. On other devices Utilitab uses a different route.
Licence
This model is released under Creative Commons Attribution-NonCommercial 4.0. You may use, share and adapt it for non-commercial purposes, with attribution to Utilitab. Commercial use needs written permission.
It is a derivative of SmolLM2-360M-Instruct by Hugging Face, which is licensed under the Apache License 2.0. The base model's licence and notices apply to the parts that come from it.
Citation
@misc{utilitab-rewriter-v1,
title = {Utilitab Rewriter v1: a 228 MB on-device sentence paraphraser},
author = {Muonagolu, Chigozie},
year = {2026},
url = {https://huggingface.co/gozymuo/utilitab-rewriter}
}
Model tree for gozymuo/utilitab-rewriter
Base model
HuggingFaceTB/SmolLM2-360M