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 to freeze other components of the model? #7

Open
qinglin666635 opened this issue Sep 4, 2024 · 4 comments
Open

how to freeze other components of the model? #7

qinglin666635 opened this issue Sep 4, 2024 · 4 comments

Comments

@qinglin666635
Copy link

Hello,

I noticed that the configuration file includes parameter freezing operations:

freeze_layers: encoder.feat_extr, encoder.ffn, decoder.embedding, decoder.self_attn, decoder.ffn

If I want to freeze other components of the model or freeze entire some layer of the encoder or decoder, how can I determine the correct names for these components? I observed that the notation in the configuration file differs from the notation used when printing the model structure.

Thank you for your response.

Best wishes

@gegallego
Copy link
Member

Hello,

They are defined here. You'll have to modify these lines to do different freezing operations.

Let me know if that's what you were looking for.

Best regards,
Gerard

@qinglin666635
Copy link
Author

Hello,

Yes, I am looking for these definitions. However, if I want to freeze an entire layer of the encoder or decoder, how should I modify it? For example, if the decoder has 12 layers and I want to freeze layers 3 to 9.

Best

@gegallego
Copy link
Member

Hello,

Sorry, I just realized I never replied! In BLOCKS2REGEX you can define any RegEx pattern you want. So you can define a new "block" that has associated a RegEx that targets those layers.

Best regards,
Gerard

@qinglin666635
Copy link
Author

Hello,

Thank for your reply. I'll try it .

Best regards

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

No branches or pull requests

2 participants