jxmorris12 / vec2text

utilities for decoding deep representations (like sentence embeddings) back to text
Other
673 stars 75 forks source link

llama-2-7b inversion #50

Open d-bohn opened 4 months ago

d-bohn commented 4 months ago

Very cool project and I've been having a fun time exploring the repo. I'd like to run some additional examples but I'm having a difficulty reproducing any results using your llama models. It is also a bit difficult to follow how to appropriately load these models if I only wanted to invert text embeddings like you outline with the other models (as opposed to run experiments or evaluate the models).

For example, I have your t5-base__llama-7b__one-million-instructions__emb model downloaded along with the meta-llama/Llama-2-7b-hf model in my local cache (though it is not clear if this is needed). Using analyze_utils.load_experiment_and_trainer_from_pretrained keeps throwing errors on my machine. What would be the easiest way to simply load these model(s) and test embedding and inversion when the models are stored locally (something analogous to the vec2text.invert_embeddings and vect2text.invert_strings pipeline)?