FlagEmbedding
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)
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.