FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

How can I adjust only specific layers and not all reranker and bi encoder layers in your project (e.g. adjust only the classifier layer)

Open QuangTQV opened this issue 1 year ago • 1 comments

QuangTQV avatar May 12 '24 08:05 QuangTQV

The implementation is very simple. You only need to add some code in run.py. Here are the code we used to freeze the position embedding: https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/finetune/run.py#L79-L84

You can use the same method to freeze the parameters of other layers.

staoxiao avatar May 12 '24 13:05 staoxiao