Run this model with HF Jobs
Run Tiiny/OpenFrogNano-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Tiiny/OpenFrogNano-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Tiiny/OpenFrogNano-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Tiiny/OpenFrogNano-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Tiiny/OpenFrogNano-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Tiiny/OpenFrogNano-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tiiny/OpenFrogNano-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tiiny/OpenFrogNano-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("Tiiny/OpenFrogNano-4B") model = AutoModelForMultimodalLM.from_pretrained("Tiiny/OpenFrogNano-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 Tiiny/OpenFrogNano-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tiiny/OpenFrogNano-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": "Tiiny/OpenFrogNano-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tiiny/OpenFrogNano-4B
- SGLang
How to use Tiiny/OpenFrogNano-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 "Tiiny/OpenFrogNano-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": "Tiiny/OpenFrogNano-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 "Tiiny/OpenFrogNano-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": "Tiiny/OpenFrogNano-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tiiny/OpenFrogNano-4B with Docker Model Runner:
docker model run hf.co/Tiiny/OpenFrogNano-4B
OpenFrogNano-4B
An Open-Source 4B Coding Agent Trained with Pure Multi-Round RL on 794 Synthesized SWE Tasks
๐ค Tiiny AI | Round 0 | Round 1 | Round 2 (Latest) | ๐ Dataset (794 Tasks) | ๐ License: Apache-2.0
Disclaimer: OpenFrogNano is an independent open-source reproduction of FrogNano-4B by Tiiny AI, initialized from
Qwen/Qwen3.5-4B. It is not affiliated with or endorsed by Microsoft or the official FrogNano team.
Highlights
- Pure RL, zero teacher distillation: Post-trained exclusively with executable-test reinforcement learning from
Qwen/Qwen3.5-4Bโno SFT or trajectory distillation from stronger teacher models. - Outperforms Base & FrogNano on SWE-bench Pro V2: Achieves 51.61%
avg@3(994 / 1,926rollouts across 642 tasks), improving +19.68 pp overQwen/Qwen3.5-4B(31.93%) and surpassingFrogNano-4B-2609(49.22%,948 / 1,926) by +2.39 pp under the same evaluation harness. - High sample efficiency on SWE-bench Verified: Using 3 RL rounds and only 794 synthesized SWE tasks (roughly half the ~1,500 tasks and 5 rounds of official FrogNano), OpenFrogNano-4B boosts SWE-bench Verified (500 tasks,
avg@3) from 40.73% โ 61.33% (+20.60 pp / +50.6% relative gain). - Full-trajectory open release: We release all three sequential round checkpoints (
Round 0โRound 1โRound 2) together withTiiny/OpenFrogNano-Tasks(all 794 executable tasks with hidden test patches & grading metadata) and the full training recipe.
Benchmark Results
All evaluations below use Qwen3.5's native tool-calling format inside isolated Docker sandboxes (131,072 max context, 8,192 max tokens/turn, up to 150 turns, temperature = 0.6, seed = 42, truncated rollouts scored as 0) unless noted otherwise.
SWE-bench Pro V2 (642 Tasks, avg@3)
| Model | RL Rounds | Synthesized Tasks | Tasks | Rollouts | Passed | avg@3 |
Gain vs. Base |
|---|---|---|---|---|---|---|---|
Qwen/Qwen3.5-4B (Base) |
0 | โ | 642 | 1,926 | โ | 31.93% | โ |
microsoft/FrogNano-4B-2609 (same harness) |
5 | ~1,500 | 642 | 1,926 | 948 | 49.22% | +17.29 pp |
Tiiny/OpenFrogNano-4B (Ours) |
3 | 794 | 642 | 1,926 | 994 | 51.61% | +19.68 pp (+2.39 vs. FrogNano) |
SWE-bench Verified (500 Tasks, avg@3)
| Model | Params | RL Rounds | Synth. Tasks | Valid Tasks | avg@3 (Native) |
avg@3 (Full-500) |
Gain vs. Base |
|---|---|---|---|---|---|---|---|
Qwen/Qwen3.5-4B (Base) |
4B | 0 | โ | 500 / 500 | 40.73% | 40.73% | โ |
Tiiny/OpenFrogNano-4B-Round0 (step100) |
4B | 1 | 194 | 498 / 500 | 51.41% | 51.20% | +10.68 pp |
Tiiny/OpenFrogNano-4B-Round1 (step200) |
4B | 2 | 494 cum. | 497 / 500 | 57.61% | 57.33% | +16.88 pp |
Tiiny/OpenFrogNano-4B (round2-step70) |
4B | 3 | 794 cum. | 500 / 500 | 61.33% | 61.33% | +20.60 pp |
Ref: microsoft/FrogNano-4B-2609 (reported Leaf harness)* |
4B | 5 | ~1,500 | 500 / 500 | 61.5% | 61.5% | +22.1 pp (vs. 39.4%) |
Ref: microsoft/FrogNano-4B-2609 (same harness)* |
4B | 5 | ~1,500 | 499 / 500 | 57.98% | 57.87% | +17.25 pp |
Larger Ref: openai/gpt-oss-120b (official card)** |
120B MoE | โ | โ | 500 / 500 | 62.4% | 62.4% | โ |
Larger Ref: Qwen/Qwen3.5-35B-A3B (official card)** |
35B-A3B | โ | โ | 500 / 500 | 69.2% | 69.2% | โ |
Larger Ref: Qwen/Qwen3.5-27B (official card)** |
27B | โ | โ | 500 / 500 | 72.4% | 72.4% | โ |
*Harness note: Official FrogNano-4B-2609 was trained and reported under its native Leaf harness (where base Qwen3.5-4B scores 39.4% and FrogNano reaches 61.5%). On Verified-500, OpenFrogNano-4B completed 1,500/1,500 valid rollouts with 0 excluded tasks, 3.8% truncation rate, and 28.6K mean response tokens.
**Larger open-weight reference scores are taken directly from their respective official Model Cards under their native evaluation scaffolds: openai/gpt-oss-120b reports 62.4% at high reasoning effort (cited as 62.0% in Qwen3.5's table), Qwen/Qwen3.5-35B-A3B reports 69.2%, and Qwen/Qwen3.5-27B reports 72.4%.
Model Family & 3-Round Training Recipe
OpenFrogNano-4B is trained in three sequential rounds with asynchronous partial-rollout DPPO ($\delta = 0.2$, $C = 3.0$) and GRPO group-relative advantage ($\epsilon = 10^{-6}$, $\beta_{\text{KL}} = 0$, 32 prompts ร 8 rollouts = 256 trajectories/step, Adam lr = 1e-6 constant, BF16 compute / FP32 master weights, frozen vision encoder).
| Stage | Checkpoint | Init From | Tasks | Context / Turns | Presence Penalty | Truncation Reward | Steps (Selected) | Verified 500 (avg@3) |
|---|---|---|---|---|---|---|---|---|
| Round 0 | OpenFrogNano-4B-Round0 |
Qwen3.5-4B |
194 | 64K / 75t | 0.0 |
Strict 0.0 |
120 (step 100) |
51.41% |
| Round 1 | OpenFrogNano-4B-Round1 |
Round 0 |
300 | 64K / 75t | 0.0 |
Strict 0.0 |
200 (step 200) |
57.61% |
| Round 2 | OpenFrogNano-4B |
Round 1 |
300 | 96K / 150t | 0.0 |
Strict 0.0 |
121 (step 70) |
61.33% |
Training dynamics (370 cumulative RL steps): Across all three rounds, training uses binary outcome rewards (zero_reward_on_truncation, no presence penalty). Across Round 0 (steps 0โ100), online Verified-200 truncation drops rapidly from 28.4% to 7.1% while avg@3 rises +12.6 pp. Rotating to 300 unseen tasks in Round 1 (steps 100โ300) breaks training-set saturation and keeps truncation near 2%. In Round 2 (steps 300โ370), expanding context/turns to 96K / 150t enables deeper multi-turn reasoning (mean response length grows steadily from 21.2K โ 29.1K tokens while truncation stays below 3.6%), reaching 61.98% on online Verified-200 at step 70 (61.33% on full Verified-500). (Online evals during Round 2 steps 30โ60 were affected by an evaluation-infrastructure incident and are masked in the plot above.)
Quick Start
Serving with vLLM
vllm serve Tiiny/OpenFrogNano-4B \
--dtype bfloat16 \
--max-model-len 131072
Serving with SGLang
python -m sglang.launch_server \
--model-path Tiiny/OpenFrogNano-4B \
--dtype bfloat16 \
--context-length 131072
Inference with Transformers
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "Tiiny/OpenFrogNano-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "user", "content": "Explain why Python's asyncio.Lock should not be shared across different event loops."}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer([prompt], return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.6,
top_p=1.0,
do_sample=True,
)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Agentic SWE tip: To reproduce benchmark performance on repository-level issues, run the model inside an isolated Docker sandbox with Qwen3.5's native tool-calling format (
131,072context,8,192max tokens/turn,150max turns,temperature = 0.6).
Technical Notes & Limitations
- No MTP head: The 15 Multi-Token Prediction (
mtp.*) tensors fromQwen3.5-4Bwere not exported during RL training (text_config.mtp_num_hidden_layers = 0). Standard inference works out of the box without MTP speculative decoding. - Vision encoder frozen: Visual encoder weights are inherited bit-for-bit from
Qwen/Qwen3.5-4Band were not post-trained or evaluated on multimodal tasks. - Domain focus: Post-training focused primarily on English, Python-heavy repository debugging and patch generation; performance may vary under different agent scaffolds or non-Python languages.
- Safety & review: Candidate patches generated by the model should always be executed in an isolated sandbox and reviewed by a human developer before merging or deploying.
License & Citation
Released under the Apache-2.0 license, inheriting the upstream license of Qwen/Qwen3.5-4B.
@misc{openfrognano2026,
title = {OpenFrogNano: Open-Source 4B Coding Agents via Closed-Loop Task Synthesis and Asynchronous RL},
author = {Tiiny AI},
year = {2026},
url = {https://huggingface.co/Tiiny/OpenFrogNano-4B}
}
- Downloads last month
- -