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
Note:
There also was some strange behavior regarding n_batch and n_token where a longer prompt (still way below the context length) lead to an unexpected error:
GGML_ASSERT: n_token <= n_batch
Right now my workaround is to use a rust wrapper (Command::new) around the ./embedding binary and parse the float values from stdout back into a string, then vector. The only parameter I set is --ctx-size 8192 and --mlock.
I imagine this is less efficient as the model needs to be reloaded for each call.
Activity
mdrokz commentedon Oct 25, 2023
have you tried this
rust-llama.cpp/src/lib.rs
Line 287 in baa1bcf
this will get you the embeddings for the prompt
Philipp-Sc commentedon Oct 26, 2023
@mdrokz thank you for your response.
I tried it before trying the direct llama.cpp ./embedding executable.
The function would always return an empty vector:
I tried multiple configurations but could not fix the issue.
mdrokz commentedon Oct 26, 2023
Alright i will test on my end see whats happening. Thanks
Philipp-Sc commentedon Oct 27, 2023
I was using zephyr-7B-alpha-GGUF with:
without any GPU assistance.
Note:
There also was some strange behavior regarding
n_batchandn_tokenwhere a longer prompt (still way below the context length) lead to an unexpected error:Right now my workaround is to use a rust wrapper (
Command::new) around the ./embedding binary and parse the float values fromstdoutback into a string, then vector. The only parameter I set is--ctx-size 8192and--mlock.I imagine this is less efficient as the model needs to be reloaded for each call.