Making (Very) Small LLMs Smarter
A 3B-parameter local model (Qwen2.5-Coder-3B, Q4_K_M) can become a useful coding assistant for an unfamiliar, recent Go library (Nova) when it is given a small, focused RAG context. Markdown snippet sections are embedded with EmbeddingGemma and stored in an in-memory vector store. Each query retrieves at most 3 snippets above a cosine-similarity threshold of 0.45. Because small models degrade as context grows, conversation history is capped at 2 messages. The agent is built in Node.js with LangchainJS and runs via Docker Model Runner and Docker Compose's models section, with low temperature and a presence penalty to keep output focused.
Related posts
- CoderForge-Preview: SOTA open dataset for training efficient coding agents
Together AI hardMasterCoderForge-Preview is an open dataset of 258K test-verified coding agent trajectories (155K passing) covering 51K tasks across 1,655 repositories from R2E-Gym, SWE-Smith and SWE-Rebench. The trajectories were generated with Qwen3-Coder-480B in OpenHands Docker environments, filtered by rejection sampling and permissive-license audits, and cost about $130K to produce at a ~90% prompt cache hit rate. Fine-tuning Qwen3-32B on the passing trajectories, using Ulysses sequence parallelism, multipacking and token-level loss normalization at 128K context, reaches 59.4% pass@1 on SWE-Bench Verified, and a 4B model reaches 43.0%. Ablations show a repetition penalty helps only early checkpoints, so later checkpoints should be run without one.
- Build Your Own AI-Driven Code Analysis Chatbot for Developers with the GenAI Stack
Docker mediumAdeptCode Explorer, a winning Docker AI/ML Hackathon project, is a RAG chatbot that answers questions about a local codebase by parsing source files, chunking them with LangChain's RecursiveCharacterTextSplitter (5000 characters with 500 overlap), and storing embeddings in a Neo4j vector store. LangChain builds two chains: a QnA RAG chain for detailed answers and an agent chain that wraps it as a tool and tends to return more concise summaries. The app falls back to the plain LLM when no codebase has been processed. The walkthrough runs the stack with Docker Compose: a Streamlit UI, Ollama serving codellama:7b-instruct, a one-shot model-pull container, and Neo4j, configured through a .env file.
- Run Claude Code Locally with Docker Model Runner
Docker mediumAdeptClaude Code can run against local models by pointing its ANTHROPIC_BASE_URL environment variable at Docker Model Runner, which exposes an Anthropic-compatible API on localhost:12434. Docker Desktop users must enable TCP access first. Because gpt-oss defaults to a 4,096-token context, the guide repackages it with `docker model package --context-size 32000` so it is usable for coding, while models like qwen3-coder and devstral-small-2 already ship with 128K. `docker model requests` shows the raw requests Claude Code sends to the model, which helps debug compatibility issues.
- Build a custom RAG AI agent in TypeScript and Jupyter
Deno mediumAdeptA local agentic RAG pipeline built in TypeScript inside a Deno Jupyter notebook, using LangChain and LangGraph with Ollama models. Deno blog posts are loaded with Cheerio, split into 500-character chunks, embedded with mxbai-embed-large and stored in an in-memory vector store exposed as a retriever tool. A LangGraph state graph wires an agent node (Llama 3.2 3B, the only small local model the author got tool calling working with) to retrieval, a binary relevance grader, query rewriting and final answer generation with DeepSeek R1 8B. The setup suits confidential documents that must not leave the machine.
- OpenCode with Docker Model Runner for Private AI Coding
Docker mediumAdeptOpenCode can use locally hosted models by pointing an @ai-sdk/openai-compatible provider in opencode.json at Docker Model Runner's OpenAI-compatible endpoint (localhost:12434/v1, with TCP enabled on Docker Desktop). Prompts and code then stay on infrastructure you control, and there are no per-token costs. Coding models such as qwen3-coder and devstral-small-2 ship with 128K context, while gpt-oss defaults to 4,096 tokens. `docker model package --context-size` can repackage gpt-oss as a 128K OCI artifact that teams push to a registry to standardize and version model variants.