Manuscript Offprint

arXiv:2610.20682

TurboMamba: Faster Inference, Faster Training, and Better Prediction with Lexical Memory

Hanxin Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We introduce TurboMamba, a language-model architecture for faster inference, faster training, and better token prediction. A global Mamba-3 model runs once per completed token block. A small Transformer uses this global context and earlier tokens within the block to predict the next token. Three lightweight additions improve local predictions: direct access to the previous block's last token, a small correction to next-token scores, and a learned mixture with recent-token frequencies. We compare twelve small-scale implementations on public FineWeb-Edu, with comparable parameter counts and shared training-budget caps. The baselines include Transformer, Mamba-3, Jamba, and Zamba. The Jamba and Zamba versions use Mamba-3 in place of their original Mamba modules. TurboMamba achieves the lowest mean test prediction loss (negative log-likelihood, NLL) among all twelve models. Its mean NLL is 9.4% lower than that of Mamba-3, 7.3% lower than that of the Jamba version, and 18.3% lower than that of the Zamba version. End-to-end training throughput is 2.60×2.60\times that of Mamba-3, 2.81×2.81\times that of the Jamba version, and 4.82×4.82\times that of the Zamba version. We measure end-to-end batch latency for a batch of 32 sequences, each with a 256-token prompt and 128 generated tokens. On this workload, TurboMamba achieves a 3.12×3.12\times speedup over Mamba-3, a 3.53×3.53\times speedup over the Jamba version, and a 6.21×6.21\times speedup over the Zamba version.

1 Introduction

Every generated text unit, or token, has two costs: carrying forward the context and producing an accurate prediction. Transformers retain detailed context through attention. State-space models such as Mamba carry it in a compact recurrent state [Gu and Dao, 2023, Lahoti et al., 2026]. Hierarchical models reduce work further by processing groups of tokens with a global model and predicting the tokens with a smaller local model [Yu et al., 2023, Ho et al., 2024, Egli et al., 2025].

TurboMamba follows a simple design principle: spend global computation on blocks, and spend a small amount of extra computation on token detail. A global Mamba-3 stack processes completed token blocks. A lightweight local Transformer predicts each token using the global context and the tokens already available inside the block. A boundary connection, a residual vocabulary correction, and a recent-count mixture enrich this local prediction path. Model width, block size, stack depths, and memory length define a configuration of the architecture; the experiment below evaluates one small-scale configuration.

We call our basic comparison model the Plain block model. It uses the same block-level Mamba-3 and local Transformer stacks, but omits the previous-block token connection, residual vocabulary correction, and recent-token mixture. Each block's first token is predicted from its global prefix; later tokens also use earlier tokens in that block.

Preprint.

Table 1: Mechanism comparison. The rows describe architectural designs; the experiments use matched small-scale implementations. TurboMamba combines blockwise global computation with three additions to its local prediction path.

ArchitectureGlobal computationLocal predictionAdded detail or routing
TurboMambaMamba-3 per fixed blockSmall Transformer with global prefixBoundary connection, residual head, count mixture
JambaToken-level Mamba and attentionToken-level hybrid layersTop-2 experts in selected layers
ZambaToken-level MambaRepeated shared attention branchOriginal-embedding concatenation; shared attention/feedforward
BSTToken-level state-space modelBlock-local self/cross-attentionState-space context in local attention
MBLMFixed multiscale hierarchyLocal decoder with global context vectorsSeparate stage embeddings
H-NetLearned dynamic chunksFine encoder and decoder around main modelLearned boundaries; smoothed chunk expansion
BTAttention per fixed blockLocal Transformer with global prefixesCoarse-to-fine token modeling
Cache TransformerToken-level attentionCommon TransformerHidden-similarity lexical cache
Pointer SentinelToken-level attentionCommon TransformerLearned pointer/vocabulary mixture
Plain block modelMamba-3 per fixed blockSmall Transformer with global prefixThree local enhancements removed
Mamba-3Recurrent update per tokenToken-level state-space stackCompact recurrent context
TransformerFull causal attentionToken-level attention stackDetailed attention history

Our contributions are threefold. First, we specify and jointly train this lexical enhancement package within a blockwise Mamba-3 architecture. Second, we implement incremental generation with block-level state updates and token-level lexical updates. Third, we compare twelve implementations spanning attention, state-space models, layer hybrids, hierarchies, and lexical memory under a common public-data and budget protocol. We measure prediction quality, end-to-end training throughput, generated-text diagnostics, and end-to-end batch latency across five batch sizes.

References (20)