Тёмный
Scott Ingram
Scott Ingram
Scott Ingram
Подписаться
Комментарии
@noway8233
@noway8233 7 дней назад
Cool chip , i cant imaginen how much power need it 😅 Well , i think is a cool idea , yuo need lees space to implement a supercomputer like using Nvidia grafic cards h100 Anyway , the AI hype continue
@laibahadurbhai
@laibahadurbhai 27 дней назад
😊😅आई😅😅
@dwainmorris7854
@dwainmorris7854 Месяц назад
The best thing about it is that is uncensored you can make memes of celebrities without guardrails . they give you lots of generations per day and it only costs eight bucks a month that alone will run circles around Mid Journey and you don't need to have complex installation For big learning curve in order to use it or buy a $2000 gaming computer to use it so WIN WIN !
@jitushah9640
@jitushah9640 24 дня назад
😮
@Its10k-ru8oh
@Its10k-ru8oh 24 дня назад
😊
@mizanurazharistatus7728
@mizanurazharistatus7728 23 дня назад
😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅
@mizanurazharistatus7728
@mizanurazharistatus7728 23 дня назад
😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😊😅😅😅😅😅😅😅😅9😅😅
@williammcguire9058
@williammcguire9058 Месяц назад
Big thanks for the detailed walkthrough-really learned a lot from your video!
@lorenzoplaatjies8971
@lorenzoplaatjies8971 2 месяца назад
I'm able to get as far as inference, once the model is trained i get an error: name 'FastLanguageModel' is not defined but thank you for the tutorial
@vilivilhunen3383
@vilivilhunen3383 2 месяца назад
Amazing! Thanks for the help :)
@Hotboy-q7n
@Hotboy-q7n 2 месяца назад
in the "Test model before fine-tuning to note the results" this error: NotImplementedError Traceback (most recent call last) <ipython-input-10-aff9346028d1> in <cell line: 15>() 13 ], return_tensors = "pt").to("cuda") 14 ---> 15 outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = False) 16 decoded_output = tokenizer.batch_decode(outputs) 17 print(decoded_output) 26 frames /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/dispatch.py in _run_priority_list(name, priority_list, inp) 63 for op, not_supported in zip(priority_list, not_supported_reasons): 64 msg += " " + _format_not_supported_reasons(op, not_supported) ---> 65 raise NotImplementedError(msg) 66 67 NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs: query : shape=(1, 7, 8, 4, 128) (torch.bfloat16) key : shape=(1, 7, 8, 4, 128) (torch.bfloat16) value : shape=(1, 7, 8, 4, 128) (torch.bfloat16) attn_bias : <class 'xformers.ops.fmha.attn_bias.LowerTriangularMask'> p : 0.0 `flshattF@0.0.0` is not supported because: xFormers wasn't build with CUDA support operator wasn't built - see `python -m xformers.info` for more info `cutlassF` is not supported because: xFormers wasn't build with CUDA support operator wasn't built - see `python -m xformers.info` for more info `smallkF` is not supported because: max(query.shape[-1] != value.shape[-1]) > 32 xFormers wasn't build with CUDA support dtype=torch.bfloat16 (supported: {torch.float32}) attn_bias type is <class 'xformers.ops.fmha.attn_bias.LowerTriangularMask'> operator wasn't built - see `python -m xformers.info` for more info operator does not support BMGHK format unsupported embed per head: 128
@Hotboy-q7n
@Hotboy-q7n 2 месяца назад
Did you play Chef Slowik in the movie "The Menu"?
@hellohey8088
@hellohey8088 2 месяца назад
I think calling the .for_inference method before training will interfere with training, so it seems like a bad idea. The training in the notebook converges without a problem for me using a T4 GPU if just skipping that step.
@hellohey8088
@hellohey8088 2 месяца назад
Nice video. I have a question: At 8:10, is there any reason why you set add_special_tokens=false in the .encode_plus method? I thought special tokens are added during training so wouldn't it make more sense to set add_special_tokens=true if we want to know how large the biggest training example will be?
@jonassteinberg9598
@jonassteinberg9598 2 месяца назад
"The A100 works well" You don't say lol -- bruh this is a $50K GPU which costs $2-$3K/month to run.
@John-kn6df
@John-kn6df Месяц назад
Search für Google colab. U Clan use there gpu
@godnessy
@godnessy 2 месяца назад
Great video! so much fun to see a structured test that allows us to evaluate head to head
@ronaldmatovu5383
@ronaldmatovu5383 2 месяца назад
Thank you for this wonderful video, very educative. I have a question, incase I have a dataset with questions and answers but the answers are not written in proper English grammar which at hugging face as matovu-ronald/kisan_call_centre_groundnut_crop_QA_dataset_cleaned. What is the best way to make a mode return an answer that is grammatically formatted
@scott_ingram
@scott_ingram 2 месяца назад
Thanks for your question! It sounds like you want to clean the dataset and then use it to fine-tune a model before you use it for inference. This is because if you use grammatically bad data for training, you're going to get a model that dutifully responds with bad grammar. Fixing the grammar from a model's response means that you may already have lost some context before you even get to post-processing, although it can be done programmatically. That approach has many problems. Instead, I would suggest using a large language model to clean the dataset: Preprocess the Dataset: Go through each question-answer pair in the dataset. Use a model like GPT-3.5 or GPT-4 to correct the grammar of each answer. Design a prompt for grammar correction: Create a prompt that instructs the model to correct grammar while preserving meaning. Run batch cleaning: Process the dataset in batches to speed up the cleaning process. Here's a short example of how you might implement this using the OpenAI API (with API key): ```python import openai import pandas as pd openai.api_key = 'your-api-key' def correct_grammar(text): response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are a helpful assistant that corrects grammar while preserving the original meaning."}, {"role": "user", "content": f"Correct the grammar of the following text, maintaining its original meaning: '{text}'"} ] ) return response.choices[0].message['content'] # Load your dataset df = pd.read_csv('your_dataset.csv') # Apply grammar correction to the 'answer' column df['corrected_answer'] = df['answer'].apply(correct_grammar) # Save the corrected dataset df.to_csv('corrected_dataset.csv', index=False) ``` Here are the advantages to this approach: * Consistency: It ensures a uniform level of grammatical correctness across the dataset. * Meaning Preservation: By instructing the model to maintain the original meaning, you reduce the risk of altering the content. * Efficiency: You can process a large number of entries quickly. * Flexibility: You can adjust the prompt to focus on specific aspects of grammar or style as needed. After cleaning the dataset this way, you can then use it with a fine-tuning process on the grammatically correct data (or whatever your use case prescribes). You should end up with a model that produces more grammatically correct output so you can avoid post-processing steps. Hope this helps! Scott
@ronaldmatovu5383
@ronaldmatovu5383 2 месяца назад
@@scott_ingram thank you very much Scott this is much helpful.
@ganeshkumara8501
@ganeshkumara8501 2 месяца назад
what are the parameters need to update, If I using a 1000 question and answer pair in CSV and what will be the value of those parameters.
@scott_ingram
@scott_ingram 2 месяца назад
Thanks for your question! When scaling up from just 30 records to 1000 question-answer pairs, you'll likely need to adjust several parameters to accommodate the increased dataset size and try to improve the fine-tuning. Here are some key parameters to consider updating: * Batch size: With a larger dataset, you may want to increase the batch size to process more examples per iteration. This can help improve training efficiency. * Learning rate: You might need to adjust the learning rate. With more data, you could potentially use a slightly higher learning rate, but be careful not to set it too high. * Number of epochs: With more data, you might need fewer epochs to reach convergence. Monitor the training and validation loss to determine the optimal number of epochs. * LoRA rank: You might consider increasing the LoRA rank to allow for more capacity in the adapted layers, given the larger dataset. * Warmup steps: Adjust the number of warmup steps proportionally to the increased dataset size. Weight decay: You might need to adjust the weight decay to prevent overfitting on the larger dataset. * Gradient accumulation steps: If memory is a constraint, you might need to use gradient accumulation to effectively increase the batch size. * Evaluation strategy: Consider evaluating more frequently with the larger dataset. As for specific values, it's hard to provide exact numbers, as they're going to differ between use cases, actual data, hardware, and desired outcomes. But, here are some general guidelines: * Batch size: Try increasing to 16 or 32, depending on your GPU memory. * Learning rate: Start with 2e-4 to 5e-4 and adjust based on training performance. * Number of epochs: Start with 3-5 epochs and adjust based on convergence. * LoRA rank: Consider increasing to 16 or 32. * Warmup steps: 10% of the total training steps is a good starting point. * Weight decay: Start with 0.01 and adjust as needed. * Gradient accumulation steps: Start with 4 or 8 and adjust based on your hardware capabilities. * Evaluation strategy: Consider evaluating every 500 or 1000 steps. These are just starting points. Every use case is different. You'll need to experiment. You might be able to use techniques like learning rate finders or hyperparameter tuning to optimize for your specific case. Good luck! Scott
@ganeshkumara8501
@ganeshkumara8501 2 месяца назад
I sir . First i have started with limited data. It works fine . After i added the another 20 data in csv. Not answering correctly. Some other answer it is giving.why?
@scott_ingram
@scott_ingram 2 месяца назад
Hi! Thanks for your question. When working with a 4-bit quantized version of Llama 3 7B using LoRA adaptation layers and PEFT, it's not uncommon to see performance changes as you add more data. This is especially true given the constraints of training in Colab on an A100. The issue you're experiencing could be due to several factors: Quantization effects: 4-bit quantization, while efficient, can sometimes lead to loss of precision, which might become more apparent with more diverse data. LoRA adaptation: The low-rank adaptation might need adjustment as your dataset grows. The rank or alpha parameters might need tuning. PEFT limitations: While PEFT is great for efficient fine-tuning, it might struggle to capture more complex patterns as your dataset expands. Data quality and consistency: Ensure the new data aligns well with your original dataset and task objective. Limited model capacity: Despite Llama 3 7B being a large model, the quantization and adaptation techniques might limit its capacity to absorb significant new information without losing previous learning. To address this: Try adjusting your LoRA parameters (rank, alpha) to allow for more capacity. Experiment with different learning rates or training durations. Consider using a higher bit quantization if possible, though this might be constrained by Colab's resources. Ensure your new data is well-preprocessed and consistent with your original dataset. You might need to balance between the amount of new data added and the model's capacity to learn from it given the constraints. Remember, fine-tuning large language models, especially with techniques like quantization and PEFT, often requires iterative experimentation to find the right balance. Keep monitoring your performance metrics and adjusting your approach accordingly. Good luck! Scott
@ganeshkumara8501
@ganeshkumara8501 2 месяца назад
@@scott_ingram are you intrested to colab with my company? Regarding this Fine tuning
@andrew.derevo
@andrew.derevo 3 месяца назад
Did you have any experience with fine tuning for non english data on this model, any suggestions for a good multilingual open sources models?🙏
@scott_ingram
@scott_ingram 2 месяца назад
I haven't personally fine-tuned models for languages other than English, but Llama 3 is one of the best available multilingual open source models.
@andrew.derevo
@andrew.derevo 3 месяца назад
Good stuff sir, thanks a lot 🙌
@petroff_ss
@petroff_ss 3 месяца назад
Thank you! You have a talent for explaining and planning a workshop! Thank you for your work!
@RosildaSilva-cb1jf
@RosildaSilva-cb1jf 3 месяца назад
Gostei dessas publicações.
@azkarathore4355
@azkarathore4355 3 месяца назад
Hi i want to finetune llama3 for English to urdu machine translation can you guide me regarding this.dataset is opus 100
@big_sock_bully3461
@big_sock_bully3461 3 месяца назад
Best way of explaining thanks a lot man really helped a lot
@Danishkhan-ni5qf
@Danishkhan-ni5qf 3 месяца назад
Wow!
@EuSouAnonimoCara
@EuSouAnonimoCara 4 месяца назад
Awesome content!
@SilentEcho-d9q
@SilentEcho-d9q 4 месяца назад
Is the output from Ollama on your MacBook in real-time? Or you have speed up in the video? On my 2014 iMac, it is significantly slower. It's about time for a new one. What are the technical specifications of your Mac?
@scott_ingram
@scott_ingram 4 месяца назад
Except for the download, which I sped up significantly, everything in terminal was shown in real time. The demo was done on a MacBook Pro M3 Pro Max. YMMV with other hardware.
@SilentEcho-d9q
@SilentEcho-d9q 4 месяца назад
Amazing video, thanks for the best explanation I’ve ever seen on RU-vid. Could you also please make a video how to finetune the phi3 model? 🙏
@scott_ingram
@scott_ingram 4 месяца назад
Great suggestion! I will look into that.
@pyramydseven
@pyramydseven 4 месяца назад
wow
@gustavomarquez2269
@gustavomarquez2269 4 месяца назад
You are amazing! This is the best explanation about this topic. I liked it and just subscribed. Thank you very much !!!
@scott_ingram
@scott_ingram 4 месяца назад
Thank you so much for the kind words and for subscribing, I really appreciate it! I'm so glad you found the video helpful in explaining how to fine-tune LLaMA 3 and run it on your own device. It's a fascinating topic and technology with a lot of potential. I'm looking forward to sharing more content on large language models and AI that you'll hopefully find just as valuable. Stay tuned!
@andrepamplona9993
@andrepamplona9993 4 месяца назад
Super, hyper fantastic! Thank you.
@ratsock
@ratsock 4 месяца назад
Absolutely fantastic! Really appreciate, detailed, clear breakdown of concrete steps that let us drive value, rather than the clickbait hypetrain that everyone else is on.
@tal7atal7a66
@tal7atal7a66 4 месяца назад
i like the thumbnails, topic types, explains methods, and the mr who explain. nice channel very valuable infos ❤
@israelcohen4412
@israelcohen4412 4 месяца назад
So i never post comments, but the way you explained this was by far the best i have seen online, i wish I found your channel 8 months ago :) Please keep posting videos your explanation is very well thought off and put together.
@ChargedPulsar
@ChargedPulsar Месяц назад
I'm still struggling. There is a lot of advertisements and explanations, tutorials of other tools which I don't care at all. I want to learn about fine tuning, it should be all about some python code and whatever libraries used. People can use all kinds of other tools to support the development, if they cannot open an excel file or know where to write their python code, they shouldn't be in the AI business at all.
@RameshBaburbabu
@RameshBaburbabu 4 месяца назад
Thank you so much for sharing that fantastic clip! It was really informative. I'm currently looking into fine-tuning a model with my ERP system, which handles some pretty complex data. Right now, I'm creating dataframes and using panda-ai for analytics. Could you guide me on how to train and make inferences with this row/column data? I really appreciate your time and help!
@scott_ingram
@scott_ingram 4 месяца назад
Thanks for your question and for watching the video. I'm glad you found it informative! Your approach largely depends on your use case and the kind of insights you're looking to derive from your data. Generally, you're going to want to follow these steps to train a model with complex data: Decide how you plan to interact with the model. For instance, maybe you're doing text generation; or natural language understanding tasks like sentiment analysis, named entity recognition and question answering; or text summarization; or domain-specific queries like legal, medical or corporate. Choose a model that has high benchmarks for the specific requirements of your task, the nature of your data and the desired output format. A model is more likely to train well if the base model's capabilities are already very strong for the task you intend to use it for. Consider factors like model performance, computational resources, and the availability of pre-trained weights for your specific domain or language. Prepare and preprocess your dataframes, removing/filling missing values, encoding variables numerically and normalizing the data. The cleaner the data, the better the training will be. Split the data into a training set and validation set. The validation set will be data you haven't trained the model on to see how the model performs with unseen data. Fine-tune with your dataset, test the model out, then iterate on the process by tweaking data, adding more data, trying different training parameters, even trying different models. Hope this helps guide you in your endeavor!
@madhudson1
@madhudson1 4 месяца назад
rather than using google colab + compute for training, what are your thoughts on using a local machine + GPU?
@guyvandenberg9297
@guyvandenberg9297 4 месяца назад
Good question. I am about to try that. I think you need an Ampere architecture on the GPU - (A100 or RTX 3090). Scott, thanks for a great video.
@guyvandenberg9297
@guyvandenberg9297 4 месяца назад
Ampere architecture for BF16 as opposed to F16 as per Scott's explanation in the video.
@scott_ingram
@scott_ingram 4 месяца назад
Thanks for your question! The notebook is designed to do the training on Colab, but you can run it locally for training if you have compatible hardware; I haven't tested it locally though. The RTX3090 does support brain float. Install python, then set up a virtual environment: python3 -m venv venv source venv/bin/activate Next, install and start the Jupyter notebook service: pip install jupyter jupyter notebook --kernel_name=python3 That will run a local jupyter notebook service and connect to a Python 3 kernel. Then, test GPU availability: import torch print(torch.cuda.is_available()) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") print(f"Using device: {device}") Here's how you would create a tensor with pytorch on the RTX 3090 and tell it to use brain float: tensor = torch.randn(1024, 1024, dtype=torch.bfloat16) Some cells in the notebook won't run correctly, such as the first cell that sets up text wrapping (this cell is not relevant for training); that's designed for Colab specifically. There may be other compatibility issues, but I haven't tested it running locally. This should get you started to see whether your GPU could potentially work. Let me know how it works out!
@PreparelikeJoseph
@PreparelikeJoseph 4 месяца назад
@@scott_ingram Id really like to get some ai agents running locally on a self hosted model. Im hoping two rtx 3090 can combine just via PCI and load a full 70b model.
@evanm6739
@evanm6739 4 месяца назад
You cannot censor nor monitor what people generate period. It’s a violation on freedom and privacy.
@alan-od8hk
@alan-od8hk 4 месяца назад
Very interesting....
@mridlon1634
@mridlon1634 4 месяца назад
1:47 Looks like the video game, “Stray” before the apocalypse, the plague that wiped out humanity, and the emergence of the “Zurks”.
@CharliePrismatic
@CharliePrismatic 4 месяца назад
I wanna do more than just 'like' your comment, i totally agree, i skipped that part thank you for saying this, you've positively affected at least 1 person and i appreciate you
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
Ya its crappy looking! Thats why its NOT making any cash! A need doesnt exist outside CRIME! Sure, crooks need this process. Child po*n producers will be HAPPY these tools are available! First DA to prosicute as "aiding and abetting" Soros will win. Sure! If i was a DA i would prosicute too!
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
So... It appears joining scenes is impossible because each generation is unique and a little random. This is untenable in Hollywood. Scenes need to be CONSISTANT through movie, right?
@scott_ingram
@scott_ingram 2 месяца назад
Sure. It works best on small clips, but I think this capability will improve dramatically over time.
@irisfilmproductions
@irisfilmproductions 4 месяца назад
Why can't ai be useful and not replace artistic jobs. Leave some joy for us plebians and stop stealing art dammit
@Kevin-p2l5b
@Kevin-p2l5b 4 месяца назад
Awesome.
@Kevin-p2l5b
@Kevin-p2l5b 4 месяца назад
Okay.
@godnessy
@godnessy 4 месяца назад
Very interesting survey of the model! Would love it if you could do the same for other top models (Opus, gpt4 turbo etc) and maybe have a running comparison for them. Would help greatly when trying to develop AI products!
@4Nanook
@4Nanook 4 месяца назад
You missed the mistakes in the hockey fish, there are two pucks.
@bobtarmac1828
@bobtarmac1828 4 месяца назад
Ai jobloss is the only thing I worry about anymore.
@julkiewicz
@julkiewicz 4 месяца назад
Well it writes really lousy code on its own. The logic for ball bouncing is all wrong and buggy. But in the hands of a person that knows what they are doing it would be very useful. I wish I had this as copilot, it would make me even faster. I love this as autocomplete. Just don't rely on it to think on its own. It clearly falls short in that department.
@mikelolz
@mikelolz 4 месяца назад
Timestamps 0:00 Introduction 0:44 Image Generation 4:15 Code Generation (Breakout game in Python) 14:23 Safety & Content Guardrails 16:23 Logic. Reasoning, Counting, and Math 32:05 Closing Thoughts
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
But...my words WILL get read! People will comment... AI is the latest vent-cap money pit after the METAVERSE pooped out, nft's sunk to nothing and even ev's are unsold! Why use paid sponsorships? G-ai not paying off? Too bad, scalpers!
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
I'm da fool today! Hahaha!
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
Seven vids ALL on HOW COOL g-ai is! Really Scott? Why not just say you are SELLING us on g-ai, and NOT really saying it's limitations. We call doing that as SHILLING. Scott, are you selling and not sharing?
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
They have a device out ya pin to your shirt and it projects an image onto a surface... Wow, it doesnt actually WORK! It uses gestures to interface and...it doesnt work either! It costs $700 bucks! Invest in AI NOW, NOW, NOW!
@dousiastailfeather9454
@dousiastailfeather9454 4 месяца назад
Look online for "ai devices" and see a watchlist of company fails! Its laughable!