What is Code Llama?
Code Llama is an AI model built on Llama 2, fine-tuned for generating and discussing code.
It is free for research and commercial use.
Code Llama facilitates code completion and debugging, seamlessly adapting to popular languages such as Python, C++, Java, PHP, Typescript (Javascript), C#, and Bash.
In this section, I will explain each step in detail through code.
Running Code Llama on MacBook
getting Started
Code Llama's model weights can be found on Huggingface.
Basic Model Code Llama and Extended Model Code Llama — Python is not fine-tuned to follow instructions. They should be prompted so that the expected answer becomes a natural continuation of the prompt. This means that these two models focus on code filling and code completion.
The extended model Code Llama — is trained using “natural language instructions” input and expected output. This strategic approach enhances the model's ability to capture human expectations in cues. This means that the instruction model can be used in chatbot-like applications.
Install
llama2-wrapper is a package that wraps multiple llama2 backends (transformers, gptq, llama.cpp) and provides llama2-webui to run chatbots and Code Llama's code playground.
Installation can be easily done with pip:
pip install llama2-wrapper
Clone repository