For a toolkit for knowledge distillation, the first results are tencent/pocketflow (PocketFlow is an integrated model compression toolkit with a dedicated knowledge distillation engine, quantization, pruning, and automated hyperparameter tuning, directly matching the need for a comprehensive framework to compress models while retaining accuracy), meta-pytorch/torchtune and huggingface/open-r1 (Open-r1 is a framework specifically designed for large-scale training and distillation of language models, with a focus on reasoning and programming tasks — it fits the knowledge distillation category but is narrower in scope than a general-purpose distillation framework). openai/consistency_models and huggingface/sentence-transformers round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
Frameworks and techniques for compressing large language models into smaller, more efficient, and performant versions.
PocketFlow is an integrated toolkit for deep learning model compression, distributed training, and mobile format optimization. It provides a system for reducing the size and complexity of neural networks to improve inference efficiency, featuring a dedicated engine for knowledge distillation and a mobile model optimizer. The framework differentiates itself through an automated hyperparameter tuning system that uses reinforcement learning and statistical models to determine optimal compression ratios and layer-wise bit allocation. It also includes a distributed training system that utilizes mu
PocketFlow is an integrated model compression toolkit with a dedicated knowledge distillation engine, quantization, pruning, and automated hyperparameter tuning, directly matching the need for a comprehensive framework to compress models while retaining accuracy.
Torchtune is a PyTorch-native library for fine-tuning, aligning, and quantizing large language models. It provides a config-driven system for instantiating components, orchestrating distributed training, and managing parameter-efficient fine-tuning with quantization support, all through YAML-based configurations and command-line overrides. The library distinguishes itself through its comprehensive post-training workflow orchestration, combining supervised fine-tuning, preference optimization (DPO, PPO, GRPO), knowledge distillation, and quantization-aware training in a single configurable pip
Torchtune is a PyTorch-native library that includes knowledge distillation as part of its comprehensive post-training workflow, along with fine-tuning, quantization, and pruning, making it a solid fit for compressing LLMs, though it may not cover data-free distillation or multi-teacher architectures.
Open-r1 is a framework designed for the large-scale training, distillation, and optimization of language models focused on complex reasoning and programming tasks. It provides a comprehensive suite of tools for managing distributed training jobs across multi-node clusters, enabling the development of high-performance models through reinforcement learning and supervised fine-tuning. The project distinguishes itself by integrating secure, containerized code execution environments directly into the training and evaluation lifecycle. By allowing models to run and verify code snippets against test
Open-r1 is a framework specifically designed for large-scale training and distillation of language models, with a focus on reasoning and programming tasks — it fits the knowledge distillation category but is narrower in scope than a general-purpose distillation framework.
This project is a framework for training and sampling generative models designed to produce high-quality images in few steps. It provides implementations for image generation models that transform random noise into structured visual data through an optimized sampling process. The system specializes in accelerating image generation through consistency distillation and consistency training. It includes tools to transform pre-trained diffusion models into faster versions by distilling knowledge from a teacher model into a student model, as well as methods to train consistency models from scratch
openai/consistency_models is a framework for distilling knowledge from diffusion models into faster consistency models for image generation, which fits knowledge distillation, but its specialization to generative models and lack of support for quantization, pruning, or arbitrary framework integration makes it a narrower answer than what the full feature list describes.
This project is a transformer-based framework for generating dense and sparse vector embeddings of text and multimodal data. It serves as a library for fine-tuning models to perform semantic similarity tasks, retrieval, and reranking. The system is distinguished by its support for diverse architectural patterns, including bi-encoders for fast similarity search and cross-encoders for high-precision reranking. It provides dedicated pipelines for multimodal embeddings, mapping text and images into a shared vector space, and implements knowledge distillation to compress large models into smaller,
Sentence-Transformers is a framework that includes dedicated knowledge distillation pipelines for compressing large embedding models into smaller, faster ones, which fits the search for a KD library even though it is focused on text embeddings rather than being a general-purpose distillation toolkit.
Oumi is a comprehensive large language model development platform designed for synthesizing data, fine-tuning models, and running performance evaluations. It serves as a unified environment for the entire model lifecycle, encompassing a training and fine-tuning suite, an evaluation framework, and tools for synthetic data generation and model distillation. The platform is distinguished by its iterative, failure-driven synthesis approach, which analyzes model weaknesses during evaluation to generate targeted training data. It utilizes an LLM-based judge framework to programmatically score respo
Oumi is a large language model development platform that includes model distillation as a built-in feature, making it a valid tool for compressing LLMs while retaining accuracy — fitting the core request even though it is broader than a dedicated distillation library.
This project is a framework for implementing knowledge distillation and managing deep learning experiments within the PyTorch ecosystem. It provides a structured environment for training compact student models to mimic the output distributions of larger teacher models, aiming to improve inference efficiency. The framework distinguishes itself by decoupling model architectures from loss functions, allowing for flexible composition of teacher and student components. It integrates automated hyperparameter grid search capabilities to systematically identify optimal training configurations, which
A PyTorch library specifically designed for experimenting with knowledge distillation, making it a direct fit for compressing neural networks through teacher-student training, though it focuses on KD experiments rather than covering the full compression pipeline like quantization or pruning.
Knowledge-Distillation-Zoo is a framework for neural network model compression that facilitates the transfer of learned patterns from large teacher models to smaller student architectures. It provides a modular environment for executing training pipelines designed to reduce the computational requirements of deep learning models while maintaining predictive accuracy. The library implements knowledge transfer through both logit-based mimicry and feature-map alignment, allowing students to replicate the classification behavior and internal representations of a teacher. It supports teacher-studen
This PyTorch library implements a variety of knowledge distillation methods (teacher-student architectures and configurable losses), directly matching the core need for model compression via distillation, though it may not explicitly cover all advanced features like quantization or data-free distillation.
llm-compressor is a quantization toolkit and post-training library designed to reduce the memory footprint and size of large language models. It provides a framework for compressing models using weight and activation quantization to enable more efficient deployment. The project distinguishes itself through a distributed quantization framework that utilizes data-parallel processing and disk-based weight offloading to handle massive model checkpoints that exceed available system memory. It includes specialized compressors for diverse architectures, including Mixture-of-Experts, Vision-Language,
llm-compressor is a quantization and post-training compression toolkit for LLMs, but it does not implement knowledge distillation (teacher-student training or distillation losses), which is the core capability you are looking for.
Neural Compressor is a deep learning model compression toolkit and AI inference acceleration engine. It functions as an automated model quantization tool and hardware-aware model compiler designed to reduce the memory footprint of neural networks and decrease execution latency. The project provides specialized frameworks for optimizing large language models, utilizing weight-only quantization and hardware-specific kernels to improve the operational efficiency of generative AI workloads. It maps neural network operators to specialized CPU and GPU vector instructions to accelerate model executi
Neural Compressor is a broad model compression and quantization toolkit that includes knowledge distillation among its features, but its primary focus is on quantization and hardware-specific acceleration rather than being a dedicated knowledge distillation framework with configurable teacher-student architectures.
This project is a comprehensive framework for the training, fine-tuning, and deployment of large language models. It functions as a distributed deep learning platform that enables users to scale model workflows across multiple hardware nodes while providing tools for model evaluation and performance benchmarking. The platform distinguishes itself by offering specialized utilities for model compression and weight transformation, allowing users to reduce memory footprints and latency through quantization and pruning. It supports the adaptation of large models for consumer-grade hardware, facili
This platform focuses on LLM training, fine-tuning, and compression via quantization and pruning, but does not implement knowledge distillation techniques like teacher-student architectures or distillation loss functions, making it a neighbouring tool rather than a dedicated distillation framework.
AutoGPTQ is a model compression toolkit and post-training quantization framework designed to reduce the memory footprint of large language models. It utilizes the GPTQ algorithm to compress neural network weights, lowering hardware requirements and reducing VRAM usage. The project serves as an inference accelerator by providing optimized kernels that increase token generation speed. It features model architecture extensibility, allowing quantization capabilities to be added to new model structures through configurable patterns. The framework covers a comprehensive quantization pipeline, incl
AutoGPTQ is a post-training quantization toolkit that compresses models by reducing weight precision, not a distillation framework that trains a smaller student model from a larger teacher model — it covers model compression but not the teacher-student distillation approach you're looking for.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| tencent/pocketflow | 2.9K | Python | other | |
| meta-pytorch/torchtune | 5.8K | Python | BSD-3-Clause | |
| 26.3K |
| Python |
| Apache-2.0 |
| openai/consistency_models | 6.5K | Python | MIT |
| huggingface/sentence-transformers | 18.8K | Python | Apache-2.0 |
| oumi-ai/oumi | 8.9K | Python | apache-2.0 |
| haitongli/knowledge-distillation-pytorch | 2K | Python | MIT |
| aberhu/knowledge-distillation-zoo | 1.7K | Python | — |
| vllm-project/llm-compressor | 2.8K | Python | apache-2.0 |
| intel/neural-compressor | 2.6K | Python | apache-2.0 |