Closed justinliang1020 closed 10 months ago
Pushed some new code for just getting training/inference on modal, no need to review it yet cause it's just proof of concept
Pushed the commits that I had thought I had pushed earlier (but accidentally didn't). What I did:
What I plan on doing:
Closing PR since we are pivoting from pytorch to sentence transformers implementation
Initial code for adding an affine transformation onto a base embedding model (in this case BAAI/bge-small-en-v1.5
Based on the finetune model found here: https://github.com/567-labs/fastllm/blob/main/applications/finetune-embedding/model.py
This is currently draft code, only the forward pass an init functions have been modified so far to add in the base embedding model
Main.py is just sample code on running the model
To run, run
python main.py
in the directoryEDIT:
Refactored the entire PR. It's now mainly based on the finetune-embeddings directory. The logic behind this is that the base embedding model doesn't need to be inside the model.py file since the base embedding weights are frozen and we're just training on the liner adapter model on top of it.
TODO: