Opline 0.8B
A new way to create and update text using your voice.
A quantized fine-tuned 0.8B parameter model that understands natural language instructions to create and update markdown documents.
Code, executor, and web demo: github.com/kueckelheim/opline
Example commands:
- "Add heading saying todo list"
- "Add list item saying buying groceries"
- "Remove line five"
- "In line four replace walking down the hill with running up the mountain"
How it works
The model receives the following input containing the system prompt, the user instruction and the markdown document the change should be applied to:
system: Convert the edit instruction into exactly one op line for the numbered document.
user:
In line four replace walking down the hill with running up the mountain
---
[L01] # Sunday
[L02] - Pack the bags
[L03] - Check the map
[L04] - Walk down the hill
The model output will be:
REP [L04] walking down the hill || running up the mountain
The executor, a small deterministic TypeScript program, translates the model output into an actual file change. It finds the quoted anchor in the real document, applies the edit, and normalizes the markdown. Ambiguous or unmatched ops are rejected whole, leaving the document untouched.
Scope
Opline is a small, single-purpose edit model, not a general assistant.
- Text in, edit out. It has no native audio support. It is trained on STT-style text (spoken
phrasing, missing punctuation, spoken numbers); the demo transcribes speech with
nemotron-speech-streaming-en-0.6bbefore calling it. - Edits, not authorship. The instruction supplies the content: "Add a list item saying buy milk". Summarizing a paragraph, writing an ingredient list, or expanding notes into prose is left to whatever produces the dictation.
- One line per turn. Insert a line, delete a line, or edit one fragment inside a line. Requests like "rename every heading to title case" need one instruction per line.
- Mention the line number. When changing an existing line, always mention its number: "Remove line five", "In line four replace walking down the hill with running up the mountain". The executor resolves the quoted anchor content-first, but every trained instruction that targets a line names it.
- Phrasing matters. The training data is fairly opinionated about phrasing: use the expected edit frame ("saying X", "replace X with Y", "continue with X"). Semantic targets such as "the second bullet" or "the paragraph about pricing" are not supported; quote the text instead.
- Bare dictation continues the last paragraph. "Buy milk" extends the paragraph ending the file; if the file ends in a list or heading, or is blank, it starts a new paragraph instead.
Model info
| Base | Qwen3.5-0.8B |
| Size | 0.87B parameters |
| Quantization | Q4_K_M GGUF (517 MB) |
| Memory | ~0.6 GB RAM/VRAM at 2k context (1k training window) |
Quickstart
The default build is opline-0.8b-Q4_K_M.gguf: Q4_K_M, 517 MB, ~0.6 GB RAM/VRAM at 2k context.
Requires a llama.cpp build with Qwen3.5 support:
hf download erknog/opline-0.8b opline-0.8b-Q4_K_M.gguf --local-dir opline-gguf
llama-server -m opline-gguf/opline-0.8b-Q4_K_M.gguf --port 8080 --jinja --ctx-size 2048 \
--chat-template-kwargs '{"enable_thinking":false}'
The endpoint is OpenAI-compatible at http://127.0.0.1:8080/v1. The web demo — typed instructions
plus optional voice input — runs on top of it; see
github.com/kueckelheim/opline for the quickstart.
Full-precision (transformers):
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText
mid = "erknog/opline-0.8b"
processor = AutoProcessor.from_pretrained(mid)
model = AutoModelForImageTextToText.from_pretrained(mid, dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "system", "content": "Convert the edit instruction into exactly one op line for the numbered document."},
{"role": "user", "content": "Remove the sub heading in line 11.\n\n---\n\n[L01] # Lemon Lentils\n[L11] ## Questions and Answers"},
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, enable_thinking=False,
return_tensors="pt", return_dict=True,
).to(model.device)
out = model.generate(**inputs, max_new_tokens=48, do_sample=False)
print(processor.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])
# DEL [L11] Questions and Answers
MLX (Apple silicon):
hf download erknog/opline-0.8b --include "mlx-4bit/*" --local-dir opline-mlx
mlx_lm.server --model opline-mlx/mlx-4bit --port 8080 --chat-template-args '{"enable_thinking":false}'
adapter/ holds the PEFT LoRA (r=16, alpha=16) for unsloth/Qwen3.5-0.8B if you prefer to keep the
base weights shared.
The ops
| Op | Meaning |
|---|---|
ADD [Lnn] <text> | insert a line before line nn |
APP <text> | append at end of file (also on a blank document) |
DEL [Lnn] <anchor> | delete the resolved line |
RM [Lnn] <fragment> | remove a fragment inside the line |
REP [Lnn] <old> || <new> | replace a fragment |
INSB / INSA [Lnn] <anchor> || <payload> | insert before / after the anchor |
UNDO | undo the last change |
One op per turn, always. Anchors are verbatim fragments of the target line; the line number is a hint that the executor resolves content-first.
Training
| method | unsloth 16-bit LoRA, rank 16, alpha 16 |
| budget | 1130 steps = 2 epochs, effective batch 32, seq 1024, LR 2e-4 cosine |
| data | 18086 train / 2045 held-out instruction-op turns |
| result | best eval loss 0.0119 at step 1000 (restored before merging) |
| compute | 1 x RTX 4090, 72 minutes |
Evaluation
| Held-out instruction→op turns | 1966/2029 = 96.9% |
| Hand-authored scenario suite | 255/272 = 93.8% |
A pass means applying the predicted op produces the intended document change.
Limitations
- The caller must supply the document with
[Lnn]line numbers; the model does not read files. - One op per turn; several changes mean several turns.
- 1024-token training window: documents longer than roughly 1000 tokens degrade.
- English and Markdown only: nested lists, code blocks, tables, links, blockquotes, bold and italic are not edit targets. Anchors are byte-exact, so re-rendering the document weakens matching.
License
Apache-2.0, inherited from Qwen/Qwen3.5-0.8B. See
LICENSE.