Meta says the largest version of its new model is the best-performing open code generator to date. The catch is that, by TechCrunch’s account, the company tested its safety with just 25 employees.
On August 24, 2023, Meta released Code Llama, a model built on top of Llama 2 and further trained on code. It takes plain-language prompts and produces code, completes partial code, helps with debugging, and explains what a block of code does. Meta supports Python, C++, Java, PHP, Typescript, C# and Bash, among others, and lets people use it free for research and commercial work under the same community license as Llama 2. Reuters framed it as Meta’s move against Microsoft’s GitHub Copilot, and noted the company says the model is not recommended for general text tasks.
What is in the box
There are three sizes, with 7 billion, 13 billion and 34 billion parameters. Each was trained on 500 billion tokens of code and code-related data, and two fine-tuned variants sit on top: Code Llama – Python, tuned on a further 100 billion tokens of Python, and Code Llama – Instruct, tuned to follow natural-language instructions and give what Meta calls helpful and safe answers.
The sizes trade quality against speed. The 34 billion model gives the best results, while the 7 billion and 13 billion versions respond faster and suit real-time completion, because they can insert code into existing code. The 7 billion model can run on a single GPU, which matters to anyone without a server rack. TechCrunch reported that the models accept around 100,000 tokens of code as input.
The mechanics of the pitch
Meta’s argument is that coding models gain most from an open approach, for innovation and for safety: with the weights public, the wider community can evaluate the model, find faults and fix vulnerabilities. There is a commercial logic too. GitHub says more than 400 organizations use Copilot and that developers inside them code 55% faster, and Stack Overflow’s survey found 70% of respondents already using or planning to use AI coding tools this year. A free rival goes straight at that demand.
On closer reading, the risks are the weak point. A Stanford-affiliated team found that engineers using AI tools are more likely to introduce security vulnerabilities. Code-generating models can also reproduce copyrighted or restrictively licensed code, and TechCrunch noted that Meta would not categorically deny that applies to Code Llama. Meta red-teamed the model internally with 25 employees, and a request for a script to encrypt every file in a user’s home directory, effectively ransomware, got through when it was phrased innocently, though a direct request for ransomware was refused. Meta itself admits outputs may be “inaccurate” or “objectionable” and tells developers to do their own safety testing.
The licence terms are loose. Users agree not to use the model for malicious purposes, and any company deploying it on a platform with more than 700 million monthly active users has to ask Meta for a license.
Sources
- Introducing Code Llama, an AI Tool for Coding
- Meta releases Code Llama, a code-generating AI model – TechCrunch
- Meta to launch AI model for writing computer codes – Reuters





