yoheinakajima / babyagi

MIT License
19.94k stars 2.61k forks source link

I suppose the embedding process can be done by LLAMA as well... #139

Open sablin39 opened 1 year ago

sablin39 commented 1 year ago

I cannot get access to openAI and thus I cannot use the original get_ada_embedding function. However, I find that there's an executable called embedding in llama.cpp and it can output a 5120 D vector. So I modify the get_ada_embedding function and let LLAMA do the embedding. I am wondering if it could work as well.

However, the modified program hasn't provide me with any result and it runs for over 5 minutes :(

sablin39 commented 1 year ago

Oh crap... there's nothing in the query when I check the index in pinecone

matigumma commented 1 year ago

share repo?

sablin39 commented 1 year ago

share repo? Well I haven't succeeded yet...The reply given by llama.cpp is a mess and I think I may have to change the prompts too.

jakvb commented 1 year ago

208 here it is implemented and working with vicuna

matigumma commented 1 year ago

ty @jakvb i made my own test here: https://github.com/yoheinakajima/babyagi/blob/3e1b478241769f96b69ddea1e0570248c75ed896/baby_agi%20.ipynb

matigumma commented 1 year ago

ty @jakvb i made my own test here: https://github.com/yoheinakajima/babyagi/blob/3e1b478241769f96b69ddea1e0570248c75ed896/baby_agi%20.ipynb

forget to set dimension = 2048 for llama 7B from npx dalai install...

sablin39 commented 1 year ago

ty @jakvb i made my own test here: https://github.com/yoheinakajima/babyagi/blob/3e1b478241769f96b69ddea1e0570248c75ed896/baby_agi%20.ipynb

forget to set dimension = 2048 for llama 7B from npx dalai install...

Yeah,,, I've find this issue and I changed mine too. It seems that the dimention for 13B 5120?

matigumma commented 1 year ago

i dont know... llama cpp 7B said 4096 :/ ... but pinecone give me error for 2048

image

from here

jakvb commented 1 year ago

@matigumma @sablin39 I use vicuna-13B and has dimension 5120. For other models it seems to be different, so it will be better to move this variable to config You should create new pinecone table or another free account with new dimensions.