Instructions to use devopsfortunato/Fonzie0.1-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use devopsfortunato/Fonzie0.1-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="devopsfortunato/Fonzie0.1-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("devopsfortunato/Fonzie0.1-4B") model = AutoModelForMultimodalLM.from_pretrained("devopsfortunato/Fonzie0.1-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 devopsfortunato/Fonzie0.1-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devopsfortunato/Fonzie0.1-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": "devopsfortunato/Fonzie0.1-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/devopsfortunato/Fonzie0.1-4B
- SGLang
How to use devopsfortunato/Fonzie0.1-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 "devopsfortunato/Fonzie0.1-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": "devopsfortunato/Fonzie0.1-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "devopsfortunato/Fonzie0.1-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": "devopsfortunato/Fonzie0.1-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use devopsfortunato/Fonzie0.1-4B with Docker Model Runner:
docker model run hf.co/devopsfortunato/Fonzie0.1-4B
Fonzie0.1-4B
A 4B model that searches when it doesn't know, answers with sources, speaks Italian and English, and looks at pictures. It is a fine-tune of Qwen3.5-4B, trained to work inside real agent apps: oh-my-pi and opencode. It was also tested in Hermes Agent, which it never saw in training.
In italiano: un 4B che cerca quando non sa, risponde con le fonti, parla italiano e inglese e guarda le foto. Addestrato dentro le app vere (oh-my-pi, opencode), provato anche in Hermes Agent, che non ha mai visto. ร un progetto di studio personale di Alfonso Fortunato: i numeri qui sotto dicono onestamente cosa fa meglio del modello base e cosa no.
GGUF for llama.cpp / LM Studio (Q8_0, Q4_K_M, vision projector): Fonzie0.1-4B-GGUF.
A newer version is out: Fonzie0.2-4B. It tries again after a failed search, searches first for "the latest X", says when something doesn't exist and asks the user in oh-my-pi.
What it does better than the base model
Averages over 3 runs on a fixed set of 130 test questions (94 for Hermes, text only), never used in training. Differences in bold are outside the paired 95% bootstrap interval.
| oh-my-pi | opencode | Hermes (unseen) | ||||
|---|---|---|---|---|---|---|
| base | Fonzie0.1 | base | Fonzie0.1 | base | Fonzie0.1 | |
| Searches when it doesn't know | 84.4% | 87.8% | 65.0% | 82.8% | 93.8% | 87.5% |
| Gets stuck in a loop / timeout | 19.7% | 10.3% | 7.7% | 6.2% | 14.2% | 5.7% |
| Empty answers | 9.2% | 1.3% | 0.8% | 0.8% | 3.5% | 0.7% |
| Answers in the user's language | 93.1% | 96.8% | 97.0% | 96.3% | 99.6% | 97.8% |
| Accuracy | 66.7% | 63.3% | 68.1% | 64.7% | 78.5% | 76.0% |
| Confident wrong answers | 30.5% | 26.8% | 29.4% | 29.1% | 17.9% | 17.9% |
| Links not returned by a tool | 0.3% | 2.8% | 0.0% | 2.6% | 0.0% | 2.1% |
On our own agent format (250 frozen questions, 2 runs), against the base:
- confident wrong answers 25.2% vs 31.7%;
- loops 3.6% vs 27.8%;
- right language 99% vs 86%.
It also stops "answering" questions about people and places that don't exist: 87% of these handled correctly, against 20% for the base.
Recovery after a failed search (rate limit or timeout, failure types never seen in training): it says what failed and tries again in 90% of cases in opencode and 54% in Hermes. In oh-my-pi it says what failed (97%) but tries again only 12% of the time.
What it does not do (yet)
- Accuracy is 2-3 points below the base: the base answers from memory more often, and is right on facts it knows. In the evaluation the search backend was a local Wikipedia index that contains the answer only 35-55% of the time.
- Confident wrong answers in the apps are about the same as the base, which was the main goal and is not reached.
- It sometimes writes a link from memory, typically in a "where to check" sentence after a failed search ("meteo-suiza.ch").
- Recognizing specific landmarks and artworks from a photo is unreliable, and it rarely verifies its guess with a search.
- It sometimes puts the wrong year in a search query.
- It can add time-sensitive facts from memory without searching (in a test it said the latest Python release was 3.13, a year out of date); it searches when challenged.
- Outside an agent context (plain chat, no system prompt, no tools) it falls back to the base model's long thinking.
How to use it
It expects an agent harness that gives it a web search tool. To reproduce the training setup in opencode, serve it with vLLM and add a search MCP server.
vllm serve devopsfortunato/Fonzie0.1-4B --served-model-name fonzie --max-model-len 65536 \
--enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser qwen3
Sampling used in all evaluations: temperature 1.0, top_p 0.95, top_k 20 (also in generation_config.json).
The LoRA adapter alone (rank 16, on top of unsloth/Qwen3.5-4B) is in lora/.
How it was made
Fonzie0.1 is the first release; in the project it is the fourth training round ("Ricercatore v4", SFT only).
Data: 1,390 conversations, about 65% in Italian:
- 610 in a plain agent format: 373 distilled from our own GRPO checkpoint (best of 4 attempts, kept only if it passed the filters), the rest written by the teacher;
- 683 recorded inside oh-my-pi (390) and opencode (293);
- 162 generated in a replica of the two apps' formats (system prompt, tools, error messages), with the first search forced and failures injected on purpose;
- 37 recognized and 37 unrecognized photos.
Teachers, all run locally on a DGX Spark:
- GLM-5.3-Flash (text);
- Qwen3.8 Flash Next (pictures, early data).
Filters: every conversation passed code checks before an LLM judge (Grok 4.7) looked at it:
- the answer matches the reference;
- no answer or guessed names in the search query;
- every link comes from a tool result;
- right language;
- short reasoning;
- no repeated identical calls.
A report checked that no sentence appears in more than 5 answers.
Training: LoRA rank 16 on the language layers (vision encoder frozen), bf16, learning rate 1e-4, 1 epoch, up to 24,576 tokens, with Unsloth. Training took 97 minutes on an NVIDIA DGX Spark. No RL in this version: an earlier GRPO round gave no measurable gain.
Credits
- Javi0.2-4B and Javi0.3 by Javier (@javierbits): this project follows their approach (test in the real harness, check with code, fix failures with data) and many of their lessons.
- Qwen for the base model, Unsloth for training, and llama.cpp for the GGUF files.
- Questions from:
- MKQA (Apple, CC BY 3.0);
- TriviaQA;
- HotpotQA (CC BY-SA 4.0);
- Wikidata (CC0);
- Wikimedia Commons images;
- ChartQA (GPL-3.0);
- DocVQA (MIT);
- gsm8k_italian (Sapienza NLP, MIT);
- Aya (Cohere, Apache 2.0);
- evol-instruct-italian;
- no_robots (Hugging Face H4, CC BY-NC 4.0).
License
CC BY-NC 4.0 (non-commercial), because part of the training data (no_robots) is non-commercial. The base model Qwen3.5-4B is Apache 2.0 (LICENSE-Qwen3.5-Apache-2.0).
Author: Alfonso Fortunato.
- Downloads last month
- -