jsbai-aaron commited on
Commit
720f668
·
verified ·
1 Parent(s): 470f34b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +41 -33
README.md CHANGED
@@ -12,47 +12,54 @@ tags:
12
  - reinforcement-learning
13
  library_name: transformers
14
  pipeline_tag: text-generation
 
 
15
  ---
16
- <p align="center">
17
- <img src="https://cdn-uploads.huggingface.co/production/uploads/69b0868703a7e83e476092ec/RIr7Vy21qoIEFJrMAE8qn.png" alt="SDSU JSBCAI Center Logo" width="400">
18
- </p>
19
-
20
- # James Silberrad Brown Center for AI Research
21
-
22
- 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.
23
 
24
  # JSBAI-Coder-4B-NVFP4
25
 
26
- **An agentic coding model that runs on your laptop.** JSBAI-Coder-4B is a 4B-parameter model fine-tuned from Qwen3.5-4B for multi-step, tool-using software engineering: the capability class currently gated to 27B+ models, at a size that fits consumer GPUs.
 
 
27
 
28
  ## Results
29
 
30
- | Benchmark | Qwen3.5-4B (base) | **JSBAI-Coder-4B** | Δ |
 
 
31
  |---|---|---|---|
32
- | **Live-60** (real-world SWE, t32) | 15.0% | **21.7%** | **+44% relative** |
33
- | **IFEval** (excl-empty, 8K) | 84.66 | **87.21** | +2.55 |
34
- | **Held-out SWE** (unseen instances, K=8) | 10.1% | **82.9%** | **+72.8pp** |
35
- | MMLU-Pro (generative) | TBD | TBD | TBD |
36
  | Terminal-Bench 2.1 | TBD | TBD | TBD |
37
 
38
- *Held-out SWE: 121 never-trained coding instances solved with verified test execution. The gains are broad-spectrum generalization, not benchmark memorization. Our decontamination protocol is published with the model.*
 
 
39
 
40
  ## What it does
41
 
42
- - **Agentic software engineering**: multi-turn bug investigation, tool orchestration (bash, file editing, test running), patch generation and verification, in real repositories inside sandboxed containers
43
- - **Interleaved reasoning**: thinks before each tool call, like much larger reasoning models
44
- - **Quality held**: instruction-following *improved* over base (87.21 vs 84.66 IFEval). The agentic gains cost nothing on general quality.
45
- - **Laptop-scale**: ~5GB VRAM (the NVFP4 quantized variant of JSBAI-Coder-4B)
 
 
 
 
 
46
 
47
- ## Training methodology
48
 
49
- **Teacher-seeded agentic RL.** The model was produced in three stages:
50
 
51
- 1. **Seed SFT**: a small curated set (~1,875 verified trajectories) from GLM-5.3 (a 744B-A40B open model) bootstrap the student into the agentic tool-use distribution
52
- 2. **GRPO with verifiable rewards**: 145 batches of on-policy RL on a difficulty-banded pool of real SWE tasks (237 unique instances), where the reward is *actual test execution*. The model's patch must make the hidden tests pass.
53
- 3. **Generalization gates**: held-out never-trained instances verified the transfer at every phase boundary (10.1% to 82.9% pass rate).
54
 
55
- The RL phase is the capability engine: the seed SFT contributes the behavioral format, the verification-driven RL builds the problem-solving. We extensively studied on-policy distillation from the teacher (logprob-scoring) and found the signal prefers stylistic imitation over correctness at every model family and tier we tested. Those negative results and the mechanism are documented in our technical report.
 
 
 
56
 
57
  ## Usage
58
 
@@ -61,26 +68,27 @@ from vllm import LLM
61
  llm = LLM(model="jsbaicenter/JSBAI-Coder-4B-NVFP4", quantization="modelopt", max_model_len=131072)
