4 ms·
Glad to see that more people outside the big ai labs are figuring out how to do fine tuning. Some open source LLM authors also seem to have figured it out. I
by gdiamos 3y ago
Glad to see that more people outside the big ai labs are figuring out how to do fine tuning. Some open source LLM authors also seem to have figured it out.
I think many users get put off it because just pushing a button doesn’t work and the whole thing seems like a black box that you don’t know how to fix when it breaks.
It turns out that finetuning can be debugged, but the methods aren’t well documented (yet), eg by generating q/a, oversampling them, etc
When you get it to work it’s powerful - new abilities emerge beyond memorization.
Just like how llama2/claude2/gpt4 learned reasoning by memorizing sentences from Reddit posts :P
Also, I don’t get the comparison of rag vs finetuning in articles like this - why not do both. RAG is easy to setup - it’s push button. Just do it on all models (including finetuned models).
- scoot 3y ago> RAG is easy to setup - it’s push button I'm interested to hear about push-button solutions for RAG that aren't a SaaS.
- deleted 3y ago[deleted]
- gdiamos 3y agohttps://github.com/lamini-ai/lamini-sdk/tree/main/03_RAG https://github.com/lamini-ai/lamini-sdk/tree/main/03_RAG You can implement RAG in 80 lines of python and 0 SaaS libraries. It's extremely easy. 1. Load your data as a giant string (streaming) 2. Chunk it (big chunk size, small chunk steps) 3. Call an LLM to convert chunk -> embedding, store in an index (or just concat it onto a numpy array) 4. Call an LLM to convert query -> embedding 5. Compute cosine similarity between the embeddings, pick the max 6. Insert the picked chunks into the LLM prompt That's it. I'd encourage you to try to implement it yourself. Anything beyond this is unnecessary complexity. I walk through the code/whiteboard of the whole thing in this video: https://www.youtube.com/watch?v=Xkzd_YNbWmc&t=6003s https://www.youtube.com/watch?v=Xkzd_YNbWmc&t=6003s
- binocarlos 3y agoThanks for the feedback - I agree that fine tuning a) has potential and b) is not easy :-) > Also, I don’t get the comparison of rag vs finetuning in articles like this - why not do both It's interesting you say this because we are very close to adding RAG support to Helix sessions and it will be "both at the same time" not an "either or" setup. You can choose to do either or but we are interested in seeing if doing both at the same time yields better results than either or - watch this space! disclaimer: I work on Helix