Beihang's InCoder-32B-Thinking Beats Closed Models at Writing Real Hardware Code
InCoder-32B-Thinking teaches a 32B model to reason like a hardware engineer by replaying error-correction loops from real industrial toolchains, beating Claude Sonnet 4.6 on CAD and chip design tasks.
Takeaways
- New model: InCoder-32B-Thinking is a 32B open-weight model trained to reason about hardware code via error-correction loops.
- Key method: Error-driven Chain-of-Thought (ECoT) synthesizes reasoning traces from real toolchain failures across Verilog, CUDA, CAD, and firmware.
- World model proxy: The Industrial Code World Model (ICWM) replaces expensive real toolchain calls with a learned simulator at 96.7% accuracy, enabling large-scale data synthesis.
- Top results: 81.3% on LiveCodeBench v5 (best open-weight), 84.0% on CAD-Coder, 38.0% on KernelBench L2, beating Claude Sonnet 4.6 on CAD and chip design tasks.
- Adaptive thinking: Reasoning depth spans a 209x range naturally, from 91 chars/step for agentic coding to 19K chars for GPU kernel optimization.
- Fully open: Weights and code available at HuggingFace and GitHub.
InCoder-32B-Thinking is a new open-weight code model that does something most LLMs cannot: reason fluently about hardware. While GPT-4 and friends have conquered LeetCode, they still struggle badly when asked to write a Verilog module that passes RTL simulation, a CUDA kernel that respects shared-memory budgets, or firmware that boots on a real microcontroller. This paper, from a team at Beihang University and collaborators, proposes a training framework that closes that gap by teaching a model to think the way an engineer actually does: write code, read the error, fix it, repeat.
The gap nobody talks about
General code LLMs perform significantly worse in industrial scenarios that require reasoning about hardware semantics, specialized language constructs, and strict resource constraints. The reason is structural: a Verilog module must be validated through RTL simulation before it reaches silicon; a GPU kernel must execute on real hardware and produce numerically correct results; embedded firmware must boot on a microcontroller and interact correctly with its peripherals; and a CAD script must produce geometry that can be manufactured. None of that feedback shows up in web-scraped training data.
The predecessor model, InCoder-32B, was the first attempt to unify these domains in a single model. A single InCoder-32B model serves chip design, GPU kernel optimization, embedded systems, compiler optimization, and 3D modeling, unifying these previously fragmented industrial domains for the first time. InCoder-32B-Thinking is the thinking-augmented successor, adding explicit chain-of-thought reasoning grounded in real execution feedback.
Two ideas doing the heavy lifting
The paper introduces two components that work together: Error-driven Chain-of-Thought (ECoT) and the Industrial Code World Model (ICWM). The key insight is that expert engineers do not write correct hardware code on the first try. They run the simulator, read the diagnostic, and iterate. ECoT captures exactly that loop.

The pipeline operates in two phases. In the grounded collection phase, a generator produces code, executes it against real toolchains and simulators, records structured feedback, and iterates for up to K correction rounds. The resulting multi-turn trajectories pair reasoning traces with concrete execution outcomes and directly enter the training corpus. In the ICWM-driven amplification phase, the collected trajectories train an ICWM that predicts execution outcomes without invoking real backends, then serves as a fast proxy environment for large-scale trajectory synthesis.