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

Add distillation for fine-tuning #195

Merged
merged 18 commits into from
Sep 8, 2023
Merged

Add distillation for fine-tuning #195

merged 18 commits into from
Sep 8, 2023

Conversation

Jaskr616
Copy link

@Jaskr616 Jaskr616 commented Aug 31, 2023

1.This PR includes

  • Chinese-CLIP combines knowledge distillation for fine-tuning training to further improve the image retrieval (image2image) ability of Chinese-CLIP.
  • Our solution has been significantly improved after HumanEval in a certain vertical field (e-commerce) , and we hope that it can also be demonstrated in other fields.

2.All of our teacher model is provided with modelscope, including

Support model
damo/multi-modal_team-vit-large-patch14_multi-modal-similarity
damo/multi-modal_rleg-vit-large-patch14
damo/multi-modal_clip-vit-huge-patch14_zh
damo/multi-modal_clip-vit-large-patch14_zh

3.Example image retrieval results of our model(finetuned + distillation)/pretrained model/finetuned model.
image
image
image

@@ -243,10 +243,47 @@ def main():
# only do so if it is the 0th worker.
args.should_save = (args.logs is not None and args.logs != '' and args.logs.lower() != 'none') and is_master(args)

# load teacher model to distllation
if args.distllation:
from modelscope.models import Model

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需要加一个防错,如果用户是直接使用这一功能,import 失败的话,需要补充一个pip install的报错

@yangapku yangapku merged commit 846e630 into OFA-Sys:master Sep 8, 2023
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

Successfully merging this pull request may close these issues.

3 participants