Instructions to use erknog/opline-0.8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use erknog/opline-0.8b with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("erknog/opline-0.8b") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use erknog/opline-0.8b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf erknog/opline-0.8b:Q4_K_M # Run inference directly in the terminal: llama cli -hf erknog/opline-0.8b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf erknog/opline-0.8b:Q4_K_M # Run inference directly in the terminal: llama cli -hf erknog/opline-0.8b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf erknog/opline-0.8b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf erknog/opline-0.8b:Q4_K_M
Use Docker
docker model run hf.co/erknog/opline-0.8b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use erknog/opline-0.8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "erknog/opline-0.8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "erknog/opline-0.8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/erknog/opline-0.8b:Q4_K_M
- Ollama
How to use erknog/opline-0.8b with Ollama:
ollama run hf.co/erknog/opline-0.8b:Q4_K_M
- Unsloth Desktop
- Pi
How to use erknog/opline-0.8b with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "erknog/opline-0.8b"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "erknog/opline-0.8b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use erknog/opline-0.8b with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "erknog/opline-0.8b"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "erknog/opline-0.8b" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "erknog/opline-0.8b", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use erknog/opline-0.8b with Docker Model Runner:
docker model run hf.co/erknog/opline-0.8b:Q4_K_M
- Lemonade
How to use erknog/opline-0.8b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull erknog/opline-0.8b:Q4_K_M
Run and chat with the model
lemonade run user.opline-0.8b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use erknog/opline-0.8b with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "erknog/opline-0.8b"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default erknog/opline-0.8b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use erknog/opline-0.8b with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "erknog/opline-0.8b"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "erknog/opline-0.8b" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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.
- Downloads last month
- 488
Quantized