Lightning-AI / Lightning-AI/pytorch-lightning

An example for knowledge distillation. Especially for the load the teacher model's weights , and train the student model

Open
#17,592 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

example feature help wanted
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Description & Motivation

_No response_

### Pitch

A example for knowledge distillation. Especially for the load the teacher model's weight ,and train the student model.

Now I have a trained teacher_model. When I want to train the student model, I need to load the teacher model's weights and set the teacher model to eval().

I am confused about the specific steps to do above using the Lightning.
Could I get an example for it?

### Alternatives

An example for knowledge distillation. Especially for the load the teacher model's weight ,and train the student model

### Additional context

An example for knowledge distillation. Especially for the load the teacher model's weight ,and train the student model.

cc @borda

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The request names Lightning, a trained teacher_model, and a student model but no files or tests. Start by reviewing Lightning's model-loading and train/eval entry points, then define an example that loads the teacher weights, sets the teacher to eval(), and trains the student; done means the knowledge-distillation workflow is documented and runnable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.