from LM_Cocktail import mix_models, mix_models_with_data
# Mix fine-tuned model and base model; then save it to output_path: ./mixed_model_1
model = mix_models(
model_names_or_paths=["BAAI/bge-reranker-base", "your_fine-tuned_model"],
model_type='encoder',
weights=[0.5, 0.5], # you can change the weights to get a better trade-off.
output_path='./mixed_model_1')
If you want me I can create a PR.
Hey,
I am just wondering:
https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker
Shouldnt this be
model_type='reranker'?I guess yes:

If you want me I can create a PR.
Best,
Damian