[HELP] can some one tell how i can make ollama hosted deepseek or qwen model use in vscode to chat and read my local files and generate code for me in python or fullstack program i am try to make? the yt video not tell how i can make it read and write local file. pls pls help some one.
You can use Cline to get your stuff done, or use Qwen. Both of them are extensions just install and try them.
in vs code open copilot and go to agent or model manager there you can select a list of model providers and select what you want and you are good to go
Your Personal Copilot β Free, Private, Runs on YOUR Machine
Local AI that chats, reads your files, writes code, and never phones home.
The Full Picture
Everything YouTube skipped: Ollama + DeepSeek/Qwen in VS Code with actual file read/write β from zero to fully working.
Why This Hits Different
No monthly fees. No data leaving your laptop. No rate limits ever.
Qwen2.5-Coder-32B now ties GPT-4 on benchmarks β running locally.
One-time GPU investment β unlimited AI coding forever.
What You Unlock
Chat with AI inside VS Code
AI reads your entire project (the missing piece)
AI creates and edits files directly
Python, React, FastAPI, SQL β all of it
Autocomplete that keeps up with Copilot
Offline-capable, fully private
@vinhson asked:
β[HELP] can some one tell how i can make ollama hosted deepseek or qwen model use in vscode to chat and read my local files and generate code for me in python or fullstack program i am try to make? the yt video not tell how i can make it read and write local file. pls pls help some one.β
Got you. Hereβs the complete answer. ![]()
FULL SETUP β Zero to Working
STEP 1 β Install Ollama
The engine that runs AI models locally.
π macOS
- https://ollama.com/download β download Mac version
- Drag to Applications
- Terminal:
ollama --version - Version shows? Done.
πͺ Windows
- https://ollama.com/download β run the
.exe - PowerShell:
ollama --version - Version shows? Done.
π§ Linux
curl -fsSL https://ollama.com/install.sh | sh
Auto-starts on boot. Done.
STEP 2 β Grab a Coding Model
Pick one based on your GPU:
| GPU Memory | Model | Command |
|---|---|---|
| 8GB | Qwen 7B | ollama pull qwen2.5-coder:7b |
| 12GB | DeepSeek V2 | ollama pull deepseek-coder-v2 |
| 24GB | Qwen 32B | ollama pull qwen2.5-coder:32b |
| No GPU | Qwen 1.5B | ollama pull qwen2.5-coder:1.5b |
π€ How to check GPU memory
- Windows: Task Manager β Performance β GPU
- Mac: Apple menu β About This Mac
- Linux:
nvidia-smi
STEP 3 β Install the VS Code Extension
Two options. Pick based on what you need:
Continue β Chat + Edit + Autocomplete
Best for: asking questions, inline edits, code completion
- VS Code β Extensions (
Ctrl+Shift+X) - Search βContinueβ β install (by Continue.dev)
- Sidebar β Continue icon
- Auto-detects your Ollama models

