This video lacks alot of helpful info... Anyone can just open the examples and read them just the same as you did. I would have liked to be given extra detail and tips about how to actually do fine-tuning... Some of the topics I am struggling with include, how to load custom data, how to use a different prompt template, how to define validation data, when to use validation data, what learning rates are good, how do i determine how many epochs to run... Im sorry buddy, but I have to give this video a thumbs down as it really truly and honestly dosent provide any useful info that isnt already in the notebook.
@@ueka24 oh actually I figured it out. Well specifically the dataset thing. Make sure you run the lora part too as I didn't at first thinking he said not to. But this is the code I ran: alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: {} ### Input: {} ### Response: {}""" EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN def formatting_prompts_func(examples): # instructions = examples["instruction"] instructions = ai_person_prompt inputs = examples["input"] outputs = examples["output"] texts = [] for instruction, input, output in zip(instructions, inputs, outputs): # Must add EOS_TOKEN, otherwise your generation will go on forever! text = alpaca_prompt.format(instruction, input, output) + EOS_TOKEN texts.append(text) return { "text" : texts, } from datasets import load_dataset # Load your local JSON dataset dataset = load_dataset("json", data_files="/content/main_dataset.json", split="train") dataset = dataset.map(formatting_prompts_func, batched=True) it specifies a file in the notebook file manager. Just put the main_dataset.json file there, format it like this: [ { "instruction": "Write a Funny Joke", "input": "Tell me a knock-knock joke.", "output": "Knock, knock. Who's there? Lettuce. Lettuce who? Lettuce in, it's freezing out here!" } ]
One more comment :-). this Video is about fintung a model, but there is no real explanation why. We finetune with the standard Alpaca dataset, but there is no explanation why. It would be great if you could do a follow up and show us how to create datasets.
How to actually train models? And I mean non-supervised training where I have a set of documents and want to learn on it and probably find author's 'style' or tendency?
You need to create some process to transfer all the knowledge in these documents in the form of "prompt":"best output". Usually we use an team of agents to do it for us.
Thank you for the video. Just an observation, the video glosses over how to prep your data. For example, I want to train a model on how to write in my style. How would I prep my data for training?
@@TheIITianExplorer unsloth library is very useful library for finetune using LoRA technique . QLoRA is Quantization and LoRA so if use Unsloth then the same output you will get as unsloth already quantise the LLMs
Thank you so much for sharing this was wonderful, I have a question, I am a beginner in LLM model world, which playlist on your channel can I start from ? Thank you
I wonder if this is how Open AI got Chat GPT to say stupid things like "Humans are delicious", "I will destroy all humans" and that crap... It was blatantly done on purpose.
Thank your very much for your great video. I ran the workbook but did not manage to find the GGUF files on Huggingsface. I put in my HF-Token, but that did not work. Do I have to change the code?
One thing I am unsure of is how to transform my data into a training set. I have the target format: the written body of work, but no "instruction" or "input" of course. I've seen some people try to generate it with ChatGPT, but this seems counter-intuitive. There must be an established method of actually manipulating data into a training set. Where is that piece?
You will need to have a {input, response} pair in order to fine-tune an instruct model. Unfortunately, there is no way around it unless you are just pre-training the base model.
Master, have a question, if I have my dataset equal of the Alpaca, I need to upload my dataset to Hugging face to train or I can use my dataset from locally, like my PC? Thanks 👍🏻
In that case, you will have to convert the book into question answers and format it in the similar fashion. You can use an LLM to convert the book to QA using an LLM
it's one of the most useless video on youtube. You literally opened a notebook, and read it. You didn't added a single sentence that would be considered as a plus value. That was like watching a text to speech model in action.