Instructions to use stneric/simplixity-writer-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stneric/simplixity-writer-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stneric/simplixity-writer-4b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("stneric/simplixity-writer-4b") model = AutoModelForMultimodalLM.from_pretrained("stneric/simplixity-writer-4b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stneric/simplixity-writer-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stneric/simplixity-writer-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stneric/simplixity-writer-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/stneric/simplixity-writer-4b
- SGLang
How to use stneric/simplixity-writer-4b 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 "stneric/simplixity-writer-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stneric/simplixity-writer-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "stneric/simplixity-writer-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stneric/simplixity-writer-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use stneric/simplixity-writer-4b with Docker Model Runner:
docker model run hf.co/stneric/simplixity-writer-4b
simplixity-writer-4b
Qwen3.5-4B fine-tuned to write the answers in Simplixity, a self-hosted research assistant. Given a question and numbered sources, it writes an answer that cites those sources, in the reader's language (English or German).
This is v1. GGUF files for Ollama, LM Studio and llama.cpp are in simplixity-writer-4b-GGUF.
Use with Ollama
On Linux and Windows, Ollama cannot import safetensors. Download a GGUF file from simplixity-writer-4b-GGUF and follow the instructions there.
On macOS, from a download of this repo:
ollama create simplixity-writer:4b-v1-q4_k_m -f Modelfile --quantize q4_K_M
In Simplixity, choose simplixity-writer:4b-v1-q4_k_m as the answer model with provider Ollama.
Prompt
The model was trained on the prompt that Simplixity builds for the answer step (prompts.answer in the app, compact ruleset), at context windows of 4k and 8k tokens. Use it through Simplixity, or rebuild that prompt exactly; other prompts are untested.
Results
Judge: Claude Haiku 5.5 through Simplixity's verify step, which labels every claim of an answer as supported, partly supported or unsupported by the cited sources. Ollama 0.40, Q4_K_M, MTP draft 2.
| Set, window | Base supported / partial / unsupported | v1 |
|---|---|---|
| Test (87 questions), 4k | 79 / 14 / 7 % | 89 / 11 / 1 % |
| Test, 8k | 75 / 12 / 12 % | 89 / 11 / 0.5 % |
| Real usage (67), 4k | 65 / 21 / 13 % | 75 / 20 / 5 % |
| Real usage, 8k | 60 / 31 / 9 % | 83 / 14 / 3 % |
- Answers in the wrong language: 5% โ 1% (test set).
- Speed on an RTX 3070 Ti: about 180 tokens/s with MTP speculative decoding, TTFT about 0.9 s, median answer 2.2 s.
- The unsupported claims of the base model were mostly facts from its own knowledge. Those of v1 are mostly statements about the sources.
Limits
- Hedges too often ("the sources do not say โฆ"), about 1.7 times per answer on real questions.
- Sometimes claims that sources disagree when they don't.
- Cites a smaller share of its sentences than the base model.
Training
- Data: answers written by Claude Haiku 5.5 (teacher) for synthetic questions, on evidence frozen from Simplixity's real search pipeline, plus a small private set from real use. Teacher answers were filtered for citation errors and cut-off outputs. The training data is not published.
- Method: QLoRA (NF4 base), on the language model's linear layers, loss on the answer only. Checkpoint at step 80 (about one epoch); the second epoch overfit.
- Export: the LoRA was merged into the bf16 base. The
mtp.*(next-token prediction) layer is kept, so llama.cpp and Ollama can use it for speculative decoding. LoRA does not train that layer.
Code
training/ holds the scripts (no data): freeze_evidence.py runs Simplixity's search pipeline up to the answer step and saves its inputs, teacher.py gets the teacher answers, make_sft.py filters them, train.py trains, export_ckpt.py merges a checkpoint, to_ollama.sh builds the GGUF files, and eval/eval_writer.py scores answers.
Licence
Apache 2.0, like the base model.
- Downloads last month
- 51