A Tool in the Forward Pass: Frozen Tape Modules as Layers of a Small Language Model
Michael Granitzer, Saber Zerhoudi, Mohammad Al-Maamari, Hai Dang Dang, Kanishka Ghosh Dastidar
Abstract
Calling a tool through generated text adds decoding steps, even when the computation itself is short. We study an alternative: a small neural module that runs inside a language model's forward pass. A learned writer turns hidden states into a symbolic tape, a short sequence of discrete symbols that encodes the computation. The module, trained separately and then frozen, reduces the tape to a result, and a learned reader returns that result to the model. We evaluate arithmetic and object tracking in gemma-3-1b-it. With a writer trained on labelled tapes, the layer answers all 750 items of BIG-Bench Hard's tracking shuffled objects correctly. At seven people it needs about 1/10 of the GPU kernel time of a text-tool baseline that uses the same host model and exact code, with accuracy 1.00 against 0.99. The writer can also be learned from answers alone, guided by a hand-written copying prior, but less reliably: 5 of 6 runs succeed in the 1B host and 2 of 4 in the 4B host. Two independently trained layers keep their task accuracy when attached to one model, and a learned gate keeps them silent on the tested general-text and look-alike prompts. The results support a narrow use case: a bounded computation that returns one symbol can avoid the decoding cost of a textual tool call. Extracting the right input reliably, and deciding when to act, remain the main open problems.
Create a lesson
Metadata
- Categories
- cs.AI, cs.NE
- Comments
- 12 pages, 1 figure, 9 tables. Code, configurations, results and frozen modules: https://doi.org/10.5281/zenodo.23831494
Related papers
Layer-Level Control of Language Model Execution in Agent Frameworks
Shared title terminologycs.AIRan Guan, Yiqi Lin, Xiangxi Tian et al.
Selection Policies for Equal-Byte Mixed-Precision Quantization of Small Language Models
Shared title terminologycs.AISmit Anand
Compression Technique Interactions in Small Language Models: A Factorial Ablation Study
Shared title terminologycs.AIBhushit Nema, Siddharth Krishnamurthy, Anjali Kadiyala
From Small to Large: Assessing Medical Reasoning, Benchmark Contamination, and Model Size in Language Models
Shared title terminologycs.AINavapat Nananukul, Mayank Kejriwal
Learning from Another Angle: Rotation-Based Test-Time Training for Multimodal Large Language Models
Shared title terminologycs.AIChangyu Liu, Fei Zhao, Yiyang Liu et al.
StudioBench: Benchmarking Agentic Multimodal Large Language Models for Productive Audiovisual Creation
Shared title terminologycs.AIXinglong Xu, Yuxia Zhu, Siyuan Li et al.