Claude writes a CUDA kernel for a 512 by 512 RMSNorm. It assigns 262,144 threads to gridDim.y, but the hardware caps gridDim.y at 65,535. The kernel crashes. InCoder-32B flattens to a 1D grid, stays in bounds, runs. The difference is not smarts. It is that InCoder trained on the same compiler error messages you would see.
Today's best code LLMs ace LeetCode but crash on CUDA grid limits. They emit Verilog that will not synthesize. They generate CAD scripts that rotate parts around the wrong axis. The gap is not more data. The gap is that general code training never sees the execution feedback that industrial engineers live by: simulation logs, synthesis reports, hardware errors. InCoder-32B closes this by training on 2.5 million samples grounded in real toolchains: Icarus Verilog plus Verilator plus Yosys for chip design, nvcc and Triton on A100 for GPU kernels, Renode STM32F407 simulator for embedded C, CadQuery and OpenCascade for 3D modeling.
Imagine a junior developer who only reads StackOverflow versus one who pairs with a senior engineer for a year, watching every compiler error, every simulation waveform, every profiler trace. The second developer learns the constraints that do not appear in tutorials: gridDim limits, bit-width rules, HAL function signatures, Euler angle conventions. InCoder-32B is that second developer, trained on 2.5 million execution-grounded samples where every wrong answer comes with the actual toolchain feedback that explains why.
The engine behind this is the Code-Flow pipeline, three stages where verification is not a filter, it is the teacher. Stage one: pre-train and anneal on 4,096 GPUs with general code plus curated industrial code that has been deduplicated, AST-verified, and recompiled. Stage two: mid-train with progressive context scaling from 8K to 32K to 128K tokens, fed by synthetic industrial QA, agent trajectories that follow Thought-Action-Observation loops with real tool feedback, and artifacts like testbenches, SDC constraints, and profiling traces. Stage three: post-train execution-grounded supervised fine-tuning on 2.5 million samples from real industrial tasks, each decomposed into instruction plus interface plus platform plus verification script, candidates generated, executed, failures repaired with full feedback context including compiler errors, waveforms, counterexamples, profiler bottlenecks.
Let us trace one concrete example from the paper's ArchXBench suite: generating a Verilog 8-to-3 priority encoder. The natural language spec asks for an 8-to-3 binary encoder that detects X and Z inputs, validates one-hot, outputs the encoded position or 000. From pre-training the model knows Verilog syntax, casez, reduction XOR for X and Z detection. From mid-training it saw similar encoder tasks with simulation feedback: it learned that triple-equals 1'bx catches X and Z, that one-hot check needs exact count. In post-training the task is decomposed with an Icarus Verilog testbench. A candidate is generated, simulated, and if it fails the feedback: syntax error, test mismatch is appended and a repaired candidate is added to training. The output yields two valid implementations, a combinational assign version and a casez version, both with X and Z propagation, one-hot validation, clean fallback.
The numbers tell the story. On industrial benchmarks InCoder-32B leads the best open-weight competitors on eight of eleven tasks, often by wide margins.
On RealBench module synthesis it hits 74.8 percent versus Kimi-K2-Instruct at 50.1. On functional simulation 62.7 versus 22.2. CAD-Coder compilation 82.0 versus Kimi-K2.5 at 40.0. CAD-Coder IoU 53.5 versus 12.1. KernelBench level one fast1 22.2 versus MiniMax-M2.5 at 7.1, level two 36.0 versus 14.0, level three 14.0 versus 8.0. It trails on VeriRepair fix rate at 80.0 versus GLM-5 at 90.0, EmbedCGen main at 35.2 versus 90.2, and SuperCoder speedup at 1.3x versus 1.87x. The pattern is clear: execution-grounded training teaches hardware constraints: grid limits, bit widths, HAL APIs, Euler conventions that pure code completion never sees. Where it trails, embedded C linker errors from HAL and CMSIS mismatches and SuperCoder assembly copy-paste failures need more specialized toolchain feedback loops.
Scaling the post-train tokens from 83 million to 250 million shows most benchmarks improving monotonically. KernelBench level one dips at 250 million: verification saturation. EmbedCGen shows the steepest climb because linker errors need volume. The takeaway: verification in the loop beats bigger model. InCoder-32B at 32 billion dense parameters beats 480 billion MoE models on CAD-Coder IoU and KernelBench because every training sample passed a real simulator or compiler. Grounding beats parameter count for constrained domains.
On general code benchmarks InCoder-32B holds its own. HumanEval+ 89.6 versus Qwen2.5-Coder-32B at 86.6. MBPP+ 78.3 versus 77.8. SWE-bench Verified 74.8 versus DeepSeek-V3.2 at 73.1. Tau-squared bench telecom 86.8 versus 25.4 for Qwen3-Coder-30B-A3B. Industrial training does not hurt general coding; it helps on agentic software engineering tasks.
The core mechanism is the feedback-driven repair loop. Here is a toy implementation that mirrors the post-training data engine at one-millionth scale.
#!/usr/bin/env python3 """ Toy implementation of InCoder-32B's feedback-driven repair loop. Simulates: Task -> Candidate Generation -> Execution -> Feedback -> Repair -> Success """ import random import subprocess import tempfile import os # Simulated industrial task: Write a Verilog 8-to-3 priority encoder TASK_SPEC = """ Module: priority_encoder_8to3 Inputs: in [7:0] -- one-hot input (exactly one bit high) Outputs: out [2:0] -- binary position of high bit Constraints: - Detect X/Z on any input bit, output 3'bxxx - Validate exactly one bit is high, else output 3'b000 - Use casez for priority encoding - Must compile with iverilog and pass testbench """ # Simulated verification environment (stand-in for iverilog + testbench) def verify_verilog(code: str) -> tuple[bool, str]: """Run iverilog compilation + simulation. Returns (pass, feedback).""" with tempfile.TemporaryDirectory() as td: # Write module mod_path = os.path.join(td, "encoder.v") with open(mod_path, "w") as f: f.write(code) # Write minimal testbench tb = """ `timescale 1ns/1ps module tb; reg [7:0] in; wire [2:0] out; priority_encoder_8to3 uut (.in(in), .out(out)); initial begin in = 8'b00000001; #10 assert(out==3'b000); in = 8'b00000100; #10 assert(out==3'b010); in = 8'b10000000; #10 assert(out==3'b111); in = 8'b00000011; #10 assert(out==3'b000); // not one-hot in = 8'bx0000000; #10 assert(out==3'bxxx); // X input $finish; end endmodule """ tb_path = os.path.join(td, "tb.v") with open(tb_path, "w") as f: f.write(tb) # Compile r = subprocess.run(["iverilog", "-o", "sim", mod_path, tb_path], cwd=td, capture_output=True, text=True) if r.returncode != 0: return False, f"COMPILE ERROR:\n{r.stderr}" # Simulate r = subprocess.run(["vvp", "sim"], cwd=td, capture_output=True, text=True) if r.returncode != 0: return False, f"SIMULATION FAILED:\n{r.stdout}\n{r.stderr}" return True, "PASS" # Candidate generator (simulates LLM with increasing sophistication) def generate_candidate(attempt: int, prior_feedback: str = "") -> str: base = """module priority_encoder_8to3(input [7:0] in, output [2:0] out); """ if attempt == 0: # Naive: no X/Z check, no one-hot validation return base + """ assign out = in[7]?3'd7 : in[6]?3'd6 : in[5]?3'd5 : in[4]?3'd4 : in[3]?3'd3 : in[2]?3'd2 : in[1]?3'd1 : 3'd0; endmodule""" elif attempt == 1: # Adds X/Z detection via reduction XOR return base + """ wire has_xz = ^in === 1'bx; assign out = has_xz ? 3'bxxx : (in[7]?3'd7 : in[6]?3'd6 : in[5]?3'd5 : in[4]?3'd4 : in[3]?3'd3 : in[2]?3'd2 : in[1]?3'd1 : 3'd0); endmodule""" else: # Full: X/Z check + one-hot count + casez encoding (matches paper Figure 27) return base + """ wire has_xz = ^in === 1'bx; reg [3:0] count; integer i; always @(*) begin count=0; for(i=0;i<8;i=i+1) if(in[i]===1'b1) count=count+1; end wire valid_one_hot = (count == 4'd1); reg [2:0] enc; always @(*) casez(in) 8'b00000001: enc=3'b000; 8'b00000010: enc=3'b001; 8'b00000100: enc=3'b010; 8'b00001000: enc=3'b011; 8'b00010000: enc=3'b100; 8'b00100000: enc=3'b101; 8'b01000000: enc=3'b110; 8'b10000000: enc=3'b111; default: enc=3'b000; endcase assign out = has_xz ? 3'bxxx : (valid_one_hot ? enc : 3'b000); endmodule""" # Repair strategy: append feedback to prompt, regenerate def repair_candidate(bad_code: str, feedback: str) -> str: """In real pipeline: feed (code + feedback) to model -> repaired code. Here: deterministic progression through attempt levels.""" if "COMPILE ERROR" in feedback: return generate_candidate(1) # Fix syntax if "SIMULATION FAILED" in feedback: return generate_candidate(2) # Fix logic return generate_candidate(2) # Main loop def run_repair_loop(max_attempts=3): print(f"{'='*60}") print("TASK: Verilog 8-to-3 Priority Encoder (ArchXBench style)") print(f"{'='*60}\n") feedback = "" for attempt in range(max_attempts): code = generate_candidate(attempt, feedback) print(f"--- Attempt {attempt+1} ---") print(code[:200] + ("..." if len(code) > 200 else "")) pass_, feedback = verify_verilog(code) print(f"Result: {'PASS' if pass_ else 'FAIL'}") if not pass_: print(f"Feedback:\n{feedback[:300]}...\n") else: print(f"Feedback: {feedback}\n") print(f"{'='*60}") print(f"SUCCESS on attempt {attempt+1}") print("This (code + feedback + repair) becomes one SFT sample.") print(f"{'='*60}") return True print("Max attempts reached. Failure logged for analysis.") return False if __name__ == "__main__": run_repair_loop() When you run this with iverilog installed you see the loop in action. Attempt one fails on X and Z detection. Attempt two adds the reduction XOR check but fails on one-hot validation. Attempt three adds the bit count and casez encoding and passes. This code plus feedback plus repair becomes one supervised fine-tuning sample. The paper does this 2.5 million times across Verilog, CUDA and Triton, embedded C, CadQuery: with parallel candidate generation, cross-language migration perturbation, and quality filtering for executability, stability, information density. The result: SFT samples that are closed-loop trajectories, not static prompt-answer pairs.
The paper's error analysis across 1,882 failures on nine benchmarks is honest. Syntax and compilation dominates: 71 percent on RealBench, 51 percent on ArchXBench, 46 percent unparseable on VeriScope: the model knows vocabulary but not precise grammar, bit-width rules, port declarations, casez syntax. API hallucination: 47 percent of EmbedCGen linker errors from wrong HAL and CMSIS names, 33 percent TritonBench NameErrors, 24 percent TypeErrors: industrial APIs are vast and underrepresented. Geometric reasoning gap: 93 percent of CAD-Coder failures are IoU errors, mostly Euler angle convention mixups: spatial reasoning in code is weak. Optimization plateau: 33 percent of KernelBench failures are correct but slow, 83 percent of SuperCoder failures are copy-paste of input assembly: the model does not reason about performance, it memorizes patterns.
Five engineering takeaways. First, verification in the loop beats bigger model. InCoder-32B at 32 billion dense beats 480 billion MoE on CAD-Coder IoU and KernelBench because every training sample passed a real simulator or compiler. Grounding beats parameter count for constrained domains. Second, trajectory data beats static pairs. Mid-training agent trajectories with Thought-Action-Observation and tool feedback, plus post-train repair trajectories, unlock multi-step debugging that standard SFT misses. The ablation confirms: repository transitions beat static snapshots; feedback-conditioned trajectories beat instruction tuning. Third, environment fidelity is non-negotiable. Renode STM32F407 with full peripheral models, Verilator as used by CHIPS Alliance, CadQuery and OpenCascade as used by FreeCAD and KiCad, nvcc on A100: proxies would teach wrong constraints. Building these environments is the real engineering work. Fourth, context scaling matters for industrial code. The 8K to 32K to 128K progression mirrors real workflows: file-level RTL module to repo-level IP integration to debug-session waveform plus log correlation. Mid-train trajectory data at 128K is what enables long-horizon repair. Fifth, open problems remain: embedded HAL and CMSIS coverage, assembly superoptimization reasoning not memorization, geometric convention learning, and scaling verification-driven data to 10 million plus samples without human bottleneck.
InCoder-32B shows what happens when you stop treating verification as evaluation and start treating it as the data source. The model learns to write code that compiles, simulates, synthesizes, and runs because it trained on the same feedback loops engineers live by.




