mlsanityData to 7 Oct 2026

MoSE: Hierarchical Self-Distillation Enhances Early Layer Embeddings

arXiv 2503.03008 ↗First posted 4 Mar 2025cs.CL cs.AI cs.PLcited by 2

Not on the map. Why?

Abstract (arXiv)

Deploying language models often requires navigating accuracy vs. performance trade-offs to meet latency constraints while preserving utility. Traditional model distillation reduces size but incurs substantial costs through training separate models. We introduce ModularStarEncoder (MoSE), a 1-billion-parameter multi-exit encoder for code retrieval and classification that employs a novel Self-Distillation mechanism. This approach significantly enhances lower-layer representations, enabling flexible deployment of different model portions with favorable performance trade-offs. Our architecture improves text-to-code and code-to-code search by targeting specific encoder layers as exit heads, where higher layers guide earlier ones during training, thereby improving intermediate representations at minimal additional cost. We further enhance MoSE with a repository-level contextual loss that maximizes training context window utilization. Additionally, we release a new dataset created through code translation that extends text-to-code benchmarks with cross-language code-to-code pairs. Evaluations demonstrate the effectiveness of Self-Distillation as a principled approach to trading inference cost for accuracy across various code understanding tasks.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 36 of its 45 references that are in the map. First posted on arXiv 4 Mar 2025.

Builds on

36 of 45 references.

References · 36

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2024The Llama 3 Herd of Modelscited by 14,192
  5. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  6. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  7. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  8. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  9. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  10. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  11. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  12. 2018Deep contextualized word representationscited by 2,285
24 more
  1. 2015Learning both Weights and Connections for Efficient Neural Networkscited by 1,998
  2. 2017Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inferencecited by 1,548
  3. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  5. 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,153
  6. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  7. 2023StarCoder: may the source be with you!cited by 790
  8. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  9. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  10. 2024DeepSeek LLM: Scaling Open-Source Language Models with Longtermismcited by 621
  11. 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 591
  12. 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 527
  13. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  14. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  15. 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 329
  16. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  17. 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 307
  18. 2024Extreme Compression of Large Language Models via Additive Quantizationcited by 223
  19. 2023From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inferencecited by 168
  20. 2023The geometry of hidden representations of large transformer modelscited by 108
  21. 2024CoIR: A Comprehensive Benchmark for Code Information Retrieval Modelscited by 59
  22. 2024Code Representation Learning At Scalecited by 26
  23. 2023An Empirical Comparison of Pre-Trained Models of Source Codecited by 25
  24. 2023LEONARDO: A Pan-European Pre-Exascale Supercomputer for HPC and AI Applicationscited by 12

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.