Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can distillation be carried out under these circumstances? #12

Open
lean-wang opened this issue Sep 18, 2024 · 1 comment
Open

How can distillation be carried out under these circumstances? #12

lean-wang opened this issue Sep 18, 2024 · 1 comment

Comments

@lean-wang
Copy link

Dear Professor,

I would like to ask some questions. In your experiment, you used the models "teacher": "arcee-ai/Arcee-Spark" and "student": "Qwen/Qwen2-1.5B" for the distil-logits task. I am wondering how to perform distillation when the vocabulary sizes of these two models are different and the word indices in their vocabularies do not match. The shape of the teacher's logits is [b, seq_len, vocabulary_size_spark], and the student's logits shape is [b, seq_len, vocabulary_size_qwen]. How can distillation be carried out under these circumstances?

@ashdtu
Copy link

ashdtu commented Dec 17, 2024

Hi @lean-wang, in cases where the student and teacher model tokenizers(hence output logits) are not of similar dimension, hidden feature based distillation is recommended. You would need to look at the model architectures of both your student and teacher model, and find latent dimensions of similar size.

The other option for distillation, that is invariant to model architectures would be to distill using reasoning generated from teacher model as a training objective for Supervised finetuning. Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants