New AI - Code Llama - Broke the Internet: Why Everyone's Switching from GPT-4

Meta released Code Llama, a specialized AI for writing and debugging code that outperforms GPT-4 on HumanEval benchmarks: 28.8% versus GPT-4's 18.6%. It comes in three sizes, runs locally without subscription fees, and is available through Perplexity AI Labs and Hugging Face.
Questions this video answers
2023-08-28
2026-01-02
7B, 13B, and 34B parameters
500 billion tokens of code and code-related data
100,000 tokens
Chapters
Everyone online is talking about Meta's new AI model, Code Llama, and it's easy to see why. It's an impressive tool that can create and talk about code through text prompts, and it's more advanced than any tool we've known. In this video, I'll explain all the details about Code Llama, its features, how it stands out from other AI tools, and ways you can start using it today. Alright, so according to Meta's blog post, Code Llama is a large language model that is fine tuned for coding tasks. It's built on top of llama 2, which is Meta's general purpose language model that can handle text, images and other modalities. Code Llama is specialized for generating and discussing code from both code and natural language prompts. For example, you can ask it to write a function that outputs the Fibonacci sequence or explain what a piece of code does. It can also help you with code completion and debugging by inserting code into existing scripts or finding errors in your code. It supports many of the most popular programming languages used today, such as Python, C, Java, PHP, TypeScript, Bash and more. It can also handle up to 100,000 tokens of context, which means it can work with large and complex codebases. This is a huge improvement over many existing models that can only handle a few thousand tokens at most. Now, Meta has released three sizes of code llama 7B, 13B and 34B parameters, and each of these models has been trained with 500 billion tokens of code and code related data. The bigger the model, the better the results, but also the slower the speed. The 7B model can be served on a single GPU, while the 34B model requires a supercomputer and the 13B model is somewhere in between. But Meta has also created two additional variations of Code Llama Code Llama Python and Code Llama Instruct. Code Llama Python is a model that is further fine tuned on Python code only, which makes it more suitable for Python developers and learners. As Python is one of the most widely used and benchmarked languages for coding Code Llama Instruct is a model that is fine tuned for understanding natural language instructions better. So when you ask it to do something in simple words, it can figure out what you mean and and produce the right code for you. One of the coolest features of Code Llama is its fill in the Middle capability. It lets you add code into what you've already written without removing or replacing any of it. This is great when you need to finish a part of your code without changing everything else. So let's say you made a function to add two numbers but forgot to put in the part that gives back the result. You can get Code Llama to finish that part for you with fim. Alright, now let's talk about how Code Llama stands compared to other similar tools. The main competitors to Code Llama are Chat GPT and GitHub Copilot Chat Chat GPT is based on the GPT 3.5 model, and GitHub Copilot Chat uses the Codex model for context. Codex is a large language model from OpenAI and it's trained using code from GitHub. Now, both Chat GPT and GitHub Copilot Chat are great at generating and discussing code. When given text instructions, however, they have some limitations. For example, they can only manage up to 2,048 tokens of context, so they might struggle with large or complicated coding projects. They also can sometimes make mistakes in accuracy and might produce code that's not entirely safe or correct. When we compare the performance, Code Llama does better than both in various tests. One significant test is human evil. OpenAI developed this test to see how well a program can write code based on written descriptions called docstrings. A docstring is like a comment that tells you what a specific function or class in the code is supposed to do. The challenge is to come up with code that matches that description perfectly. On Human Evil, code llama solves 28.8% of the problems, while chatgpt solves 0%. So nothing and GitHub copilot chat solves 11.4%. That's a huge difference. Code Llama is also more likely to produce factual and safe responses than ChatGPT and GitHub Copilot chat, as it has been aligned using more human feedback and adversarial testing. But what about GPT4, which clearly has some advantages over Code Llama? Like it can handle visual input which Code Llama cannot. It can also generate more creative and collaborative content such as songs, screenplays, or learning a user's writing style. However, GPT4 is not specialized for coding tasks. In fact, on human evil, GPT4 only solves 18.6% of the problems, while code llama solves 28.8%. That's a significant gap. Code Llama also has some features that GPT4 does not have, such as FIM capability and instruction fine tuning, and it is more accessible and implementable than GPT4, as I will explain later, but Before I go on, I want to share something exciting with you. Unnatural Code Llama this is an upcoming version of Code Llama that's been trained on a secret dataset of unnatural Code. Unnatural Code is code that is deliberately written in a way that violates the conventions or best practices of coding, like using misleading variable names, omitting comments, or nesting loops too deeply. But why would anyone train a model on Unnatural Code? Well, the idea is to make the model more robust and adaptable to different coding styles and scenarios. Unnatural Code can also be used as a form of obfuscation or encryption, making the code harder to read or reverse engineer by humans or machines. This model is still in development, but some leaked results have shown that it can rival GPT4's performance on various benchmarks. For instance, it can pass a simulated bar exam with a score around the top 10% of test takers. In contrast, GPT4's score was around the bottom 10%. It can also generate code that is indistinguishable from human written code by experts. Unnatural Code Llama is making waves on social media as many people are curious and excited about its potential. So how can you get your hands on Code Llama? Well, the good news is that it is now available via the Perplexity AI Labs website where you can interact with Code Llama through a web interface. You can also try the code llama model 13B in code llama Playground on Hugging Face okay, now back to advantages of using code llama over GPT4 in terms of accessibility and implementation. For one thing, Code Llama can run on local machines, while GPT4 requires cloud based servers. Another advantage is that Code Llama does not have any subscription models or Usage limits. Unlike GPT4, you can use Code Llama as much as you want without paying anything extra or being restricted by quotas or tiers. You also don't have to worry about potential ethical or legal concerns that might arise from using GPT4's cloud based mechanism. So what are the potential and future implications of Code Llama? Well, to be honest, it's a game changer for coders of all levels and domains. It helps you write and understand code quickly, learn new coding techniques, and discuss code with others. But it's not flawless. It might struggle with unique cases or new programming languages, and may face legal issues like code that breaks copyright rules. There's also competition. Tools like GPT4 or others optimized for specific coding tasks might challenge Code Llama to stay relevant. It needs to keep evolving, but as I mentioned earlier, Meta is already working on updates like Unnatural, Code Llama and adding image input. Actually, you should check their blog post for more details and examples of Code Llama. And if you want to stay updated on the latest news and developments of Code Llama, you can follow Meta on Twitter or join their Discord server. And that wraps up today's video. I hope you found it useful, and if you did, give it a like and subscribe for more videos on AI. Also, let me know in the comments what you think of Code Llama and how you plan to use it. Thank you so much for watching and I'll see you in the next one.










