ai-agent

KDFlow – Streamline LLM Knowledge Distillation for Faster Model Tuning

KDFlow lets founders compress large language models with off‑policy, on‑policy, cross‑tokenizer, and multimodal distillation—all in Python, ready for rapid prototyping.

From the repo · “A user-friendly & efficient knowledge distillation framework for LLMs, supporting off-policy, on-policy (OPD), cross-tokenizer, multimodal, and on-policy self-distillation.”

254 stars+2★ this week19 forksPythonGuide quality 9/10 · reviewed Oct 10Updated 10/21/2026100% free · open source
What it does

KDFlow is a framework that allows startup founders to efficiently perform knowledge distillation on large language models, transferring knowledge from a teacher model to a student model.

When to use it
  • •When you have a large pre-trained language model and want to reduce its size while preserving its performance
  • •When you need to adapt a language model to a specific domain or task with limited training data
  • •When you want to improve the efficiency of your language model deployment without sacrificing accuracy
Ready-to-paste prompt
python train.py --config config.py --teacher_model bert-base-uncased --student_model distilbert-base-uncased --dataset glue-mnli
Heads up: Make sure you have the correct version of PyTorch installed, as KDFlow requires PyTorch 1.9 or later, and also ensure that you have the necessary dependencies installed, including the `transformers` library
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/kdflow && curl -fsSL https://workflowstacks.com/api/skills/kdflow/claude-skill -o ~/.claude/skills/kdflow/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How KDFlow – Streamline LLM Knowledge Distillation for Faster Model Tuning works
Codeflow
Free to inspect

KDFlow – Streamline LLM Knowledge Distillation for Faster Model Tuning is a medium Python project (~12k lines across 93 code files, plus 1 test files). Setup is light: installs like a normal app. Reading the code is optional. Last commit this month, MIT license, has a test suite.

Size
Medium codebase
~12k lines · 93 code files · ~2 h to skim
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Python
No API keys detected
Python 100%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    pyproject.toml
    Dependencies and the commands it exposes
  3. 3
    kdflow/__init__.py
    Inside kdflow/ — the main logic begins here
  4. 4
What's in each folder
kdflow/Core code — the actual logic79 files
docs/Documentation24 files
examples/Examples you can copy13 files
figures/Folder4 files
docker/Deployment / infrastructure1 files
tests/Tests — proof it works1 files
READMEHas testsDocumentedNo CIExamples includedMIT licenseUpdated this month
Quick Actions
Details
Creator
songmzhang
Language
Python
Category
ai-agent
Published
2/27/2026

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/kdflow.svg)](https://workflowstacks.com/skills/kdflow?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.