99.3% of ChatGPT Performance with OpenSource AI - [QLoRA paper]

Wes Roth · Beginner ·🧠 Large Language Models ·3y ago

Key Takeaways

The video discusses QLoRA, a method for efficient fine-tuning of quantized language models, and its potential to achieve 99.3% of ChatGPT performance with open-source AI. It covers the concept of low rank adaptation, fine-tuning, and quantization, and explores the use of tools like Hugging Face and Nvidia for training and deploying models.

Full Transcript

so there's some big news today with the open source AI progression paper called Q Laura efficient fine tuning of quantized LMS now in order to really understand what this means we first have to understand a lot of the terminology and Tech jargon this paper uses so first things first here's a Quick Clip explaining what all these words mean what is Laura in AI you may have heard of a concept called Laura referring to Ai and large language models but what is it imagine you have a giant box of Legos you can build all kinds of things with this giant box houses cars spaceships but it's so big and heavy that it's hard to carry around and most of the time you don't need all these Legos to build what you want to build so instead you build a smaller box of your favorite most useful Legos this smaller box is easier to carry around and you can still build most of the things that you want in this analogy the giant box of Legos is like a large language model for example gpt4 it's powerful and can do lots of things but it's also big and heavy it requires a lot of computational resources to use the smaller box of Legos is like a low rank adaptation of the large language model it's a smaller lighter version of the model that's been adapted for a specific task it's not as powerful as the full model there might be some things that it can't do but it's more efficient and easier to use Laura stands for low rank adaptation low rank in this context referred to a mathematical technique used to create this smaller lighter model you can also think of low rank as just reading the highlighted parts of a book full rank would be reading the entire book and low rank would be reading just the important highlighted bits why is Laura important let's say you have a large and advanced AI model trained on recognizing all sorts of images you can fine tune it to do a related task like recognizing images of cats specifically you do that by making small adjustments to this large model you can also fine-tune it to add behaviors you want or remove behaviors you don't but this can be very expensive in terms of what computers you would need and how long it would take Laura solves this problem by making it cheap and fast to fine-tune these smaller models Laura is important because one efficiency using Laura can greatly reduce the amount of resources used to train AI models to perform these tasks two speed these lower ranked models are faster to train but also they can provide faster outputs this can be crucial in applications where results need to happen in real time three limited resources and many real world applications the devices that are available to run AI models may have limited computational power or memory your smartphone may not be able to run a large language model but a low rank adaptation can be used for specific tasks you may need for stacking and transferring low rank adaptations can be helpful for transfer learning we're a model trained on one task can be adapted to a different but related task this is much more efficient than training the large model to do something from scratch the updates and new skills learned by these low rank adaptations can also stack with other such adaptations so multiple models can benefit each other as well as the original larger model Q Laura Q Laura is a similar concept the Q stands for quantized so kelora is quantized lowering adaptation quantized refers to data compression quantization is converting a continuous range of values into a finite set of possible values imagine if you're an artist mixing paint you have an almost infinite range of colors you can create by mixing different amounts of colors together this is like a continuous signal in the real world but if you're working with a computer Graphics program it can't handle an infinite range of colors it might only allow each color component red green and blue to have one of many levels of intensity this limited set of possible colors is like a quantized signal here it can apply to reducing the number of decimal places we need to express a number for example Pi is an infinitely long number but we can use 3.14 as an approximation when doing calculations so back to the paper key lower so basically killora trains these models through a 4-bit quantized pre-trained language model into low rank adapters Laura what does this mean well it means it's now very cheap and very accessible to training your own AI models here's a blog post on hugging face about this paper the majority of this paper deals with how we store data and the most common data types it explains why training these models can be so expensive and requires such Advanced and powerful and expensive Hardware the common data types used in machine learning and what quantization means but in a nutshell what this means is you can get the latest Nvidia card on Amazon for about 1600 bucks and with that you can start training your own AI models more specifically fine-tuning them to your own needs now if you recall there was a leaked document out of Google it was the we have no moat document and in it there was a whole paragraph talking about Laura and what an incredibly powerful technique this was here's what it said it's in the paragraph titled what we missed the innovation that powered open source recent successes directly solved problems we're still struggling with paying more attention to their work could help us avoid Reinventing the wheel Laura is an incredibly powerful Technique we should probably be paying more attention to Laura works by representing model updates as low rank factorizations which reduces the size of the update matrices by a factor of up to several thousand this allows model fine-tuning at a fraction of the cost and time being able to personalize a large language model in a few hours on consumer Hardware is a big deal particularly for aspirations that involved incorporating new and diverse knowledge in real time the fact that this technology exists is under exploited inside Google even though it directly impacts some of our most ambitious projects curious to know what they mean by some of our most ambitious projects retraining models from scratch is the hard path part of what makes Laura so effective is that like other forms of fine tuning it's stackable improvements like instruction tuning can be applied and then leveraged as other contributors add-on dialogue or reasoning or tool use while the individual fine tunings are low rank there are some need not be allowing full rank updates to the model to accumulate over time this means that as new and better data sets and tasks become available the model can be cheaply kept up to date without ever having to pay the cost of a full run by contrast training giant models from scratch not only throws away the pre-training but also in the iterative improvements that have been made on top in the open source World it doesn't take long before these improvements dominate making a full retrain extremely costly basically resetting whatever improvements and advancements they've made we should be thoughtful about whether each new application or idea really needs a whole new model if we really do have major architectural improvements that preclude directly reusing model weights then we should invest in more aggressive forms of distillation that allow us to retain as much of the previous generation's capabilities as possible large models aren't more capable in the long run if we can iterate faster on smaller models Lora updates are very cheap to produce around 100 bucks for the most popular model sizes this means that almost anyone with an idea can generate one and distribute it trading times under a day are the norm at that pace it doesn't take long before the accumulative effects of All of These Fine tunings overcome starting off at a size disadvantage focusing on maintaining some of the largest models on the planet actually puts us at a disadvantage I don't know what this means for you but for me the nvidia's GeForce RTX 490 just now became on my buy list and of course it's going to be 100 written off for tax purposes because I will use it strictly for work and business related purposes and certainly not for gaming thank you for watching

