Meta has released new versions of its software code-writing generative AI tool Code Llama that can help developers work quicker and more efficiently.
Code Llama is a large language model (LLM) that can use text prompts to generate code. By using generative AI tools like Code Llama, developers should be able to write quicker and better code, while these tools can also lower the barrier of entry to people who are learning to code.
Meta released the original versions of Code Llama back in August last year in three sizes, with 7B, 13B, and 34B parameters. The new offerings include take it up to 70B – 70 billion parameters – with Llama Code 70B being the largest and most high performance LLM in the group so far.
Code Llama 70B is now available in the three versions, all of which are open source and thus free for research and commercial use. The new versions are:
- CodeLlama – 70B, the foundational code model
- CodeLlama – 70B - Python, specialized for Python
- Code Llama – 70B – Instruct, which is fine-tuned for understanding natural language instructions
“Writing and editing code has emerged as one of the most important uses of AI models today,” said Meta CEO Mark Zuckerberg on Facebook, announcing the updated models. Developers can request access to the models from Meta.
Code Llama is a code-specialized version of Meta’s open source Llama 2 foundational general purpose LLM, created by training Llama 2 further on code-specific datasets. That means Code Llama can generate code, and text about code, from both code and natural language prompts. For example, you could ask it to ‘Write a function that outputs the Fibonacci sequence’.
'Code Llama – Python' is a language-specialized variation of Code Llama. Meta said that because Python is the most benchmarked language for code generation – and because Python and PyTorch play an important role in the AI community – a specialized model would be particularly useful to developers.
'Code Llama - Instruct' is a second variation of Code Llama that has been fed a “natural language instruction” input and the expected output which makes it better at understanding what humans expect out of their code prompts. Because this version has been fine-tuned to generate “helpful and safe” answers, Meta recommends using Code Llama - Instruct variants whenever using Code Llama for code generation.
Meta said it didn’t recommend using Code Llama or 'Code Llama - Python' to perform general natural language tasks since neither of these models are designed to follow natural language instructions.
“Code Llama is specialized for code-specific tasks and isn’t appropriate as a foundation model for other tasks,” it said.
Discover why development teams need to adopt a responsible approach to AI code completion tools
“Programmers are already using LLMs to assist in a variety of tasks, ranging from writing new software to debugging existing code. The goal is to make developer workflows more efficient, so they can focus on the most human centric aspects of their job, rather than repetitive tasks,” Meta said when it first launched the tools.
Not all AI models used for coding are open source, but Meta said LLMs for coding benefit from an open approach, both in terms of innovation and safety. “Publicly available, code-specific models can facilitate the development of new technologies that improve peoples' lives,” it said.
Meta said that in its own benchmark testing, Code Llama outperformed state-of-the-art publicly available LLMs on code tasks.
Certainly, looking at the updated benchmark data Meta has included, it seems that 'Code Llama Instruct – 70B' and 'Code Llama – Python 70B' do seem to perform very well against the rivals listed. However, the race to be the most high-performing LLMs is a tough one, with each of the big players constantly iterating.
Meta’s LLMs are far from the only option for developers looking to give their code an artificial intelligence boost. Amazon offers its Code Whisperer free for individual developers, while Github Copilot, powered by generative AI models developed by GitHub, OpenAI, and Microsoft, is probably the best known, and claims to make developers up to 55% more efficient at coding.
Get the ITPro. daily newsletter
Receive our latest news, industry updates, featured resources and more. Sign up today to receive our FREE report on AI cyber crime & security - newly updated for 2023.
Steve Ranger is an award-winning reporter and editor who writes about technology and business. Previously he was the editorial director at ZDNET and the editor of silicon.com.