LegoReview-35B-A3B

Paper Blog Code Data & Models Citation

LegoReview-35B-A3B is a repository-level reviewer fine-tuned from Qwen3.5-35B-A3B-Base on verified code-review trajectories. Trained with finding-level verification from PR histories, it uses repository tools to produce prioritized findings and a structured review decision.

LegoReview overview: verification from PR histories, review data at scale, and training gains for review and coding.

Project overview; coding gains come from the paper’s joint-training experiments.

Highlights

  • Verification at the finding level. PR histories support checking the individual defects a reviewer reports, enabling selection of informative training trajectories.
  • Review data at scale. LegoReview constructs 168k tasks across 12,891 repositories and eight languages, with 60k verified trajectories for reviewer training.
  • Stronger reviews through verified training. LegoReview-35B-A3B reaches 56.1 F1 on LegoReview-Bench, up from 5.7 for the base model, with 90.9% Clean Rate. Scaling verified data from 1k to 60k trajectories raises F1 from 43.1 to 56.1.

Resources

Resource What you can do with it
Code Construct tasks, generate and verify trajectories, and evaluate reviewers
LegoReview-Task Generate new reviews on 167,960 tasks with PR context and reference findings
LegoReview-Traj Train on 59,338 verified trajectories or study the full 154,412 teacher rollouts
LegoReview-Bench Evaluate on 75 tasks, including 11 clean tasks, with 430 reference findings

Run the reviewer

Download the full checkpoint, tokenizer, and chat template:

from huggingface_hub import snapshot_download

model_path = snapshot_download("Lego-X/LegoReview-35B-A3B")

Serve the model with a runtime supporting Qwen3_5MoeForConditionalGeneration, using the supplied tokenizer and chat template. Run reviews with the OpenHands scaffold and repository tools. The installation guide and local model evaluation guide provide the commands for serving, task preparation, agent execution, and scoring.

Evaluation

Benchmark Precision Recall F1 Clean Rate
LegoReview-Bench 62.5 50.9 56.1 90.9
Martian Code Review Bench 37.2 51.1 43.1 —

Scores (%) pool three runs per task with the same OpenHands prompt and tools. Clean Rate is the share of clean-task runs with a valid report and no high-priority finding. See the evaluation protocol for the full settings and scoring procedure.

Training

Setting Value
Base model Qwen3.5-35B-A3B-Base
Method Full-parameter supervised fine-tuning
Released training split 59,338 trajectories (45,775 defect and 13,563 clean)
Epochs / context 3 / 196,608 tokens
Global batch size 64
Learning rate 5e-5, cosine decay, 0.1 warmup ratio
Precision bfloat16

The data guide lists the datasets and download revisions.

Acknowledgements

Built with SWE-Review, OpenHands, Harbor, LegoFlow, and Martian Code Review Benchmark.

License

Apache-2.0.

Citation

If you use our code, data, or model, please cite the two papers below.

@misc{wang2026legoreviewscalingcodereview,
  title={LegoReview: Scaling Code Review Data with Verification from Pull Request Histories}, 
  author={Ruoyu Wang and Jierun Chen and Yuxin Jiang and Chaofan Tao and Shaowei Wang and Sidi Yang and Conghao Xiong and Yiming Du and Tiezheng Yu and Kim-Hui Yap and Lifeng Shang and Xiao-Hui Li and Haoli Bai},
  year={2026},
  eprint={2612.00862},
  archivePrefix={arXiv},
  primaryClass={cs.SE},
  url={https://arxiv.org/abs/2612.00862}, 
}

@misc{wang2026swereview,
  title = {SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review},
  author = {Ruoyu Wang and Jierun Chen and Shaowei Wang and Chaofan Tao and Sidi Yang and Yuxin Jiang and Kim-Hui Yap and Lifeng Shang and Xiaohui Li and Haoli Bai},
  year = {2026},
  url = {https://github.com/LegoX/SWE-Review}
}
Downloads last month
71
Safetensors
Model size
35B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Lego-X/LegoReview-35B-A3B

Finetuned
(96)
this model

Dataset used to train Lego-X/LegoReview-35B-A3B

Collection including Lego-X/LegoReview-35B-A3B

Paper for Lego-X/LegoReview-35B-A3B