TSUMIKI
Local Open-Weight LLMs for Analog IC Layout Behind the Foundry Firewall
TL;DR: A local open-weight LLM writes ~30 lines of analog layout intent—not raw mask polygons—solving 155/164 SKY130 blocks on two consumer GPUs (0 bytes sent to the cloud), and even transfers to commercial 65-nm and 16-nm FinFET PDKs.
Abstract
Foundry PDKs are confidential, so LLM-driven analog layout must run on local open-weight models—yet a 27B open model scripting raw mask polygons passes 0 of 20 SKY130 circuits. In TSUMIKI (Japanese for wooden building blocks), the LLM never draws polygons: it writes a short Python program of layout intent, a deterministic compiler and router emit the GDS, and an independent verifier grades only that GDS (DRC, LVS, analog constraints, post-layout simulation).
Fine-tuned on 3,428 verified SKY130 layouts and repairs, a 27B model on two consumer GPUs solves 155 of 164 held-out leaf blocks within four verifier-guided runs (66–76% in one run across tracks), showing no significant difference from two frontier closed models (157, 154; paired exact McNemar p ≥ 0.77) and far ahead of non-LLM placers (54–55). On 58–110-device subsystems, where flat synthesis fails for every model (≤4 of 16), composing verified subcircuits recovers 12 of 16 locally (closed models: 15 and 10) and 6 of 6 on unseen holdouts. Behind the foundry firewall, swapping only the compiler backend transfers a SKY130-trained checkpoint with zero retraining to confidential commercial 65-nm planar CMOS (18/32 [56%] Calibre DRC+LVS+density pass; 28/32 LVS) and 16-nm FinFET (11/32 [34%] pass via post-hoc recompile with 0.35× compiler pitch rescaling), demonstrating end-to-end analog layout generation across commercial nodes entirely on-premise. Code, the 195-task SKY130 evaluation benchmark, and open-weight 9B/27B LoRA models are publicly available at https://keio-csg.github.io/tsumiki/.
SKY130 Benchmark Results & Hierarchical Scaling
Across 164 held-out SKY130 leaf blocks (<30 devices), local TSUMIKI-27B (-RL10) solves 155/164 (94.5%) within four verifier-guided runs (all 155/155 also pass KLayout DRC=0), comparable to gpt-6.1-terra (154/164, paired McNemar p = 1.00) and showing no significant difference against gpt-6.1-sol (157/164, p = 0.77).
Single-GPU TSUMIKI-9B reaches 113/164 (68.9%), comparable to claude-haiku (114/164), whereas non-LLM placers on the identical router solve only 54–55/164 (~33%).
TSUMIKI-27B leads on first-shot synthesis (40.0% Easy, 43.1% Medium), while frontier closed models retain a 2–24 pp single-run repair lead (71.5% pooled single-run for TSUMIKI-27B vs. 79.1% terra and 88.9% sol).
Headline leaf-block comparison and capability boundaries (Paper Fig. 6).
(a) Pooled best-of-4 FULL pass count across 164 unseen SKY130 leaf blocks.
(b) Where the local model leads (first-shot synthesis) vs. trails (single-run repair), and how hierarchical subcircuit composition recovers 75% local / 63% terra / 94% sol past the 58-device flat cliff.
| Model§ | Easy (108) best-of-4 |
Medium (36) best-of-4 |
RC-PEX (20) best-of-4 |
Pooled (164) Single-Run (656 runs) |
Pooled (164) best-of-4 |
Hard (16) Hier. best-of-4 |
|---|---|---|---|---|---|---|
| Random-Legal (Same Router) | 37/108 (34.3%) | 12/36 (33.3%) | 6/20 (30.0%) | 133/656 (20.3%) | 55/164 (33.5%) | – |
| Greedy-Row (Same Router) | 38/108 (35.2%) | 10/36 (27.8%) | 6/20 (30.0%) | 216/656 (32.9%) | 54/164 (32.9%) | 0/16 (0.0%) |
| Qwen3.8-27B Base (0-shot, Think OFF) | 26/108 (24.1%) | 11/36 (30.6%) | 5/20 (25.0%) | 65/656 (9.9%) | 42/164 (25.6%) | – |
| Qwen3.8-27B Base (0-shot, Think ON) | 55/108 (50.9%) | 20/36 (55.6%) | 12/20 (60.0%) | 171/656 (26.1%) | 87/164 (53.0%) | – |
claude-haiku (Cloud) | 75/108 (69.4%) | 25/36 (69.4%) | 14/20 (70.0%) | 347/656 (52.9%) | 114/164 (69.5%) | – |
gpt-6.1-terra (Cloud, med) | 101/108 (93.5%) | 34/36 (94.4%) | 19/20 (95.0%) | 519/656 (79.1%) | 154/164 (93.9%) | 10/16 (62.5%) |
gpt-6.1-sol (Cloud, med) | 103/108 (95.4%) | 35/36 (97.2%) | 19/20 (95.0%) | 583/656 (88.9%) | 157/164 (95.7%) | 15/16 (93.8%) |
| TSUMIKI-9B (Local, 1 GPU) | 78/108 (72.2%) | 22/36 (61.1%) | 13/20 (65.0%) | 258/656 (39.3%) | 113/164 (68.9%) | – |
| TSUMIKI-27B (-RL10, Local, 2 GPUs) | 101/108 (93.5%) | 36/36 (100.0%) | 18/20 (90.0%)† | 469/656 (71.5%) | 155/164 (94.5%)‡ | 12/16 (75.0%)* |
§Evaluation protocol: Every local and closed model receives the identical unified API system prompt, API documentation, task JSON, and 4-run × ≤5-round budget. Closed baselines (accessed Nov.–Dec. 2026 via CLI with tools and repository access disabled): gpt-6.1-sol / gpt-6.1-terra via codex-cli 0.162.1 with reasoning="medium" (med); claude-haiku via Claude Code 2.1.333 --model haiku alias (provider-resolved; snapshot ID unexposed by CLI). Pooled Single-Run is the micro-averaged 5-round pass rate across all 656 runs (4 seeds × 164 leaf tasks; per-track TSUMIKI-27B single-run: 70.8% Easy, 76.4% Medium, 66.3% RC-PEX).
‡95% Wilson CI [89.9%, 97.1%]; paired exact McNemar vs. terra: +0.6 pp (CI [−3.7, +4.9] pp, p = 1.00); vs. sol: −1.2 pp (CI [−5.4, +2.9] pp, p = 0.77, no significant difference); vs. TSUMIKI-9B: p = 1.3×10−10. Nine additional min_width_um-constrained Medium macros in medium_45.json were excluded from primary scoring so zero-shot baselines are not penalized by an undocumented option (including them yields 45/45 TSUMIKI-27B vs. 35/45 sol, 34/45 terra).
†Repair-Only Thinking SFT parent passes 20/20 (100%) RC-PEX and -RL1 passes 19/20; -RL10 lifts RC-PEX single-run pass rate to 66.3% (+12.5 pp vs. -RL1) while omitting ngspice from its RL reward.
*12/16 FULL (95% Wilson CI [50.5%, 89.8%]) and 13/16 DRC+LVS clean on Hard-16 (leaf LLM calls: 246 sol, 385 TSUMIKI-27B, 462 terra; flat monolithic scores 4/16 for sol and 0/16 for all other models). On six additional unseen 70–90-device subsystems under the completely frozen assembler, TSUMIKI-27B solves 6/6 (100%, CI [61.0%, 100%]) (27/27 leaves, 143 calls) vs. 0/6 for Greedy-Row.
Generated Mask Gallery & Compiler Hardening
Because TSUMIKI separates analog intent from low-level polygon emission, layout-quality defaults—wide M3/M4 power rails, multi-point 0.60 µm guard rings, automatic VSS differential shields, and auto-scaled wide-FET contact columns—live inside the compiler and upgrade frozen model outputs directly from identical Python code.
Across all 164 leaf tasks without retraining (evaluated on -RL1), the shipped TSUMIKI API v1.0 compiler retains 144/164 (87.8%) Magic-only FULL with 139/144 (96.5%) wide-power compliance (141/164 [86.0%] under dual Magic+KLayout DRC)—a 4.9 pp Magic-only pooled drop (−11.1 pp on Medium) vs. the same -RL1 checkpoint on the baseline compiler (152/164) due to tighter routing congestion under thicker default rails and guard rings.
Matched-scale SKY130 mask comparison (Paper Fig. 7) across gpt-6.1-terra (left), gpt-6.1-sol (center), and local TSUMIKI-27B (right, teal border) on identical unseen specifications (all Magic DRC=0, Netgen LVS clean; scale bars have identical physical length across each row).
Top (a–c): RC-PEX-verified Folded-Cascode OTA comparing baseline-compiled cloud layouts against the shipped API v1.0 local layout (so the thicker M3/M4 power rails and vertical drops reflect API v1.0 compiler defaults alongside bilateral mirror symmetry, at 12–23% area overhead vs. cloud and 11% vs. local baseline).
Bottom (d–f): Hard-16 110-device ADPLL subsystem via hierarchical subcircuit compilation (M5 top-level overlay in yellow).
Upgrading the compiler under a frozen model (Paper Fig. 8).
On three representative unmodified Round-1 TSUMIKI-27B programs, recompiling under TSUMIKI API v1.0 increases guard-ring tap density by 6×, widens signal spacing by +49–62%, and adds automatic VSS differential shields and multi-column wide-FET contacts from identical Python intent. Across 14 unmodified passing Round-1 27B programs without any repair round, 12/14 stay DRC+LVS-clean and 11/14 pass FULL+wide-power (14/14 on 9B).
Intent-Level, Netlist-Bound Layout API & GDS-Only Verifier
Direct raw-GDS polygon scripting fails for an out-of-the-box 27B model (0/20 on RC-PEX-20) across polygon/DRC explosion, netlist transcription errors, and loss of analog semantics.
TSUMIKI API v1.0 is an intent-level, netlist-bound Python API operating at the abstraction level of constraint-driven custom layout tools (e.g., Virtuoso Layout XL with ModGen): the LLM decides row grouping, ABBA common-centroid ordering, floorplan coordinates, guard rings, power rails, and multi-round debugging in 25–60 lines of Python, while the deterministic compiler locks read-only SPICE netlist sizing and executes PCells, contact-column scaling, gridded Manhattan A* routing, multi-cut vias, and matched differential shields.
Representation boundary (Paper Fig. 2). Separating analog intent from polygon generation locks exact SPICE W, L, nf, m, and connectivity automatically before deterministic compilation and GDS-only verification.
Representative 15-Line TSUMIKI Python Program (Listing 1: symmetric differential stage)
def build(c):
# Symmetric ABBA input pair in shared NMOS guard ring
r_in = c.row(['M1[0]', 'M2[0]', 'M2[1]', 'M1[1]'], 0, 0,
guard=False, anchor='ll', start_net='TAIL')
r_t = c.place('MT', 0, c.snap(r_in.bbox[1] - 2.2),
guard=False, anchor='ll', sd_con_col=2)
gn = c.shared_guard('nfet', 'VSS', [r_in, r_t], margin=0.5)
# Align PMOS load cleanly above NMOS guard ring
px, py = c.align_block([gn], side='top', gap=2.6, align='center')
r_ld = c.row(['M3', 'M4'], px, py, guard=False, anchor='ll')
gp = c.shared_guard('pfet', 'VDD', [r_ld], margin=0.5)
# Analog power, matching, and shielding intent
c.power_ring('VDD', 'VSS', width=1.2, margin=0.9, via_size=1.0)
c.diff_pair('INP', 'INN')
c.shield_net('VBIAS', shield='VSS', width=0.6)
Family-Separated Corpus & Benchmark (195 Tasks)
Random parameter splits leak exact circuit templates between training and testing.
TSUMIKI partitions strictly by circuit family (263 training families vs. 90 unseen evaluation families, with 0 exact bipartite graph isomorphisms across splits, though canonical analog archetypes recur with distinct topologies and constraints).
Every training example was built in-house on open SKY130 1.8V (zero closed-model outputs): 2,295 single-shot layouts and 1,133 real verifier-guided repairs.
The public SKY130 benchmark ships 195 tasks: 180 primary tasks (108 Easy single-block analog & AMS cells, 36 primary Medium multi-block macros, 20 RC-PEX, 16 Hard subsystems) plus 9 excluded min_width_um-constrained Medium macros and 6 frozen-assembler subsystems.
Programmatic topology separation (Paper Fig. 3). Train Families ∩ Test Families = ∅ across 263 training families (3,428 verified trajectories, 1–32 devices) and 90 disjoint evaluation families (0 exact graph isomorphism).
Corpus composition across 3,428 verified SKY130 trajectories (Paper Fig. 4). (a) Circuit taxonomy across 263 SKY130 families. (b) Failure modes across the 1,133 repair trajectories: because the API eliminates most low-level polygon errors up front, only 2.5% concern DRC, while 97.5% teach placement exceptions, analog constraints, LVS debugging, and area/density fixes. (c) High-level API primitive adoption in verified programs.
Method: Completion-Only Repair SFT & Verifier-Reward GRPO
We fine-tune the strongest available dense open-weight models at the 1-GPU and 2-GPU tiers—Qwen/Qwen3.5-9B (BF16 LoRA, r = 32, α = 64, 1×32-GB GPU) and Qwen/Qwen3.8-27B (NF4 QLoRA, r = 32, α = 64, 2×32-GB GPUs; served via vLLM on Qwen/Qwen3.8-27B-FP8)—using strict completion-only loss masking at 12,288 tokens with zero truncation.
On 9B controlled ablations, truncating at 8k silently drops 297 trajectories (mostly long multi-block repairs) and costs 20 pp on Easy, while dropping the 1,133 repair trajectories costs 27 pp on Easy best-of-4 and collapses first-shot accuracy from 26.9% to 7.2% (though no-repair 9B slightly edges full 9B on RC-PEX best-of-4 at 14/20 vs. 13/20 while losing 11.2 pp on RC-PEX single-run).
For 27B only, we add repair-only diagnostic thinking SFT and a fixed 10-iteration deterministic GDS-verifier GRPO schedule (-RL10), which peaked at 34 GB and ran on 1×96-GB GPU (whereas SFT and all local inference run on 1–2 consumer 32-GB GPUs), delivering a nominally significant +9-task gain over base 27B SFT (155 vs. 146/164, 13 vs. 4 discordant, exact McNemar p = 0.049).
Training pipeline illustrated on a 5T differential OTA (Paper Fig. 5; schematic illustration of the training format, distinct from the held-out RC-PEX-20 evaluation circuit in Fig. 1).
(a) Supervised fine-tuning masks the task spec, broken draft, and verifier JSON (labels = -100), optimizing cross-entropy exclusively on the verified passing def build(c) completion.
(b) Verifier-reward GRPO samples G = 4 candidate trajectories per task, grades each compiled GDS deterministically, and reinforces winning <think> diagnostics and floorplans via group-relative advantages.
Behind the Foundry Firewall: Commercial 65-nm & 16-nm FinFET Transfer
Because the TSUMIKI API is process-portable, swapping only the compiler backend lets an unmodified SKY130-trained checkpoint (-RL7) run end-to-end behind our foundry firewall on confidential commercial 65-nm planar CMOS (ρ ≥ 0.18, a TSUMIKI-defined active-area density gate, not a foundry rule) and 16-nm FinFET (ρ ≥ 0.08, TSUMIKI-defined gate) PDKs across 64 circuit–process test cases (32 identical topologies per node under Calibre DRC/LVS) with zero retraining:
- 65-nm Planar (Zero-Retrain): Solves 18/32 (56.3%) FULL under Calibre DRC+LVS+density (22/32 DRC-clean, 28/32 LVS-clean, 10/32 first-shot any-of-4) and retains 10/16 (62.5%) LVS-clean layouts even with deterministic post-route DRC cleanup disabled.
- 16-nm FinFET (Post-Hoc Recompile, a-priori 0.35× BEOL pitch-ratio scaling): Applying fixed a-priori 0.35× BEOL pitch-ratio scaling to 130-nm spacing/width literals when post-hoc recompiling the final program of each of the 128 saved
-RL7runs (zero retraining, zero extra LLM calls) solves 11/32 (34.4%) FULL under Calibre DRC+LVS+density (12/32 DRC, 14/32 LVS; 11/14 [78.6%] of LVS-clean layouts pass FULL). - Why pitch scaling matters (ablation): Without a-priori 0.35× BEOL pitch-ratio scaling, unmodified 130-nm spacing/width literals still achieve 14/32 LVS (7/16 pre-cleanup LVS) but fail FinFET area/density gates (2/32 FULL); 0.35× scaling lifts 16-nm FULL 5.5×, highlighting the value of pitch-normalized coordinates before dedicated on-premise commercial fine-tuning.
Behind-the-firewall zero-retraining transfer (0 bytes to cloud). SKY130 LoRA weights ship once behind the foundry firewall and swap only the process compiler backend, solving 18/32 (56.3%) on 65-nm planar and 11/32 (34.4%) on 16-nm FinFET via post-hoc recompile with a-priori 0.35× BEOL pitch-ratio scaling (5.5× over 2/32 unrescaled) before any on-premise fine-tuning.
| Node | Configuration | 1st-shot† | DRC | LVS | FULL | Pre-Cleanup LVS★ |
|---|---|---|---|---|---|---|
| 65-nm Planar (ρ ≥ 0.18) | TSUMIKI-27B (-RL7) | 10/32 | 22/32 | 28/32 | 18/32 (56.3%) | 10/16 (62.5%) |
| 16-nm FinFET (ρ ≥ 0.08) | TSUMIKI-27B (post-hoc 0.35× pitch)‡ | – | 12/32 | 14/32 | 11/32 (34.4%) | – |
| 16-nm FinFET (ρ ≥ 0.08) | w/o 0.35× pitch rescale | 2/32 | 11/32 | 14/32 | 2/32 (6.3%) | 7/16 (43.8%) |
†First-shot pass in any of 4 runs.
★LVS-clean rate on a 16-circuit ablation subset (first 16 topologies) with deterministic post-route DRC cleanup disabled.
‡Post-hoc recompile applying a-priori 0.35× BEOL pitch-ratio scaling to spacing/width literals (dropping 130-nm inter_sd_l) on the final program of each of the 128 saved -RL7 16-nm runs with zero retraining and zero extra LLM calls (14/32 circuits are LVS-clean without an LLM repair round, of which 11/14 [78.6%] pass FULL).
| On-Premise Local Model | Easy (32) 4 runs × 5 rounds |
Hard (84 = 64 Hard + 20 Tape-Out Analog) 4 runs × 5 rounds |
|---|---|---|
| Greedy Placer (Non-LLM, on-premise) | – | 0/64 (0.0% on Hard-64) |
TSUMIKI-27B (Zero-Retrain -RL7, on-premise) |
18/32 (56.3%) | – |
| TSUMIKI-27B (65-nm On-Premise FT, Ours) | 29/32 (90.6%)§ | 30/84 (35.7%)¶ |
Post-paper on-premise fine-tuning update trained and evaluated strictly behind the foundry firewall using local open-weight models only (0 bytes sent to cloud; no closed cloud APIs are evaluated on confidential commercial PDK assets; FULL = Calibre DRC=0 + LVS clean + TSUMIKI-defined active-area density gate ρ ≥ 0.18). §Easy (32): same 32 Commercial 65-nm Planar CMOS topologies as the zero-retrain paper table above; 29/32 (90.6%) FULL at 4×5 (4 runs × 5 rounds) with 100% DRC and 100% LVS, 25/32 first-shot@4, 66.4% single-run pass rate, and 25/32 (78.1%) at 2×5 (2 runs × 5 rounds). ¶Hard (84 = 64 Hard 20–42-device commercial blocks + 20 Tape-Out Analog Blocks; distinct from SKY130’s 58–110-device Hard-16): 30/84 (35.7%) FULL at 4×5 (25/64 [39.1%] on Hard-64 + 5/20 [25.0%] on Tape-Out Analog Blocks; best tape-out block achieves 0.73× human layout area), and 17/84 (20.2%) at 2×5. Clean-Room Provenance: Commercial PDK backends, design rules, fine-tuned commercial adapters, and layouts remain strictly on-premise and are never distributed.
Open-Source Release & Quick Start
The TSUMIKI API v1.0 compiler, fail-closed Linux bwrap sandbox, GDS-only verifier, 195-task open SKY130 benchmark suite (in benchmarks/ and mirrored at keio-csg/tsumiki-sky130-bench), and trained 9B/27B LoRA adapters (keio-csg/tsumiki-27b-lora = flagship -RL10, keio-csg/tsumiki-9b-lora; both rank r = 32, α = 64) are released under Apache-2.0.
The 3,428 lab training trajectories and commercial-PDK backends remain private and on-premise.
Prerequisites & quantization notes: Linux is required for the fail-closed Bubblewrap (bwrap) sandbox, alongside SKY130A PDK (sky130A via Volare/OpenLane), Magic, Netgen, ngspice, and optional KLayout CLI.
TSUMIKI-27B was trained with NF4 QLoRA (r=32) on Qwen/Qwen3.8-27B and evaluated/served in FP8 via vLLM (Qwen/Qwen3.8-27B-FP8, 2× consumer 32-GB GPUs); TSUMIKI-9B is trained and served in BF16 on Qwen/Qwen3.5-9B (1× 24–32-GB GPU).
# 1. Clone, install, and configure SKY130A PDK (Linux required for bwrap sandbox)
git clone https://github.com/Keio-CSG/tsumiki.git
cd tsumiki && pip install -e ".[dev]"
export PDK_ROOT=/path/to/volare/sky130/versions/<pdk_hash>
export PDK=sky130A
# 2. Serve TSUMIKI-27B (-RL10) locally via vLLM (2x consumer GPUs, zero cloud inference)
# Disable telemetry (for air-gapped foundry servers, also set HF_HUB_OFFLINE=1 & local paths)
export VLLM_NO_USAGE_STATS=1 DO_NOT_TRACK=1 HF_HUB_DISABLE_TELEMETRY=1
vllm serve Qwen/Qwen3.8-27B-FP8 \
--tensor-parallel-size 2 --max-model-len 16384 \
--enable-lora --max-lora-rank 32 \
--lora-modules tsumiki-27b=keio-csg/tsumiki-27b-lora \
--port 8000
# 3. Smoke-test multi-round verification on 1 RC-PEX task (drop --limit 1 for all 20)
# (HF mirror of all 195 tasks: datasets.load_dataset('keio-csg/tsumiki-sky130-bench'))
python eval/eval_vllm.py \
--tasks-json benchmarks/rc_pex_20.json \
--out-dir runs/eval_rc_pex \
--base-url http://127.0.0.1:8000 \
--model-name tsumiki-27b \
--rounds 5 --seeds 4 --thinking-mode repair_only --functional-pex --limit 1
Reproducing Paper Results:
- Compiler profile: Shipped
TSUMIKI API v1.0enables hardened wide-power/guard-ring defaults (144/164 Magic-only FULL on-RL1vs. 152/164 on the paper's baseline compiler defaults; headline 155/164 used-RL10on baseline defaults). - Primary Medium-36 subset:
benchmarks/medium_45.jsoncontains all 45 macros; the 36 primary tasks are those withoutmin_width_umpower-rail constraints in their task JSON. - Thinking mode: Pass
--thinking-mode repair_onlyfor TSUMIKI-27B (-RL10: direct code on Round 1,<think>on Rounds 2–5),--thinking-mode offfor TSUMIKI-9B / base Think-OFF, and--thinking-mode allfor base Think-ON. - Hard-16 & Frozen-6: All 22 subsystem specs and the flat verifier are included in
benchmarks/; the paper's M3–M5 hierarchical top-level assembler is not bundled in this flat API v1.0 release.
Acknowledgements
This work was supported in part by JST Next-generation Edge AI Semiconductor Grant Number JPMJES2515.
BibTeX
@misc{yoshioka2026tsumiki,
author = {Yoshioka, Kentaro},
title = {TSUMIKI: Local Open-Weight LLMs for Analog IC Layout Behind the Foundry Firewall},
year = {2026},
eprint = {2612.03056},
archivePrefix = {arXiv},
primaryClass = {cs.AR},
url = {https://arxiv.org/abs/2612.03056}
}