arXiv cs.AI· Plawan Kumar Rath·· 12 小时前AI 评分31
无需重训练实现跨方言泛化:MLIR 模式派生约束解码的基准与评估
Cross-Dialect Generalization Without Retraining: Benchmarks and Evaluation of Schema-Derived Constrained Decoding for MLIR
AI 导读
研究团队发布四个自然语言到 MLIR 的基准(MLIR-Spec-150、Linalg-Spec-30、StableHLO-Spec-30、StableHLO-Held-Out-200),共 410 对样本,覆盖三种方言,并构建基于 ODS 的三层模式派生约束栈。
正文 · 原文
Abstract:Multi-Level Intermediate Representation (MLIR) underlies modern ML compiler infrastructure (TensorFlow, JAX/StableHLO, PyTorch Inductor, IREE), yet appears only in trace amounts in code-LM pretraining corpora. MLIR is also extensible by design: new dialects ship per application domain, so a fine-tuned model per dialect does not scale. We ask whether inference-time priors derived mechanically from each dialect's Operation Definition Specification (ODS) can substitute for gradient-based adaptation. First, we release four natural-language-to-MLIR benchmarks across three dialects (MLIR-Spec-150, Linalg-Spec-30, StableHLO-Spec-30, StableHLO-Held-Out-200), totaling 410 in-scope NL-to-MLIR pairs, plus a 25-program out-of-grammar stress set, with functional references on 30 Spec prompts, under Apache-2.0 with Gebru datasheets and Croissant 1.1 metadata. Second, we build a three-layer schema-derived constraint stack: a CFG over op signatures (C1), type-domain splits from an ODS-extracted type lattice (C2), and an SSA-scope validator driving five-retry rejection sampling (C3). Porting it to StableHLO required no new constraint-layer code. On structurally dominated dialects, SmolLM2-1.7B with token-level constraints matches or exceeds 15B-34B code LMs running post-hoc rejection at a matched retry budget and 8-25x the per-generation speed: on linalg it reaches 80.0% verify-valid (three runs, n=125), 21 to 44 pp above CodeLlama-34B, Granite-Code-34B, and StarCoder2-15B with non-overlapping CIs. The comparison is between systems, not models: under the baselines' post-hoc protocol, SmolLM2 falls from 52.0% to 24.5% on arith+func. On arith+func and the templated StableHLO-Held-Out-200 the baselines match or beat the SLM; we scope these as non-win cells. We release benchmarks, decoder, every per-prompt generation, and a pinned reproducibility Dockerfile.
| Comments: | Accepted to the NeurIPS 2026 Evaluations and Datasets Track; camera-ready version. 31 pages (10 main + references + appendix + checklist). Code: this https URL Datasets: this https URL |
| Subjects: | Artificial Intelligence (cs.AI); Machine Learning (cs.LG); Programming Languages (cs.PL) |
| ACM classes: | I.2.7; D.3.4; I.2.6 |
| Cite as: | arXiv:2607.18254 [cs.AI] |
| (or arXiv:2607.18254v2 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2607.18254 arXiv-issued DOI via DataCite |
Submission history
From: Plawan Kumar Rath [view email]
[v1]
Thu, 14 May 2026 02:08:13 UTC (182 KB)
[v2]
Fri, 16 Oct 2026 14:07:14 UTC (185 KB)
来源:arXiv cs.AI · arxiv.org