From Large to Super-Tiny: End-to-End Optimization for Cost-Efficient LLMs

Jiliang Ni, Jiachen Pu, Zhongyi Yang, Kun Zhou, Hui Wang, Xiaoliang Xiao, Dakui Wang, Xin Li, Jingfeng Luo, Conggang HuarXiv 2025 · OpenReview

Abstract

Large Language Models (LLMs) have significantly advanced artificial intelligence by optimizing traditional Natural Language Processing (NLP) workflows. However, direct integration of massive LLMs often leads to prohibitive costs or suboptimal performance after fine-tuning. We introduce a three-stage cost-efficient end-to-end LLM deployment pipeline—comprising prototyping, knowledge transfer, and model compression—to address the cost-performance dilemma. Our framework simplifies system complexity, producing super-tiny (0.4B) online models with enhanced performance and reduced costs. By combining techniques like rejection sampling fine-tuning, reinforcement learning, and knowledge distillation, we transfer knowledge from a 72B teacher to 0.5B student models. Further compression via quantization and pruning achieves ultra-low latency. Experimental results demonstrate a 180x reduction in model size with nearly consistent performance and a 92.9% reduction in latency.

Introduction

Deploying LLMs in production environments presents a significant challenge: the "cost-performance" dilemma. While large models like Qwen2.5-72B offer high reasoning capabilities, they are often too slow and expensive for real-time applications. Conversely, smaller models typically lack the reasoning depth, such as Chain-of-Thought (CoT), required for complex tasks like function calling. Traditional systems often rely on fragmented BERT-based pipelines that are difficult to maintain. This paper proposes a unified approach to replace these systems with a single, "super-tiny" LLM that maintains high performance at a fraction of the cost.

Methodology

The proposed optimization pipeline consists of three distinct stages designed to bridge the gap between high-performance large models and efficient tiny models.

The three-stage pipeline for cost-efficient LLM deployment: (a) Prototyping, (b) Knowledge Transfer and Compression, and (c) Application.

1. Prototyping

The first stage involves building an optimal performance prototype using a massive "teacher" model (Qwen2.5-72B-Instruct) combined with Retrieval-Augmented Generation (RAG). This system transforms complex user queries into function calls, serving as a "gold standard" to generate high-quality synthetic training data. This stage addresses the lack of extensive high-quality data in many project development cycles.

2. Hybrid Knowledge Transfer

This stage is the core innovation of the framework. Small models (under 1B) typically struggle with Reinforcement Learning (RL) because they cannot generate diverse or coherent reasoning paths. To overcome this, the researchers first train a 7B model using RL to master reasoning. They then employ Knowledge Distillation (KD) to transfer these reasoning capabilities and CoT patterns into a 0.5B student model. This hybrid approach allows the student model to mimic the sophisticated reasoning of the teacher.

3. Model Compression

The 0.5B model is further optimized for production deployment:

  • Structured Pruning: The model is reduced to 0.4B parameters by removing entire layers (depth pruning) or channels (width pruning). Depth pruning was found to be superior for domain-specific tasks, achieving 20% acceleration with minimal accuracy loss.
  • Quantization: Implementing 4-bit weight-only (GPTQ) and 8-bit weight-activation (FP8) strategies maximizes hardware acceleration on modern GPUs.

Experimental Results

The framework was evaluated using internal production data and public benchmarks like the Berkeley Function-Calling Leaderboard (BFCL).

Achievable Rate (%) vs. FLOPs (G) across different model sizes and optimization techniques, showing the efficiency of the 0.4B and 0.5B models compared to BERT and larger LLMs.

Efficiency and Performance

The final 0.4B model achieved a 180x compression ratio compared to the original 72B model. Despite the extreme reduction in size, the tiny model outperformed traditional BERT-based systems by an absolute 14% in accuracy. In terms of latency, the 0.4B version delivered a 17.4x improvement in throughput and a 92.9% reduction in latency compared to a 7B model, dropping from ~882ms to ~62ms under specific loads.

RL+KD Synergy

A key insight is the synergy between RL and KD. While 0.5B models are too small to learn via RL directly, they are highly effective at mimicking the CoT produced by an RL-trained teacher. This strategy preserves reasoning capabilities that would otherwise be lost in sub-1B models.

Conclusion

This paper demonstrates a systematic approach to creating "super-tiny" LLMs for production. By treating all NLP tasks as a unified function-calling interface and leveraging a three-stage optimization pipeline, the authors achieved massive efficiency gains without sacrificing performance. The modular design of the framework suggests potential applicability across various domains in the NLP landscape.

Summary updated

BibTeX
@misc{ni2025from,
  author = {Jiliang Ni and Jiachen Pu and Zhongyi Yang and Kun Zhou and Hui Wang and Xiaoliang Xiao and Dakui Wang and Xin Li and Jingfeng Luo and Conggang Hu},
  title = {{From Large to Super-Tiny: End-to-End Optimization for Cost-Efficient LLMs}},
  year = {2025},
  eprint = {2504.13471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.13471},
}
Figure