SDSU JSBCAI Center Logo

James Silberrad Brown Center for AI Research

The James Silberrad Brown Center for Artificial Intelligence (JSBCAI) is an interdisciplinary research hub at San Diego State University dedicated to advancing artificial intelligence through foundational research, applied innovation, and student-driven inquiry.

JSBAI-Coder-4B-NVFP4

An agentic coding model that runs on your laptop.

JSBAI-Coder-4B is a 4B-parameter model, fine-tuned from Qwen3.5-4B, that investigates bugs, edits files, runs commands, and verifies its own fixes in real software repositories. Agentic coding at this level has required 27B+ models. This one fits on a consumer GPU.

Results

We reserved 121 real software bugs that the model never saw during training. Before fine-tuning, it solved 10% of them. After training, it solved 83%, verified by running each project's hidden test suite. The model learned to fix bugs in general, not just the ones it practiced on.

Benchmark Qwen3.5-4B (base) JSBAI-Coder-4B (BF16) JSBAI-Coder-4B-NVFP4
Generalization test (121 unseen bugs, tests run to verify) 10.1% 82.9% coming soon
Live-60 (60 real-world engineering tasks, solved end-to-end in containers) 15.0% 21.7% 15.0%
Instruction-following (IFEval) 84.66 87.21 86.37
MMLU-Pro TBD 70.0% 66.85%
Terminal-Bench 2.1 TBD TBD coming soon

The instruction-following score improved over the base model. The coding gains cost nothing on general quality. Gains of this kind usually trade one for the other.

The NVFP4 quantization preserves instruction-following (within ~1 point of BF16) and trades real coding capability: Live-60 drops from 21.7% to 15.0%. The BF16 remains the best model; this variant trades that margin for a 40% smaller footprint and ~5GB VRAM.

Our decontamination protocol is published with the model: none of these benchmark problems overlap the training data.

What it does

  • Investigates and fixes bugs in real repositories. The model explores a codebase, reads the failing code, writes a patch, and runs the tests to check itself, inside a sandboxed container.
  • Thinks before each action. Like much larger reasoning models, it reasons between tool calls.
  • Runs on consumer hardware. ~5GB VRAM (the NVFP4 quantized variant).

How we trained it

Three stages, each with a plain-language summary:

  1. Seed demonstrations. GLM-5.3, a frontier 744B open model, generated roughly 1,875 coding trajectories. We verified every one by running the actual tests before using it. These demonstrations taught our model the format of agentic coding: how to use tools, when to run tests, what a working solution looks like.

  2. Reinforcement learning on real bugs. The model then practiced on 237 curated software engineering problems: ones it could sometimes solve, but not reliably. For each problem, the model repeatedly attempted a fix. Solutions that made the real hidden tests pass were reinforced; failures were not. This phase, 145 batches of on-policy GRPO, built the actual problem-solving ability.

  3. Generalization checks. At every stage boundary, we re-tested the model on problems it had never trained on. The 10.1% to 82.9% jump above is the result.

Training data

  • NVIDIA Nemotron-Post-Training-Dataset-v2: a portion of its general instruction-following, structured-output, and tool-use data anchored the model's general capabilities.
  • Our distilled seed set: ~1,875 verified coding trajectories generated by GLM-5.3 (Z.AI), each confirmed by running the real test suite before use.
  • Open SWE datasets: a blend of open software-engineering problem sets provided the RL practice pool.
  • The RL phase used no static data at all: the model generated fresh attempts each batch, and only test-verified outcomes became training signal.

Usage

from vllm import LLM
llm = LLM(model="jsbaicenter/JSBAI-Coder-4B-NVFP4", quantization="modelopt", max_model_len=131072)

Recommended sampling: temperature 1.0, top_p 0.95. The model uses the Qwen3.5 chat template with interleaved thinking (the qwen3 reasoning parser in vLLM) and qwen3_coder tool-call format.

The full-precision BF16 release and an MTP-boosted speculative decoding head (for faster inference) are available from the same organization. This variant was quantized with NVIDIA ModelOpt.

Limitations

  • A 4B model has 4B knowledge: obscure facts and extreme-domain reasoning still favor larger models.
  • We tuned the agent loop for sandboxed container environments; other deployment contexts are untested.
  • Safety behaviors come from the base model; the RL phase optimized test-passing only, with no safety-specific training. See the base model card.

Lineage & credits

License

Apache-2.0, matching the base model.

Citation

@misc{jsbai_coder_4b,
  title={JSBAI-Coder-4B: Agentic Coding at Laptop Scale via Teacher-Seeded RL},
  author={James Silberrad Brown Center for AI},
  year={2026},
  publisher={HuggingFace}
}
Downloads last month
-
Safetensors
Model size
3B params
Tensor type
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jsbaicenter/JSBAI-Coder-4B-NVFP4

Finetuned
Qwen/Qwen3.5-4B
Quantized
(448)
this model

Dataset used to train jsbaicenter/JSBAI-Coder-4B-NVFP4

Collection including jsbaicenter/JSBAI-Coder-4B-NVFP4