arXiv:2611.22842cs.LGNov 2026

Manuscript Offprint

arXiv:2611.22842

SilverSpoon-KD: A General-Purpose Toolkit for Knowledge Distillation

Xaver R. Davey, David Broman

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

Abstract

Knowledge distillation transfers deep learning representations from a teacher model to a student model, typically reducing model size or inference cost. However, knowledge distillation tooling has not kept pace with the breadth of research methods: existing toolkits typically support only a limited subset of techniques and use cases. We present SilverSpoon-KD, an open-source PyTorch toolkit that unifies different distillation paradigms and architectural relationships across workloads and applications behind a single API. Moreover, SilverSpoon-KD offers the first general-purpose blockwise knowledge distillation implementation with unique scalability features. We validate its versatility across vision, masked language model, and causal language models on tasks spanning homogeneous, heterogeneous, and quantization distillation across paradigms. We also evaluate SilverSpoon-KD by comparing its performance—including throughput and GPU memory usage—with existing toolkits. Despite extensive support for convenience, metric calculation, and tracking, we have found SilverSpoon-KD’s performance to be on par with or better than existing toolkits.

1 Introduction

Knowledge distillation (KD) [1] is a family of techniques for transferring learned representations from a teacher model (the trained source) to a student model (the target being trained, typically smaller), primarily to reduce inference cost (Figure 1a). KD workflows vary along three largely orthogonal axes (Figure 1b–d): the workload (general task or training objective), the architectural relationship between teacher and student, and the distillation paradigm (how signals flow from teacher to student). Architectural relationships span homogeneous compression (same architecture family, smaller student) [2, 3], heterogeneous transfer (different architecture families with distinct internal operations) [4, 5], quantization-based distillation [6], and self-distillation [7, 8]. These techniques are central to deploying large models at scale, with successes spanning compressed CNN image classifiers [9], encoder language models like DistilBERT [2], and the distillation of modern LLMs [10].

(a) What KD doesTeacher(inference, larger)Student(trained, smaller)knowledge transferred via logits, intermediate features, or sample relations (b) WorkloadsVisionMasked LMCausal LMOthers⋯\cdots(c) Architectural relationshipssame arch. familydifferent arch. familylower precisionteacher ≈\approx studentFP32INT8self(d) Distillation paradigmsResKDResponse-basedFeatKD (feature-based)HKDHolistic (end-to-end)BKDBlockwise (independent)RelKDRelation-basedlogits output distribution only (no intermediate access) featureslogitsbp full student forward; one backward through whole chain featureslogitsbp detached teacher-forced inputs; independent per-block backward x_{1}$$x_{2}d(T)d(S)match match relationships between samples; can compose with previous

Figure 1: Knowledge distillation at a glance. KD spans diverse workloads, architectural relationships, and paradigms; existing tooling covers narrow slices of this combinatorial space, motivating a general-purpose toolkit. Panel (d) shows the four paradigms used throughout the paper: response-based (ResKD), feature-based (FeatKD), holistic (HKD), blockwise (BKD), and relation-based (RelKD).

The paradigm axis comprises four families. Response-based KD is the most fundamental approach, matching the teacher’s output distribution [1]. By contrast, feature-based KD aligns intermediate representations either through holistic KD [11] or blockwise KD [12], with isolated student blocks trained with teacher-forced inputs. Finally, relation-based KD [13] matches inter-sample relationships and can compose orthogonally with any of the other paradigms.

Despite the breadth and maturity of KD research, tooling has arguably not kept pace: response-based KD is well-served, but feature-based KD demands capturing intermediate tensors that vary significantly across architectures, often forcing researchers to build custom pipelines per project. A few dedicated toolkits support only holistic KD, and to our knowledge, no existing toolkit facilitates blockwise KD out of the box. KD tools have also lagged behind the broader deep learning ecosystem: the community increasingly expects scalable training infrastructure with built-in evaluation, logging, and multi-device support—as exemplified by Hugging Face’s Transformers [14]. However, current KD tooling often lacks these engineering conveniences.

This paper presents SilverSpoon-KD, a toolkit designed to be a comprehensive solution for KD. Our key contributions are:

  • Multi-workload, multi-architecture, multi-paradigm coverage in one API: SilverSpoon-KD supports key workloads (vision, masked LM, causal LM), all architectural relationships, and all four KD paradigms behind a single API. A general-purpose abstraction is a non-trivial contribution (removing hard-coded assumptions while keeping the API ergonomic).
  • First general-purpose blockwise KD implementation: To our knowledge, SilverSpoon-KD is the first open-source toolkit to provide a general abstraction for blockwise KD. Prior implementations have been narrowly scoped and tied to specific use-cases, leaving users to build custom pipelines.
  • Practical engineering breadth with measured performance gains: SilverSpoon-KD interoperates with PyTorch [15], the HuggingFace Trainer, and the standard parallelism stack (DDP, FSDP, DeepSpeed). It offers flexible teacher placement, automatic teacher–student dimension matching via projectors, asynchronous teacher–student CUDA streams, and built-in evaluation. The resulting throughput and memory gains over existing toolkits are modest but consistently present across all three workloads; they accrue primarily from the sum of many parts rather than from any single optimization, which is notable given SilverSpoon-KD’s broader feature surface.

References (43)