Harness or Fine-Tuning? Execution-Verified Agents for Qiskit-to-CUDA-Q Porting
Paper · https://arxiv.org/abs/2612.04403
arXiv:2612.04403v1 Announce Type: new Abstract: A previous study found that fine-tuning a small open model for Qiskit-to-CUDA-Q translation ties a 4-shot prompt and that no model translated any of 27 real QED-C kernels. We ask whether an agent harness -- a loop in which the model runs code and checks its result -- is an alternative to fine-tuning, which parts matter, what each option costs, and when to use both. With the same execution-based verifier (correct only if the kernel matches the Qiskit reference state), a 3B-active mixture-of-experts model (Nemotron Cascade 2 30B-A3B) reaches 97% [89-99] on 60 tasks and 93.8% on all 640 with the full harness, against 0% in a single attempt. API knowledge and verification in the loop are what matter; a weak run-only verifier keeps most of the gain. Models without tool-use post-training do not gain from the loop (dense 4B/7B; Llama 4 Scout, 17B active). A fine-tuned 7B code model matches the harness on the sample at a fifth of the compute, but drops on unseen style (80% vs. 90.5%) and real QED-C kernels (where the harness reaches 63-100%). A verifier-gated cascade -- fine-tuned 7B first, harness only on rejection -- reaches 98.9% on all 640 tasks, 5 points above either system alone, at a third of the harness compute. Translating every prompt from Portuguese to English changed no result significantly on 60 tasks. The choice depends on whether the base model can use the loop and on how far inputs drift from training.
First seen by Oriel on .
AI summary
The paper compares fine-tuning with execution-verified agent harnesses for Qiskit-to-CUDA-Q translation and finds that a verifier-gated cascade achieves the highest accuracy at lower compute cost.
- The full harness reaches 97% accuracy on 60 tasks and 93.8% across 640 tasks, compared with 0% for a single attempt.
- The loop’s benefits depend on models with tool-use post-training; API knowledge and in-loop verification drive performance.
- A fine-tuned 7B code model matches the harness on a sample using one-fifth the compute, but performs worse on unseen styles and real QED-C kernels.
- Running the fine-tuned model first and invoking the harness only when its verifier rejects reaches 98.9% across 640 tasks, five points above either system alone at one-third of the harness compute.
- Translating prompts from Portuguese to English produced no significant change on 60 tasks.
#llm agents #qiskit #cuda-q #fine-tuning
Generated by gpt-5.6-sol. Check the original for details.
Aliases
| Source | External ID | URL |
|---|---|---|
| arXiv AI Papers | oai:arXiv.org:2612.04403v1 | https://arxiv.org/abs/2612.04403 Read discussion |