62
  ```
63
 
64
- Recommended sampling: `temperature 1.0, top_p 0.95`. The model uses the Qwen3.5 chat template with interleaved thinking (the `nemotron_v3`/`qwen3` reasoning parser in vLLM) and `qwen3_coder` tool-call format.
65
 
66
- A quantized NVFP4 variant (~5GB) and an MTP-boosted speculative decoding head (for faster inference) are available from the same organization.
67
 
68
  ## Limitations
69
 
70
- - 4B-scale knowledge limits: obscure factual recall and extreme-domain reasoning remain behind larger models
71
- - The agent loop is tuned for sandboxed container environments; other deployment contexts are untested
72
- - Safety behaviors inherited from the base model; the RL phase was reward-verification only (no safety-specific training). See the base model card
73
 
74
  ## Lineage & credits
75
 
76
  - **Base model**: [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) (Apache-2.0)
77
- - **Distillation teacher (seed data)**: GLM-5.3 (Z.AI), served locally; training data generated and verified by us
78
- - **Quantization**: NVIDIA ModelOpt (NVFP4)
79
- - **Technical report**: coming soon (the arXiv submission covers the full methodology, the ablations, and the negative results)
 
80
 
81
  ## License
82
 
83
- Apache-2.0 (matching the base model).
84
 
85
  ## Citation
86
 
 
12
  - reinforcement-learning
13
  library_name: transformers
14
  pipeline_tag: text-generation
15
+ datasets:
16
+ - nvidia/Nemotron-Post-Training-Dataset-v2
17
  ---
 
 
 
 
 
 
 
18
 
19
  # JSBAI-Coder-4B-NVFP4
20
 
21
+ **An agentic coding model that runs on your laptop.**
22
+
23
+ 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.
24
 
25
  ## Results
26
 
27
+ 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.
28
+
29
+ | Benchmark | Qwen3.5-4B (base) | **JSBAI-Coder-4B** | Change |
30
  |---|---|---|---|
31
+ | **Generalization test** (121 unseen bugs, tests run to verify) | 10.1% | **82.9%** | **+72.8 points** |
32
+ | **Live-60** (60 real-world engineering tasks, solved end-to-end in containers) | 15.0% | **21.7%** | **+44% relative** |
33
+ | **Instruction-following** (IFEval) | 84.66 | **87.21** | +2.55 |
34
+ | MMLU-Pro | TBD | TBD | TBD |
35
  | Terminal-Bench 2.1 | TBD | TBD | TBD |
36
 
37
+ 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.
38
+
39
+ Our decontamination protocol is published with the model: none of these benchmark problems overlap the training data.
40
 
41
  ## What it does
42
 
43
+ - **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.
44
+ - **Thinks before each action.** Like much larger reasoning models, it reasons between tool calls.
45
+ - **Runs on consumer hardware.** ~5GB VRAM (the NVFP4 quantized variant).
46
+
47
+ ## How we trained it
48
+
49
+ Three stages, each with a plain-language summary:
50
+
51
+ 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.
52
 
53
+ 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.
54
 
55
+ 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.
56
 
57
+ ### Training data
 
 
58
 
59
+ - **[NVIDIA Nemotron-Post-Training-Dataset-v2](https://huggingface.co/datasets/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.
60
+ - **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.
61
+ - **Open SWE datasets**: a blend of open software-engineering problem sets provided the RL practice pool.
62
+ - **The RL phase used no static data at all**: the model generated fresh attempts each batch, and only test-verified outcomes became training signal.
63
 
64
  ## Usage
65
 
 
68
  llm = LLM(model="jsbaicenter/JSBAI-Coder-4B-NVFP4", quantization="modelopt", max_model_len=131072)
69
  ```
70
 
71
+ 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.
72
 
73
+ 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](https://github.com/NVIDIA/Model-Optimizer).
74
 
75
  ## Limitations
76
 
77
+ - A 4B model has 4B knowledge: obscure facts and extreme-domain reasoning still favor larger models.
78
+ - We tuned the agent loop for sandboxed container environments; other deployment contexts are untested.
79
+ - Safety behaviors come from the base model; the RL phase optimized test-passing only, with no safety-specific training. See the base model card.
80
 
81
  ## Lineage & credits
82
 
83
  - **Base model**: [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) (Apache-2.0)
84
+ - **Demonstration generator**: GLM-5.3 (Z.AI), served locally
85
+ - **General training data**: [nvidia/Nemotron-Post-Training-Dataset-v2](https://huggingface.co/datasets/nvidia/Nemotron-Post-Training-Dataset-v2)
86
+ - **Quantization**: [NVIDIA ModelOpt](https://github.com/NVIDIA/Model-Optimizer) (NVFP4)
87
+ - **Technical report**: coming soon, covering the full methodology, the ablations, and our negative results on teacher-logprob distillation.
88
 
89
  ## License
90
 
91
+ Apache-2.0, matching the base model.
92
 
93
  ## Citation
94