Local AI Coding Assistant with Qwen 2.5
ollama pull qwen2.5-coder:7bI used Qwen-2.5-Coder:7B parameters because models with 3B parameters or less cannot solve the coding task well, so a model with higher capabilities is needed that can run on a mid-range GPU with 8GB of VRAM, such as an RTX 3070 or equivalent.
Once Ollama has finished downloading the desired model, to connect Qwen-2.5-Coder with the Continue extension in the Visual Studio Code editor, we need a local AI server. There are two ways to run an AI server with Ollama: by running the desktop application or by running the following command::
ollama serve Next, we'll add the Continue extension from Continue.Dev to the Visual Studio Code editor. (This extension is also available for JetBrains IDEs like Intellij IDEA, but I haven't tried it yet.) Once the Continue extension is installed, we'll need to edit the extension's config.json file. To do this, use the keyboard shortcut Ctrl+Shift+P and type "continue: config," then select "Continue: Open Continue Config" from the resulting options.
Fill in or change the config for "models" and "tabAutoCompleteModel" according to the instructions from the Continue extension here, as shown by this sample below:
{
"models": [
{
"model": "qwen2.5-coder:7b",
"provider": "ollama",
"title": "Qwen 2.5 Coder 7B",
"systemMessage": "You are an expert software developer. You give helpful and concise responses."
}
],
"tabAutocompleteModel": {
"title": "Qwen 2.5 Coder 7B",
"provider": "ollama",
"model": "qwen2.5-coder:7b"
},
"contextProviders": [
{Don't forget to save this file so the Continue extension can connect to Qwen-2.5-Coder in Ollama. If you still don't see any changes, try opening a new VS Code window or restarting both Ollama and VS Code. Sometimes, restarting your PC or laptop is necessary so Ollama can use all available graphics memory to run Qwen-2.5-Coder smoothly.
Happy coding~!

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging.. Indonesian links
ReplyDelete