Usage:
Ctrl+Lβ open chat@file src/app.pyβ AI reads that file@codebaseβ AI searches whole project- Highlight code +
Ctrl+Iβ inline edit
βοΈ Manual config (if auto-detect fails)
Create ~/.continue/config.yaml:
models:
- name: Qwen Coder
provider: ollama
model: qwen2.5-coder:7b
apiBase: http://localhost:11434
roles:
- chat
- edit
- autocomplete
Restart VS Code.
Cline β Full Agent Mode (Reads AND Writes Files)
This is what youβre looking for. AI that actually creates/edits files on disk.
- Extensions β search βClineβ (by saoudrizwan)
- Install β click Cline sidebar icon
- Settings:
- API Provider: Ollama
- Base URL:
http://localhost:11434 - Model: your installed model
Usage: Just describe what you want:
βCreate a Flask API with JWT auth and save it to src/api.pyβ
Cline plans β creates file β writes code β shows diff β you approve.
π Safety permissions
Control what AI can do:
| Permission | Recommendation |
|---|---|
| Read project files | |
| Edit project files | |
| Run terminal commands | |
| Read outside workspace |
Every edit shows a diff preview first. You approve or reject.
STEP 4 β Enable Codebase Search (The Missing Piece)
This lets AI see your whole project β what tutorials skip.
For Continue:
ollama pull nomic-embed-text
Add to ~/.continue/config.yaml:
models:
- name: Embeddings
provider: ollama
model: nomic-embed-text
roles:
- embed
Restart VS Code. Now @codebase where is auth implemented? actually works.
For Cline:
Already built-in. Just ask:
βLook at my src folder and explain the structureβ
It reads whatever files it needs.
STEP 5 β Speed Tweaks
β‘ Make responses faster
Windows (PowerShell admin):
[Environment]::SetEnvironmentVariable("OLLAMA_KEEP_ALIVE", "-1", "User")
[Environment]::SetEnvironmentVariable("OLLAMA_FLASH_ATTENTION", "1", "User")
Mac/Linux β add to ~/.bashrc or ~/.zshrc:
export OLLAMA_KEEP_ALIVE=-1
export OLLAMA_FLASH_ATTENTION=1
export OLLAMA_NUM_PARALLEL=2
KEEP_ALIVE=-1β model stays loadedFLASH_ATTENTION=1β up to 3x fasterNUM_PARALLEL=2β handles multiple requests
π§ Bigger context window (see more files)
Ollama defaults to 4096 tokens. Your models handle way more.
ollama create qwen-32k -f - <<EOF
FROM qwen2.5-coder:7b
PARAMETER num_ctx 32768
EOF
Use qwen-32k in extension settings. DeepSeek-V2 supports 160K tokens β entire codebases in one chat.
Code Generation Examples
Python/FastAPI:
βCreate a FastAPI app with SQLAlchemy User model, JWT auth, CRUD endpoints. Save to src/main.pyβ
React/Next.js:
βBuild a dashboard component with Tailwind, fetches /api/stats, loading states, error handling. TypeScript.β
SQL:
ollama pull sqlcoder
βTables: users(id, email), orders(id, user_id, total). Query: users with 3+ orders last month.β
What You Can Run
| Setup | Model | Speed |
|---|---|---|
| 8GB GPU | Qwen 7B | ~50 tok/s |
| 12GB GPU | DeepSeek V2 / Qwen 14B | ~35 tok/s |
| 24GB GPU | Qwen 32B | ~25 tok/s |
| CPU only | Qwen 1.5B | ~8 tok/s |
| M1/M2/M3 Mac | Same tiers | ~30 tok/s |
Local vs Copilot
| Local Ollama | GitHub Copilot | |
|---|---|---|
| Monthly cost | $0 | $10-39 |
| Privacy | 100% local | Cloud |
| Rate limits | None | Yes |
| Offline | Yes | No |
| Quality (32B) | GPT-4 tier | GPT-4 |
$400 GPU pays for itself in ~10 months. Then free forever.
Resources
π Official Docs
π Tutorials
- https://ollama.com/blog/continue-code-assistant
- https://www.2am.tech/blog/integrate-ollama-with-visual-studio-code-for-ai-coding-assistance
- https://freshbrewed.science/2025/01/28/codellm.html
- https://sourcegraph.com/blog/local-code-completion-with-ollama-and-cody
- https://atlassc.net/2025/01/15/configuring-your-ollama-server
- https://www.jan.ai/post/deepseek-r1-locally
π§ Extensions
π Benchmarks & Models
Quick Start
# 1. Install Ollama (links above)
# 2. Get model
ollama pull qwen2.5-coder:7b
# 3. Get embeddings (for codebase search)
ollama pull nomic-embed-text
# 4. Install VS Code extension
# β Continue (chat/autocomplete)
# β Cline (file read/write agent)
# 5. Code with AI
File READ + WRITE β Cline
Chat + Autocomplete β Continue
Both? Install both.
Free. Private. Unlimited. Runs on your hardware. ![]()
Hello, I just bought an RTX 5080 16GB VRAM, is it ok to try Qwen 32B or should I stick to DeepSeek V2?
-
Go for Qwen 32B if you are doing coding or complex logic. Use a 3.5bpw EXL2 or a GGUF Q3_K_L to keep it entirely on the GPU. The intelligence gain over smaller models is very noticeable.
-
Stick to DeepSeek V2 (or Qwen 14B) if you want instant responses and a large context window (e.g., feeding it long documents).
[!TIP] Since you have a Blackwell-series card (5080), look for GGUF or EXL2 quants specifically. Using LM Studio or Ollama will allow you to easily slide the βGPU Offloadβ bar to see exactly how many layers you can fit before you run out of VRAM.
!