LM2 Compiling a Language Model into Another Model Weights
Abstract
Deploying a conversational model and a specialist together could avoid maintaining a separate specialist service. We present LM2, which embeds a trained story generator into a larger conversational model. The larger model handles the conversation and invokes the generator for story requests. We constrain the generator arithmetic during training so its calculations can be compiled directly into added model layers. We compare this approach with QwenPU, which executes the stories260K language model on an embedded processor. LM2 requires one host token per generated character, compared with approximately 25,000 for QwenPU. However, its story generator predicts held out text less well, i.e. 1.145 bits per character versus 0.894 for stories260K, where lower is better. The Qwen3.5, 0.8B implementation occupies 18.1 GB and generates the same characters as a standalone integer implementation of the inner model in the tested runs. These results illustrate a tradeoff between host-token cost and text-prediction performance.
Create a lesson
Related papers
Self-WSP: Can Language Models Improve Themselves Through Weight-Space Programming?
Shared title terminology · Guoming Ling, Shanshan Zhong, Kaixuan Zhang et al.
Weight-Space Programming Writes In-Context Learning and Matches Fine-Tuning in Language Models
Shared title terminology · Konstantinos Skianis, Aristidis Likas
Grammar Sparsity Sets How Transformers Learn Random Languages
Shared title terminology · Edgar Andres Hernandez Moreno, Francesco Cagnetta
Diversity in Unity, Theory in Practice: Hierarchical Multitask Benchmarks for Chinese Minority Languages
Shared title terminology · Yijie Li, Xi Cao, Yuan Sun et al.
Explainable Emotion and Mental Health Reasoning in Large Language Models Using Theories of Emotion
Shared title terminology · Tadesse Destaw Bela, Iqra Ameer, Helena Gómez Adorno et al.
Single-Coordinate Activation Steering for Controllable Social Stance in Language Models
Shared title terminology · Naman Chawla, Chhavi Dhiman