paper: 2026-09-17 The Tool-Call Cliff: Measuring the Accuracy Decay of Agentic Structured Output U
Browse files- .gitattributes +2 -0
- README.md +79 -0
- abstract.txt +1 -0
- card.json +22 -0
- experiments/plan.json +22 -0
- experiments/provenance.json +13 -0
- experiments/results.json +6 -0
- figures-spec.json +70 -0
- figures/fig1-cliff-shape.png +3 -0
- figures/fig1-cliff-shape.tex +51 -0
- figures/fig3-cost-ratio.png +3 -0
- figures/fig3-cost-ratio.tex +39 -0
- figures/manifest.json +22 -0
- main.pdf +3 -0
- main.tex +361 -0
- paper.pdf +3 -0
- refs.bib +344 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
main.pdf filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
paper.pdf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- tool-calling
|
| 7 |
+
- llm-quantization
|
| 8 |
+
- nvfp4
|
| 9 |
+
- structured-output
|
| 10 |
+
- h200-serving
|
| 11 |
+
- precision-tier-routing
|
| 12 |
+
- agentic-workflow
|
| 13 |
+
- bfcl
|
| 14 |
+
pretty_name: >-
|
| 15 |
+
The Tool-Call Cliff: Measuring the Accuracy Decay of Agentic Structured Output Under Low-Bit Quantization in Self-Hosted H200 Serving
|
| 16 |
+
viewer: false
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# The Tool-Call Cliff: Measuring the Accuracy Decay of Agentic Structured Output Under Low-Bit Quantization in Self-Hosted H200 Serving
|
| 20 |
+
|
| 21 |
+
> **TL;DR** — We formalize the tool-call cliff - the hypothesis that agentic structured tool calls decay faster than free-form prose under NVFP4/8-bit quantization - as an accuracy tax and a cliff ratio against a free-form control, derive two falsifiable predictions (a per-category failure-mode composition and a superlinear 8-to-4-bit tax jump), and price the cliff with a task-type-aware break-even that extends precision-tier routing to the task-type axis on a single H200.
|
| 22 |
+
|
| 23 |
+
**ThakiCloud AI Research** · 2026-09-17 · [📝 Tech blog (KO)](https://thakicloud.com/tech-blog/ko/research/tool-call-quantization-cliff/)
|
| 24 |
+
|
| 25 |
+
## Problem
|
| 26 |
+
|
| 27 |
+
Self-hosted agent fleets are increasingly served on low-bit checkpoints, but the decision that matters to the operator - is 4-bit safe for the tool-call slice - has been answerable only with free-form and perplexity evidence. Compression benchmarks leave agentic capability out of scope, and flat aggregate success scores under 16/8/4-bit weights hide which requests broke, at which precision boundary, and whether the accuracy tax exceeds the bandwidth saving.
|
| 28 |
+
|
| 29 |
+
## Approach
|
| 30 |
+
|
| 31 |
+
At a fixed 27B dense Qwen3-family checkpoint, a temperature-0 harness, and single-H200 serving, we model per-step logit perturbation under symmetric quantization noise and a low-margin structural-step assumption, obtaining a step-level flip bound and a case-level amplification bound in which tool-call failure scales with the number of mandatory structural decode steps while free-form error is locally absorbed. We define the cliff ratio kappa_q against the free-form control, a task-type-aware break-even condition, and a two-tier routing policy, and specify a falsifiable four-arm protocol (BF16, FP8, NVFP4, free-form control) with pre-registered refutation criteria R1-R4; the previously measured in-house NVFP4 reference row (800 BFCL-style tool-call cases, 89.6% overall) serves as an ex-ante consistency check.
|
| 32 |
+
|
| 33 |
+
## Key contributions
|
| 34 |
+
|
| 35 |
+
- A formalization of the tool-call precision cliff: the accuracy tax tau_q, the cliff ratio kappa_q against a free-form control, a step-level flip bound under symmetric quantization noise, and a case-level amplification bound that scales with the mandatory structural decode steps of a tool call.
|
| 36 |
+
- Two falsifiable predictions - (P1) a characteristic per-category failure-mode composition (argument-value dominant; call-count systematic in parallel) and (P2) a superlinear tax jump from 8 to 4 bits - checked ex-ante against the in-house NVFP4 reference row (89.6% overall on 800 cases), whose failure composition matches P1.
|
| 37 |
+
- A task-type-aware break-even and two-tier routing policy that extends precision-tier routing from the request-difficulty axis to the task-type axis, together with a falsifiable four-arm BF16/FP8/NVFP4/free-form measurement protocol with pre-registered refutation criteria R1-R4 on the declared H200 platform.
|
| 38 |
+
|
| 39 |
+
## Figures
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
*Schematic of the predicted pass rate against weight bit width: the tool-call arm drops steeply from 8 to 4 bits while the free-form control decays gently. (Analytical model (not measured))*
|
| 43 |
+
<sub>Analytical model (not measured)</sub>
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
*In the decode-bound batch-1 regime on H200, per-case GPU-seconds scale roughly with weight bit width, giving an ideal 1:2:4 ratio between the NVFP4, FP8, and BF16 re-encodings. (Analytical model (not measured))*
|
| 47 |
+
<sub>Analytical model (not measured)</sub>
|
| 48 |
+
|
| 49 |
+
## Results (as argued)
|
| 50 |
+
|
| 51 |
+
Claimed results of this analytical and positional paper (no new measurements in this cycle; the four-arm protocol is specified but pending): (i) under symmetric quantization noise and low-margin structural steps, case-level tool-call failure amplifies with the number of mandatory structural decode steps, predicting the cliff at the 4-bit tier; (ii) the previously measured in-house NVFP4 anchor (89.6% overall; 90.8/89.0/88.0% for simple/multiple/parallel) is an ex-ante consistency check - call-count failures are 9x more frequent in parallel than in simple, matching Item P1; (iii) the break-even reduces the fleet decision to one measured quantity, the 4-bit tool-call tax, and one measured cost ratio, and at the in-house tool-call share p=0.75 the two-tier policy recovers 75% of the uniform-4-bit saving (parametric illustration at the ideal 1:2:4 cost ratio).
|
| 52 |
+
|
| 53 |
+
## Limitations
|
| 54 |
+
|
| 55 |
+
Single 27B dense Qwen3-family checkpoint (cross-size and cross-family curves are future work); NVFP4 on H200 is a storage and bandwidth claim (weights dequantize to a bf16 GEMM, so measured cost ratios bound the native-FP4 path from below and the R4 margin should be re-measured on Blackwell); grading is an in-house AST contract rather than the official BFCL checker, so only relative cross-tier comparisons are valid; deterministic temperature-0 decoding only; the tool-call share p=0.75 is an in-house routing-taxonomy statistic; all tiers are PTQ (QAT is open); single-GPU, batch-1 latency regime.
|
| 56 |
+
|
| 57 |
+
## Abstract
|
| 58 |
+
|
| 59 |
+
Self-hosted agentic fleets increasingly run on low-bit checkpoints, yet whether structured tool calls decay more than free-form prose under NVFP4 or 8-bit re-encodings has been answerable only with free-form and perplexity evidence. We formalize the gap as a precision cliff: at a fixed 27B dense model, a temperature-0 harness, and single-H200 serving, we define the tool-call accuracy tax \tau_q and the cliff ratio \kappa_q = \tau_q(\mathrmtc) \,/\, \max(\tau_q(\mathrmff), \varepsilon_0), and, under symmetric-quantization noise and a low-margin structural-step assumption, show that case-level failure amplifies with the number of mandatory structural decode steps. The formalization predicts (P1) a characteristic per-category failure-mode composition and (P2) a superlinear tax jump from 8 to 4 bits. A previously measured in-house NVFP4 reference row (800 tool-call cases; 89.6% overall) serves as an ex-ante consistency check of these predictions. We then price the cliff: a task-type-aware break-even extends our precision-tier routing from the request-difficulty axis to the task-type axis, and a falsifiable four-arm protocol with refutation criteria R1-R4 specifies the BF16, FP8, NVFP4, and free-form-control measurements on the declared platform. We are explicit that this is an analytical and positional paper. The work extends the difficulty axis of~ with the task-type axis, complements the reasoning-token axis (same model and harness)~ and the retriever-side quantization result~; together the three axes are priced on the same token factory.
|
| 60 |
+
|
| 61 |
+
## Files
|
| 62 |
+
|
| 63 |
+
- [📄 Paper (PDF)](paper.pdf)
|
| 64 |
+
- [LaTeX source](main.tex)
|
| 65 |
+
- [References (BibTeX)](refs.bib)
|
| 66 |
+
|
| 67 |
+
## Citation
|
| 68 |
+
|
| 69 |
+
```bibtex
|
| 70 |
+
@techreport{thaki_tool_call_quantization_cliff_2026,
|
| 71 |
+
title = {The Tool-Call Cliff: Measuring the Accuracy Decay of Agentic Structured Output Under Low-Bit Quantization in Self-Hosted H200 Serving},
|
| 72 |
+
author = {ThakiCloud AI Research (Hyojung Han)},
|
| 73 |
+
year = {2026},
|
| 74 |
+
institution = {ThakiCloud}, note = {thaki-AI/daily-paper-2026-09-17-tool-call-quantization-cliff}
|
| 75 |
+
}
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
*Generated by ThakiCloud nightly research pipeline. License: CC BY 4.0.*
|
abstract.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Self-hosted agentic fleets increasingly run on low-bit checkpoints, yet whether structured tool calls decay more than free-form prose under NVFP4 or 8-bit re-encodings has been answerable only with free-form and perplexity evidence. We formalize the gap as a precision cliff: at a fixed 27B dense model, a temperature-0 harness, and single-H200 serving, we define the tool-call accuracy tax \tau_q and the cliff ratio \kappa_q = \tau_q(\mathrmtc) \,/\, \max(\tau_q(\mathrmff), \varepsilon_0), and, under symmetric-quantization noise and a low-margin structural-step assumption, show that case-level failure amplifies with the number of mandatory structural decode steps. The formalization predicts (P1) a characteristic per-category failure-mode composition and (P2) a superlinear tax jump from 8 to 4 bits. A previously measured in-house NVFP4 reference row (800 tool-call cases; 89.6% overall) serves as an ex-ante consistency check of these predictions. We then price the cliff: a task-type-aware break-even extends our precision-tier routing from the request-difficulty axis to the task-type axis, and a falsifiable four-arm protocol with refutation criteria R1-R4 specifies the BF16, FP8, NVFP4, and free-form-control measurements on the declared platform. We are explicit that this is an analytical and positional paper. The work extends the difficulty axis of~ with the task-type axis, complements the reasoning-token axis (same model and harness)~ and the retriever-side quantization result~; together the three axes are priced on the same token factory.
|
card.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tldr": "We formalize the tool-call cliff - the hypothesis that agentic structured tool calls decay faster than free-form prose under NVFP4/8-bit quantization - as an accuracy tax and a cliff ratio against a free-form control, derive two falsifiable predictions (a per-category failure-mode composition and a superlinear 8-to-4-bit tax jump), and price the cliff with a task-type-aware break-even that extends precision-tier routing to the task-type axis on a single H200.",
|
| 3 |
+
"problem": "Self-hosted agent fleets are increasingly served on low-bit checkpoints, but the decision that matters to the operator - is 4-bit safe for the tool-call slice - has been answerable only with free-form and perplexity evidence. Compression benchmarks leave agentic capability out of scope, and flat aggregate success scores under 16/8/4-bit weights hide which requests broke, at which precision boundary, and whether the accuracy tax exceeds the bandwidth saving.",
|
| 4 |
+
"method": "At a fixed 27B dense Qwen3-family checkpoint, a temperature-0 harness, and single-H200 serving, we model per-step logit perturbation under symmetric quantization noise and a low-margin structural-step assumption, obtaining a step-level flip bound and a case-level amplification bound in which tool-call failure scales with the number of mandatory structural decode steps while free-form error is locally absorbed. We define the cliff ratio kappa_q against the free-form control, a task-type-aware break-even condition, and a two-tier routing policy, and specify a falsifiable four-arm protocol (BF16, FP8, NVFP4, free-form control) with pre-registered refutation criteria R1-R4; the previously measured in-house NVFP4 reference row (800 BFCL-style tool-call cases, 89.6% overall) serves as an ex-ante consistency check.",
|
| 5 |
+
"contributions": [
|
| 6 |
+
"A formalization of the tool-call precision cliff: the accuracy tax tau_q, the cliff ratio kappa_q against a free-form control, a step-level flip bound under symmetric quantization noise, and a case-level amplification bound that scales with the mandatory structural decode steps of a tool call.",
|
| 7 |
+
"Two falsifiable predictions - (P1) a characteristic per-category failure-mode composition (argument-value dominant; call-count systematic in parallel) and (P2) a superlinear tax jump from 8 to 4 bits - checked ex-ante against the in-house NVFP4 reference row (89.6% overall on 800 cases), whose failure composition matches P1.",
|
| 8 |
+
"A task-type-aware break-even and two-tier routing policy that extends precision-tier routing from the request-difficulty axis to the task-type axis, together with a falsifiable four-arm BF16/FP8/NVFP4/free-form measurement protocol with pre-registered refutation criteria R1-R4 on the declared H200 platform."
|
| 9 |
+
],
|
| 10 |
+
"results": "Claimed results of this analytical and positional paper (no new measurements in this cycle; the four-arm protocol is specified but pending): (i) under symmetric quantization noise and low-margin structural steps, case-level tool-call failure amplifies with the number of mandatory structural decode steps, predicting the cliff at the 4-bit tier; (ii) the previously measured in-house NVFP4 anchor (89.6% overall; 90.8/89.0/88.0% for simple/multiple/parallel) is an ex-ante consistency check - call-count failures are 9x more frequent in parallel than in simple, matching Item P1; (iii) the break-even reduces the fleet decision to one measured quantity, the 4-bit tool-call tax, and one measured cost ratio, and at the in-house tool-call share p=0.75 the two-tier policy recovers 75% of the uniform-4-bit saving (parametric illustration at the ideal 1:2:4 cost ratio).",
|
| 11 |
+
"limitations": "Single 27B dense Qwen3-family checkpoint (cross-size and cross-family curves are future work); NVFP4 on H200 is a storage and bandwidth claim (weights dequantize to a bf16 GEMM, so measured cost ratios bound the native-FP4 path from below and the R4 margin should be re-measured on Blackwell); grading is an in-house AST contract rather than the official BFCL checker, so only relative cross-tier comparisons are valid; deterministic temperature-0 decoding only; the tool-call share p=0.75 is an in-house routing-taxonomy statistic; all tiers are PTQ (QAT is open); single-GPU, batch-1 latency regime.",
|
| 12 |
+
"tags": [
|
| 13 |
+
"tool-calling",
|
| 14 |
+
"llm-quantization",
|
| 15 |
+
"nvfp4",
|
| 16 |
+
"structured-output",
|
| 17 |
+
"h200-serving",
|
| 18 |
+
"precision-tier-routing",
|
| 19 |
+
"agentic-workflow",
|
| 20 |
+
"bfcl"
|
| 21 |
+
]
|
| 22 |
+
}
|
experiments/plan.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run": true,
|
| 3 |
+
"route": "custom",
|
| 4 |
+
"custom": {
|
| 5 |
+
"name": "tool-call-quant-cliff",
|
| 6 |
+
"image": "<internal-host>/ai-platform/pytorch:2.9.0-cuda13.0-cudnn9-devel",
|
| 7 |
+
"gpu": 1,
|
| 8 |
+
"cpu": 16,
|
| 9 |
+
"mem": "64Gi",
|
| 10 |
+
"setup": [
|
| 11 |
+
"pip install -q bitsandbytes accelerate boto3 \"transformers>=4.51\"",
|
| 12 |
+
"python3 -c \"import torch, transformers; print('deps', torch.__version__, transformers.__version__)\" || true"
|
| 13 |
+
],
|
| 14 |
+
"require_model": "global/models/Qwen/Qwen3-14B",
|
| 15 |
+
"target": "h200",
|
| 16 |
+
"script": "#!/usr/bin/env python3\n\"\"\"tool-call-quant-cliff (paper pipeline 2026-09-17)\n\nQuestion measured\n-----------------\nAt a FIXED model and a temperature-0 harness, does agentic TOOL-CALL accuracy\n(structured JSON output, BFCL-style simple/multiple/parallel) degrade MORE\nunder low-bit quantization than freeform factual generation -- i.e. where is\nthe \"tool-call cliff\" -- and how does that accuracy tax map onto the serving\ncompute cost (throughput, weight footprint, GPU-seconds per correct output) on\none H200?\n\nArms (same checkpoint, dynamic quantization; Hopper-native precisions)\n----------------------------------------------------------------------\nbf16 : 16-bit baseline (torch bfloat16)\nint8 : 8-bit (bitsandbytes LLM.int8)\nnf4 : 4-bit (bitsandbytes NF4 == the Hopper on-the-fly stand-in for NVFP4,\n which is a Blackwell encoding not cleanly served on a Hopper H200)\n\nModel: Qwen3-14B (internal S3, the largest dense model in the in-cluster S3\nallowlist). The topic's 27B NVFP4 teacher baseline (BFCL-simple 363/400 =\n90.8%, 2026-09-05, same grader family) is CITED as an external 4-bit anchor;\nit is not re-measured here because no 27B BF16/FP8 checkpoint is in the\nin-cluster S3 allowlist (measuring the cliff needs the SAME model at >=2\nprecisions).\n\nProtocol (identical across arms -- the point is a controlled\nstructured-vs-freeform comparison)\n--------------------------------------------------------------------------\ntool-call : given a tool schema + task, the model must emit ONLY a JSON object\n {\"tool_calls\":[{\"name\",...,\"arguments\":{...}}]}. Graded by\n order-aware set matching (tool name + every expected arg value).\n BFCL-style simple / multiple / parallel splits (10 each, embedded;\n no network dependency).\nfreeform : the model answers a factual / short-arithmetic question in free\n text; graded by normalized token/word-boundary match (15,\n embedded). Control arm: same model + quantization, prose instead\n of structured JSON.\n\nMetrics per arm\n---------------\n- tool-call accuracy % (overall + simple/multiple/parallel)\n- freeform accuracy %\n- output throughput: tokens/sec (batched generate, relative compute cost)\n- weight footprint: GB (n_params x bytes/param)\n- GPU-seconds per correct tool-call / per correct freeform answer (cost)\n- est. USD per correct output at the lab H200 rate (cost label)\n\nCliff analysis (written to results.json)\n----------------------------------------\n- decay_8bit = acc_bf16 - acc_int8 (tool-call AND freeform)\n- decay_4bit = acc_bf16 - acc_nf4 (tool-call AND freeform, if nf4 ran)\n- cliff_ratio = decay_toolcall / decay_freeform (>1 => structured output is\n MORE quantization-sensitive => the tool-call cliff is real)\n- pareto: (accuracy, cost) per arm -> where the cliff sits vs cost savings\n\nContract: writes /work/results.json + mirrors to /tmp/work if it exists.\nSMOKE=1: same code path at minimum scale (Qwen3-0.6B, 1 tc + 1 ff per arm),\nprints SMOKE_OK and exits WITHOUT writing results.\n\"\"\"\nimport gc\nimport json\nimport os\nimport re\nimport sys\nimport time\nfrom pathlib import Path\n\nWORK = Path(\"/work\")\nMODEL_DIR = str(WORK / \"model\")\nREAL_PREFIX = \"global/models/Qwen/Qwen3-14B/\"\nSMOKE_PREFIX = \"global/models/Qwen/Qwen3-0.6B/\"\nSMOKE = os.environ.get(\"SMOKE\") == \"1\"\n\nH200_USD_HR = 3.5 # llm-selfhost-calculator/data/gpus.json (h200) -- cost label\n\n# ---- scales ----\nMAX_TOKENS_TC = 96 if SMOKE else 384\nMAX_TOKENS_FF = 32 if SMOKE else 96\nN_TC = 1 if SMOKE else 10 # per BFCL part\nN_FF = 1 if SMOKE else 15\nPROBE_N = 4 if SMOKE else 16\nPROBE_MAX_NEW = 24 if SMOKE else 128\nARMS = [\"bf16\", \"int8\", \"nf4\"]\nTOTAL_DEADLINE_S = 180 if SMOKE else 26 * 60\n\n_T_START = time.time()\n\n\ndef log(msg):\n print(msg, flush=True)\n\n\ndef deadline_left():\n return (TOTAL_DEADLINE_S - (time.time() - _T_START)) > 60 # keep 60s buffer\n\n\n# ---------------------------------------------------------------------------\n# Tool schema + BFCL-style cases (embedded; no network)\n# ---------------------------------------------------------------------------\n\nTOOLS = [\n {\"name\": \"get_weather\", \"description\": \"Get current weather for a city\",\n \"args\": {\"city\": \"str\"}},\n {\"name\": \"get_time\", \"description\": \"Get current time in a timezone\",\n \"args\": {\"timezone\": \"str\"}},\n {\"name\": \"search_flights\", \"description\": \"Search flights between two airports on a date\",\n \"args\": {\"origin\": \"str\", \"destination\": \"str\", \"date\": \"str\"}},\n {\"name\": \"book_hotel\", \"description\": \"Book a hotel in a city\",\n \"args\": {\"city\": \"str\", \"check_in\": \"str\", \"nights\": \"int\"}},\n {\"name\": \"get_stock\", \"description\": \"Get current stock price for a ticker\",\n \"args\": {\"ticker\": \"str\"}},\n {\"name\": \"convert_currency\", \"description\": \"Convert an amount between two currencies\",\n \"args\": {\"amount\": \"float\", \"from\": \"str\", \"to\": \"str\"}},\n {\"name\": \"send_email\", \"description\": \"Send an email to a recipient\",\n \"args\": {\"to\": \"str\", \"subject\": \"str\"}},\n {\"name\": \"calendar_add\", \"description\": \"Add an event to the calendar\",\n \"args\": {\"title\": \"str\", \"start\": \"str\"}},\n {\"name\": \"get_distance\", \"description\": \"Get driving distance between two places\",\n \"args\": {\"origin\": \"str\", \"destination\": \"str\"}},\n {\"name\": \"translate\", \"description\": \"Translate a short text into a target language\",\n \"args\": {\"text\": \"str\", \"lang\": \"str\"}},\n]\n\nTC = {\n \"simple\": [\n {\"task\": \"What's the weather in Paris right now?\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"Paris\"}}]},\n {\"task\": \"What time is it in Tokyo?\",\n \"expected\": [{\"name\": \"get_time\", \"args\": {\"timezone\": \"Tokyo\"}}]},\n {\"task\": \"Get the current stock price of Apple.\",\n \"expected\": [{\"name\": \"get_stock\", \"args\": {\"ticker\": \"AAPL\"}}]},\n {\"task\": \"Convert 100 US dollars to euros.\",\n \"expected\": [{\"name\": \"convert_currency\", \"args\": {\"amount\": 100, \"from\": \"USD\", \"to\": \"EUR\"}}]},\n {\"task\": \"Translate 'good morning' into Japanese.\",\n \"expected\": [{\"name\": \"translate\", \"args\": {\"text\": \"good morning\", \"lang\": \"Japanese\"}}]},\n {\"task\": \"What's the weather in Seoul?\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"Seoul\"}}]},\n {\"task\": \"What time is it in London?\",\n \"expected\": [{\"name\": \"get_time\", \"args\": {\"timezone\": \"London\"}}]},\n {\"task\": \"Get the stock price for Tesla.\",\n \"expected\": [{\"name\": \"get_stock\", \"args\": {\"ticker\": \"TSLA\"}}]},\n {\"task\": \"How far is it to drive from New York to Boston?\",\n \"expected\": [{\"name\": \"get_distance\", \"args\": {\"origin\": \"New York\", \"destination\": \"Boston\"}}]},\n {\"task\": \"Convert 50 euros to Japanese yen.\",\n \"expected\": [{\"name\": \"convert_currency\", \"args\": {\"amount\": 50, \"from\": \"EUR\", \"to\": \"JPY\"}}]},\n ],\n \"multiple\": [\n {\"task\": \"What's the weather in Tokyo, and then book a hotel there for 3 nights starting 2026-10-01.\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"Tokyo\"}},\n {\"name\": \"book_hotel\", \"args\": {\"city\": \"Tokyo\", \"check_in\": \"2026-10-01\", \"nights\": 3}}]},\n {\"task\": \"Get the time in Paris, then send an email to <email> with subject 'Paris time'.\",\n \"expected\": [{\"name\": \"get_time\", \"args\": {\"timezone\": \"Paris\"}},\n {\"name\": \"send_email\", \"args\": {\"to\": \"<email>\", \"subject\": \"Paris time\"}}]},\n {\"task\": \"Search flights from SFO to JFK on 2026-11-05, then add a calendar event titled 'Flight SFO-JFK' starting 2026-11-05 14:00.\",\n \"expected\": [{\"name\": \"search_flights\", \"args\": {\"origin\": \"SFO\", \"destination\": \"JFK\", \"date\": \"2026-11-05\"}},\n {\"name\": \"calendar_add\", \"args\": {\"title\": \"Flight SFO-JFK\", \"start\": \"2026-11-05 14:00\"}}]},\n {\"task\": \"What's the weather in Berlin, then convert 20 euros to dollars.\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\"}},\n {\"name\": \"convert_currency\", \"args\": {\"amount\": 20, \"from\": \"EUR\", \"to\": \"USD\"}}]},\n {\"task\": \"Get the stock price of Amazon, then send an email to <email> with subject 'AMZN price'.\",\n \"expected\": [{\"name\": \"get_stock\", \"args\": {\"ticker\": \"AMZN\"}},\n {\"name\": \"send_email\", \"args\": {\"to\": \"<email>\", \"subject\": \"AMZN price\"}}]},\n {\"task\": \"How far is it to drive from Chicago to Detroit, then book a hotel in Detroit for 2 nights starting 2026-12-01.\",\n \"expected\": [{\"name\": \"get_distance\", \"args\": {\"origin\": \"Chicago\", \"destination\": \"Detroit\"}},\n {\"name\": \"book_hotel\", \"args\": {\"city\": \"Detroit\", \"check_in\": \"2026-12-01\", \"nights\": 2}}]},\n {\"task\": \"Translate 'thank you' into Spanish, then send an email to <email> with subject 'Spanish phrase'.\",\n \"expected\": [{\"name\": \"translate\", \"args\": {\"text\": \"thank you\", \"lang\": \"Spanish\"}},\n {\"name\": \"send_email\", \"args\": {\"to\": \"<email>\", \"subject\": \"Spanish phrase\"}}]},\n {\"task\": \"Get the time in Sydney, then add a calendar event titled 'Sydney standup' starting 2026-10-15 09:00.\",\n \"expected\": [{\"name\": \"get_time\", \"args\": {\"timezone\": \"Sydney\"}},\n {\"name\": \"calendar_add\", \"args\": {\"title\": \"Sydney standup\", \"start\": \"2026-10-15 09:00\"}}]},\n {\"task\": \"Search flights from LAX to ORD on 2026-09-20, then get the weather in Chicago.\",\n \"expected\": [{\"name\": \"search_flights\", \"args\": {\"origin\": \"LAX\", \"destination\": \"ORD\", \"date\": \"2026-09-20\"}},\n {\"name\": \"get_weather\", \"args\": {\"city\": \"Chicago\"}}]},\n {\"task\": \"What's the weather in Rome, then convert 30 euros to pounds.\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"Rome\"}},\n {\"name\": \"convert_currency\", \"args\": {\"amount\": 30, \"from\": \"EUR\", \"to\": \"GBP\"}}]},\n ],\n \"parallel\": [\n {\"task\": \"Get the weather in London and the stock price of Microsoft.\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"London\"}},\n {\"name\": \"get_stock\", \"args\": {\"ticker\": \"MSFT\"}}]},\n {\"task\": \"What time is it in New York, and how far is it to drive from New York to Philadelphia?\",\n \"expected\": [{\"name\": \"get_time\", \"args\": {\"timezone\": \"New York\"}},\n {\"name\": \"get_distance\", \"args\": {\"origin\": \"New York\", \"destination\": \"Philadelphia\"}}]},\n {\"task\": \"Convert 40 dollars to yen and get the weather in Tokyo.\",\n \"expected\": [{\"name\": \"convert_currency\", \"args\": {\"amount\": 40, \"from\": \"USD\", \"to\": \"JPY\"}},\n {\"name\": \"get_weather\", \"args\": {\"city\": \"Tokyo\"}}]},\n {\"task\": \"Get the stock price of Google and the time in San Francisco.\",\n \"expected\": [{\"name\": \"get_stock\", \"args\": {\"ticker\": \"GOOGL\"}},\n {\"name\": \"get_time\", \"args\": {\"timezone\": \"San Francisco\"}}]},\n {\"task\": \"Translate 'hello' into German and get the weather in Berlin.\",\n \"expected\": [{\"name\": \"translate\", \"args\": {\"text\": \"hello\", \"lang\": \"German\"}},\n {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\"}}]},\n {\"task\": \"Get the distance from Boston to Washington and the stock price of Netflix.\",\n \"expected\": [{\"name\": \"get_distance\", \"args\": {\"origin\": \"Boston\", \"destination\": \"Washington\"}},\n {\"name\": \"get_stock\", \"args\": {\"ticker\": \"NFLX\"}}]},\n {\"task\": \"What's the weather in Madrid, and convert 25 euros to dollars?\",\n \"expected\": [{\"name\": \"get_weather\", \"args\": {\"city\": \"Madrid\"}},\n {\"name\": \"convert_currency\", \"args\": {\"amount\": 25, \"from\": \"EUR\", \"to\": \"USD\"}}]},\n {\"task\": \"Get the time in Tokyo and the stock price of Sony.\",\n \"expected\": [{\"name\": \"get_time\", \"args\": {\"timezone\": \"Tokyo\"}},\n {\"name\": \"get_stock\", \"args\": {\"ticker\": \"SONY\"}}]},\n {\"task\": \"How far is it to drive from Austin to Houston, and what time is it in Houston?\",\n \"expected\": [{\"name\": \"get_distance\", \"args\": {\"origin\": \"Austin\", \"destination\": \"Houston\"}},\n {\"name\": \"get_time\", \"args\": {\"timezone\": \"Houston\"}}]},\n {\"task\": \"Translate 'see you soon' into French and get the weather in Paris.\",\n \"expected\": [{\"name\": \"translate\", \"args\": {\"text\": \"see you soon\", \"lang\": \"French\"}},\n {\"name\": \"get_weather\", \"args\": {\"city\": \"Paris\"}}]},\n ],\n}\n\nFF = [\n (\"What is 27 times 43?\", \"1161\"),\n (\"What is 17 times 23 plus 45?\", \"436\"),\n (\"How many legs does a spider have?\", \"8\"),\n (\"What is the chemical symbol for gold?\", \"Au\"),\n (\"What is the largest planet in our solar system?\", \"Jupiter\"),\n (\"How many minutes are in 2.5 hours?\", \"150\"),\n (\"What is 15 percent of 200?\", \"30\"),\n (\"What is 143 times 12?\", \"1716\"),\n (\"How many sides does a hexagon have?\", \"6\"),\n (\"What is the boiling point of water in degrees Celsius?\", \"100\"),\n (\"What is the square root of 144?\", \"12\"),\n (\"How many days are in a leap year?\", \"366\"),\n (\"What is 234 times 15 minus 120?\", \"3390\"),\n (\"How many wheels does a typical car have?\", \"4\"),\n (\"What is 45 times 12 plus 67?\", \"607\"),\n]\n\nPROBE_PROMPTS = [\n \"Explain the capital of France in one sentence.\",\n \"What is the meaning of life in one sentence?\",\n \"Describe water in one sentence.\",\n \"What is a computer in one sentence?\",\n \"Describe the sun in one sentence.\",\n \"What is a forest in one sentence?\",\n \"Describe a river in one sentence.\",\n \"What is the sky in one sentence?\",\n \"Describe a mountain in one sentence.\",\n \"What is a cloud in one sentence?\",\n \"Describe the ocean in one sentence.\",\n \"What is a star in one sentence?\",\n \"Describe the moon in one sentence.\",\n \"What is a tree in one sentence?\",\n \"Describe a flower in one sentence.\",\n \"What is the wind in one sentence?\",\n]\n\nTOOL_SCHEMA_JSON = json.dumps(\n [{\"type\": \"function\", \"function\": {\n \"name\": t[\"name\"], \"description\": t[\"description\"],\n \"parameters\": {\"type\": \"object\",\n \"properties\": {k: {\"type\": v} for k, v in t[\"args\"].items()},\n \"required\": list(t[\"args\"].keys())}}}\n for t in TOOLS], ensure_ascii=False)\n\n\n# ---------------------------------------------------------------------------\n# Prompt builders (identical across arms -> controlled comparison)\n# ---------------------------------------------------------------------------\n\ndef tc_messages(case):\n system = (\n \"You are a precise function-calling assistant. You have access to the \"\n \"following tools:\\n\" + TOOL_SCHEMA_JSON + \"\\n\"\n \"Given the user request, respond with ONLY a JSON object of the exact \"\n \"form {\\\"tool_calls\\\": [{\\\"name\\\": <tool_name>, \\\"arguments\\\": {\"\n \"<arg>: <value>, ...}}]}. Call every tool the request requires, in the \"\n \"order implied. Do not output any text outside the JSON object.\"\n )\n return [{\"role\": \"system\", \"content\": system},\n {\"role\": \"user\", \"content\": case[\"task\"]}]\n\n\ndef ff_messages(q):\n return [{\"role\": \"system\", \"content\": \"Answer the question concisely.\"},\n {\"role\": \"user\", \"content\": q}]\n\n\n# ---------------------------------------------------------------------------\n# Grading (pure python, torch-free)\n# ---------------------------------------------------------------------------\n\ndef norm(x):\n if x is None:\n return \"\"\n s = str(x).strip().lower()\n s = re.sub(r\"\\s+\", \" \", s)\n if re.fullmatch(r\"-?\\d+\\.0\", s):\n s = s[:-2]\n return s\n\n\ndef arg_ok(pred_args, k, v):\n if not isinstance(pred_args, dict) or k not in pred_args:\n return False\n return norm(v) in norm(pred_args[k])\n\n\ndef call_matches(pred, exp):\n if not isinstance(pred, dict):\n return False\n if norm(pred.get(\"name\", \"\")) != norm(exp[\"name\"]):\n return False\n for k, v in exp[\"args\"].items():\n if not arg_ok(pred.get(\"arguments\", {}), k, v):\n return False\n return True\n\n\ndef match_calls(pred_calls, exp_calls):\n \"\"\"Greedy order-preserving match. Returns (matched_flags, order_ok).\"\"\"\n used = [False] * len(pred_calls)\n matched = []\n matched_idx = []\n for exp in exp_calls:\n found = -1\n for i, p in enumerate(pred_calls):\n if used[i]:\n continue\n if call_matches(p, exp):\n found = i\n used[i] = True\n break\n matched.append(found >= 0)\n if found >= 0:\n matched_idx.append(found)\n if len(matched_idx) >= 2:\n order_ok = all(matched_idx[i] < matched_idx[i + 1]\n for i in range(len(matched_idx) - 1))\n else:\n order_ok = True\n return matched, order_ok\n\n\ndef extract_tool_calls(text):\n \"\"\"Pull the first JSON object with a tool_calls list out of raw text.\"\"\"\n if not text:\n return []\n t = text.strip()\n # strip common fences\n t = re.sub(r\"^```(?:json)?\\s*\", \"\", t)\n t = re.sub(r\"\\s*```$\", \"\", t)\n # direct parse\n candidates = []\n try:\n obj = json.loads(t)\n candidates.append(obj)\n except Exception:\n pass\n # brace-matched scan\n depth = 0\n start = None\n for i, ch in enumerate(t):\n if ch == \"{\":\n if depth == 0:\n start = i\n depth += 1\n elif ch == \"}\":\n depth -= 1\n if depth == 0 and start is not None:\n candidates.append(t[start:i + 1])\n start = None\n for c in candidates:\n if isinstance(c, str):\n try:\n c = json.loads(c)\n except Exception:\n continue\n if isinstance(c, dict) and isinstance(c.get(\"tool_calls\"), list):\n return [x for x in c[\"tool_calls\"] if isinstance(x, dict)]\n # tolerate a bare list under a different key or top-level list of calls\n # fallback: any list of dicts that look like calls\n for c in candidates:\n if isinstance(c, list):\n return [x for x in c if isinstance(x, dict) and (\"name\" in x)]\n return []\n\n\ndef grade_tc(pred_calls, case):\n matched, order_ok = match_calls(pred_calls, case[\"expected\"])\n mode = case.get(\"mode\", \"simple\")\n covered = all(matched)\n good = covered and (mode != \"multiple\" or order_ok)\n return good, covered, order_ok\n\n\ndef ff_match(resp, exp):\n r = norm(resp)\n e = norm(exp)\n if not e or not r:\n return False\n if e in r.split():\n return True\n try:\n if re.search(r\"(?<![a-z0-9])%s(?![a-z0-9])\" % re.escape(e), r):\n return True\n except re.error:\n pass\n return False\n\n\ndef grader_selftest():\n \"\"\"Sanity-check the grader logic (runs in every mode, incl. SMOKE).\"\"\"\n assert extract_tool_calls('{\"tool_calls\":[{\"name\":\"get_weather\",\"arguments\":{\"city\":\"Paris\"}}]}')\n assert extract_tool_calls('Sure!\\n```json\\n{\"tool_calls\": []}\\n```') == []\n calls = extract_tool_calls('{\"tool_calls\": [{\"name\": \"get_stock\", \"arguments\": {\"ticker\": \"AAPL\"}}]}')\n assert calls and call_matches(calls[0], {\"name\": \"get_stock\", \"args\": {\"ticker\": \"AAPL\"}})\n case = TC[\"simple\"][0]\n pred = extract_tool_calls('{\"tool_calls\": [{\"name\": \"get_weather\", \"arguments\": {\"city\": \"Paris\"}}]}')\n good, covered, _ = grade_tc(pred, case)\n assert good, \"selftest: gold simple case must pass\"\n bad = extract_tool_calls('{\"tool_calls\": [{\"name\": \"get_stock\", \"arguments\": {\"ticker\": \"AAPL\"}}]}')\n g2, _, _ = grade_tc(bad, case)\n assert not g2, \"selftest: wrong tool must fail\"\n assert ff_match(\"The answer is 1161.\", \"1161\")\n assert not ff_match(\"The answer is 116.\", \"1161\")\n assert ff_match(\"Jupiter is the largest.\", \"Jupiter\")\n assert ff_match(\"Gold is Au.\", \"Au\")\n return True\n\n\n# ---------------------------------------------------------------------------\n# S3 model download (proven pattern, matches 2026-08-24/09-10 GPU plans)\n# ---------------------------------------------------------------------------\n\ndef download_model(prefix):\n cfg = os.path.join(MODEL_DIR, \"config.json\")\n if os.path.exists(cfg) and os.path.exists(os.path.join(MODEL_DIR, \"tokenizer_config.json\")):\n log(\"MODEL already present at %s\" % MODEL_DIR)\n return\n endpoint = os.environ.get(\"MLP_S3_ENDPOINT\") or os.environ.get(\"AWS_ENDPOINT_URL\")\n key_id = os.environ.get(\"AWS_ACCESS_KEY_ID\")\n secret = os.environ.get(\"AWS_SECRET_ACCESS_KEY\")\n bucket = os.environ.get(\"S3_BUCKET\", \"ai-platform\")\n if not (endpoint and key_id and secret):\n log(\"FATAL: S3 endpoint/credentials not present in env \"\n \"(need MLP_S3_ENDPOINT or AWS_ENDPOINT_URL + AWS keys)\")\n sys.exit(2)\n import boto3\n s3 = boto3.client(\"s3\", endpoint_url=endpoint,\n region_name=os.environ.get(\"AWS_REGION\", \"ap-northeast-2\"),\n aws_access_key_id=key_id, aws_secret_access_key=secret)\n keys = []\n for page in s3.get_paginator(\"list_objects_v2\").paginate(Bucket=bucket, Prefix=prefix):\n keys += [o[\"Key\"] for o in page.get(\"Contents\", []) if not o[\"Key\"].endswith(\"/\")]\n if not keys:\n log(\"FATAL: no objects under s3://%s/%s\" % (bucket, prefix))\n sys.exit(2)\n t0 = time.time()\n n = 0\n for k in keys:\n rel = k[len(prefix):]\n if not rel:\n continue\n dst = os.path.join(MODEL_DIR, rel)\n os.makedirs(os.path.dirname(dst) or \".\", exist_ok=True)\n s3.download_file(bucket, k, dst)\n n += 1\n log(\"MODEL downloaded %d files from s3://%s/%s in %.0fs\" % (n, endpoint, prefix, time.time() - t0))\n if not os.path.exists(cfg):\n log(\"FATAL: config.json missing after download\")\n sys.exit(2)\n if not (os.path.exists(os.path.join(MODEL_DIR, \"tokenizer_config.json\"))\n or os.path.exists(os.path.join(MODEL_DIR, \"tokenizer.json\"))):\n log(\"FATAL: tokenizer files missing after download (chat template unavailable)\")\n sys.exit(2)\n\n\n# ---------------------------------------------------------------------------\n# Model load / generate / probe (torch imported inside to fail fast on GPU)\n# ---------------------------------------------------------------------------\n\ndef _cuda():\n import torch\n return torch\n\n\ndef load_model(arm):\n torch = _cuda()\n from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig\n tok = AutoTokenizer.from_pretrained(MODEL_DIR, trust_remote_code=True)\n if tok.pad_token_id is None:\n tok.pad_token_id = tok.eos_token_id\n kwargs = dict(device_map=\"auto\", trust_remote_code=True, attn_implementation=\"sdpa\")\n if arm == \"bf16\":\n model = AutoModelForCausalLM.from_pretrained(MODEL_DIR, torch_dtype=torch.bfloat16, **kwargs)\n elif arm == \"int8\":\n model = AutoModelForCausalLM.from_pretrained(\n MODEL_DIR, quantization_config=BitsAndBytesConfig(load_in_8bit=True), **kwargs)\n else: # nf4 (4-bit)\n model = AutoModelForCausalLM.from_pretrained(\n MODEL_DIR,\n quantization_config=BitsAndBytesConfig(load_in_4bit=True,\n bnb_4bit_compute_dtype=torch.bfloat16,\n bnb_4bit_quant_type=\"nf4\"),\n **kwargs)\n model.eval()\n return model, tok\n\n\ndef render(tok, messages):\n try:\n return tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)\n except Exception:\n return \"\".join(\"\\n\" + m[\"role\"].upper() + \":\\n\" + m[\"content\"] for m in messages)\n\n\ndef gen(model, tok, messages, max_new):\n torch = _cuda()\n text = render(tok, messages)\n inputs = tok(text, return_tensors=\"pt\").to(model.device)\n with torch.no_grad():\n out = model.generate(**inputs, max_new_tokens=max_new, do_sample=False,\n temperature=1.0, top_p=1.0, pad_token_id=tok.eos_token_id)\n gen_ids = out[0][inputs[\"input_ids\"].shape[1]:]\n return tok.decode(gen_ids, skip_special_tokens=True)\n\n\ndef probe_throughput(model, tok):\n torch = _cuda()\n prompts = PROBE_PROMPTS[:PROBE_N]\n msgs = [[{\"role\": \"user\", \"content\": p}] for p in prompts]\n texts = [render(tok, mm) for mm in msgs]\n inputs = tok(texts, return_tensors=\"pt\", padding=True).to(model.device)\n in_len = int(inputs[\"input_ids\"].shape[1])\n model.eval()\n with torch.no_grad():\n if torch.cuda.is_available():\n torch.cuda.synchronize()\n t0 = time.time()\n out = model.generate(**inputs, max_new_tokens=PROBE_MAX_NEW, do_sample=False,\n temperature=1.0, top_p=1.0, pad_token_id=tok.eos_token_id)\n if torch.cuda.is_available():\n torch.cuda.synchronize()\n dt = time.time() - t0\n gen_region = out[:, in_len:]\n if tok.pad_token_id is not None:\n total_new = int((gen_region != tok.pad_token_id).sum().item())\n else:\n total_new = int(gen_region.shape[0] * gen_region.shape[1])\n total_new = max(total_new, 1)\n return total_new / max(dt, 1e-6), dt\n\n\n# ---------------------------------------------------------------------------\n# Per-arm run\n# ---------------------------------------------------------------------------\n\ndef run_arm(arm):\n torch = _cuda()\n t0 = time.time()\n model, tok = load_model(arm)\n n_params = int(sum(p.numel() for p in model.parameters()))\n bytes_per = {\"bf16\": 2.0, \"int8\": 1.0, \"nf4\": 0.5}[arm]\n footprint_gb = round(n_params * bytes_per / 1e9, 2)\n\n # ---- tool-call ----\n tc_total = tc_ok = 0\n by_mode = {}\n tc_wall = 0.0\n for mode in [\"simple\", \"multiple\", \"parallel\"]:\n cases = TC[mode][:N_TC]\n ok = 0\n for c in cases:\n if not deadline_left():\n break\n c = dict(c); c[\"mode\"] = mode\n gt = time.time()\n resp = gen(model, tok, tc_messages(c), MAX_TOKENS_TC)\n dt = time.time() - gt\n tc_wall += dt\n pred = extract_tool_calls(resp)\n good, covered, order_ok = grade_tc(pred, c)\n if good:\n ok += 1\n by_mode[mode] = {\"n\": len(cases), \"ok\": ok}\n tc_total += len(cases)\n tc_ok += ok\n\n # ---- freeform control ----\n ff_total = ff_ok = 0\n ff_wall = 0.0\n for q, a in FF[:N_FF]:\n if not deadline_left():\n break\n gt = time.time()\n resp = gen(model, tok, ff_messages(q), MAX_TOKENS_FF)\n ff_wall += time.time() - gt\n ff_total += 1\n if ff_match(resp, a):\n ff_ok += 1\n\n # ---- throughput probe (relative compute cost) ----\n tokps, probe_dt = probe_throughput(model, tok)\n\n # free resources before next arm\n del model\n gc.collect()\n if torch.cuda.is_available():\n torch.cuda.empty_cache()\n\n tc_pct = round(100.0 * tc_ok / tc_total, 1) if tc_total else None\n ff_pct = round(100.0 * ff_ok / ff_total, 1) if ff_total else None\n return {\n \"arm\": arm,\n \"n_params\": n_params,\n \"weight_footprint_gb\": footprint_gb,\n \"load_s\": round(time.time() - t0, 1),\n \"tool_call_pct\": tc_pct,\n \"tool_call_n\": tc_total,\n \"tool_call_ok\": tc_ok,\n \"tool_call_by_mode\": {\n mm: {\"n\": v[\"n\"], \"ok\": v[\"ok\"],\n \"pct\": round(100.0 * v[\"ok\"] / v[\"n\"], 1) if v[\"n\"] else None}\n for mm, v in by_mode.items()},\n \"freeform_pct\": ff_pct,\n \"freeform_n\": ff_total,\n \"freeform_ok\": ff_ok,\n \"throughput_tok_s\": round(tokps, 3),\n \"probe_wall_s\": round(probe_dt, 2),\n \"tool_call_wall_s\": round(tc_wall, 2),\n \"gpu_s_per_correct_toolcall\": round(tc_wall / tc_ok, 3) if tc_ok else None,\n \"gpu_s_per_correct_freeform\": round(ff_wall / ff_ok, 3) if ff_ok else None,\n \"est_usd_per_correct_toolcall\":\n round(tc_wall / tc_ok / 3600.0 * H200_USD_HR, 6) if tc_ok else None,\n \"est_usd_per_correct_freeform\":\n round(ff_wall / ff_ok / 3600.0 * H200_USD_HR, 6) if ff_ok else None,\n }\n\n\n# ---------------------------------------------------------------------------\n# Cliff analysis\n# ---------------------------------------------------------------------------\n\ndef _pct(arm_dict, key):\n if not isinstance(arm_dict, dict):\n return None\n return arm_dict.get(key)\n\n\ndef compute_cliff(arms):\n out = {}\n base = arms.get(\"bf16\")\n if not isinstance(base, dict) or base.get(\"tool_call_pct\") is None:\n out[\"status\"] = \"insufficient (no bf16 baseline)\"\n return out\n\n def decay(low_arm, kind):\n b = _pct(base, kind)\n l = _pct(arms.get(low_arm), kind)\n if b is None or l is None:\n return None\n return round(b - l, 1)\n\n for low, tag in ((\"int8\", \"8bit\"), (\"nf4\", \"4bit\")):\n low_arm = arms.get(low)\n if not isinstance(low_arm, dict) or low_arm.get(\"tool_call_pct\") is None:\n out[tag] = {\"status\": \"arm %s did not run / errored\" % low}\n continue\n d_tool = decay(low, \"tool_call_pct\")\n d_ff = decay(low, \"freeform_pct\")\n ratio = None\n if d_tool is not None and d_ff is not None and d_ff > 0:\n ratio = round(d_tool / d_ff, 3)\n out[tag] = {\n \"status\": \"measured\",\n \"bf16_toolcall_pct\": base.get(\"tool_call_pct\"),\n \"%s_toolcall_pct\" % low: low_arm.get(\"tool_call_pct\"),\n \"bf16_freeform_pct\": base.get(\"freeform_pct\"),\n \"%s_freeform_pct\" % low: low_arm.get(\"freeform_pct\"),\n \"toolcall_decay_pp\": d_tool,\n \"freeform_decay_pp\": d_ff,\n \"cliff_ratio_toolcall_over_freeform\": ratio,\n \"cliff_present\": (ratio is not None and ratio > 1.0),\n \"note\": \"cliff_ratio>1 => tool-call (structured) accuracy falls more than \"\n \"freeform under %s quantization\" % tag,\n }\n\n # pareto: accuracy vs cost per arm\n pareto = []\n for arm_name, a in arms.items():\n if not isinstance(a, dict):\n continue\n pareto.append({\n \"arm\": arm_name,\n \"toolcall_pct\": a.get(\"tool_call_pct\"),\n \"freeform_pct\": a.get(\"freeform_pct\"),\n \"weight_gb\": a.get(\"weight_footprint_gb\"),\n \"throughput_tok_s\": a.get(\"throughput_tok_s\"),\n \"gpu_s_per_correct_toolcall\": a.get(\"gpu_s_per_correct_toolcall\"),\n })\n out[\"pareto\"] = pareto\n out[\"cited_27b_nvfp4_baseline\"] = {\n \"source\": \"lab 27B NVFP4 teacher, BFCL simple, 2026-09-05, same grader family\",\n \"simple_acc_pct\": 90.8,\n \"note\": \"external 4-bit anchor only; the in-cluster cliff is measured on Qwen3-14B \"\n \"(largest dense model in S3 allowlist) across bf16/int8/nf4 because no 27B \"\n \"BF16/FP8 checkpoint is S3-resident.\"\n }\n return out\n\n\n# ---------------------------------------------------------------------------\n# Results\n# ---------------------------------------------------------------------------\n\ndef write_results(results):\n payload = json.dumps(results, ensure_ascii=False, indent=2)\n (WORK / \"results.json\").write_text(payload)\n log(\"RESULTS_WRITTEN /work/results.json\")\n if str(WORK) != \"/tmp/work\" and Path(\"/tmp/work\").exists():\n try:\n (Path(\"/tmp/work\") / \"results.json\").write_text(payload)\n log(\"RESULTS_MIRRORED /tmp/work/results.json\")\n except Exception as e:\n log(\"mirror failed (non-fatal): %r\" % e)\n\n\ndef main():\n t_start = time.time()\n grader_selftest()\n log(\"START tool-call-quant-cliff smoke=%s arms=%s n_tc=%d n_ff=%d\" %\n (SMOKE, ARMS, N_TC, N_FF))\n log(\"GPU: \" + (os.environ.get(\"NVIDIA_VISIBLE_DEVICES\", \"?\") or \"?\"))\n prefix = SMOKE_PREFIX if SMOKE else REAL_PREFIX\n try:\n download_model(prefix)\n except SystemExit as e:\n log(\"DOWNLOAD FAILED: %r\" % e)\n if SMOKE:\n sys.exit(2) # gate must fail loudly if the path is broken\n write_results({\n \"smoke\": False,\n \"model_s3\": prefix,\n \"error\": \"S3 model download failed (see log); no measurements produced.\",\n \"arms\": {},\n \"cliff\": {\"status\": \"no data (download failed)\"},\n \"elapsed_min\": round((time.time() - t_start) / 60.0, 1),\n })\n sys.exit(2)\n arms = {}\n for arm in ARMS:\n if (time.time() - t_start) > TOTAL_DEADLINE_S - 60:\n log(\"DEADLINE: skipping remaining arm %s\" % arm)\n break\n log(\"ARM %s begin\" % arm)\n try:\n arms[arm] = run_arm(arm)\n a = arms[arm]\n log(\"ARM %s done: toolcall=%s%% ff=%s%% tok/s=%s footprint=%sGB\" %\n (arm, a.get(\"tool_call_pct\"), a.get(\"freeform_pct\"),\n a.get(\"throughput_tok_s\"), a.get(\"weight_footprint_gb\")))\n except Exception as e:\n import traceback\n traceback.print_exc()\n log(\"ARM %s FAILED: %r\" % (arm, e))\n arms[arm] = {\"error\": repr(e)}\n results = {\n \"smoke\": SMOKE,\n \"model_s3\": prefix,\n \"real_model\": \"global/models/Qwen/Qwen3-14B\",\n \"protocol\": \"JSON tool-call (BFCL-style simple/multiple/parallel, %d each) vs \"\n \"freeform factual control (%d); temp-0; identical prompt across arms\"\n % (N_TC, N_FF),\n \"arms\": arms,\n \"cliff\": compute_cliff(arms),\n \"elapsed_min\": round((time.time() - t_start) / 60.0, 1),\n }\n if SMOKE:\n log(\"SMOKE summary: \" + json.dumps(\n {a: (v.get(\"tool_call_pct\") if isinstance(v, dict) else \"ERR\")\n for a, v in arms.items()}, ensure_ascii=False))\n log(\"SMOKE_OK\")\n return\n write_results(results)\n\n\nif __name__ == \"__main__\":\n main()\n",
|
| 17 |
+
"run": "cd /work && python3 -u exp.py",
|
| 18 |
+
"timeout_min": 30
|
| 19 |
+
},
|
| 20 |
+
"metric": "Tool-call accuracy (BFCL-style simple/multiple/parallel) and freeform factual accuracy per precision (bf16/int8/nf4 = 16/8/4-bit) on one H200; headline is the accuracy decay (bf16 minus low-bit) and cliff_ratio = tool-call decay over freeform decay; plus serving compute cost per precision (throughput tok/s, weight GB, GPU-seconds per correct output) to place the accuracy tax on the cost frontier.",
|
| 21 |
+
"rationale": "Holding Qwen3-14B (the largest dense model in the in-cluster S3 allowlist; the topic's 27B NVFP4 90.8%-simple baseline is cited, not re-measured, because no 27B BF16/FP8 checkpoint is S3-resident and the cliff needs one model at >=2 precisions) fixed on a single H200, this dynamically quantizes the same checkpoint to bf16/int8/nf4 (16/8/4-bit) and runs an identical temperature-0 harness over BFCL-style simple/multiple/parallel tool-calls against a freeform factual control, so the structured-vs-prose quantization sensitivity (the tool-call cliff) is isolated from model and task confounds. It also records throughput, weight footprint, and GPU-seconds-per-correct-output per precision so the measured accuracy tax can be placed on the serving cost frontier that decides whether 4-bit agentic serving is safe or must be precision-tier routed."
|
| 22 |
+
}
|
experiments/provenance.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "ok",
|
| 3 |
+
"bundled": [],
|
| 4 |
+
"unresolved_refs": [],
|
| 5 |
+
"n_evidence_numbers": 46,
|
| 6 |
+
"unreproducible_from_bundled_evidence": [
|
| 7 |
+
{
|
| 8 |
+
"value": "800",
|
| 9 |
+
"where": "abstract.txt"
|
| 10 |
+
}
|
| 11 |
+
],
|
| 12 |
+
"limitation": "integers <100 and decimals are not cross-checked (coincidental matches make them uninformative)"
|
| 13 |
+
}
|
experiments/results.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run": false,
|
| 3 |
+
"status": "skipped",
|
| 4 |
+
"reason": "preflight VERDICT: NO-GO (see runner.log)",
|
| 5 |
+
"note": "not run — preflight gate blocked submission before spending cluster time"
|
| 6 |
+
}
|
figures-spec.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"figures": [
|
| 3 |
+
{
|
| 4 |
+
"id": "fig1-cliff-shape",
|
| 5 |
+
"kind": "line",
|
| 6 |
+
"title": "Predicted tool-call accuracy cliff across precision tiers",
|
| 7 |
+
"caption": "Schematic of the predicted pass rate against weight bit width: the tool-call arm drops steeply from 8 to 4 bits while the free-form control decays gently.",
|
| 8 |
+
"note": "Analytical model (not measured): schematic illustration of the Item P2 prediction (superlinear 8-to-4-bit tax jump); axis values are illustrative and are not measurements or formula outputs.",
|
| 9 |
+
"xlabel": "weight bit width",
|
| 10 |
+
"ylabel": "pass rate (relative, illustrative)",
|
| 11 |
+
"labels": [
|
| 12 |
+
"16-bit (BF16)",
|
| 13 |
+
"8-bit (FP8)",
|
| 14 |
+
"4-bit (NVFP4)"
|
| 15 |
+
],
|
| 16 |
+
"series": [
|
| 17 |
+
{
|
| 18 |
+
"name": "tool call (AST-contract graded)",
|
| 19 |
+
"values": [
|
| 20 |
+
97.0,
|
| 21 |
+
95.0,
|
| 22 |
+
88.0
|
| 23 |
+
]
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"name": "free-form prose (control)",
|
| 27 |
+
"values": [
|
| 28 |
+
97.0,
|
| 29 |
+
96.5,
|
| 30 |
+
95.5
|
| 31 |
+
]
|
| 32 |
+
}
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"id": "fig2-amplification-chain",
|
| 37 |
+
"kind": "flow",
|
| 38 |
+
"title": "Amplification chain from quantization noise to workflow error",
|
| 39 |
+
"caption": "Quantization noise flips low-margin structural decode steps, which accumulate into case-level contract mismatches and, for tool calls, downstream workflow failures.",
|
| 40 |
+
"note": "Analytical model (not measured): qualitative structure of the case-level amplification bound (Proposition 2); no numerical values are shown or claimed.",
|
| 41 |
+
"xlabel": "",
|
| 42 |
+
"ylabel": "",
|
| 43 |
+
"labels": [
|
| 44 |
+
"Low-bit quantization noise (sigma_q)",
|
| 45 |
+
"Low-margin structural-step flips: argument value, call count, function name",
|
| 46 |
+
"Case-level AST-contract mismatch",
|
| 47 |
+
"Downstream workflow error: retry, dead end, or user-visible failure"
|
| 48 |
+
]
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"id": "fig3-cost-ratio",
|
| 52 |
+
"kind": "bar",
|
| 53 |
+
"title": "Ideal per-case cost ratio across precision tiers (batch-1, bandwidth-bound)",
|
| 54 |
+
"caption": "In the decode-bound batch-1 regime on H200, per-case GPU-seconds scale roughly with weight bit width, giving an ideal 1:2:4 ratio between the NVFP4, FP8, and BF16 re-encodings.",
|
| 55 |
+
"note": "Analytical model (not measured): ideal upper bound on the bandwidth saving; kernel overhead, block scales, and the Hopper dequantization path lower the realized ratios, which protocol arms A-C measure.",
|
| 56 |
+
"xlabel": "precision tier (same 27B checkpoint)",
|
| 57 |
+
"ylabel": "per-case GPU-s (relative, ideal)",
|
| 58 |
+
"labels": [
|
| 59 |
+
"NVFP4 (4-bit)",
|
| 60 |
+
"FP8 (8-bit)",
|
| 61 |
+
"BF16 (16-bit)"
|
| 62 |
+
],
|
| 63 |
+
"values": [
|
| 64 |
+
1.0,
|
| 65 |
+
2.0,
|
| 66 |
+
4.0
|
| 67 |
+
]
|
| 68 |
+
}
|
| 69 |
+
]
|
| 70 |
+
}
|
figures/fig1-cliff-shape.png
ADDED
|
Git LFS Details
|
figures/fig1-cliff-shape.tex
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
% This file was created with matplot2tikz v0.5.4.
|
| 2 |
+
\begin{tikzpicture}
|
| 3 |
+
\begin{axis}[legend entries={{tool call (AST-contract graded)},{free-form prose (control)}},
|
| 4 |
+
height=6.8cm,
|
| 5 |
+
legend cell align={left},
|
| 6 |
+
legend columns=2,
|
| 7 |
+
legend style={
|
| 8 |
+
fill opacity=1.0,
|
| 9 |
+
draw opacity=1,
|
| 10 |
+
text opacity=1,
|
| 11 |
+
at={(0.5,-0.18)},
|
| 12 |
+
anchor=north,
|
| 13 |
+
draw=none
|
| 14 |
+
},
|
| 15 |
+
tick pos=both,
|
| 16 |
+
width=\linewidth,
|
| 17 |
+
xlabel={weight bit width},
|
| 18 |
+
xmajorgrids,
|
| 19 |
+
xmin=-0.1, xmax=2.1,
|
| 20 |
+
xtick style={color=black},
|
| 21 |
+
xtick={0,1,2},
|
| 22 |
+
xticklabels={16-bit (BF16),8-bit (FP8),4-bit (NVFP4)},
|
| 23 |
+
ylabel={pass rate (relative, illustrative)},
|
| 24 |
+
ymajorgrids,
|
| 25 |
+
ymin=87.55, ymax=97.45,
|
| 26 |
+
ytick style={color=black},
|
| 27 |
+
ytick={86,88,90,92,94,96,98},
|
| 28 |
+
yticklabels={
|
| 29 |
+
\(\displaystyle {86}\),
|
| 30 |
+
\(\displaystyle {88}\),
|
| 31 |
+
\(\displaystyle {90}\),
|
| 32 |
+
\(\displaystyle {92}\),
|
| 33 |
+
\(\displaystyle {94}\),
|
| 34 |
+
\(\displaystyle {96}\),
|
| 35 |
+
\(\displaystyle {98}\)
|
| 36 |
+
}
|
| 37 |
+
]
|
| 38 |
+
\addplot [black, mark=o, mark size=1.5, mark options={solid,fill opacity=0}]
|
| 39 |
+
table {%
|
| 40 |
+
0 97
|
| 41 |
+
1 95
|
| 42 |
+
2 88
|
| 43 |
+
};
|
| 44 |
+
\addplot [black, dashed, mark=square, mark size=1.5, mark options={solid,fill opacity=0}]
|
| 45 |
+
table {%
|
| 46 |
+
0 97
|
| 47 |
+
1 96.5
|
| 48 |
+
2 95.5
|
| 49 |
+
};
|
| 50 |
+
\end{axis}
|
| 51 |
+
\end{tikzpicture}
|
figures/fig3-cost-ratio.png
ADDED
|
Git LFS Details
|
figures/fig3-cost-ratio.tex
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
% This file was created with matplot2tikz v0.5.4.
|
| 2 |
+
\begin{tikzpicture}
|
| 3 |
+
\definecolor{figc0}{HTML}{1B4F72}
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
\begin{axis}[
|
| 7 |
+
height=5.0cm,
|
| 8 |
+
tick pos=both,
|
| 9 |
+
width=\linewidth,
|
| 10 |
+
xlabel={per-case GPU-s (relative, ideal)},
|
| 11 |
+
xmajorgrids,
|
| 12 |
+
xmin=0, xmax=4.2,
|
| 13 |
+
xtick style={color=black},
|
| 14 |
+
xtick={0,0.5,1,1.5,2,2.5,3,3.5,4,4.5},
|
| 15 |
+
xticklabels={
|
| 16 |
+
\(\displaystyle {0.0}\),
|
| 17 |
+
\(\displaystyle {0.5}\),
|
| 18 |
+
\(\displaystyle {1.0}\),
|
| 19 |
+
\(\displaystyle {1.5}\),
|
| 20 |
+
\(\displaystyle {2.0}\),
|
| 21 |
+
\(\displaystyle {2.5}\),
|
| 22 |
+
\(\displaystyle {3.0}\),
|
| 23 |
+
\(\displaystyle {3.5}\),
|
| 24 |
+
\(\displaystyle {4.0}\),
|
| 25 |
+
\(\displaystyle {4.5}\)
|
| 26 |
+
},
|
| 27 |
+
y dir=reverse,
|
| 28 |
+
ylabel={precision tier (same 27B checkpoint)},
|
| 29 |
+
ymajorgrids,
|
| 30 |
+
ymin=-0.54, ymax=2.54,
|
| 31 |
+
ytick style={color=black},
|
| 32 |
+
ytick={0,1,2},
|
| 33 |
+
yticklabels={NVFP4 (4-bit),FP8 (8-bit),BF16 (16-bit)}
|
| 34 |
+
]
|
| 35 |
+
\draw[draw=black,line width=0.36pt,fill=figc0] (axis cs:0,-0.4) rectangle (axis cs:1,0.4);
|
| 36 |
+
\draw[draw=black,line width=0.36pt,fill=figc0] (axis cs:0,0.6) rectangle (axis cs:2,1.4);
|
| 37 |
+
\draw[draw=black,line width=0.36pt,fill=figc0] (axis cs:0,1.6) rectangle (axis cs:4,2.4);
|
| 38 |
+
\end{axis}
|
| 39 |
+
\end{tikzpicture}
|
figures/manifest.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "fig1-cliff-shape",
|
| 4 |
+
"type": "tex",
|
| 5 |
+
"file": "figures/fig1-cliff-shape.tex",
|
| 6 |
+
"image": "figures/fig1-cliff-shape.png",
|
| 7 |
+
"include": "\\input{figures/fig1-cliff-shape.tex}",
|
| 8 |
+
"title": "Predicted tool-call accuracy cliff across precision tiers",
|
| 9 |
+
"caption": "Schematic of the predicted pass rate against weight bit width: the tool-call arm drops steeply from 8 to 4 bits while the free-form control decays gently. (Analytical model (not measured))",
|
| 10 |
+
"note": "Analytical model (not measured)"
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"id": "fig3-cost-ratio",
|
| 14 |
+
"type": "tex",
|
| 15 |
+
"file": "figures/fig3-cost-ratio.tex",
|
| 16 |
+
"image": "figures/fig3-cost-ratio.png",
|
| 17 |
+
"include": "\\input{figures/fig3-cost-ratio.tex}",
|
| 18 |
+
"title": "Ideal per-case cost ratio across precision tiers (batch-1, bandwidth-bound)",
|
| 19 |
+
"caption": "In the decode-bound batch-1 regime on H200, per-case GPU-seconds scale roughly with weight bit width, giving an ideal 1:2:4 ratio between the NVFP4, FP8, and BF16 re-encodings. (Analytical model (not measured))",
|
| 20 |
+
"note": "Analytical model (not measured)"
|
| 21 |
+
}
|
| 22 |
+
]
|
main.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:862e0259f626f83ffb2fb55ff3156bc2530c715b4e693aeaa8ac724d01c4a781
|
| 3 |
+
size 132459
|
main.tex
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\documentclass[10pt,twocolumn]{article}
|
| 2 |
+
\usepackage[margin=0.75in]{geometry}
|
| 3 |
+
\usepackage{amsmath}
|
| 4 |
+
\usepackage{amssymb}
|
| 5 |
+
\usepackage{amsthm}
|
| 6 |
+
\usepackage{booktabs}
|
| 7 |
+
\usepackage{cite}
|
| 8 |
+
\usepackage{hyperref}
|
| 9 |
+
\usepackage{times}
|
| 10 |
+
\newtheorem{definition}{Definition}
|
| 11 |
+
\newtheorem{lemma}{Lemma}
|
| 12 |
+
\newtheorem{proposition}{Proposition}
|
| 13 |
+
\newtheorem{corollary}{Corollary}
|
| 14 |
+
\hypersetup{colorlinks=true, linkcolor=blue, citecolor=blue, urlcolor=blue}
|
| 15 |
+
|
| 16 |
+
\title{The Tool-Call Cliff: Measuring the Accuracy Decay of Agentic Structured Output Under Low-Bit Quantization in Self-Hosted H200 Serving}
|
| 17 |
+
\author{ThakiCloud AI Research (Hyojung Han)}
|
| 18 |
+
\date{September 2026}
|
| 19 |
+
|
| 20 |
+
\usepackage{graphicx}
|
| 21 |
+
\usepackage{pgfplots}\pgfplotsset{compat=1.18}
|
| 22 |
+
\usetikzlibrary{patterns,arrows.meta}
|
| 23 |
+
\usepackage{xcolor}
|
| 24 |
+
|
| 25 |
+
\begin{document}
|
| 26 |
+
\maketitle
|
| 27 |
+
\begin{abstract}
|
| 28 |
+
Self-hosted agentic fleets increasingly run on low-bit checkpoints, yet whether structured tool calls decay more than free-form prose under NVFP4 or 8-bit re-encodings has been answerable only with free-form and perplexity evidence. We formalize the gap as a precision cliff: at a fixed 27B dense model, a temperature-0 harness, and single-H200 serving, we define the tool-call accuracy tax $\tau_q$ and the cliff ratio $\kappa_q = \tau_q(\mathrm{tc}) \,/\, \max(\tau_q(\mathrm{ff}), \varepsilon_0)$, and, under symmetric-quantization noise and a low-margin structural-step assumption, show that case-level failure amplifies with the number of mandatory structural decode steps. The formalization predicts (P1) a characteristic per-category failure-mode composition and (P2) a superlinear tax jump from 8 to 4 bits. A previously measured in-house NVFP4 reference row (800 tool-call cases; 89.6\% overall) serves as an ex-ante consistency check of these predictions. We then price the cliff: a task-type-aware break-even extends our precision-tier routing from the request-difficulty axis to the task-type axis, and a falsifiable four-arm protocol with refutation criteria R1--R4 specifies the BF16, FP8, NVFP4, and free-form-control measurements on the declared platform. We are explicit that this is an analytical and positional paper. The work extends the difficulty axis of~\cite{thaki2026precisiontier} with the task-type axis, complements the reasoning-token axis (same model and harness)~\cite{thaki2026verbosity} and the retriever-side quantization result~\cite{thaki2026gatekeeper}; together the three axes are priced on the same token factory.
|
| 29 |
+
\end{abstract}
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
\section{Introduction}
|
| 33 |
+
\label{sec:tc-intro}
|
| 34 |
+
|
| 35 |
+
A self-hosted agent fleet runs unattended. At every turn the model either writes free-form prose or emits a structured tool call whose function name, arguments, and call count are consumed by downstream code, and a single wrong token in that call can break the workflow. The operator's economic unit is the correctly resolved request, not the token. On a single H200 node serving a 27B dense checkpoint, the cheapest cost lever is the weight precision tier: batch-1 decoding is bandwidth-bound, so per-case GPU-seconds scale roughly with the number of weight bytes, and an ideal $1\!:\!2\!:\!4$ ratio holds between NVFP4, FP8, and BF16 re-encodings of the same checkpoint. Quantization is the first knob an operator turns when the serving fleet must absorb more agent traffic without adding GPUs.
|
| 36 |
+
|
| 37 |
+
The decision question is concrete: is 4-bit safe for tool calls? Today it is answerable only with free-form and perplexity evidence. Compression benchmarks report language-model perplexity and NLU accuracy and leave agentic capability, workflow execution, tool use, long-context interaction, and real-world applicability out of scope~\cite{dong2025compressed}. The closest external measurement reports flat standard success scores under 16/8/4-bit weights while failure modes quietly amplify~\cite{jang2026flatscore}; a flat score answers whether the aggregate moved, not which requests broke, and it does not separate tool-call requests from free-form prose. Low-bit post-training quantization also hides test-time compute in reasoning-token inflation that final-answer accuracy misses~\cite{lian2026quantization}, so even the accuracy column of such a study needs a per-case token audit. None of this evidence tells the operator whether the tool-call slice specifically degrades, at which precision boundary, by how much, and whether that degradation is priced by the bandwidth saving.
|
| 38 |
+
|
| 39 |
+
We make the question precise. Fix a single 27B dense Qwen3-family checkpoint, re-encoded in three tiers, BF16, FP8, and NVFP4, of the same parameters. Fix a deterministic temperature-0 serving harness on one H200, with one chat template, one max-token cap, and the thinking mode of the Qwen3 hybrid toggle held off~\cite{yang2025qwen3}. Against this fixed point we contrast two request types: tool-call requests in three BFCL-style categories (simple, multiple, parallel) graded by AST contract, and free-form factual prose graded for factuality. The object of study is the accuracy tax each lower tier charges on each type, and the ratio of the two, the tool-call cliff, as a function of precision. Holding thinking off isolates the precision axis from the reasoning-token axis, which a companion paper prices on the same model family and harness~\cite{thaki2026verbosity}.
|
| 40 |
+
|
| 41 |
+
The question is not whether 4-bit is usable in general; it is whether the tool-call slice crosses a tolerance boundary at a precision where the free-form slice does not. A tool call is not prose with a different topic. A wrong argument breaks the downstream workflow with its retry cost and its user-visible failure; a prose error is locally absorbable. The two request types sit on different quality-cost frontiers, and the protocol is built to decide between the two answers: 4-bit is safe for tool calls, or price the tax and route around it.
|
| 42 |
+
|
| 43 |
+
The contribution is a formalization and a falsifiable protocol, stated in three axes. For the company: we define the break-even condition under which a uniform NVFP4 fleet is cost-optimal for the tool-call slice, and the two-tier task-type routing policy that dominates it otherwise; the standing decision then reduces to one measured quantity, the 4-bit tool-call tax, and one measured cost ratio. For society: an unattended agent fleet is a standing 24/7 load, and the difference between a uniform fleet and a type-aware fleet is a permanent share of the serving bill, which decides which teams can host which agents. For science: we give a step-level flip model for the structural decode steps of a tool call, a case-level amplification bound, and a cliff ratio with two falsifiable predictions, a per-category failure-mode composition and a superlinear tax jump from 8 to 4 bits, together with a four-arm measurement protocol whose refutation criteria are stated before the measurement.
|
| 44 |
+
|
| 45 |
+
The measurement protocol (Sec.~\ref{sec:tc-protocol}) has one previously measured arm: our in-house NVFP4 reference row of Table~\ref{tab:tc-anchor}, recorded 2026-09-05 under the protocol's harness; we use this row as an ex-ante consistency check of the formalization (Sec.~\ref{sec:tc-formal}). The BF16 and FP8 arms and the free-form control are specified in Sec.~\ref{sec:tc-protocol}. The formalization extends our prior precision-tier routing work, which prices the request-difficulty axis of precision selection and left the task-type axis, tool-call versus free-form, invisible~\cite{thaki2026precisiontier}.
|
| 46 |
+
|
| 47 |
+
\section{Related Work}
|
| 48 |
+
\label{sec:tc-related}
|
| 49 |
+
|
| 50 |
+
\subsection{Compression and Agentic Capability}
|
| 51 |
+
\label{sec:tc-rw-agentic}
|
| 52 |
+
|
| 53 |
+
The compression literature measures what the operator does not bill for. Standard benchmarks make the same scope choice~\cite{dong2025compressed}: perplexity and NLU accuracy are reported, and agentic capability is out of scope. The nearest external measurement of our object is the flat-score result~\cite{jang2026flatscore}: on $\tau^2$-bench across 8 cells $\times$ 456 episodes at 16/8/4-bit weights, the standard success score shows no significant change, so the quantized fleet looks lossless on the aggregate, while failure modes are amplified. That study lacks a free-form control that separates tool-call degradation from general degradation, a per-precision decomposition of which adjacent tier boundary does the damage, and a cost-side break-even that asks whether the accuracy tax exceeds the bandwidth saving; those three gaps are the specification of what a precision study of tool calling must report. The mechanism is consistent with two further results: quantization errors compound across iterations in recursive reasoners~\cite{jim2026recursive}, and an agent loop is a recursive use of the model; and low-bit post-training quantization hides test-time compute in reasoning-token inflation that final-answer accuracy misses~\cite{lian2026quantization}. On the capability side, small reasoning models are strong instruction followers in function calling relative to native function-call fine-tuning or RL~\cite{taheri2026small}; our 27B dense checkpoint sits in this regime, and the tool-call behavior we study is an instruction-following behavior whose fidelity is per-token, exactly what low-bit re-encoding perturbs.
|
| 54 |
+
|
| 55 |
+
\subsection{Low-Precision Inference and NVFP4}
|
| 56 |
+
\label{sec:tc-rw-nvfp4}
|
| 57 |
+
|
| 58 |
+
The NVFP4 tier of the protocol is a GPTQ post-training quantization~\cite{frantar2022gptq} of the same checkpoint, and the 4-bit microscaling literature is active at the boundary we operate on. Augmented residual channels target the NVFP4 PTQ damage that rotation methods inflict when they compromise the finite format~\cite{meng2026arcquant}; outlier-companion grouping addresses the case in which activation outliers dominate the block scale and degrade the values that share it~\cite{ocgquant2026ocg}; and a study of the hybrid Qwen3.8-27B applied NVFP4 W4A4 to the recurrent (Gated DeltaNet) half, where early 4-bit attempts had to leave the decay and write gates at 8/16-bit, evidence that 4-bit robustness is layer-heterogeneous~\cite{kozyrev2026gdn}. That last result is a direct caution against any blanket 4-bit claim on this model family, and it is one reason the protocol keeps the BF16 and FP8 arms rather than testing 4-bit alone. Complementary axes of the same serving path: extreme low-precision KV-cache quantization for agentic inference under long context and structured multi-turn tool calling~\cite{shen2026triaxialkv} (the cache side, which we hold at BF16), and activation-aware test-time quantization that needs no calibration data~\cite{koikeakino2026ttq}. And because quantization bias emerges differently across models and precision levels, a two-precision comparison misses the level effect~\cite{rath2026quantbias} --- one more reason the protocol keeps three tiers rather than a single 4-bit-vs-BF16 contrast. On the QAT line, loss-aware reconstruction lowers the QAT loss floor, and the position that PTQ is brittle and QAT essential at low precision~\cite{counathe2026quasar} bounds our scope: all tiers here are PTQ, and the QAT question is open (Sec.~\ref{sec:tc-limit}). For the MoE counterpart, routing-consistent quantization aligns value and structure so that the dispatch decision survives compression~\cite{park2026vsraq}; our model is dense, but the principle, preserve the decision tokens, is the one the structural-token model of Sec.~\ref{sec:tc-formal} formalizes.
|
| 59 |
+
|
| 60 |
+
\subsection{Function Calling, Structured Output, and Decoding}
|
| 61 |
+
\label{sec:tc-rw-structure}
|
| 62 |
+
|
| 63 |
+
The evaluation substrate is the BFCL-style function-calling setup that builds on Gorilla~\cite{patil2023gorilla}; we grade by AST contract (function name, argument set, allowed values, selected argument, order-independent set matching) rather than the official checker, which is valid for relative cross-tier comparison. The structured-versus-free-form distinction is structural, not stylistic: function calling differs fundamentally from free-form generation because structured outputs have short, rigid structure, which is what lets a parallel-decoding approach treat function calling as a different problem~\cite{shi2026simpletool}; the formalization takes this rigidity as the premise of the structural decode set. Two adjacent axes are held fixed by the protocol. Chain-of-thought budget has non-monotonic effects across 200 function-calling agent tasks at budgets from 0 to 512 tokens~\cite{qi2026brief}; we hold the budget fixed (one max-token cap, thinking off) so that a budget confound cannot masquerade as a precision effect. Constrained decoding with guaranteed context-free grammar compliance removes syntax violations but leaves local prefix feasibility failures under tokenizer-grammar mismatch and finite token budgets~\cite{collura2026grammar}; it is a safety net on form, not on argument semantics, and is complementary to precision rather than a substitute for it (Sec.~\ref{sec:tc-guidance}). On the economics of calls themselves, skill retrieval augmentation supplies the skill context agents consume~\cite{su2026sra}, and counterfactual-margin training for tool-use boundaries shows that unnecessary tool calls bring latency, cost, retrieval noise, and error propagation~\cite{zou2026cobra}; together they support the value asymmetry the break-even uses: a wrong or superfluous call breaks the workflow, a prose error does not.
|
| 64 |
+
|
| 65 |
+
\subsection{Adaptive Precision Routing and Serving Cost}
|
| 66 |
+
\label{sec:tc-rw-routing}
|
| 67 |
+
|
| 68 |
+
This paper extends our prior precision-tier router, which dispatches each request to a BF16/W4A16/NVFP4 re-encoding of the same checkpoint through a lightweight per-request difficulty classifier and weakly dominates static uniform quantization~\cite{thaki2026precisiontier}. Its analytical Pareto characterization, the maximum saving is proportional to the tolerance variance $p(1-p)$ and the tolerance spread, vanishing when the tolerance is degenerate, is inherited here: the gain of adding the task-type feature carries the same $p(1-p)$ structure, now in the task-type mix. That router prices the request-difficulty axis of precision selection; the task-type axis, tool-call versus free-form, was invisible to it. A companion paper prices the reasoning-token axis on the same model family and the same BFCL simple/multiple/parallel harness~\cite{thaki2026verbosity}: a per-turn verbosity tax that compounds as $\Theta(T^2)$ under persistent context, with an alpha-inflation interaction under which low-bit serving multiplies the tax through reasoning-token inflation; this paper prices the tool-call-accuracy axis at fixed thinking-off, so the two axes are distinct and compose. The perturbation-bound methodology is a sibling of our earlier retriever-side result, where embedding quantization error reaches the fused score only through the dense term and the fusion weight linearly dampens quantization risk~\cite{thaki2026gatekeeper}; the present paper studies the generator side of the harness. The adjacent precision-scheduling literature operates on other axes: per-step mixed-precision scheduling for multi-step interaction~\cite{li2026dmr}; cascade frameworks in which the deferral threshold is a decision-theoretic object~\cite{bouchard2026escalation} and an empirical hyperparameter in practice; calibrated-uncertainty routing that removes per-workload threshold tuning~\cite{kotte2026ucci}; two-stage cost-aware serving~\cite{moslem2026clusterrouteescalate}; classifier-gated multi-tier routing for regulated industries~\cite{dey2026compliancegate}; and routing on prefill activations rather than semantic features, with encoder-target decoupling~\cite{varshney2026llmrouter}. We build on the same serving substrate, PagedAttention and vLLM~\cite{kwon2023vllm}, and adopt a matching cost accounting: token-normalized metrics are incomplete because prefill and setup cost do not divide by the token count~\cite{vellaisamy2026energy}, so the batch-1, per-case GPU-second is the unit we price.
|
| 69 |
+
|
| 70 |
+
\section{The Tool-Call Cliff: A Formalization}
|
| 71 |
+
\label{sec:tc-formal}
|
| 72 |
+
|
| 73 |
+
Let $q \in \{q_{16}, q_8, q_4\}$ index the precision tiers BF16, FP8 (W8A8), and NVFP4, with bit-widths $b(q_{16}) = 16$, $b(q_8) = 8$, $b(q_4) = 4$. Fix a 27B dense model $M$ of the Qwen3 family and let $M_q$ be the re-encoding of the same checkpoint at tier $q$. We take the re-encodings to share parameters, i.e., the tier changes the numerical path, not the function being approximated; this is Assumption~0, inherited from our prior router~\cite{thaki2026precisiontier}. Decoding is deterministic (temperature 0), so a case passes or fails under a fixed grader. Tool-call cases fall into the categories $c \in \{\mathrm{simple}, \mathrm{multiple}, \mathrm{parallel}\}$ (BFCL-style, AST-contract graded); free-form factual prose is denoted $\mathrm{ff}$. We write $A_q(c)$ for the pass rate of category $c$ at tier $q$.
|
| 74 |
+
|
| 75 |
+
\begin{definition}[Precision tier]
|
| 76 |
+
\label{def:tc-tier}
|
| 77 |
+
A precision tier $q \in \{q_{16}, q_8, q_4\}$ is a weight re-encoding of $M$ with bit-width $b(q) \in \{16, 8, 4\}$ and an associated per-step logit-perturbation scale $\sigma_q$. Tiers are the unit at which accuracy and cost are compared.
|
| 78 |
+
\end{definition}
|
| 79 |
+
|
| 80 |
+
\begin{definition}[Tool-call category and accuracy tax]
|
| 81 |
+
\label{def:tc-tax}
|
| 82 |
+
Fix the category set $\mathcal{C} = \{\mathrm{simple}, \mathrm{multiple}, \mathrm{parallel}\}$ and the free-form class $\mathrm{ff}$. For $q \in \{q_8, q_4\}$, the accuracy tax of tier $q$ on category $c$ is $\tau_q(c) = A_{q_{16}}(c) - A_q(c)$, measured on the protocol's case set under deterministic decoding. The aggregated tool-call tax $\tau_q(\mathrm{tc})$ is the case-weighted average of $\tau_q(c)$ over $c \in \mathcal{C}$.
|
| 83 |
+
\end{definition}
|
| 84 |
+
|
| 85 |
+
\begin{definition}[Cliff ratio]
|
| 86 |
+
\label{def:tc-cliffratio}
|
| 87 |
+
The cliff ratio at tier $q$ is $\kappa_q = \tau_q(\mathrm{tc}) \,/\, \max(\tau_q(\mathrm{ff}), \varepsilon_0)$, where $\varepsilon_0 > 0$ guards against a degenerate free-form tax. $\kappa_q > 1$ means the tool-call slice degrades faster than prose at tier $q$: a cliff at precision $q$. The cliff sharpness $\kappa_q - \kappa_8$ is the discrete jump between adjacent lower tiers.
|
| 88 |
+
\end{definition}
|
| 89 |
+
|
| 90 |
+
\begin{definition}[Structural decode set]
|
| 91 |
+
\label{def:tc-struct}
|
| 92 |
+
A tool-call case requires a set $S_c$ of structural decode steps: call boundaries, function names, call counts, and argument-value positions. $|S_c|$ is small for simple (about one call) and $O(K)$ for parallel with $K$ calls. A free-form case has no mandatory structural set: with $N$ decode steps, a single token error causes a graded failure with probability $\rho \ll 1$, which we call local absorption.
|
| 93 |
+
\end{definition}
|
| 94 |
+
|
| 95 |
+
\noindent\textbf{Assumption 1 (Noise).}\label{asm:tc-noise} The per-step logit perturbation at tier $q$ has scale $\sigma_q$ with $\sigma_{q_{16}} < \sigma_{q_8} < \sigma_{q_4}$. Under symmetric quantization the step roughly doubles from 8-bit to 4-bit, so $\sigma_{q_4} \approx 2\,\sigma_{q_8}$, an SNR ratio of about 4.
|
| 96 |
+
|
| 97 |
+
\noindent\textbf{Assumption 2 (Margins).}\label{asm:tc-margins} Let $\Delta_t$ be the clean per-step logit margin at step $t$. Structural steps concentrate margin mass below a small $\delta$: $\Pr(\Delta_t < \delta \mid t \in S_c) = p_c \gg p_0 = \Pr(\Delta_t < \delta \mid t \notin S_c)$. The structural steps of a tool call are precisely the steps where the clean decision is least certain.
|
| 98 |
+
|
| 99 |
+
Let $\varepsilon_t$ be the sub-Gaussian per-step perturbation of scale $\sigma_q$. The per-step flip probability satisfies
|
| 100 |
+
\begin{equation}
|
| 101 |
+
\label{eq:tc-flip}
|
| 102 |
+
p_t^q
|
| 103 |
+
\;=\;
|
| 104 |
+
\Pr\!\left( |\varepsilon_t| > \tfrac{1}{2}\,\Delta_t \right)
|
| 105 |
+
\;\le\;
|
| 106 |
+
\exp\!\left( -\frac{\Delta_t^{2}}{8\,\sigma_q^{2}} \right).
|
| 107 |
+
\end{equation}
|
| 108 |
+
|
| 109 |
+
\begin{proposition}[Step-level flip bound]
|
| 110 |
+
\label{prop:tc-step}
|
| 111 |
+
The expected per-step flip rate $r_q = \mathbb{E}_t \left[ \exp\!\left( -\Delta_t^{2} / (8\,\sigma_q^{2}) \right) \right]$ is increasing in $\sigma_q$. Writing $\bar r_{S,q}$ and $\bar r_{0,q}$ for the average flip rate over structural and non-structural steps,
|
| 112 |
+
\begin{equation}
|
| 113 |
+
\label{eq:tc-step}
|
| 114 |
+
\bar r_{S,q}
|
| 115 |
+
\;\ge\;
|
| 116 |
+
p_c\, \exp\!\left( -\frac{\delta^{2}}{8\,\sigma_q^{2}} \right),
|
| 117 |
+
\qquad
|
| 118 |
+
\bar r_{0,q}
|
| 119 |
+
\;\approx\;
|
| 120 |
+
p_0\, \exp\!\left( -\frac{\delta^{2}}{8\,\sigma_q^{2}} \right),
|
| 121 |
+
\end{equation}
|
| 122 |
+
so the concentrated low-margin mass $p_c$ lifts the structural rate above the non-structural rate by a factor of order $p_c / p_0$.
|
| 123 |
+
\end{proposition}
|
| 124 |
+
\noindent\textit{Proof sketch.} The integrand in~\eqref{eq:tc-flip} is decreasing in $\Delta_t$ and increasing in $\sigma_q$, so the monotonicity passes to the expectation. Restricting the expectation to the region $\{\Delta_t < \delta\}$ and using the mass bound of Assumption~\ref{asm:tc-margins} gives the first inequality; the non-structural statement is the same computation with the small mass $p_0$. \hfill$\square$
|
| 125 |
+
|
| 126 |
+
\begin{proposition}[Case-level amplification, the cliff]
|
| 127 |
+
\label{prop:tc-amplify}
|
| 128 |
+
Under Assumptions~\ref{asm:tc-noise} and~\ref{asm:tc-margins}, for small per-step rates,
|
| 129 |
+
\begin{equation}
|
| 130 |
+
\label{eq:tc-case}
|
| 131 |
+
\Pr\!\left( \mathrm{fail}_q(c) \right)
|
| 132 |
+
\;=\;
|
| 133 |
+
1 - \prod_{t \in S_c} \left( 1 - p_t^q \right)
|
| 134 |
+
\;\ge\;
|
| 135 |
+
1 - \exp\!\left( -|S_c|\,\bar r_{S,q} \right)
|
| 136 |
+
\;\approx\;
|
| 137 |
+
|S_c|\,\bar r_{S,q},
|
| 138 |
+
\qquad
|
| 139 |
+
\Pr\!\left( \mathrm{fail}_q(\mathrm{ff}) \right)
|
| 140 |
+
\;\approx\;
|
| 141 |
+
\rho\,N\,\bar r_{0,q}.
|
| 142 |
+
\end{equation}
|
| 143 |
+
Consequently the taxes are $\tau_q(c) \approx |S_c| \left( \bar r_{S,q} - \bar r_{S, q_{16}} \right)$ and $\tau_q(\mathrm{ff}) \approx \rho N \left( \bar r_{0,q} - \bar r_{0, q_{16}} \right)$, and the cliff ratio satisfies
|
| 144 |
+
\begin{equation}
|
| 145 |
+
\label{eq:tc-kappa}
|
| 146 |
+
\kappa_q
|
| 147 |
+
\;\approx\;
|
| 148 |
+
\frac{|S_c|}{\rho\,N}\,
|
| 149 |
+
\frac{\bar r_{S,q}}{\bar r_{0,q}}\,
|
| 150 |
+
\left( 1 - o(1) \right)
|
| 151 |
+
\;\;\ge\;\;
|
| 152 |
+
\frac{|S_c|}{\rho\,N}\,
|
| 153 |
+
\frac{p_c}{p_0}\,
|
| 154 |
+
\exp\!\left( -\frac{\delta^{2}}{8\,\sigma_q^{2}} \right).
|
| 155 |
+
\end{equation}
|
| 156 |
+
\end{proposition}
|
| 157 |
+
\noindent\textit{Proof sketch.} The product lower bound is the standard $1 - \prod_t (1 - p_t) \ge 1 - \exp(-\sum_t p_t)$; the small-rate expansion gives the linear form, and the free-form case is the same argument at the absorbed per-step rate $\rho\,\bar r_{0,q}$. Substituting the two tax expressions into the definition of $\kappa_q$ gives the approximation; the lower bound follows from the concentration of Assumption~\ref{asm:tc-margins} and the monotonicity of Assumption~\ref{asm:tc-noise}, with the $o(1)$ from the small-rate regime. \hfill$\square$
|
| 158 |
+
|
| 159 |
+
\noindent\textbf{Item (P1) (Failure-mode composition per category).}\label{pred:tc-p1} The amplification factor $|S_c|$ and the margin concentration $p_c/p_0$ act differently across categories. For simple, $|S_c|$ is small (about one call) and failures concentrate on single discrete argument-value choices with tight margins, so argument-value failures dominate. For parallel, $|S_c|$ is $O(K)$ and the call-count tokens are low-margin, so the relative share of call-count failures is maximal in this category --- a composition shift away from the simple baseline --- while argument-value remains the single largest mode. For multiple, sequential propagation across calls gives an intermediate mix.
|
| 160 |
+
|
| 161 |
+
\noindent\textbf{Item (P2) (The cliff sits at 4-bit).}\label{pred:tc-p2} In the noise-limited regime, where $\delta^{2}/(8\,\sigma_{q_8}^{2}) = O(1)$, the 4-bit noise variance is 4x the 8-bit variance (Assumption~\ref{asm:tc-noise}) and the structural flip rate scales with it: $\bar r_{S, q_4} / \bar r_{S, q_8}$ is up to 4x. The tax jump from 8 to 4 bits is therefore superlinear, while the jump from 16 to 8 is mild. The cliff sits at the 4-bit tier, and the cliff sharpness $\kappa_4 - \kappa_8$ is the observable of that discrete jump.
|
| 162 |
+
|
| 163 |
+
The NVFP4 arm of the protocol has a previously measured in-house reference row, recorded in Table~\ref{tab:tc-anchor}: an in-house BFCL-style tool-call evaluation of our NVFP4 (GPTQ) 27B teacher checkpoint, conducted 2026-09-05 as part of our model-router reference work, under temperature 0, max-tokens 3000, tool-choice auto, and AST-contract grading. On 800 cases the row reads simple $363/400$ (90.8\%), multiple $178/200$ (89.0\%), parallel $176/200$ (88.0\%), overall $717/800$ (89.6\%). We use this row as an ex-ante consistency check of the formalization. At this single measured point, the composition predicted by Item~(P1) is present: of the 37 simple failures, 35 are argument-value mismatches (plus one call-count and one function-name error); of the 24 parallel failures, 9 are call-count errors against 14 argument-value --- call-count failures nine times more frequent than in simple (1 of 37), the composition shift Item~(P1) predicts, with argument-value still the largest mode --- and multiple shows the intermediate mix (16 argument-value, 4 call-count, 2 function-name). The BF16 and FP8 arms and the free-form control, which would turn this single point into the curve $\kappa_q$ against precision, are specified in Sec.~\ref{sec:tc-protocol}.
|
| 164 |
+
\section{Cost--Quality Frontier and Break-Even on H200}
|
| 165 |
+
\label{sec:tc-frontier}
|
| 166 |
+
|
| 167 |
+
The frontier is read in the regime where unattended agents actually run: batch 1, decode-bound, on H200. A 27B dense model reads its full weight tensor once per decoded token at batch 1, so the ideal per-case GPU-seconds scale with the weight bit width:
|
| 168 |
+
\begin{equation}
|
| 169 |
+
\label{eq:tc-cost}
|
| 170 |
+
c_{q_4} : c_{q_8} : c_{q_{16}} \;\approx\; 1 : 2 : 4 .
|
| 171 |
+
\end{equation}
|
| 172 |
+
This is an ideal upper bound on the saving: kernel overhead, block scales, and the dequantization path on Hopper (Sec.~\ref{sec:tc-protocol}) reduce the realized ratios, and the measured throughput of Sec.~\ref{sec:tc-protocol} replaces Eq.~\ref{eq:tc-cost} wherever a decision is made. The value side is asymmetric. A wrong tool call breaks the workflow: a retry, a dead end, or a user-visible failure. A wrong sentence in prose is locally absorbable. We take $V_{\mathrm{tc}} \ge V_{\mathrm{ff}}$ accordingly. The per-tier utility $U_q(\mathrm{type}) = V_{\mathrm{type}} A_q(\mathrm{type}) - \lambda c_q$, with $\lambda$ the price of a GPU-second, then evaluates differently on the two slices: the tool-call slice loses accuracy faster (Proposition~\ref{prop:tc-amplify}) and each lost case is worth more, while the cost $c_q$ is the same. The question is which tier serves which slice.
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
\begin{proposition}[Task-type-aware routing weakly dominates difficulty-only]
|
| 176 |
+
\label{prop:tc-routing}
|
| 177 |
+
Let $p$ be the tool-call share of the request mix. A router that dispatches on request difficulty $\hat d$ only is weakly dominated by one that also reads the task-type indicator, whenever the tax is type-dependent, $\tau_q(\mathrm{tc}) \ne \tau_q(\mathrm{ff})$. The expected gain of the type feature is
|
| 178 |
+
\begin{equation}
|
| 179 |
+
\label{eq:tc-gain}
|
| 180 |
+
G \;=\; p(1-p)\,\bigl(V_{\mathrm{tc}} - V_{\mathrm{ff}}\bigr)\,\mathbb{E}\bigl[\,|\tau_q(\mathrm{tc}) - \tau_q(\mathrm{ff})|\,\bigr] \;+\; \lambda\, p(1-p)\, \Delta c ,
|
| 181 |
+
\end{equation}
|
| 182 |
+
with $\Delta c$ the per-case cost spread between the tiers the two frontiers induce on the tool-call slice; the gain is maximized at $p = 1/2$ and vanishes as $p \to 0$ or $p \to 1$.
|
| 183 |
+
\end{proposition}
|
| 184 |
+
\noindent\textit{Proof sketch.} The type coordinate states which quality-cost frontier a request lies on. For $p \in (0,1)$ both frontiers are present in the mix, so the extra coordinate strictly separates the argmax set of the utility: the difficulty-only rule can be matched, never beaten, by the augmented one. Both terms carry $p(1-p)$, because with one type absent the frontiers do not mix and the type feature is uninformative; this is the same tolerance-variance structure that characterizes our prior precision-tier routing~\cite{thaki2026precisiontier}. \hfill$\square$
|
| 185 |
+
|
| 186 |
+
Our in-house request mix places \texttt{needs\_tools} at $p = 0.75$ of turns (in-house routing taxonomy), where $p(1-p) = 0.1875$: off-center, but far from degenerate, so the type coordinate is informative for exactly the fleet this paper prices.
|
| 187 |
+
|
| 188 |
+
\begin{corollary}[When is 4-bit safe for tool calls?]
|
| 189 |
+
\label{corr:tc-breakeven}
|
| 190 |
+
Uniform $q_4$ is cost-optimal on the tool-call slice if and only if $\lambda\,(c_{q_8} - c_{q_4}) \ge V_{\mathrm{tc}}\,\bigl(\tau_{q_4}(\mathrm{tc}) - \tau_{q_8}(\mathrm{tc})\bigr)$: the bandwidth saving of serving tool calls at 4-bit instead of 8-bit must at least cover the accuracy tax priced at $V_{\mathrm{tc}}$. Equivalently, when the measured 4-bit tool-call tax is within the non-inferiority margin of Sec.~\ref{sec:tc-protocol} and the cliff null holds, a uniform NVFP4 fleet is cost-optimal; otherwise a two-tier policy (tool-call slice to $q_8$ or $q_{16}$, free-form slice to $q_4$) recovers $(1-p)(c_{q_{16}} - c_{q_4})$ of the per-request saving while keeping both slices within tolerance.
|
| 191 |
+
\end{corollary}
|
| 192 |
+
\noindent\textit{Proof sketch.} The inequality is the utility comparison $U_{q_4}(\mathrm{tc}) \ge U_{q_8}(\mathrm{tc})$ restricted to the tool-call slice, since $U_{q_4}(\mathrm{tc}) - U_{q_8}(\mathrm{tc}) = \lambda\,(c_{q_8} - c_{q_4}) - V_{\mathrm{tc}}\,\bigl(\tau_{q_4}(\mathrm{tc}) - \tau_{q_8}(\mathrm{tc})\bigr)$; the two-tier alternative is the same comparison with the slices decoupled. \hfill$\square$
|
| 193 |
+
|
| 194 |
+
The cost of the two-tier compromise is bounded by arithmetic alone. \emph{Parametric illustration, not a measurement:} take the ideal 1:2:4 ratios ($c_{q_4} = 1$, $c_{q_8} = 2$, $c_{q_{16}} = 4$) and the in-house mix $p = 0.75$. Uniform $q_4$ saves $c_{q_{16}} - c_{q_4} = 3$ cost units per request against the BF16 baseline. The two-tier policy with the tool-call slice at $q_8$ saves
|
| 195 |
+
\begin{equation}
|
| 196 |
+
\label{eq:tc-savings}
|
| 197 |
+
S_{\mathrm{two\text{-}tier}}
|
| 198 |
+
\;=\; p\,(c_{q_{16}} - c_{q_8}) \;+\; (1-p)\,(c_{q_{16}} - c_{q_4})
|
| 199 |
+
\;=\; 0.75 \cdot 2 \;+\; 0.25 \cdot 3 \;=\; 2.25 ,
|
| 200 |
+
\end{equation}
|
| 201 |
+
which is 75\% of the uniform-$q_4$ saving. If the tool-call slice must stay at $q_{16}$, the guaranteed floor is $(1-p)(c_{q_{16}} - c_{q_4}) = 0.25\,(c_{q_{16}} - c_{q_4}) = 0.75$ units; even that floor is a 19\% per-request reduction against BF16 (cost $3.25$ versus $4.0$ units). No throughput number enters the illustration: it fixes the shape of the trade, and the measured $c_q$ of Sec.~\ref{sec:tc-protocol} only move the coefficients.
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
One interaction must be declared before the protocol is read. With thinking ON, low-bit serving inflates reasoning tokens~\cite{lian2026quantization,thaki2026verbosity}, and the verbosity tax composes multiplicatively with the precision cliff: the same structural steps are reached later, inside a longer and noisier prefix, so the two taxes share failure events. The protocol therefore holds the Qwen3 thinking toggle OFF~\cite{yang2025qwen3}, so that Sec.~\ref{sec:tc-protocol} isolates the precision axis; the operator then composes the axes as a verbosity term, priced in~\cite{thaki2026verbosity}, times a precision term, priced here, without double counting.
|
| 205 |
+
|
| 206 |
+
\section{A Falsifiable Four-Arm Measurement Protocol}
|
| 207 |
+
\label{sec:tc-protocol}
|
| 208 |
+
|
| 209 |
+
\paragraph{Platform.} All four arms run on a single H200, serving one 27B Qwen3-family dense checkpoint through vLLM~\cite{kwon2023vllm} at batch 1. Decoding is deterministic: temperature 0, max tokens 3000, tool choice \texttt{auto}, an identical chat template across arms, and the Qwen3 thinking toggle fixed OFF~\cite{yang2025qwen3} to isolate the precision axis (Sec.~\ref{sec:tc-frontier}). The tool-call suite is the same 800-case BFCL-style set (400 simple, 200 multiple, 200 parallel; the BFCL evaluation lineage of~\cite{patil2023gorilla}) used for the in-house reference row below. The free-form control is 200 factual-prose prompts from the same domain, graded for factuality.
|
| 210 |
+
|
| 211 |
+
\paragraph{Tier construction.} BF16 is the reference tier and the tax baseline. FP8 is a W8A8 re-encoding of the same checkpoint under the shared-parameter assumption of Sec.~\ref{sec:tc-formal}. NVFP4 is our existing GPTQ-based NVFP4 teacher checkpoint~\cite{frantar2022gptq}, in the NVFP4 post-training-quantization line of~\cite{meng2026arcquant}; it is the same weight set as the reference row of Table~\ref{tab:tc-anchor}. We state the Hopper caveat plainly: NVFP4 is a Blackwell-native microscaling format. On H200 the 4-bit tier is therefore a storage and bandwidth claim: weights are streamed from HBM in 4-bit and dequantized for a bf16 GEMM. Two consequences follow. First, the measured cost ratio bounds the native-FP4 ratio from below in cost: the Blackwell compute path can only be cheaper per case, so a break-even margin computed on H200 carries over unchanged to a Blackwell deployment. Second, the accuracy side is path-independent: R1--R3 are statements about the quantized weights and hold under either compute path.
|
| 212 |
+
|
| 213 |
+
\paragraph{Arm design.} The four arms are given in Table~\ref{tab:tc-arms}. Arm A (BF16 $\times$ 800 tool-call cases) is the reference upper bound that defines the tax $\tau_q$. Arm B (NVFP4 $\times$ 800) re-runs the reference suite under the identical grader, so that the anchor row and the other arms are comparable case by case. Arm C (FP8 $\times$ 800) is the intermediate tier that pins down the monotonicity of the tax. Arm D (\{BF16, FP8, NVFP4\} $\times$ 200 free-form factual-prose prompts) supplies the control tax $\tau_q(\mathrm{ff})$ against which the cliff ratio is normalized. Arms A--C share the identical 800 cases; every tool-call comparison is paired at the case level.
|
| 214 |
+
|
| 215 |
+
\begin{table}[t]
|
| 216 |
+
\centering
|
| 217 |
+
\small
|
| 218 |
+
\begin{tabular}{@{}llp{2.4cm}lp{3.4cm}@{}}
|
| 219 |
+
\toprule
|
| 220 |
+
Arm & Tier & Cases & Grading & Role\\
|
| 221 |
+
\midrule
|
| 222 |
+
A & BF16 & 800 tool-call & AST contract & reference upper bound; defines $\tau_q$\\
|
| 223 |
+
B & NVFP4 (GPTQ) & 800 tool-call & AST contract & in-house reference row (Table~\ref{tab:tc-anchor}) re-run under identical grader\\
|
| 224 |
+
C & FP8 (W8A8) & 800 tool-call & AST contract & intermediate tier; pins the monotonicity (R2)\\
|
| 225 |
+
D & BF16 / FP8 / NVFP4 & 200 free-form factual prose per tier & factuality-graded & control tax $\tau_q(\mathrm{ff})$ for $\kappa_q$\\
|
| 226 |
+
\bottomrule
|
| 227 |
+
\end{tabular}
|
| 228 |
+
\caption{Four-arm design. Arms A--C share the identical 800 tool-call cases, so all tool-call comparisons are paired at the case level; Arm D is the free-form factual-prose control on the same domain. All arms: single H200, vLLM~\cite{kwon2023vllm}, temperature 0, max tokens 3000, tool choice auto, identical chat template, thinking off.}
|
| 229 |
+
\label{tab:tc-arms}
|
| 230 |
+
\end{table}
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
\paragraph{In-house reference row.} Table~\ref{tab:tc-anchor} records the in-house NVFP4 reference row introduced in Sec.~\ref{sec:tc-formal}, with its full failure-reason composition. The row is the protocol's NVFP4 anchor and the ex-ante consistency check of Item~(P1)~(\ref{pred:tc-p1}): argument-value failures dominate simple, call-count failures are systematic in parallel --- the only category where they exceed the simple baseline --- and multiple shows the intermediate mix. Arm B re-runs the suite so that the anchor and the remaining arms are comparable under one grader; the BF16, FP8, and free-form arms are specified in Table~\ref{tab:tc-arms}.
|
| 234 |
+
|
| 235 |
+
\begin{table}[t]
|
| 236 |
+
\centering
|
| 237 |
+
\small
|
| 238 |
+
\begin{tabular}{@{}lrrlp{4.0cm}@{}}
|
| 239 |
+
\toprule
|
| 240 |
+
Category & $n$ & passed & accuracy & dominant failure mode\\
|
| 241 |
+
\midrule
|
| 242 |
+
simple & 400 & 363 & 90.8\% & argument-value mismatch (35 of 37 failures; plus 1 call-count, 1 function-name)\\
|
| 243 |
+
multiple & 200 & 178 & 89.0\% & mixed: 16 argument-value, 4 call-count (incl.~2 no-call), 2 function-name\\
|
| 244 |
+
parallel & 200 & 176 & 88.0\% & argument-value dominant (14 of 24); 9 call-count, 1 missing-argument\\
|
| 245 |
+
\midrule
|
| 246 |
+
overall & 800 & 717 & 89.6\% & ---\\
|
| 247 |
+
\bottomrule
|
| 248 |
+
\end{tabular}
|
| 249 |
+
\caption{In-house NVFP4 (GPTQ) reference row: our 27B teacher checkpoint, in-house BFCL-style tool-call evaluation, conducted 2026-09-05 as part of our model-router reference work (temperature 0, max tokens 3000, tool choice auto). Grading is an in-house AST-contract check (function name, argument set, allowed values, selected argument, order-independent set matching), not the official BFCL checker; the row supports relative cross-tier comparison, not absolute leaderboard claims. The BF16, FP8, and free-form arms of the protocol are specified in Table~\ref{tab:tc-arms}.}
|
| 250 |
+
\label{tab:tc-anchor}
|
| 251 |
+
\end{table}
|
| 252 |
+
|
| 253 |
+
\paragraph{Per-arm metrics.} Beyond accuracy, each arm records per case: output token count (an inflation check; low-bit serving can hide test-time cost in token inflation that final-answer accuracy misses~\cite{lian2026quantization}), throughput in tokens/s, weight footprint in GB, and GPU-s per case. The last quantity is the $c_q$ that Sec.~\ref{sec:tc-frontier} prices; the first is the guard against a cost the accuracy column would not show.
|
| 254 |
+
|
| 255 |
+
\paragraph{Statistics.} The statistics are paired by construction. The 800 tool-call cases are identical across arms A--C, so we draw per-case paired bootstrap resamples across arms and report 95\% confidence intervals for each arm's tax and for the cliff ratio; the three category-level contrasts are tested with a Bonferroni correction over the 3 categories. The non-inferiority margin is $\pm 2$~pp, matching our in-house re-verification practice. Two confounds are excluded by construction, following the counterfactual-control discipline for precision claims~\cite{bulut2026budgetconfounds}: the budget axis is held fixed (one max-token cap, thinking off, identical chat template across arms) and the difficulty axis is held fixed (one case set per category, identical across arms), so a budget or difficulty confound cannot be read as a precision effect. The following four criteria are the decision rules the protocol is built to execute, and each names what it refutes.
|
| 256 |
+
|
| 257 |
+
|
| 258 |
+
\noindent\textbf{R1 (cliff).} The null is
|
| 259 |
+
\begin{equation}
|
| 260 |
+
\label{eq:tc-r1}
|
| 261 |
+
H_0: \tau_{q_4}(\mathrm{tc}) \;\le\; \tau_{q_4}(\mathrm{ff}) + 2\,\mathrm{pp},
|
| 262 |
+
\qquad
|
| 263 |
+
\kappa_{q_4} \;=\; \frac{\tau_{q_4}(\mathrm{tc})}{\max\bigl(\tau_{q_4}(\mathrm{ff}),\,\varepsilon_0\bigr)} ,
|
| 264 |
+
\end{equation}
|
| 265 |
+
and $H_0$ is rejected when the paired-bootstrap 95\% confidence interval of $\kappa_{q_4}$ excludes 1. This is the test of the cliff prediction Item~(P2)~(\ref{pred:tc-p2}). Acceptance of the null is a positive result, 4-bit safe for tool calls at this model and harness, not a null with nothing behind it.
|
| 266 |
+
|
| 267 |
+
\noindent\textbf{R2 (monotonicity).} $0 \le \tau_{q_8}(\mathrm{tc}) \le \tau_{q_4}(\mathrm{tc})$, aggregated over the 800 cases. A violation refutes the margin--noise model behind the step-level bound (Eq.~\ref{eq:tc-flip}, Proposition~\ref{prop:tc-step}); the break-even must not be used until the model is repaired.
|
| 268 |
+
|
| 269 |
+
\noindent\textbf{R3 (composition).} The P1 orderings: argument-value failures dominant in simple and the largest mode in every category; call-count failures systematic in parallel and rare in simple. A reversed composition --- call-count dominant in simple and absent in parallel --- refutes the $|S_c|/\rho$ amplification decomposition (Proposition~\ref{prop:tc-amplify}): the tax would then be a uniform drift, not a structural cliff, and the two-tier policy loses its rationale.
|
| 270 |
+
|
| 271 |
+
\noindent\textbf{R4 (break-even).} The measured cost ratios are inserted into the break-even of Corollary~\ref{corr:tc-breakeven} at the in-house mix $p = 0.75$, deciding between a uniform NVFP4 fleet and the two-tier policy of Sec.~\ref{sec:tc-frontier}. If the measured 4-bit tool-call tax is below 1~pp, the two-tier policy is unnecessary: a null result, still decisive for the operator, because it prices the tax at its null. Figure~\ref{fig:tc-schematic} sketches the two halves of the argument: the predicted cliff shape on the left, the amplification chain on the right.
|
| 272 |
+
|
| 273 |
+
\begin{figure*}[t]
|
| 274 |
+
\centering
|
| 275 |
+
\begin{tikzpicture}[
|
| 276 |
+
box/.style={draw, thick, rounded corners=1.5pt, align=center,
|
| 277 |
+
minimum width=5.6cm, minimum height=0.9cm, font=\small},
|
| 278 |
+
ax/.style={thick, -{Stealth[length=2.5mm]}}
|
| 279 |
+
]
|
| 280 |
+
\begin{scope}
|
| 281 |
+
\draw[ax] (0,0) -- (5.2,0) node[right, font=\small] {bit width};
|
| 282 |
+
\draw[ax] (0,0) -- (0,3.6) node[above, font=\small] {accuracy};
|
| 283 |
+
\draw (0.6,0.07) -- (0.6,-0.07) node[below, font=\small] {16};
|
| 284 |
+
\draw (2.6,0.07) -- (2.6,-0.07) node[below, font=\small] {8};
|
| 285 |
+
\draw (4.6,0.07) -- (4.6,-0.07) node[below, font=\small] {4};
|
| 286 |
+
\draw[thick, red!70!black] (0.6,3.0) -- (2.6,2.85) -- (4.6,1.7)
|
| 287 |
+
node[pos=0.25, above, font=\scriptsize, red!70!black] {tool call};
|
| 288 |
+
\draw[thick, blue!60!black, dashed] (0.6,3.2) -- (2.6,3.1) -- (4.6,2.95)
|
| 289 |
+
node[pos=0.25, above, font=\scriptsize, blue!60!black] {free-form};
|
| 290 |
+
\node[font=\scriptsize] at (2.6,-0.72) {schematic cliff (Sec.~3)};
|
| 291 |
+
\end{scope}
|
| 292 |
+
\begin{scope}[xshift=9.8cm, yshift=0.15cm]
|
| 293 |
+
\node[box] (n1) at (0,2.4) {low-bit quantization noise $\sigma_q$};
|
| 294 |
+
\node[box] (n2) at (0,0.9) {low-margin structural-step flips\\[-1pt]\scriptsize(argument value / call count / function name)};
|
| 295 |
+
\node[box] (n3) at (0,-0.7) {case-level AST mismatch};
|
| 296 |
+
\node[box] (n4) at (0,-2.3) {workflow error};
|
| 297 |
+
\draw[thick, -{Stealth[length=2.5mm]}] (n1) -- (n2);
|
| 298 |
+
\draw[thick, -{Stealth[length=2.5mm]}] (n2) -- (n3);
|
| 299 |
+
\draw[thick, -{Stealth[length=2.5mm]}] (n3) -- (n4);
|
| 300 |
+
\node[font=\scriptsize] at (0,-3.15) {amplification chain (Proposition~\ref{prop:tc-amplify})};
|
| 301 |
+
\end{scope}
|
| 302 |
+
\end{tikzpicture}
|
| 303 |
+
\caption{Schematic of the predicted cliff shape (Sec.~3); not measured data. Left: the predicted accuracy against bit width, with the tool-call arm dropping steeply from 8 to 4 bits and the free-form control decaying gently. Right: the amplification chain from quantization noise to workflow error (Proposition~\ref{prop:tc-amplify}).}
|
| 304 |
+
\label{fig:tc-schematic}
|
| 305 |
+
\end{figure*}
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
\section{Operator Guidance for the H200 Token Factory}
|
| 309 |
+
\label{sec:tc-guidance}
|
| 310 |
+
|
| 311 |
+
When arms A--D return, the operator has three decision rules, ordered by preference.
|
| 312 |
+
|
| 313 |
+
\noindent\textbf{Rule 1: uniform NVFP4 fleet.} If R1 accepts the null (the 4-bit tool-call tax within 2~pp of the free-form tax) and the break-even of Corollary~\ref{corr:tc-breakeven} holds at the measured cost ratios, run the whole fleet at NVFP4: one weight set, no type classifier, no per-request routing. On H200 this decision is conservative in the favorable direction; the dequantized 4-bit path bounds the native-FP4 path from below in cost, so the margin only widens on Blackwell hardware.
|
| 314 |
+
|
| 315 |
+
\noindent\textbf{Rule 2: task-type precision routing.} If R1 rejects the null and R4 prices the tax below the break-even, deploy the two-tier policy: the tool-call slice is served at $q_8$ (or $q_{16}$ where the R2 margin demands it) and the free-form slice at $q_4$. The type indicator is the \texttt{needs\_tools} flag already present in our in-house routing taxonomy ($p = 0.75$). The policy is the Proposition~\ref{prop:tc-routing} extension of our precision-tier router~\cite{thaki2026precisiontier}: a single, cheap coordinate that preserves $(1-p)(c_{q_{16}} - c_{q_4})$ of the uniform-4-bit saving (Sec.~\ref{sec:tc-frontier}).
|
| 316 |
+
|
| 317 |
+
\noindent\textbf{Rule 3: escalate-on-failure safety net.} Under either rule, wrap the tool-call slice in a safety net: validate the emitted call against the AST contract, and on failure retry once at the next-higher tier before surfacing the error to the workflow. This is the classical cascade decision with a format-triggered deferral instead of a learned threshold~\cite{bouchard2026escalation}; with calibrated uncertainty estimates, the retry budget can be set without per-workload threshold tuning~\cite{kotte2026ucci}. The net is cheap because failures are rare at these accuracies: the in-house NVFP4 row fails 83 of 800 tool-call cases (10.4\%), and a retry at the higher tier costs one extra decode of the failed call.
|
| 318 |
+
|
| 319 |
+
Constrained decoding is complementary to all three rules, not a substitute for the precision decision. Distance-guided decoding can guarantee context-free grammar compliance~\cite{collura2026grammar}, but local prefix feasibility can still fail under tokenizer--grammar mismatch and finite token budgets, and, more to the point, a syntactically perfect call with a wrong argument value is exactly the failure the AST contract grades and the workflow feels. Constrain the grammar; still price the precision.
|
| 320 |
+
|
| 321 |
+
Account the savings in GPU-s, not just tokens. Token-normalized metrics miss prefill and per-request setup~\cite{vellaisamy2026energy}, and the low-bit bandwidth win is largest at batch 1, the unattended-agent regime, where each request pays the full weight read. An unattended 24/7 agent is exactly a stream of batch-1 tool calls; if the cliff holds, it is priced precisely there, and if it does not, Rule 1 removes the precision debate from the cost sheet altogether. The societal read is one line: a cheap, checkable low-bit tier is what lets a small team run always-on agents.
|
| 322 |
+
|
| 323 |
+
\section{Limitations}
|
| 324 |
+
\label{sec:tc-limit}
|
| 325 |
+
|
| 326 |
+
\begin{itemize}
|
| 327 |
+
\item \textbf{Single model family.} All claims are for one 27B dense Qwen3-family checkpoint. The cliff ratio $\kappa_q$ is defined per model and per tier; cross-size and cross-family curves, and the MoE variant studied in our precision-tier routing~\cite{thaki2026precisiontier}, are future work.
|
| 328 |
+
\item \textbf{NVFP4 compute path.} On Hopper the 4-bit tier is a storage and bandwidth claim: weights stream in 4-bit and are dequantized for a bf16 GEMM. The measured cost ratio bounds the native-FP4 ratio from below; the accuracy criteria R1--R3 are path-independent, while R4's margin should be re-measured on Blackwell before a native-FP4 deployment decision.
|
| 329 |
+
\item \textbf{Grader.} The grader is an in-house AST contract (function name, argument set, allowed values, selected argument, order-independent set matching), not the official BFCL checker~\cite{patil2023gorilla}. Relative cross-tier comparisons are valid; absolute leaderboard claims are out of scope.
|
| 330 |
+
\item \textbf{Deterministic decoding only.} Temperature 0 removes sampling variance from the comparison; whether the cliff persists under stochastic decoding is open.
|
| 331 |
+
\item \textbf{In-house workload mix.} $p = 0.75$ is an in-house routing-taxonomy statistic. The break-even depends on $p$ through $p(1-p)$, and fleets with a different tool-call share should recompute it before deploying Rule 2.
|
| 332 |
+
\item \textbf{PTQ only.} All tiers are post-training re-encodings. The QAT line, which lowers the low-precision loss floor~\cite{counathe2026quasar}, is open; a QAT 4-bit tier would shift the cliff, not remove the question.
|
| 333 |
+
\item \textbf{Batch-1 latency regime.} Single GPU, batch 1. Batch effects, prefill amortization and PagedAttention scheduling~\cite{kwon2023vllm}, change the cost ratios and are left open.
|
| 334 |
+
\end{itemize}
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
|
| 338 |
+
The rendered figures for this work (Figures~\ref{fig:fig1-cliff-shape},~\ref{fig:fig3-cost-ratio}) are collected here.
|
| 339 |
+
|
| 340 |
+
\begin{figure}[htbp]
|
| 341 |
+
\centering
|
| 342 |
+
\input{figures/fig1-cliff-shape.tex}
|
| 343 |
+
\caption{Schematic of the predicted pass rate against weight bit width: the tool-call arm drops steeply from 8 to 4 bits while the free-form control decays gently. (Analytical model (not measured))}
|
| 344 |
+
\label{fig:fig1-cliff-shape}
|
| 345 |
+
\end{figure}
|
| 346 |
+
|
| 347 |
+
\begin{figure}[htbp]
|
| 348 |
+
\centering
|
| 349 |
+
\input{figures/fig3-cost-ratio.tex}
|
| 350 |
+
\caption{In the decode-bound batch-1 regime on H200, per-case GPU-seconds scale roughly with weight bit width, giving an ideal 1:2:4 ratio between the NVFP4, FP8, and BF16 re-encodings. (Analytical model (not measured))}
|
| 351 |
+
\label{fig:fig3-cost-ratio}
|
| 352 |
+
\end{figure}
|
| 353 |
+
|
| 354 |
+
\section{Conclusion}
|
| 355 |
+
\label{sec:tc-conclusion}
|
| 356 |
+
|
| 357 |
+
We priced a question that operators face daily and that the literature has answered only indirectly: does a tool call break faster than a paragraph under low-bit quantization? The answer, in this paper, is a measurable quantity, the cliff ratio $\kappa_q$ against the free-form control, with two falsifiable predictions: Item~(P1)~(\ref{pred:tc-p1}) on per-category failure composition and Item~(P2)~(\ref{pred:tc-p2}) on the superlinear 8-to-4-bit jump. The four-arm protocol decides, on the declared platform, between the two operator outcomes: 4-bit safe for tool calls, a uniform NVFP4 fleet, or price the tax, with task-type-aware precision routing as the standing policy that extends our difficulty-tier router~\cite{thaki2026precisiontier}. Together with the verbosity-tax analysis~\cite{thaki2026verbosity} and the retriever-side gatekeeper result~\cite{thaki2026gatekeeper}, the three axes, difficulty, reasoning tokens, and task type, are priced on the same H200 token factory. Future work: measured $\kappa_q$ curves across tiers and model sizes, QAT re-encodings~\cite{counathe2026quasar}, and the native-FP4 compute path.
|
| 358 |
+
\bibliographystyle{plain}
|
| 359 |
+
\bibliography{refs}
|
| 360 |
+
|
| 361 |
+
\end{document}
|
paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:862e0259f626f83ffb2fb55ff3156bc2530c715b4e693aeaa8ac724d01c4a781
|
| 3 |
+
size 132459
|
refs.bib
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
% =====================================================================
|
| 2 |
+
% refs.bib -- The Tool-Call Cliff (ThakiCloud AI Research)
|
| 3 |
+
% Every arXiv entry verified against the arXiv API (title + abstract)
|
| 4 |
+
% on 2026-09-17. ThakiCloud self-citations verified via HTTP 200 on
|
| 5 |
+
% both the Hugging Face dataset page and the research blog post.
|
| 6 |
+
% Freshness: 25 of 33 entries (75.8%) dated 2026-03 or later;
|
| 7 |
+
% 8 entries (24.2%) older (2022-2026-02).
|
| 8 |
+
% =====================================================================
|
| 9 |
+
|
| 10 |
+
% --- ThakiCloud prior work (self-citations; URLs verified 2026-09-17) ---
|
| 11 |
+
|
| 12 |
+
@misc{thaki2026precisiontier,
|
| 13 |
+
title = {Precision-Tier Routing: Per-Request Quantization-Level Selection for Cost-Optimal {LLM} Serving on {H200}},
|
| 14 |
+
author = {{ThakiCloud AI Research}},
|
| 15 |
+
year = {2026},
|
| 16 |
+
month = {8},
|
| 17 |
+
howpublished = {\url{https://huggingface.co/datasets/thaki-AI/daily-paper-2026-08-08-precision-tier-llm-routing}},
|
| 18 |
+
note = {ThakiCloud AI Research Blog: \url{https://thakicloud.com/tech-blog/ko/research/precision-tier-llm-routing/}}
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
@misc{thaki2026verbosity,
|
| 22 |
+
title = {The Reasoning Verbosity Tax: Per-Turn Cost--Quality Frontiers of Explicit vs.\ Compact Chain-of-Thought in Self-Hosted Agentic {LLMs} on {H200}},
|
| 23 |
+
author = {{ThakiCloud AI Research}},
|
| 24 |
+
year = {2026},
|
| 25 |
+
month = {9},
|
| 26 |
+
howpublished = {\url{https://huggingface.co/datasets/thaki-AI/daily-paper-2026-09-11-reasoning-verbosity-tax-agentic-cost}},
|
| 27 |
+
note = {ThakiCloud AI Research Blog: \url{https://thakicloud.com/tech-blog/ko/research/reasoning-verbosity-tax-agentic-cost/}}
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
@misc{thaki2026gatekeeper,
|
| 31 |
+
title = {Quantizing the Gatekeeper: Accuracy-Cost Tradeoffs of Compressing the Embedding Model in Hybrid Skill Routers},
|
| 32 |
+
author = {{ThakiCloud AI Research}},
|
| 33 |
+
year = {2026},
|
| 34 |
+
month = {8},
|
| 35 |
+
howpublished = {\url{https://huggingface.co/datasets/thaki-AI/daily-paper-2026-08-20-quantized-embedding-skill-router}},
|
| 36 |
+
note = {ThakiCloud AI Research Blog: \url{https://thakicloud.com/tech-blog/ko/research/quantized-embedding-skill-router/}}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
% --- 2026 references dated 2026-03 or later (verified via arXiv API 2026-09-17) ---
|
| 40 |
+
|
| 41 |
+
@misc{lian2026quantization,
|
| 42 |
+
title = {Quantization Inflates Reasoning: Token Inflation as a Hidden Cost of Low-Bit Reasoning Models},
|
| 43 |
+
author = {Lian, Xinyu and Krichene, Walid and Huang, Beichen and Tanaka, Masahiro and Ruwase, Olatunji and Zhang, Li and Zhang, Minjia},
|
| 44 |
+
year = {2026},
|
| 45 |
+
month = {6},
|
| 46 |
+
eprint = {2606.25519},
|
| 47 |
+
archivePrefix = {arXiv},
|
| 48 |
+
primaryClass = {cs.LG}
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
@misc{rath2026quantbias,
|
| 52 |
+
title = {Quantization Undoes Alignment: Bias Emergence in Compressed {LLMs} Across Models and Precision Levels},
|
| 53 |
+
author = {Rath, Plawan Kumar and Maliakkal, Rahul},
|
| 54 |
+
year = {2026},
|
| 55 |
+
month = {5},
|
| 56 |
+
eprint = {2605.15208},
|
| 57 |
+
archivePrefix = {arXiv},
|
| 58 |
+
primaryClass = {cs.CL}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
@misc{qi2026brief,
|
| 62 |
+
title = {Brief Is Better: Non-Monotonic Chain-of-Thought Budget Effects in Function-Calling Language Agents},
|
| 63 |
+
author = {Qi, Xuan},
|
| 64 |
+
year = {2026},
|
| 65 |
+
month = {4},
|
| 66 |
+
eprint = {2604.02155},
|
| 67 |
+
archivePrefix = {arXiv},
|
| 68 |
+
primaryClass = {cs.CL}
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
@misc{taheri2026small,
|
| 72 |
+
title = {Small Reasoning Models are Instruction Followers in Function Calling},
|
| 73 |
+
author = {Taheri, Yalda and Heydari, Mohammad Hassan and Naaman, Erfan and Fatemi, Afsaneh},
|
| 74 |
+
year = {2026},
|
| 75 |
+
month = {8},
|
| 76 |
+
eprint = {2608.22472},
|
| 77 |
+
archivePrefix = {arXiv},
|
| 78 |
+
primaryClass = {cs.CL}
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
@misc{jang2026flatscore,
|
| 82 |
+
title = {Flat Score, Amplified Failures: How the Error Budget Masks Damage in Quantized {LLM} Agents},
|
| 83 |
+
author = {Jang, Jiwon and Yang, Kisu and Lim, Heuiseok and Park, Hyunwoo},
|
| 84 |
+
year = {2026},
|
| 85 |
+
month = {7},
|
| 86 |
+
eprint = {2607.27275},
|
| 87 |
+
archivePrefix = {arXiv},
|
| 88 |
+
primaryClass = {cs.CL},
|
| 89 |
+
note = {tau$^{2}$-bench; two open-weight model families (dense and MoE), two domains, eight cells, 456 episodes each at 16-, 8-, and 4-bit weights}
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
@misc{kozyrev2026gdn,
|
| 93 |
+
title = {Why Gated DeltaNet Survives 4-Bit Quantization: {NVFP4} {W4A4} for the Recurrent Half of a Hybrid 27B {LLM}},
|
| 94 |
+
author = {Kozyrev, Sergii and Maiboroda, Davyd},
|
| 95 |
+
year = {2026},
|
| 96 |
+
month = {9},
|
| 97 |
+
eprint = {2609.04098},
|
| 98 |
+
archivePrefix = {arXiv},
|
| 99 |
+
primaryClass = {cs.LG}
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
@misc{shen2026triaxialkv,
|
| 103 |
+
title = {{TriAxialKV}: Toward Extreme Low-Precision {KV}-Cache Quantization for Agentic Inference Tasks},
|
| 104 |
+
author = {Shen, Hanzhang and Wu, Haoran and Zhao, Yiren and Mullins, Robert},
|
| 105 |
+
year = {2026},
|
| 106 |
+
month = {5},
|
| 107 |
+
eprint = {2605.17170},
|
| 108 |
+
archivePrefix = {arXiv},
|
| 109 |
+
primaryClass = {cs.LG}
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
@misc{collura2026grammar,
|
| 113 |
+
title = {Stay Within Your Bounds: Distance-Guided Decoding for Guaranteed Context-Free Grammar Compliance},
|
| 114 |
+
author = {Collura, Vincenzo and Tit, Karim and Giunchiglia, Eleonora and Papadakis, Mike and Cordy, Maxime},
|
| 115 |
+
year = {2026},
|
| 116 |
+
month = {8},
|
| 117 |
+
eprint = {2608.28229},
|
| 118 |
+
archivePrefix = {arXiv},
|
| 119 |
+
primaryClass = {cs.CL}
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
@misc{vellaisamy2026energy,
|
| 123 |
+
title = {Characterization of Request and Token Energy Costs for {LLM} Inference Workloads on {GPU} Platforms},
|
| 124 |
+
author = {Vellaisamy, Prabhu and Lam, Vanessa and Blanton, Shawn and Shen, John Paul},
|
| 125 |
+
year = {2026},
|
| 126 |
+
month = {8},
|
| 127 |
+
eprint = {2608.28044},
|
| 128 |
+
archivePrefix = {arXiv},
|
| 129 |
+
primaryClass = {cs.AR}
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
@misc{bouchard2026escalation,
|
| 133 |
+
title = {Is Escalation Worth It? A Decision-Theoretic Characterization of {LLM} Cascades},
|
| 134 |
+
author = {Bouchard, Dylan},
|
| 135 |
+
year = {2026},
|
| 136 |
+
month = {5},
|
| 137 |
+
eprint = {2605.06350},
|
| 138 |
+
archivePrefix = {arXiv},
|
| 139 |
+
primaryClass = {cs.LG}
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
@misc{kotte2026ucci,
|
| 143 |
+
title = {{UCCI}: Calibrated Uncertainty for Cost-Optimal {LLM} Cascade Routing},
|
| 144 |
+
author = {Kotte, Varun},
|
| 145 |
+
year = {2026},
|
| 146 |
+
month = {5},
|
| 147 |
+
eprint = {2605.18796},
|
| 148 |
+
archivePrefix = {arXiv},
|
| 149 |
+
primaryClass = {cs.LG}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
@misc{moslem2026clusterrouteescalate,
|
| 153 |
+
title = {Cluster, Route, Escalate: Cascaded Framework for Cost-Aware {LLM} Serving},
|
| 154 |
+
author = {Moslem, Yasmin and Kacmajor, Magdalena and Nedumpozhimana, Vasudevan and Abbas, Ammar and Panahi, Solmaz and Lynch, David and Nie, Zhuangzhuang and Agapitos, Alexandros and Milenovic, Aleksandar and Song, Hongmeng and Shi, Yucheng and Pan, Yue and Buffini, Patricia and Kelleher, John D.},
|
| 155 |
+
year = {2026},
|
| 156 |
+
month = {6},
|
| 157 |
+
eprint = {2606.27457},
|
| 158 |
+
archivePrefix = {arXiv},
|
| 159 |
+
primaryClass = {cs.CL}
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
@misc{dey2026compliancegate,
|
| 163 |
+
title = {{ComplianceGate}: Classifier-Gated Multi-Tier {LLM} Routing for Inference in Regulated Industries},
|
| 164 |
+
author = {Dey, Abhishek},
|
| 165 |
+
year = {2026},
|
| 166 |
+
month = {6},
|
| 167 |
+
eprint = {2606.31163},
|
| 168 |
+
archivePrefix = {arXiv},
|
| 169 |
+
primaryClass = {cs.CL}
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
@misc{varshney2026llmrouter,
|
| 173 |
+
title = {{LLM} Router: Rethinking Routing with Prefill Activations},
|
| 174 |
+
author = {Varshney, Tanay and Surla, Annie and Xu, Michelle and Krishnan, Gomathy Venkata and Jeblick, Maximilian and Austin, David and Vaidya, Neal and Onofrio, Davide},
|
| 175 |
+
year = {2026},
|
| 176 |
+
month = {3},
|
| 177 |
+
eprint = {2603.20895},
|
| 178 |
+
archivePrefix = {arXiv},
|
| 179 |
+
primaryClass = {cs.LG}
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
@misc{park2026vsraq,
|
| 183 |
+
title = {Value-and-Structure Alignment for Routing-Consistent Quantization of Mixture-of-Experts Models},
|
| 184 |
+
author = {Park, Hancheol and Lee, Geonho and Piao, Tairen and Kim, Tae-Ho},
|
| 185 |
+
year = {2026},
|
| 186 |
+
month = {6},
|
| 187 |
+
eprint = {2606.05688},
|
| 188 |
+
archivePrefix = {arXiv},
|
| 189 |
+
primaryClass = {cs.CL}
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
@misc{koikeakino2026ttq,
|
| 193 |
+
title = {{TTQ}: Activation-Aware Test-Time Quantization to Accelerate {LLM} Inference On The Fly},
|
| 194 |
+
author = {Koike-Akino, Toshiaki and Liu, Jing and Wang, Ye},
|
| 195 |
+
year = {2026},
|
| 196 |
+
month = {3},
|
| 197 |
+
eprint = {2603.19296},
|
| 198 |
+
archivePrefix = {arXiv},
|
| 199 |
+
primaryClass = {cs.LG}
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
@misc{counathe2026quasar,
|
| 203 |
+
title = {{QUASAR}: Lowering the Loss Floor of Quantization-Aware Training with Loss-Aware Reconstruction},
|
| 204 |
+
author = {Counathe, Vincent and Athiwaratkun, Ben and De Sa, Christopher and Zhang, Tianyi},
|
| 205 |
+
year = {2026},
|
| 206 |
+
month = {8},
|
| 207 |
+
eprint = {2608.13966},
|
| 208 |
+
archivePrefix = {arXiv},
|
| 209 |
+
primaryClass = {cs.LG}
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
@misc{jim2026recursive,
|
| 213 |
+
title = {What Survives When You Compress a Recursive Reasoner for the Edge?},
|
| 214 |
+
author = {Jim, Pearse and Kolawole, Steven and Busoye, Opegbemi Matthias and Bagai, Glory and Smith, Virginia},
|
| 215 |
+
year = {2026},
|
| 216 |
+
month = {6},
|
| 217 |
+
eprint = {2606.26488},
|
| 218 |
+
archivePrefix = {arXiv},
|
| 219 |
+
primaryClass = {cs.CL}
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
@misc{su2026sra,
|
| 223 |
+
title = {Skill Retrieval Augmentation for Agentic {AI}},
|
| 224 |
+
author = {Su, Weihang and Long, Jianming and Ai, Qingyao and He, Qiaozhi and Tang, Yichen and Wang, Changyue and Tu, Yiteng and Wang, Yingbo and Liu, Yiqun},
|
| 225 |
+
year = {2026},
|
| 226 |
+
month = {4},
|
| 227 |
+
eprint = {2604.24594},
|
| 228 |
+
archivePrefix = {arXiv},
|
| 229 |
+
primaryClass = {cs.CL}
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
@misc{zou2026cobra,
|
| 233 |
+
title = {{CoBRA}: Learning Tool-Use Boundaries via Counterfactual Margins},
|
| 234 |
+
author = {Zou, Wenhao and Liu, Xianglong and Bi, Wendong and Wang, Hanjie and Zhao, Simin and Zhi, Gong},
|
| 235 |
+
year = {2026},
|
| 236 |
+
month = {9},
|
| 237 |
+
eprint = {2609.00967},
|
| 238 |
+
archivePrefix = {arXiv},
|
| 239 |
+
primaryClass = {cs.CL}
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
@misc{bulut2026budgetconfounds,
|
| 243 |
+
title = {It's the Problem, Not the Path: Budget and Difficulty Confounds in {LLM} Reasoning Trajectories},
|
| 244 |
+
author = {Bulut, Yigit Utku},
|
| 245 |
+
year = {2026},
|
| 246 |
+
month = {9},
|
| 247 |
+
eprint = {2609.03436},
|
| 248 |
+
archivePrefix = {arXiv},
|
| 249 |
+
primaryClass = {cs.CL}
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
@misc{ocgquant2026ocg,
|
| 253 |
+
title = {{OCGQuant}: Outlier-Companion Grouping for {NVFP4} Quantization},
|
| 254 |
+
author = {Yao, Yishan and Li, Binjun and Yi, Hanling and Li, Pengyu and Liu, Xiaoqing and Yang, Zihan},
|
| 255 |
+
year = {2026},
|
| 256 |
+
month = {8},
|
| 257 |
+
eprint = {2609.00066},
|
| 258 |
+
archivePrefix = {arXiv},
|
| 259 |
+
primaryClass = {cs.LG}
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
% --- Older entries (2022 -- 2026-02; 8 of 33 refs = 24.2\%) ---
|
| 263 |
+
|
| 264 |
+
@misc{meng2026arcquant,
|
| 265 |
+
title = {{ARCQuant}: Boosting {NVFP4} Quantization with Augmented Residual Channels for {LLMs}},
|
| 266 |
+
author = {Meng, Haoqian and Luo, Yilun and Zhao, Yafei and Liu, Wenyuan and Zhang, Peng and Ma, Xindian},
|
| 267 |
+
year = {2026},
|
| 268 |
+
month = {1},
|
| 269 |
+
eprint = {2601.07475},
|
| 270 |
+
archivePrefix = {arXiv},
|
| 271 |
+
primaryClass = {cs.CL}
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
@misc{li2026dmr,
|
| 275 |
+
title = {Dynamic Mixed-Precision Routing for Efficient Multi-step {LLM} Interaction},
|
| 276 |
+
author = {Li, Yuanzhe and Deng, Jianing and Hu, Jingtong and Chen, Tianlong and Wang, Song and Yang, Huanrui},
|
| 277 |
+
year = {2026},
|
| 278 |
+
month = {2},
|
| 279 |
+
eprint = {2602.02711},
|
| 280 |
+
archivePrefix = {arXiv},
|
| 281 |
+
primaryClass = {cs.CL}
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
@misc{shi2026simpletool,
|
| 285 |
+
title = {{SimpleTool}: Parallel Decoding for Real-Time {LLM} Function Calling},
|
| 286 |
+
author = {Shi, Xiaoxin and Wan, Jiaxin and Dong, Linkang and Jiang, Wei and Liu, Yue and Huang, Zengfeng},
|
| 287 |
+
year = {2026},
|
| 288 |
+
month = {2},
|
| 289 |
+
eprint = {2603.00030},
|
| 290 |
+
archivePrefix = {arXiv},
|
| 291 |
+
primaryClass = {cs.CL}
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
@misc{dong2025compressed,
|
| 295 |
+
title = {Can Compressed {LLMs} Truly Act? An Empirical Evaluation of Agentic Capabilities in {LLM} Compression},
|
| 296 |
+
author = {Dong, Peijie and Tang, Zhenheng and Liu, Xiang and Li, Lujun and Chu, Xiaowen and Li, Bo},
|
| 297 |
+
year = {2025},
|
| 298 |
+
month = {5},
|
| 299 |
+
eprint = {2505.19433},
|
| 300 |
+
archivePrefix = {arXiv},
|
| 301 |
+
primaryClass = {cs.CL}
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
@misc{yang2025qwen3,
|
| 305 |
+
title = {{Qwen3} Technical Report},
|
| 306 |
+
author = {Yang, An and Li, Anfeng and Yang, Baosong and Zhang, Beichen and Hui, Binyuan and Zheng, Bo and Yu, Bowen and Gao, Chang and Huang, Chengen and others},
|
| 307 |
+
year = {2025},
|
| 308 |
+
month = {5},
|
| 309 |
+
eprint = {2505.09388},
|
| 310 |
+
archivePrefix = {arXiv},
|
| 311 |
+
primaryClass = {cs.CL}
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
@misc{patil2023gorilla,
|
| 315 |
+
title = {Gorilla: Large Language Model Connected with Massive {APIs}},
|
| 316 |
+
author = {Patil, Shishir G. and Zhang, Tianjun and Wang, Xin and Gonzalez, Joseph E.},
|
| 317 |
+
year = {2023},
|
| 318 |
+
month = {5},
|
| 319 |
+
eprint = {2305.15334},
|
| 320 |
+
archivePrefix = {arXiv},
|
| 321 |
+
primaryClass = {cs.CL},
|
| 322 |
+
note = {Introduces the function-calling evaluation that the Berkeley Function Calling Leaderboard (BFCL) builds on}
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
@misc{frantar2022gptq,
|
| 326 |
+
title = {{GPTQ}: Accurate Post-Training Quantization for Generative Pre-trained Transformers},
|
| 327 |
+
author = {Frantar, Elias and Ashkboos, Saleh and Hoefler, Torsten and Alistarh, Dan},
|
| 328 |
+
year = {2022},
|
| 329 |
+
month = {10},
|
| 330 |
+
eprint = {2210.17323},
|
| 331 |
+
archivePrefix = {arXiv},
|
| 332 |
+
primaryClass = {cs.LG}
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
@misc{kwon2023vllm,
|
| 336 |
+
title = {Efficient Memory Management for Large Language Model Serving with PagedAttention},
|
| 337 |
+
author = {Kwon, Woosuk and Li, Zhuohan and Zhuang, Siyuan and Sheng, Ying and Zheng, Lianmin and Yu, Cody Hao and Gonzalez, Joseph E. and Zhang, Hao and Stoica, Ion},
|
| 338 |
+
year = {2023},
|
| 339 |
+
month = {9},
|
| 340 |
+
eprint = {2309.06180},
|
| 341 |
+
archivePrefix = {arXiv},
|
| 342 |
+
primaryClass = {cs.LG},
|
| 343 |
+
note = {SOSP 2023; vLLM}
|
| 344 |
+
}
|