This tutorial helps you to build your own local Copilot with CodeLlama model.
First, make sure you've installed the NVIDIA driver and CUDA Toolkit according to the Prepare the CUDA environment in AWS G5 instances undert Ubuntu 24.04 article.
See how to Setup Ollama.
ollama run codellama:7b-instruct
ollama run codellama:7b-code
You may noticed that we installed two models, codellama:7b-instruct
is for auto-complete, and codellama:7b-code
is for chat. We will tell you how to use them later.
sudo apt install code
Or you want to download and install manually.
See this picture that how to install Twinny:
See the picture how to configure Twinny:
Auto-complete
Hostname: localhost
Port: 11434
Path: /api/generate
Model Name: codellama:7b-code
FIM Template: codellama
Chat
Hostname: localhost
Port: 11434
Path: /v1/chat/completions
Model Name: codellama:7b-instruct
Code complete:
Chat: