PTC-Decoder: Towards Intelligent SLMs on Offline Resource-Constrained Edge Devices
Organizations: Shanghai Jiao Tong University, Computer Institute · Shanghai Landfun Information Technology
Abstract
Deploying small language models (SLMs) on offline, resource-constrained edge devices such as remote sensing satellites presents a fundamental challenge: their limited reasoning capacity hinders reliable execution of multi-step agent tasks requiring complex tool orchestration. Existing plan-solve paradigms rely on prompt-based enforcement, which our experiments show SLMs almost entirely disregard: weak models fail to invoke the plan. We propose PTC-Decoder (Plan-Tool Constrained Decoder), a training-free, plug-and-play decoder framework that combines (1) a Plan-to-Act paradigm, which elevates planning to an atomic tool and forces its invocation at the first inference step, and (2) TC-Decoder, a deterministic finite automaton that imposes token-level hard constraints on tool names while preserving freedom over parameter generation, thereby retaining SLM reasoning capability. Evaluated on 200 real remote-sensing satellite tasks across 7 SLMs, PTC-Decoder yields a statistically significant mean overall score gain of +1.21 (p<0.01), 95% CI [+1.13, +1.29]), with consistent improvements across models and other datasets. An ablation study that removes TC-Decoder causes substantial performance degradation across all quality metrics without reducing computational cost, confirming TC-Decoder as the primary driver. PTC-Decoder thus offers a lightweight yet effective solution for improving step-level reliability, with final-answer accuracy remaining an open challenge. In essence, we enforce plan adherence by constraining the permissible output vocabulary during inference, without requiring retraining.
Figures & tables
| Baseline | Prompt-Plan | |||
|---|---|---|---|---|
| Model | P.R. | Suc. | P.R. | Suc. |
| Qwen3-1.7B | .10 | 1.00 | .88 | .71 |
| Qwen3.5-2B | .00 | .79 | .13 | .86 |
| Qwen3.5-0.8B | .07 | .92 | .20 | .99 |
| Qwen3-0.6B | .03 | .99 | .47 | 1.00 |
| Gemma-4-2B(Q4) | .00 | 1.00 | .66 | 1.00 |
| Baseline | PTC-Decoder (Ours) | Plan w/o TC-Decoder | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | H. | Ov. | R.A. | F.R. | Rb. | H. | Ov. | R.A. | F.R. | Rb. | H. | Ov. | R.A. | F.R. | Rb. |
| Qwen3-1.7B | 2.05 | 1.98 | 0.87 | 2.12 | 2.71 | 3.10 | 2.94 | 2.32 | 2.97 | 3.06 | 2.45 | 2.67 | 1.34 | 2.94 | 3.03 |
| Qwen3.5-2B | 1.70 | 1.28 | 0.41 | 1.19 | 2.25 | 3.35 | 3.12 | 2.81 | 3.27 | 2.73 | 1.50 | 1.34 | 0.30 | 1.41 | 2.22 |
| Qwen3.5-0.8B | 1.05 | 1.15 | 0.42 | 0.96 | 2.04 | 2.55 | 2.29 | 1.73 | 2.31 | 2.67 | 1.55 | 1.51 | 0.53 | 1.64 | 2.17 |
| Qwen3-0.6B | 0.95 | 1.27 | 0.74 | 1.15 | 2.02 | 2.40 | 2.23 | 1.60 | 2.23 | 2.44 | 1.10 | 1.27 | 0.23 | 1.05 | 2.63 |
| Gemma-4-2B(Q4) | 1.90 | 1.71 | 0.95 | 1.69 | 2.55 | 3.25 | 3.05 | 2.42 | 3.31 | 2.60 | 1.55 | 1.36 | 0.22 | 1.45 | 2.64 |
| Baseline | PTC-Decoder (Ours) | Plan w/o TC-Decoder | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | R. | P. | F1 | Tokens | R. | P. | F1 | Tokens | R. | P. | F1 | Tokens |
| Qwen3-1.7B | .187 | .413 | .249 | 3437+181 | .305 | .295 | .292 | 7018+399 | .252 | .647 | .355 | 7018+370 |
| Qwen3.5-2B | .123 | .137 | .123 | 3424+185 | .388 | .284 | .318 | 7229+646 | .147 | .214 | .162 | 7000+509 |
| Qwen3.5-0.8B | .104 | .180 | .125 | 3424+137 | .229 | .237 | .227 | 7000+425 | .171 | .325 | .212 | 7000+421 |
| Qwen3-0.6B | .148 | .167 | .155 | 3437+112 | .250 | .249 | .246 | 7018+356 | .000 | .000 | .000 | 7018+262 |
| Gemma-4-2B(Q4) | .246 | .328 | .279 | 3130+112 | .379 | .361 | .359 | 6435+868 | .097 | .128 | .109 | 6435+422 |
LLM Tool Use
Large language model tool use studies how models select, call, and coordinate external tools to extend their reasoning and take actions.
See all 295 papers