How to Fine-tune GPT-3 to Get Better Results and Save Cost | NLP | Python |

  Рет қаралды 22,272

Pradip Nichite

Pradip Nichite

Күн бұрын

Пікірлер: 73
@FutureSmartAI
@FutureSmartAI Жыл бұрын
📌 Hey everyone! Enjoying these NLP tutorials? Check out my other project, AI Demos, for quick 1-2 min AI tool demos! 🤖🚀 🔗 KZbin: www.youtube.com/@aidemos.futuresmart We aim to educate and inform you about AI's incredible possibilities. Don't miss our AI Demos KZbin channel and website for amazing demos! 🌐 AI Demos Website: www.aidemos.com/ Subscribe to AI Demos and explore the future of AI with us!
@rudrasharma91
@rudrasharma91 Жыл бұрын
Thank You Pradip.. i looked for a couple of videos of fine tuning models, but nobody could give the clarity you gave in this video. All the best
@FutureSmartAI
@FutureSmartAI Жыл бұрын
Glad it helped
@capeandcode
@capeandcode Жыл бұрын
Great Video Pradip! Clear explanation and clean code. Thanks!
@FutureSmartAI
@FutureSmartAI Жыл бұрын
Most welcome!
@sairam332
@sairam332 Жыл бұрын
Awesome content. Thanks for the effort.
@planetmars6615
@planetmars6615 2 жыл бұрын
Thanks pradip. Really helpful and straight to the point videos. I wish all the luck and blessings for your channel. Full power! 🥳
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Thank You. Do check other videos also.
@muruvetalpay5290
@muruvetalpay5290 Жыл бұрын
Thanks for this video. I keep getting the error "Stream interrupted (client disconnected).To resume the stream, run". How can I fix this?
@duetplay4551
@duetplay4551 2 жыл бұрын
Would you please refer more study material on fine-tuning mechanisms behind the scene, Thanks!
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
We really don't know anything behind scenes we only have their guide and best practices. beta.openai.com/docs/guides/fine-tuning
@duetplay4551
@duetplay4551 2 жыл бұрын
@@FutureSmartAIgot it, Thanks
@sarbanimaiti8839
@sarbanimaiti8839 Жыл бұрын
Thanks Pardip, very good detail explanation. One thing I would like to ask here, I was experimenting the fine tuning with similar data and then also I was passing generic prompt to check if chatgpt is also showing its generic knowledge. But the generic answers were not correct sometimes quite random meaningless. Also I wanted to combine the prompt to get response from my data as well as generic knowledge of chatgpt. Again it was not able to answer. Any thought around this?
@FutureSmartAI
@FutureSmartAI Жыл бұрын
I know we don't have control over GPT-3 response, mostly on the factual part. Thats why we dont want to rely on models for knowledge rather we should maintain knowledgebase outside. In two days, I will be releasing a video on Semantic Search + GPT-3 Qna.
@sarbanimaiti8839
@sarbanimaiti8839 Жыл бұрын
@@FutureSmartAI Thank you
@venkatesanr9455
@venkatesanr9455 2 жыл бұрын
Thanks for the video and great explanation. It is better to discuss handling unstructured and unbalanced dataset(real time experiments most of the time) in nlp tasks. Can you make such video?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Great suggestion!
@josemariagh6565
@josemariagh6565 2 жыл бұрын
Thanks for the video really interesting . about unstructured dataset I have tried load a book directly without any key in the prompt for "talk" with the author of the book and I have had crazy answers. .... I don't know how could do something like that .... Could you help me?
@Fingiorstyle
@Fingiorstyle 2 жыл бұрын
@@josemariagh6565 did you have any progress with this book thing?
@duetplay4551
@duetplay4551 2 жыл бұрын
@Pradip, quick question: what's the mechanism behind the fine-tuning? Is that telling the GPT3 if I input this prompt, please response this.If I input that prompt, please response that. Just build the links between promt and response?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Its like creating our own variation of model which understands our problem better than generic model, How they do internally I am not sure. Most likely some meta layer on top of GPT-3
@duetplay4551
@duetplay4551 2 жыл бұрын
@@FutureSmartAI make sense. thx
@SwingingInTheHood
@SwingingInTheHood 2 жыл бұрын
This is really great. I have recently done some fine-tuning and understand everything you did here except for including " Intent: " in the prompt. Why did you do that?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
From Open AI "Each prompt should end with a fixed separator to inform the model when the prompt ends and the completion begins. A simple separator which generally works well is ### . The separator should not appear elsewhere in any prompt." Instead of a generic separator, I would prefer to give a more meaningful one. This is how it will look to GPT-3 "Some text for intent detection Intent: "
@DharaThacker-nf3ok
@DharaThacker-nf3ok 2 жыл бұрын
I'm somehow unable to proceed further, I'm stuck at this cmd: openai api fine_tunes.create -t "intent_sample.jsonl" -m 'davinci' I'm getting this error: Stream interrupted (client disconnected). To resume the stream, run: openai api fine_tunes.follow -i ft-BAyMSys9M25GnL2IPkvzG2W6 Any idea how can I get it working?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Yes, the stream can be disconnected; it will not stop finetuning. You can check finetuning progress by running. openai api fine_tunes.follow -i ft-BAyMSys9M25GnL2IPkvzG2W6
@thesksamim382
@thesksamim382 2 жыл бұрын
now they fixed it, try again with the latest openai version. if it's getting error, just run the command they are telling to run furthure, something like "follow ......"
@RiyazPatanwala
@RiyazPatanwala 2 жыл бұрын
Great video Pradip. Is there a possibility that a single or same prompt can provide 2 different completions? say prompt is about monthly sales figure Jan sales 10k, Feb sales 15k, Mar sales 20k and so on then the completion can be "Q1 Sales 45k" or "Yearly Sales 100k". How to manage such scenarios?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Hi Riyaz, I created discord to help people with my videos. Can you ask this question in discord? discord.gg/6K7Q7wXH
@sarbanimaiti8839
@sarbanimaiti8839 Жыл бұрын
@@FutureSmartAI the invite is invalid
@bilalirfan7303
@bilalirfan7303 Жыл бұрын
Hi Sir, thanks for video. Q1- How can we add parameters in fine tuning like we want to fine tune data with specific number of tokens, temperature how can we add that. Q2- For example we want content Generation from GPT-3 Model do we need to use different prompt's for reference because we want to generate unique content every time in same domain Q3- If we fine tune Model without max token's how can we decide max token's while using that Model because if we select less max token's then we don't get complete results with fine tuned Model. (I am working on content generation in sport's domain like (write a unique article on how to play t20 match?))
@sarathipriya
@sarathipriya Жыл бұрын
thank you for your video , 1)if i fine tune my dataset will i get the exact out put from completion, if i set temperature to zero, 2)while giving prompt ,do i have to give the exact prompt that i have set in dataset?
@FutureSmartAI
@FutureSmartAI Жыл бұрын
Not guaranteed. When temperature is zero you are more likely get same output on same input on multiple runs. Prompt format has to be the same during fine tuning model prediction.
@sarathipriya
@sarathipriya Жыл бұрын
@@FutureSmartAI I have a historical data having year, name of achiver and a party name, in that case if have only 50 records. Whether I have to give all format of possible questions?
@FutureSmartAI
@FutureSmartAI Жыл бұрын
@@sarathipriya Can you post here ? discord.gg/ACTgwNUF
@s.sasisekhar4608
@s.sasisekhar4608 2 жыл бұрын
Very Helpful content
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Glad it was helpful!
@fahimsheikh4260
@fahimsheikh4260 2 жыл бұрын
such a nice video..... sir please make a video on how to create your own ai article writing tool using python and gpt3 (with finetuned).....
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Sure I will.
@sriharivaila7276
@sriharivaila7276 2 жыл бұрын
Hi nice video I am working on a project related to Q and A thing where I will ask a question related to a particular specific domain along with that I will finetune the openAi api in that domain can it answer questions in an much more descriptive way, like can it type a whole paragraph of answer by itself after fine tuning.
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Yes. If you are fine-tuning, make sure fine-tuning examples should represent the kind of output you are expecting. If you are expecting more description, have such examples in training data. Also, max tokens parameters should be high for descriptive answers.
@sriharivaila7276
@sriharivaila7276 2 жыл бұрын
@@FutureSmartAI thanks for reply.
@10points56
@10points56 Жыл бұрын
any way to finetune SVGs
@MegaJaddi
@MegaJaddi Жыл бұрын
Thank you for your tutorial, just the problem in real life we ​​can't share private data like that in the open model for everyone. So is there a possibility to create a private model for my own usé. Thanks
@FutureSmartAI
@FutureSmartAI Жыл бұрын
You can use open source llm
@jeromesoh9249
@jeromesoh9249 2 жыл бұрын
hi, watched your video and everything is clear, but i need your help with something. I'm running the codes on jupyter notebook "!openai tools fine_tunes.prepare_data -f intent_sample.jsonl". When i try running this, my whole notebook just crashes. Do you know what i can do to solve this?
@jeromesoh9249
@jeromesoh9249 2 жыл бұрын
hey, just an update, i solved this using a -q at the back, not sure what it means though
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Awesome 👏👏
@s.sasisekhar4608
@s.sasisekhar4608 2 жыл бұрын
Can we download this model locally? and is there any way we can train this GPT model without using the opanAI platform?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
No. GPT-3 is not open sourced. You can use other open source GPT model like huggingface.co/EleutherAI/gpt-j-6B
@s.sasisekhar4608
@s.sasisekhar4608 2 жыл бұрын
@@FutureSmartAI May I know how was the performance difference between those? If you have benchmarked
@mvkrishna760
@mvkrishna760 2 жыл бұрын
Can I fine tune with a excel file with almost 1000+ rows ?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Yes, you can
@mvkrishna760
@mvkrishna760 2 жыл бұрын
Thanks for your reply! I wish I could get some guidance for that
@mvkrishna760
@mvkrishna760 2 жыл бұрын
I messaged your Instagram page
@DAYSHIVANSH
@DAYSHIVANSH Жыл бұрын
Bhai tumse bat kese ho skti he?
@Shredder656
@Shredder656 2 жыл бұрын
hey bro do you know what bittensor is?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
I have just heard never explored
@lalituor
@lalituor Жыл бұрын
Very nicely explained. I need some help how can I contact you?
@FutureSmartAI
@FutureSmartAI Жыл бұрын
You can ask in discord. discord.gg/YZUPY8hM
@arslanjutt4282
@arslanjutt4282 2 жыл бұрын
Butt sir the cost $0.40 how this payment pay ?? It pay by us or only its show not pay anything
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
When you create open ai account you will get some free credit. You can also add your payment details and it gets billed as per usage.
@0xcBenevolent
@0xcBenevolent 2 жыл бұрын
Are you on Fiverr by any chance?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
No Currently I am getting work from Upwork and LinkedIN.
@0xcBenevolent
@0xcBenevolent 2 жыл бұрын
@@FutureSmartAI I'm learning about GPT-3 to fine tune a model to write similar like Jasper. Do you have resources that I should follow?
@0xcBenevolent
@0xcBenevolent 2 жыл бұрын
@@FutureSmartAI Are you on Insta? I would like to chat with you. You have a sharp mind and I wish to understand a few things.
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
@@0xcBenevolent www.linkedin.com/in/pradipnichite/
@TheSoccerzack9
@TheSoccerzack9 2 жыл бұрын
Am I able to hire you?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Yes. www.linkedin.com/in/pradipnichite/
@xuechaoyang9632
@xuechaoyang9632 2 жыл бұрын
Hi, i followed all th steps and successfully created a fine tuned model. However, after I used it, it answered all questions like an error (e.g., enter multiple symbols to the response), do you know why it happends?
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
Can you share screenshot with me www.linkedin.com/in/pradipnichite/
@BharathBhushan-ko7lc
@BharathBhushan-ko7lc 2 жыл бұрын
hi pradip, when i run this command : !export OPENAI_API_KEY="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"; openai api fine_tunes.create -t "intent_sample_prepared_train.jsonl" --model 'davinci' --n_epochs 5 getting this error : [organization=abc-2179] Error: No file with ID: intent_sample_prepared_train.jsonl (HTTP status code: 400)
@FutureSmartAI
@FutureSmartAI 2 жыл бұрын
are you sure your filename is same?
Fine-Tuning OpenAI
16:29
Lucidate
Рет қаралды 12 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Fine-tuning Large Language Models (LLMs) | w/ Example Code
28:18
Shaw Talebi
Рет қаралды 388 М.
A Hackers' Guide to Language Models
1:31:13
Jeremy Howard
Рет қаралды 541 М.
$0 Embeddings (OpenAI vs. free & open source)
1:24:42
Rabbit Hole Syndrome
Рет қаралды 273 М.
How to Improve LLMs with RAG (Overview + Python Code)
21:41
Shaw Talebi
Рет қаралды 92 М.
Fine-Tune GPT-4o Model Step by Step
15:16
Pradip Nichite
Рет қаралды 6 М.