Technology Sharing

Meta releases Llama 2-powered AI code generator: Code Llama, open source!

2024-07-11

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Meta just released what it claims to be the "most advanced large language model" in the field of programming.
Code Llama
, can be based on
Code and natural language hints
Generate code and natural language about code, supporting multiple mainstream programming languages,
Including Python, C, Java, PHP, Typescript (Javascript), C# and Bash

Code Llama is completely free for research and commercial use and is published on GitHub:
https://www.jlht168.com/post/m1/Jryk1eDMBdAR.html

Code Llama is based on the Llama 2 language model and provides three models:

  • Code Llama
  • Basic code model
  • Code Llama - Python
  • Optimized specifically for Python
  • Code Llama - Instruct
  • Specialized for understanding natural language instructions

Running the Example

  • Generate code from natural language

  • Explain code function/structure

Code Llama provides three different sized models with 7B, 13B and 34B parameters, which can be used for code completion and debugging. Each model is trained with 500B code tokens and code-related data. In addition, the 7B and 13B base models and instruction models are trained with the intermediate filling (FIM) function, which supports the function of inserting code into existing code.

Meta said that the three different size models meet different service and latency requirements. For example, the 7B model can run on a single GPU. The 34B model returns the best results and provides better coding assistance, but the smaller 7B and 13B models are faster and more suitable for tasks that require low latency, such as real-time code completion.

According to data provided by Meta, Code Llama outperforms existing solutions and is comparable to ChatGPT on popular coding benchmarks HumanEval and Mostly Basic Python Programming (MBPP).