Comments (10)
These are probably the offending parts
https://github.com/jxmorris12/vec2text/blob/master/vec2text/models/inversion.py#L173
https://github.com/jxmorris12/vec2text/blob/master/vec2text/models/inversion.py#L193-L198
from vec2text.
Thanks; I'll look into it. In the meantime, I've trained a decent inversion model using almost exactly these settings, which is available here: https://huggingface.co/jxm/sentence-transformers_all-MiniLM-L6-v2__msmarco__128
from vec2text.
I ran this command and it worked fine for me
from vec2text.
I'm on an Apple M1
from vec2text.
It ran after I uncommented this line
https://github.com/jxmorris12/vec2text/blob/master/vec2text/models/inversion.py#L173
from vec2text.
Also M1 Mac...
from vec2text.
Silly question: how do you use the trained inverter with your repo?
https://huggingface.co/jxm/sentence-transformers_all-MiniLM-L6-v2__msmarco__128
from vec2text.
I commented out a few lines so that I can use load_corrector
with other models
import vec2text
corrector = vec2text.load_corrector("jxm/sentence-transformers_all-MiniLM-L6-v2__msmarco__128")
vec2text.invert_strings(
[
"Jack Morris is a PhD student at Cornell Tech in New York City",
"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity"
],
corrector=corrector,
)
The model returns:
["Yes, I'm playing the Weightless Option with the help of the Tiny Cells. I'm playing the Weightless Option with the help of the Tiny Cells. I'm growing older.",
'I have tried the following: 1. I have tried the following: 2. I have tried the following: 3. I have tried the following: 4. I have tried the following: 5. I have tried the following: 6. I have tried the following: 7. I have tried the following: 8. I have tried the following: 9. I have tried the following: 10. I have tried the following: 11. I have tried the following: 12. I have tried the following: 13. I have tried the following: 14. I have tried the following: 15. I have tried the following: 16. I have tried the following: 17. I have tried the following: 18. I']
and when I set num_steps
, it gives AssertionError on this line
assert embedding.shape == (batch_size, self.embedder_dim)
from vec2text.
I'll get back to you. You can't use it that way though. Basically I haven't trained the expensive corrector model, only have the zero-step inversion model for this specific model, so the API way won't work properly.
from vec2text.
I'll get back to you. You can't use it that way though. Basically I haven't trained the expensive corrector model, only have the zero-step inversion model for this specific model, so the API way won't work properly.
Can you add documentation please?
How to use it:)
from vec2text.
Related Issues (20)
- Examining hypothesis embeddings HOT 3
- Were the gtr models trained without normalization? HOT 2
- Question about storage path HOT 1
- Using Initial Inversion Model Only HOT 7
- Requirements file has no versions pinned
- Support other embeddings
- Languages supported?
- llama-2-7b inversion
- about demo HOT 1
- Error with vec2text.invert_embeddings when set num_steps parameter HOT 3
- Accidental issue
- Multi-GPU Support HOT 1
- About hypothesis generation HOT 1
- Any limitation on the targeted embedding model? HOT 5
- About train error in inversion experiment HOT 1
- InversionFromLogitsEmbModel HOT 2
- Fine-Tuning Pretrained Inversion Models on Custom Dataset HOT 1
- Can the model be trained successfully if log probabilities (logprobs) or probabilities (probs) are used as inputs instead? HOT 1
- use llama 7b as corrector HOT 2
- why need to revise attention_mask
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vec2text.