Scaling Down, Serving Fast: Compressing and Deploying Efficient LLMs for Recommendation Systems

Kayhan Behdin, Ata Fatahibaarzi, Qingquan Song, Yun Dai, Aman Gupta, Zhipeng Wang, H. S. Sang, Shao Tang, Gregory Dexter, Sirou Zhu, Siyu Zhu, Tejas Dharamsi, Vignesh Kothapalli, Zhoutong Fu, Yihan Cao, Pin-Lun Hsu, Fedor Borisyuk, Natesh S. Pillai, Luke Simon, Rahul Mazumder

Abstract: Kayhan Behdin, Ata Fatahibaarzi, Qingquan Song, Yun Dai, Aman Gupta, Zhipeng Wang, Hejian Sang, Shao Tang, Gregory Dexter, Sirou Zhu, Siyu Zhu, Tejas Dharamsi, Vignesh Kothapalli, Zhoutong Fu, Yihan Cao, Pin-Lun Hsu, Fedor Borisyuk, Natesh S. Pillai, Luke Simon, Rahul Mazumder. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: Industry Track.

2025.

Introduction

In the industrial landscape of Recommendation Systems (RecSys), the "scaling laws" of Large Language Models (LLMs) often clash with the harsh realities of latency and operational costs. While 100B+ parameter models offer impressive performance, deploying them for real-time ranking or retrieval—where responses are required in milliseconds—is frequently infeasible. This paper presents a blueprint for "scaling down" these massive models into efficient Small Language Models (SLMs) that retain the performance of their larger counterparts while meeting strict production constraints.

The Compression Pipeline

The core of the proposed approach is a three-stage "Distill-Prune-Redistill" methodology designed to minimize accuracy loss during compression.

  1. Initial Distillation: A smaller student model is trained to mimic the outputs of the full teacher model.
  2. One-shot Structured Pruning: Redundant neurons and attention heads are removed using the OSSCAR algorithm. Unlike unstructured pruning, this method produces dense matrices that are highly optimized for hardware execution.
  3. Re-distillation: A final distillation phase helps the pruned model recover generalization capabilities lost during the pruning step.
The three-stage Distill-Prune-Redistill pipeline for model compression.

To further optimize serving, the authors utilize FP8 quantization and the SGLang engine with RadixAttention for efficient prefix caching and high throughput.

Key Insights and Methodology

Several critical findings emerged from the researchers' experiments across both internal LinkedIn data and open-source benchmarks like Llama-3.1 and Qwen-2.5:

  • Logit Supervision vs. SFT: Using the teacher's "soft" logits (probability distributions) for supervision consistently outperformed standard Supervised Fine-Tuning (SFT) on "hard" ground-truth labels. This suggests that the nuanced information in the teacher's distribution is vital for the student's learning.
  • The Capacity Gap: Interestingly, a smaller teacher (e.g., 3B) can sometimes be more effective for a 1.5B student than a much larger one (e.g., 7B). If the teacher's complexity is too high, the student may fail to effectively mimic it.
  • Attention as the Bottleneck: In scenarios involving long user histories, the attention mechanism becomes the primary latency driver. Structured pruning specifically targeting attention heads yielded significant speedups in prefill latency.
Comparison of AUC Delta (%) between Knowledge Distillation (KD) and Supervised Fine-Tuning (SFT) for different model sizes.

Key Results

The application of this pipeline to a 100B+ parameter Mixture-of-Experts (MoE) foundation model yielded impressive industrial results:

  • Size Reduction: Achieved a 20x reduction in model size with negligible loss in Area Under the Curve (AUC) for ranking tasks.
  • Latency Improvements: Structured pruning led to a 40% improvement in attention latency and a 28% speedup in the prefill phase.
  • Reasoning Performance: On specialized reasoning benchmarks, the distillation recipe improved student performance by over 20% compared to base versions.
  • Hardware Efficiency: FP8 quantization provided the optimal balance of speed and quality on NVIDIA H100 GPUs, while INT4 (W4A16) was most effective for older A100 hardware.

Conclusion and Future Work

This work demonstrates that through a combination of structured pruning and multi-stage distillation, massive foundation models can be successfully adapted for high-throughput, low-latency environments. Future research will explore integrating state-of-the-art sparse attention techniques and investigating how these recipes generalize to more complex creative and coding tasks.

Summary updated

BibTeX
@misc{behdin2025scaling,
  author = {Kayhan Behdin and Ata Fatahibaarzi and Qingquan Song and Yun Dai and Aman Gupta and Zhipeng Wang and H. S. Sang and Shao Tang and Gregory Dexter and Sirou Zhu and Siyu Zhu and Tejas Dharamsi and Vignesh Kothapalli and Zhoutong Fu and Yihan Cao and Pin-Lun Hsu and Fedor Borisyuk and Natesh S. Pillai and Luke Simon and Rahul Mazumder},
  title = {{Scaling Down, Serving Fast: Compressing and Deploying Efficient LLMs for Recommendation Systems}},
  year = {2025},
  eprint = {2502.14305},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.14305},
}
Figure