Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to fine tune the llama.7B model? #166

Open
TNTTheLagger opened this issue Mar 20, 2023 · 9 comments
Open

Is there a way to fine tune the llama.7B model? #166

TNTTheLagger opened this issue Mar 20, 2023 · 9 comments

Comments

@TNTTheLagger
Copy link

TNTTheLagger commented Mar 20, 2023

I want to try and fine-tune this model to see if I can make it into a sort of chatbot.
I have plenty of chat data in json files but I don't know how exactly would I fine-tune the llama model.

Does anyone have any references or tutorials like videos or GitHub repos on this subject?

@DrakoHyena
Copy link

DrakoHyena commented Mar 20, 2023

It wouldnt be feasible to fine tune it youself, you would need to have quite a few powerful machines. The alpaca model that comes installable is already fine tuned to be a chatbot of sorts

@TNTTheLagger
Copy link
Author

Are you referring to the alpaca.7B?

@DrakoHyena
Copy link

Yes I am

@TNTTheLagger
Copy link
Author

I don't know it acts a bit weird also it tends to just repeat the same sentence or sentences over and over and over without stopping no matter when i set the output token count to

@rafaelpleite
Copy link

Try to write in the prompt as below

Below is an instruction that describes a task. Write a response that appropriately completes the request.
Question: [Your question]

like

Below is an instruction that describes a task. Write a response that appropriately completes the request.
Question: What is an alpaca? How is it different from a llama?

@Juleffel
Copy link

Juleffel commented Mar 21, 2023

https://github.com/tloen/alpaca-lora with a few changes seem to be a good option. (Just by changing the generate_prompt to something more chat conversation oriented than instructions oriented).

https://github.com/deep-diver/Alpaca-LoRA-Serve is also a good option: he is using the alpaca-lorca model with a prompt generated to give the instruction "give an answer to the following conversation remembering the context", but it doesn't seem particularly trained to do conversation, so it might perform less good than training on your chat dataset.

I'll try to fork alpaca-lora to make it train on conversations, if it hasn't already been done by the time I'm on it 😅

@mouchourider
Copy link

https://github.com/tloen/alpaca-lora with a few changes seem to be a good option. (Just by changing the generate_prompt to something more chat conversation oriented than instructions oriented).

https://github.com/deep-diver/Alpaca-LoRA-Serve is also a good option: he is using the alpaca-lorca model with a prompt generated to give the instruction "give an answer to the following conversation remembering the context", but it doesn't seem particularly trained to do conversation, so it might perform less good than training on your chat dataset.

I'll try to fork alpaca-lora to make it train on conversations, if it hasn't already been done by the time I'm on it sweat_smile

I just trained the 7B model using the https://github.com/tloen/alpaca-lora project. But I don't get how you use the adapter along with the dalai project.

Does someone knows how to do it?

@Juleffel
Copy link

@mouchourider this is issue #135

@tobiasgrossmann
Copy link

https://github.com/tloen/alpaca-lora with a few changes seem to be a good option. (Just by changing the generate_prompt to something more chat conversation oriented than instructions oriented).
https://github.com/deep-diver/Alpaca-LoRA-Serve is also a good option: he is using the alpaca-lorca model with a prompt generated to give the instruction "give an answer to the following conversation remembering the context", but it doesn't seem particularly trained to do conversation, so it might perform less good than training on your chat dataset.
I'll try to fork alpaca-lora to make it train on conversations, if it hasn't already been done by the time I'm on it sweat_smile

I just trained the 7B model using the https://github.com/tloen/alpaca-lora project. But I don't get how you use the adapter along with the dalai project.

Does someone knows how to do it?

Did you found a solution? I just got the instructions together, but no idea how to get those into an adapter or model. The Alpaca one seems to be a binary. (sorry total beginner)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants