You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the llama.h library in my code to generate embeddings for a piece of text. When I run it, I get the warning "embeddings required but some input tokens were not marked as outputs" but I'm not really sure I understand what I'm doing wrong. What I do is I tokenize my input string (add_special = true), I then populate my batch with those tokens, I call llama_decode on my batch, and then I call embeddings_ith(-1) to get the embeddings for the last token.
Perhaps related perhaps not, I'm also seeing the embedding values changing every time I run which to me suggests I'm not using the API correctly somehow - pretty sure embeddings are deterministic for a given input + model and I confirmed that is the case via llama-embedding & llama-server which do generate deterministic embeddings.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use the llama.h library in my code to generate embeddings for a piece of text. When I run it, I get the warning "embeddings required but some input tokens were not marked as outputs" but I'm not really sure I understand what I'm doing wrong. What I do is I tokenize my input string (add_special = true), I then populate my batch with those tokens, I call llama_decode on my batch, and then I call embeddings_ith(-1) to get the embeddings for the last token.
Perhaps related perhaps not, I'm also seeing the embedding values changing every time I run which to me suggests I'm not using the API correctly somehow - pretty sure embeddings are deterministic for a given input + model and I confirmed that is the case via llama-embedding & llama-server which do generate deterministic embeddings.
Beta Was this translation helpful? Give feedback.
All reactions