Original Description

🔥 Get my A.I. + Business Newsletter (free): https://natural20.com/ The Paper https://arxiv.org/pdf/2305.14314.pdf Hugging Face Blog https://huggingface.co/blog/4bit-transformers-bitsandbytes Hugging Face Explanation https://huggingface.co/blog/hf-bitsandbytes-integration Google "we have no moat" Leak https://natural20.com/google-ai-documents-leak/ TIMELINE: [00:00] - Intro [00:18] - What is LoRA [03:34] - QLoRA [05:25] - Google's Paper
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Wes Roth · Wes Roth · 35 of 60

1 Which Vanguard index fund to buy? (hint: it's the one Warren Buffett recommends)
Which Vanguard index fund to buy? (hint: it's the one Warren Buffett recommends)
Wes Roth
2 What does PALANTIR do - Palantir Stock, Founder, Controversy Explained Simply (plus why I'm BUYING).
What does PALANTIR do - Palantir Stock, Founder, Controversy Explained Simply (plus why I'm BUYING).
Wes Roth
3 Paypal misinformation fine ($2,500) - Close Your Accounts ASAP!
Paypal misinformation fine ($2,500) - Close Your Accounts ASAP!
Wes Roth
4 China Was Just Sent Back to the Dark Ages  |  US starts aggressively cutting ties
China Was Just Sent Back to the Dark Ages | US starts aggressively cutting ties
Wes Roth
5 ChatGPT Business Ideas - How I Use ChatGPT to make money
ChatGPT Business Ideas - How I Use ChatGPT to make money
Wes Roth
6 ChatGPT Explained - The AI revolution is happening right now... [ chat gpt ]
ChatGPT Explained - The AI revolution is happening right now... [ chat gpt ]
Wes Roth
7 ChatGPT Banned - New York blocking network access to ChatGPT
ChatGPT Banned - New York blocking network access to ChatGPT
Wes Roth
8 ChatGPT Trading - this [INSANE] tool A.I. built for me
ChatGPT Trading - this [INSANE] tool A.I. built for me
Wes Roth
9 Small Business Grants for ChatGPT and A.I. (similar to PPP and EIDL in 2023) |
Small Business Grants for ChatGPT and A.I. (similar to PPP and EIDL in 2023) |
Wes Roth
10 How to Make Passive Income with ChatGPT AI
How to Make Passive Income with ChatGPT AI
Wes Roth
11 OpenAI’s GPT-4 Artificial Intelligence = AGI? TRILLIONS of Parameters Plus THIS
OpenAI’s GPT-4 Artificial Intelligence = AGI? TRILLIONS of Parameters Plus THIS
Wes Roth
12 How Nvidia AI Robot Trained 42 Years In 32 Hours And Did THIS | Google DeepMind AlphaCode
How Nvidia AI Robot Trained 42 Years In 32 Hours And Did THIS | Google DeepMind AlphaCode
Wes Roth
13 John Carmack | AGI by 2030 | Will John Carmack's AI company be the one to make it?
John Carmack | AGI by 2030 | Will John Carmack's AI company be the one to make it?
Wes Roth
14 AI Small Business Grants
AI Small Business Grants
Wes Roth
15 Elon Musk attacks OpenAI - here's Sam Altman's response
Elon Musk attacks OpenAI - here's Sam Altman's response
Wes Roth
16 Bill Gates on ChatGPT and OpenAI "The Age of AI has begun"
Bill Gates on ChatGPT and OpenAI "The Age of AI has begun"
Wes Roth
17 Sparks of AGI | Microsoft Researchers claim GPT-4 Is showing "Artificial General Intelligence"
Sparks of AGI | Microsoft Researchers claim GPT-4 Is showing "Artificial General Intelligence"
Wes Roth
18 Elon Musk and Others Call for Pause on AI as GPT-4 shows signs of AGI.
Elon Musk and Others Call for Pause on AI as GPT-4 shows signs of AGI.
Wes Roth
19 Comparing GPT-4 and Google's Bard AI - Who is getting closer to AGI?
Comparing GPT-4 and Google's Bard AI - Who is getting closer to AGI?
Wes Roth
20 Sam Altman on UBI, OpenAI to $100 TRILLION and Massive Job Losses from AI Automation
Sam Altman on UBI, OpenAI to $100 TRILLION and Massive Job Losses from AI Automation
Wes Roth
21 25 ChatGPTs play a videogame...
25 ChatGPTs play a videogame...
Wes Roth
22 NVIDIA's new AI: Better Games, Art and... better life?
NVIDIA's new AI: Better Games, Art and... better life?
Wes Roth
23 Google AI Documents Leak about "Google and OpenAI"
Google AI Documents Leak about "Google and OpenAI"
Wes Roth
24 PaLM 2 vs GPT-4 | why Google is having a hard time catching up...
PaLM 2 vs GPT-4 | why Google is having a hard time catching up...
Wes Roth
25 How To Access ChatGPT Plugins | They are LIVE! (but hidden)
How To Access ChatGPT Plugins | They are LIVE! (but hidden)
Wes Roth
26 Sam Altman to Congress "America HAS to lead the world in AI"...
Sam Altman to Congress "America HAS to lead the world in AI"...
Wes Roth
27 Sam Altman Opening Statement to Congress on AI Regulation
Sam Altman Opening Statement to Congress on AI Regulation
Wes Roth
28 Sam Altman Congress Hearing "AI is the Biggest Threat to Human Race"
Sam Altman Congress Hearing "AI is the Biggest Threat to Human Race"
Wes Roth
29 Tree of Thoughts - GPT-4 Reasoning is Improved 900%
Tree of Thoughts - GPT-4 Reasoning is Improved 900%
Wes Roth
30 Governance of Superintelligence | OpenAI proposes measures for safe AI development.
Governance of Superintelligence | OpenAI proposes measures for safe AI development.
Wes Roth
31 Model Evaluation For Extreme Risks of AI | Google DeepMind and OpenAI Paper
Model Evaluation For Extreme Risks of AI | Google DeepMind and OpenAI Paper
Wes Roth
32 Minecraft AI - NVIDIA uses GPT-4 to create a SELF-IMPROVING 🤯 autonomous agent.
Minecraft AI - NVIDIA uses GPT-4 to create a SELF-IMPROVING 🤯 autonomous agent.
Wes Roth
33 AI Human Extinction Risk - Experts Warn of "Serious Risk"
AI Human Extinction Risk - Experts Warn of "Serious Risk"
Wes Roth
34 LoRA - Low-rank Adaption of AI Large Language Models: LoRA and QLoRA Explained Simply
LoRA - Low-rank Adaption of AI Large Language Models: LoRA and QLoRA Explained Simply
Wes Roth
99.3% of ChatGPT Performance with OpenSource AI - [QLoRA paper]
99.3% of ChatGPT Performance with OpenSource AI - [QLoRA paper]
Wes Roth
36 AlphaFold2 Explained | Google's DeepMind Solves Protein Folding
AlphaFold2 Explained | Google's DeepMind Solves Protein Folding
Wes Roth
37 Illumina AI - ChatGPT for your genome...
Illumina AI - ChatGPT for your genome...
Wes Roth
38 Text to Video Invasion! Runway AI releases GEN 2 text to video.
Text to Video Invasion! Runway AI releases GEN 2 text to video.
Wes Roth
39 LLMs as Tool Makers [LATM] - GPT-4 *UPGRADES* lower AI Models.
LLMs as Tool Makers [LATM] - GPT-4 *UPGRADES* lower AI Models.
Wes Roth
40 AlphaDev - DeepMind AI Discovers Better Algorithms for Foundational Computing
AlphaDev - DeepMind AI Discovers Better Algorithms for Foundational Computing
Wes Roth
41 OpenAI GPT-4 Function Calling: *HUGE* Potential
OpenAI GPT-4 Function Calling: *HUGE* Potential
Wes Roth
42 GPT-4 leaked! 🔥 All details exposed 🔥 It is over...
GPT-4 leaked! 🔥 All details exposed 🔥 It is over...
Wes Roth
43 Elon Musk announced XAI - the answer to OpenAI = X.AI
Elon Musk announced XAI - the answer to OpenAI = X.AI
Wes Roth
44 Andrej Karpathy GPT - Advice for building AI agents
Andrej Karpathy GPT - Advice for building AI agents
Wes Roth
45 TEST TO SEE IF AI CAN MAKE $1,000,000   (modern Turing test)
TEST TO SEE IF AI CAN MAKE $1,000,000 (modern Turing test)
Wes Roth
46 ChatGPT custom instructions are *POWERFUL*  Replace AutoGPT and BabyAGI?
ChatGPT custom instructions are *POWERFUL* Replace AutoGPT and BabyAGI?
Wes Roth
47 WORLDCOIN LAUNCH is starting! Backed by Sam Altman of OpenAI.
WORLDCOIN LAUNCH is starting! Backed by Sam Altman of OpenAI.
Wes Roth
48 WORLDCOIN ORB - I went to L.A. to get my eye scanned for WorldCoin [my experience]
WORLDCOIN ORB - I went to L.A. to get my eye scanned for WorldCoin [my experience]
Wes Roth
49 The Biggest Week of AI News In Months!
The Biggest Week of AI News In Months!
Wes Roth
50 Google Deepmind RT 2 - Using LLMs to Build Thinking, Learning Robots
Google Deepmind RT 2 - Using LLMs to Build Thinking, Learning Robots
Wes Roth
51 AI News is Getting *WEIRD* Human Brain Matter in Chips. OpenAI tutorial. Amazon unleashed it's AI.
AI News is Getting *WEIRD* Human Brain Matter in Chips. OpenAI tutorial. Amazon unleashed it's AI.
Wes Roth
52 GPT 5 release date 🔥 might be closer than we think | OpenAI applies for GPT-5 Trademark in the US.
GPT 5 release date 🔥 might be closer than we think | OpenAI applies for GPT-5 Trademark in the US.
Wes Roth
53 AI Agents Simulate a Town 🤯 Generative Agents: Interactive Simulacra of Human Behavior.
AI Agents Simulate a Town 🤯 Generative Agents: Interactive Simulacra of Human Behavior.
Wes Roth
54 Proof that AI Understands? 👀 Andrew Ng on LLMs building mental models, Othello GPT,  Geoffrey Hinton
Proof that AI Understands? 👀 Andrew Ng on LLMs building mental models, Othello GPT, Geoffrey Hinton
Wes Roth
55 OpenAI acquires Biomes 👀 an open-source MMORPG. ChatGPT plus Minecraft? 🔥
OpenAI acquires Biomes 👀 an open-source MMORPG. ChatGPT plus Minecraft? 🔥
Wes Roth
56 OpenAI announces FINETUNING 👀 for ChatGPT
OpenAI announces FINETUNING 👀 for ChatGPT
Wes Roth
57 Autonomous AI Agents - why YOU should be building them... and HOW.
Autonomous AI Agents - why YOU should be building them... and HOW.
Wes Roth
58 ChatGPT Enterprise - OpenAI launches the next BIG thing
ChatGPT Enterprise - OpenAI launches the next BIG thing
Wes Roth
59 HOODWINKED -  AI gets away with MURDER 👀 GPT-4 is an effective killer...
HOODWINKED - AI gets away with MURDER 👀 GPT-4 is an effective killer...
Wes Roth
60 Install Open Interpreter in 2 min | The free, open source CODE INTERPRETER!
Install Open Interpreter in 2 min | The free, open source CODE INTERPRETER!
Wes Roth

The video teaches how to use QLoRA for efficient fine-tuning of quantized language models, achieving high performance with low computational costs. It matters because it enables the development of open-source AI models that can compete with proprietary models like ChatGPT. The key insight is that low rank adaptation can significantly reduce the size of model updates, making it possible to iterate faster on smaller models.

Key Takeaways
  1. Read the QLoRA paper to understand the concept of low rank adaptation
  2. Explore Hugging Face and Nvidia tools for training and deploying models
  3. Fine-tune a pre-trained language model using QLoRA
  4. Deploy the model with low computational resources
  5. Monitor and update the model using low rank adaptations
💡 Low rank adaptation can significantly reduce the size of model updates, making it possible to iterate faster on smaller models.

Related Reads

📰
I Built a Prompt Framework for AI Indian Wedding Photography — Here’s Every Prompt You Need
Learn to create stunning AI-generated Indian wedding photos with a 5-layer prompt framework and region-specific prompts
Medium · AI
📰
Vibe Coding Only Works If You Already Know How To Code
Vibe coding with LLMs requires prior coding knowledge to be effective, as it can't replace human judgment in deciding the correctness of code patches.
Medium · LLM
📰
I Spent Two Weeks Testing Chinese AI Models and Got Surprised
Discover the surprising results of testing Chinese AI models for two weeks and learn how to apply these findings to your own AI projects
Dev.to · purecast
📰
IA local vs ChatGPT para empresas: qué usar y cuándo
Learn when to use local IA vs ChatGPT for businesses and make informed decisions about AI adoption
Dev.to AI
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →