Qwen 2.5 Coder 7B is the most accurate of the three for Python and TypeScript completions. Phi-4 Mini (3.8B) uses the least VRAM and runs nearly twice as fast. Pick it when memory or latency counts more than raw accuracy. Gemma 3 4B sits in the middle. It is the best choice when you need one model for code, commit messages, docs, and error explanations. Below are the benchmark numbers, the test method, and how to set up each model in VS Code or Neovim.
Ollama
AI-Powered Log Analysis: Find Anomalies in Server Logs with Local LLMs
A local LLM like Llama 3.3 70B or Qwen 2.5 32B running through Ollama can read your structured server logs faster than grep or awk. Pipe parsed log data through a prompt that asks the model to flag odd patterns, link error cascades, and guess at root causes. You get a useful incident summary in seconds. This fills the gap between plain text search and pricey tools like Datadog or Splunk . Best of all, no log data leaves your network.
Automate Code Reviews with Local LLMs: A CI Pipeline Integration Guide
You can plug a local LLM into your Gitea Actions, or any CI system, to review pull requests on its own. The pipeline pulls the diff, feeds it to a model running on Ollama , and posts structured feedback as PR comments. No code ever leaves your network. The setup needs three parts: a self-hosted runner with GPU access, a review prompt template, and a short Python wrapper.
Why Local LLM Code Reviews Make Sense
Static analysis tools like ESLint , Ruff , and Semgrep are great at catching syntax errors, style slips, and known vulnerability patterns. What they miss are logic bugs, unclear variable names, missing edge cases, and design concerns. An LLM fills that gap because it reads code in context. It can tell you that a function does the wrong thing, not just that it’s formatted wrong.
Structured Output from LLMs: JSON Schemas and the Instructor Library
The Instructor
library (v1.7+) patches LLM client libraries to return validated Pydantic
models instead of raw text. It does this with JSON schema enforcement in the system prompt, auto retries on validation failure, and native structured output modes where the provider supports them. It works with OpenAI, Anthropic, Ollama
, and any OpenAI-compatible API. You define your output as a Python class and get back typed, validated data. No regex parsing, no json.loads() wrapped in try/except, no manual type casting.
Running Gemma 4 Locally with Ollama: All Four Model Sizes Compared
Google’s Gemma 4 is not one model - it is a family of four, each targeting different hardware and different use cases. The smallest runs on a Raspberry Pi. The largest ranks #3 on LMArena across all models, open and closed. All four ship under the Apache 2.0 license, a first for the Gemma family. This guide walks through installing each variant with Ollama (currently at v0.20.2), benchmarks them on real consumer hardware, and helps you decide which one fits your setup.
Self-Hosted AI Search: Combine SearXNG and a Local RAG Pipeline
You can build a private AI search engine modeled on Perplexity
. You combine SearXNG
with a local language model running through Ollama
. Here is the stack. SearXNG pulls results from many search engines at once. A Python scraper fetches and cleans the actual page content. The LLM then turns everything into a cited answer with inline references like [1], [2]. No API keys, no telemetry, no query logging to third-party AI services. A machine with 12 GB VRAM runs the whole pipeline, and most queries come back in 5-15 seconds.
Botmonster Tech




