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

Resize embeddings and vocab #335

Closed
ambiSk opened this issue Jan 4, 2023 · 2 comments
Closed

Resize embeddings and vocab #335

ambiSk opened this issue Jan 4, 2023 · 2 comments

Comments

@ambiSk
Copy link

ambiSk commented Jan 4, 2023

I finetuned text encoder of CLIP and added some additional tokens to it, I would like to know is there a way to load the checkpoint with greater embedding size?

@mitchellnw
Copy link
Contributor

not totally sure if this will work but worth trying making a new model config and changing vocab_size there? e.g., make a copy of this https://github.com/mlfoundations/open_clip/blob/main/src/open_clip/model_configs/ViT-B-16.json called ViT-B-16-bigvocab then use --model ViT-B-16-bigvocab.

@rwightman
Copy link
Collaborator

don't think resizing existing models is practical, but definitely possible to make new ones, or us HF pretrained models that have larger vocab / context length

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

3 participants