Skip to content
Preprint

LegoLM: Structured Weight Sharing for Large Language Models

Aug 2026 · 0 citations · 25 references
Computer Science

TL;DR

It is discovered that outlier dominance grows with model scale: full replacement at K=128 degrades GPT-2 small but catastrophically degrades Mistral-7B by +1,134,279%, while selective replacement at p=99% rescues both models to under +15%.

Abstract

We present \LegoLM{}, a structured weight-sharing compression framework for large language models grounded in a systematic study of why global weight sharing fails and how to fix it. We identify two distinct failure modes. Distributional mismatch: for vector blocks of dimension d<= 2, transformer layers with heterogeneous weight scales impose a scale-mismatch penalty that grows linearly with d and cannot be resolved by increasing K, producing perplexity in the millions.Outlier dominance: for scalar blocks, a fraction ~1/K of weights lies beyond the outermost Lloyd-Max decision threshold and cannot be represented by any centroid; their misrepresentation accumulates across layers, causing catastrophic quality loss. \LegoLM{} resolves both failure modes via three data-free adaptations: 1 scalar-block encoding to eliminate the $d$-linear mismatch component, 2 percentile-selective replacement that identifies and preserves outlier weights verbatim, and 3 boundary-layer protection for the first and last transformer blocks. Across GPT-2 small (124M) and Mistral-7B, \LegoLM{} achieves +0.03% PPL degradation at 4.41X compression on Mistral-7B - outperforming PTQ-8bit in both quality and compression ratio - and -0.02% at 2.67X. Downstream evaluation on LAMBADA and HellaSwag confirms that \LegoLM{} at K=64, p=99% preserves accuracy within noise at 5.12 X compression, exceeding PTQ-8bit's compression ratio while matching its accuracy. We further discover that outlier dominance grows with model scale: full replacement at K=128 degrades GPT-2 small by only +23% but catastrophically degrades Mistral-7B by +1,134,279%, while selective replacement at p=99% rescues both models to under +15%. A controlled ablation confirms that selective replacement is the dominant mechanism: adding it to per-layer K-means also yields near-lossless quality, matching \LegoLM{} within 0.02%.

View source

Similar papers

Preprint Aug 2026

Mapping and Measuring the Behavioral Evolution of Large Language Models

An architecture-agnostic sufficient condition is established linking behavioral similarity to inference-prompt coverage, small excess population log-loss, and similar effective target distributions---a possible training-side account rather than an empirical explanation of the observed trends.

Dong Qiao, Chris Ding, Jicong Fan · 0 citations
Preprint Jul 2026

Rethinking Heterogeneous LLM Merging: A Weighted Model Averaging Perspective

The results show that simple parameter averaging, when paired with lightweight dimensional adaptation and carefully controlled ratios, is a surprisingly strong baseline for heterogeneous LLM merging, suggesting that the limits of direct weighted fusion may also bound what more complex heterogeneous merging methods can...

Jiahe Fan, Yinghao Hou, Sixiang Chen et al. · 0 citations
Jul 2026

Convolution for Large Language Models

These results support depthwise convolution as a lightweight complement to self-attention for modeling short-range token interactions and suggest that the convolution makes repeated token IDs more sensitive to their immediate context.

Yu-Chuan Tian, Yingte Shu, Wei He et al. · 0 citations
Preprint Aug 2026

Decodable But Not Detachable: Training Data Granularity Determines Parametric Modularity in Large Language Models

This work applies a uniform causal methodology across two domain granularities, three model families, and eight domains to identify domain-specific parametric shells: concentrated, causally necessary neuron populations whose removal selectively degrades a target domain while sparing others.

M. Armstrong, Navid Ayoobi, Arjun Mukherjee · 0 citations

Opleiding DSAI Pruning-aware Shapley values estimation for Large Language Models

It is reported that the nonuniform semistructured framework detects critical layers and that, as demonstrated through successive pruning experiments, their preservation from pruning greatly reduces performance degradation, compared to a fully pruned model.

Ann Marini, Qinyu Chen, Nusa Zidaric · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.