jxmorris12 / vec2text

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

Using Initial Inversion Model Only #46

Closed VMS-6511 closed 4 months ago

VMS-6511 commented 4 months ago

If I was looking to just look at inverting the text with the initial inversion model without the corrector would it be sufficient to simply pass that model as the corrector itself to the API? Thanks!

jxmorris12 commented 4 months ago

Good question! I think the simplest way is actually to just set num_steps=0 and then under the hood the corrector won't be called at all.

VMS-6511 commented 4 months ago

What if I haven't trained a corrector model?

jxmorris12 commented 4 months ago

Sorry – are you trying to just use your own model that you've trained? Then you need to use analyze_utils.load_experiment_and_trainer_from_pretrained and then trainer.generate() or trainer.evaluate() but that should work fine.

VMS-6511 commented 4 months ago

Sorry yeah what I'm trying to do is a I trained my own zero step inversion model. Now I'd like to pass embeddings to that model and get the corresponding inverted text back.

VMS-6511 commented 4 months ago

Okay so I tried doing that but I'm encountering this error:

ModuleNotFoundError: No module named 'run_args'

jxmorris12 commented 4 months ago

sorry -- do you mind filing a new issue with a full stack trace? That command runs for me. I tried it yesterday in colab.

VMS-6511 commented 4 months ago

I got it working sorry for the confusion it was an issue with finding the right path.