[KongchangAI]
Tutorials· 3 min read· 1,539 words

Ollama Tutorial: The Open-Source Tool for Running DeepSeek and Other LLMs Locally with One Click

Ollama Tutorial: The Open-Source Tool for Running DeepSeek and Other LLMs Locally with One Click

Ollama is GitHub's most popular tool for running LLMs like DeepSeek locally on ordinary computers.

Ollama is an open-source project built with Go that has earned over 170K GitHub Stars, making it the most popular local LLM runner available. It supports mainstream open-source models including DeepSeek, Qwen, and Gemma, powered by the llama.cpp inference engine, delivering a truly out-of-the-box experience with no complex environment configuration needed. Running LLMs locally offers significant advantages in data privacy, response speed, long-term cost, and offline availability. It's also compatible with the OpenAI API format and boasts a rich integration ecosystem.

What Is Ollama? A One-Minute Overview of This Local LLM Runner

Ollama is an open-source project that allows users to easily run various large language models (LLMs) on their own computers. The project has earned over 170,000 Stars on GitHub with nearly 16,000 forks, making it the most popular local LLM running tool available—bar none.

A Large Language Model (LLM) is a deep neural network built on the Transformer architecture and trained on massive amounts of text data. These models range from billions to hundreds of billions of parameters—you can roughly think of parameter count as the model's capacity for "memory" and "reasoning." In the past, running these models typically required expensive data-center-grade GPU clusters. However, thanks to advances like model quantization (compressing model weights from high-precision floating-point numbers to low-precision integers) and improved hardware performance, running a 7-billion-parameter model on a laptop with 16GB of RAM is now a reality. Ollama seized this technological window and wrapped the complex underlying work into an extremely simple user experience.

The project is developed in Go, and thanks to its clean design and excellent performance, it has built an outstanding reputation in the developer community. If you want to run open-source models like DeepSeekAd, Qwen, or Gemma locally, Ollama is virtually the go-to solution.

Which Models Does Ollama Support? Full Coverage of Mainstream Open-Source LLMs

Ollama currently supports the following mainstream large language models:

ModelSourceDescription
Kimi-K2.5Moonshot AILatest flagship model
GLM-5Zhipu AINext-gen general-purpose language model
DeepSeekDeepSeekHigh-value reasoning model
QwenAlibabaTongyi Qianwen series
GemmaGoogleLightweight open-source model
MiniMaxMiniMaxOpen-source multimodal model
gpt-ossCommunityOpen-source GPT-style models

The Ollama team keeps pace with the industry—almost every time a major open-source model drops, they complete adaptation in record time. This "adaptation" isn't just simple file hosting. Ollama needs to convert the original model weights released by each organization into the GGUF format supported by its underlying inference engine (based on llama.cpp), and generate multiple versions for different quantization levels (such as Q4_K_M, Q5_K_M, Q8_0, etc.), allowing users to choose the optimal balance between precision and performance based on their hardware. For developers eager to try the latest models, this is crucial.

Interestingly, models from Chinese AI companies (Kimi-K2.5, GLM-5, DeepSeek, Qwen) occupy a significant portion of the list, reflecting the rapid rise of Chinese open-source LLMs.

Why Run LLMs Locally? Four Core Advantages

Compared to calling cloud APIs, deploying LLMs locally offers several concrete benefits:

  1. Data Privacy Guaranteed: All data is processed locally—sensitive information never leaves your machine, with zero compliance concerns. This is especially important for organizations that must comply with data protection regulations like GDPR (EU General Data Protection Regulation) or China's Personal Information Protection Law. Once data is sent to a third-party cloud, you face a series of compliance risks involving data sovereignty and cross-border transfer.
  2. Faster Response Times: Eliminating network round-trips significantly reduces inference latency. Cloud API calls typically involve DNS resolution, TLS handshakes, and request queuing, with single round-trip latency reaching 100–500 milliseconds or more. Local inference can achieve first-token latency in the millisecond range—a noticeable improvement for real-time interaction scenarios like code completion and chat systems.
  3. Lower Long-Term Costs: Deploy once, use unlimited—no more paying per token. Take GPT-4o as an example: API costs are billed per input/output token, and high-frequency usage can run hundreds or even thousands of dollars per month. Local operation's marginal cost is just electricity.
  4. Works Offline: Runs perfectly without internet—ideal for travel or internal network development.

Especially for sensitive scenarios involving internal company documents or customer data, local execution is virtually the only reasonable choice.

Ollama's Technical Highlights

Truly Out-of-the-Box

What makes Ollama most appealing is its minimalist design. No manual Python environment configuration, no wrestling with CUDA driver versions—just a few commands and your model is up and running. For developers who don't want to waste time on environment setup, it's a godsend.

To appreciate this value, you need to understand the pain of traditional local LLM deployment. Before Ollama, running a large model locally typically meant: installing a specific Python version (3.8? 3.10? 3.11?—different frameworks have different requirements), configuring CUDA Toolkit (NVIDIA's GPU parallel computing platform, whose version must precisely match your GPU driver), installing the cuDNN acceleration library, resolving PyTorch or TensorFlow version dependency conflicts… The entire process often took hours or even days of debugging. Ollama wraps all of this into a single executable that automatically detects your hardware environment and selects the optimal inference backend (GPU acceleration or CPU fallback), truly achieving "install and run."

Performance Benefits from Go

Choosing Go for development was a smart decision. Go (also known as Golang) is a programming language released by Google in 2009, originally designed for building high-performance network services and infrastructure tools. Docker, Kubernetes, and other projects that transformed the entire cloud computing industry are also built with Go—this is no coincidence.

Go provides Ollama with direct technical advantages in several areas:

  • Concurrency: Go's Goroutine (lightweight coroutine) mechanism can easily manage thousands of concurrent tasks at a fraction of the cost of OS threads. This enables Ollama to efficiently handle multiple concurrent inference requests, model loading, and API serving.
  • Static Compilation & Cross-Platform: Go compiles into a single statically-linked binary with no external runtime dependencies, natively supporting macOS, Linux, and Windows. Users can download and run immediately without installing any dependencies.
  • Memory Management: Go's garbage collector has been optimized over many years, achieving a good balance between low latency and high throughput. It avoids the complexity of manual memory management in C/C++ while not incurring the excessive memory overhead of Java/Python.

These characteristics allow Ollama to perform efficiently in core operations like model loading and inference scheduling while keeping system resource usage low.

Rich Ecosystem and Easy Integration

Behind those 170,000+ Stars is an extremely active community. A wealth of third-party tools and integrations have emerged around Ollama:

  • IDE Plugins: Mainstream editors including VS Code and JetBrains have adapters, allowing developers to call local models directly within their editor for code completion, explanation, and refactoring.
  • Web UI: Visual interfaces like Open WebUI work out of the box, providing a ChatGPT-like conversational experience with support for multi-turn dialogue, file uploads, and model switching.
  • API Compatibility: Compatible with the OpenAI API format—existing code can migrate with virtually zero modifications.

Regarding OpenAI API compatibility, this point deserves elaboration. OpenAI's Chat Completions API (/v1/chat/completions) has become the de facto standard interface for LLM application development. Nearly all mainstream AI application frameworks—LangChain, LlamaIndex, Semantic Kernel, Dify, etc.—use the OpenAI API format as their default LLM integration method. Ollama's compatibility with this format means developers only need to change the API address from https://api.openai.com to http://localhost:11434, and their entire existing application code, prompt engineering, and toolchain can seamlessly switch to local models with near-zero migration cost. This "plug-and-play" compatibility strategy dramatically lowers the barrier for developers to experiment, and is one of the key reasons Ollama's ecosystem has flourished so rapidly.

What Use Cases Is Ollama Best For?

Daily Developer Productivity

  • Local code completion and code review
  • Technical documentation generation and multilingual translation
  • Building a personal AI coding assistant

Enterprise Internal Applications

  • Internal knowledge base Q&A systems (typically implemented with RAG technology—Retrieval-Augmented Generation, which first retrieves relevant content from the enterprise document repository, then provides it as context for the LLM to generate answers, significantly improving accuracy and reliability)
  • Data analysis and automated report generation
  • Prototype validation for customer service automation

Research and Learning

  • Horizontal performance comparisons across different open-source models (e.g., performance differences on standard benchmarks like MMLU, HumanEval, and GSM8K)
  • Rapid prototyping of AI application demos
  • Local infrastructure for LLM fine-tuning experiments (Ollama serves as a convenient deployment and testing platform for fine-tuned models)

Final Thoughts

Ollama's popularity is no accident. As high-quality open-source models like DeepSeek, Qwen, and Gemma continue to be released at a rapid pace, developer demand for local running tools keeps growing. Ollama puts cutting-edge AI capabilities into everyone's hands with an extremely low barrier to entry—this is one of the most valuable things happening in the democratization of AI wave.

The democratization of AI refers to making AI technology no longer limited to the few large tech companies with massive compute and top talent, but rather enabling every developer, every small and medium business, and even individual users to equally access and use AI capabilities. This trend is driven by three forces: open-source models (Meta's Llama, Google's Gemma, DeepSeek, etc., breaking the monopoly of closed-source models), hardware advances (Apple Silicon's unified memory architecture enables MacBooks to efficiently run large models), and toolchain simplification (Ollama is a critical piece of this puzzle). When the barrier to running a world-class LLM drops from "needing an AI team" to "one command line," the possibilities for innovation are blown wide open.

If you haven't tried running an LLM locally yet, Ollama is currently the most recommended starting point.

#Ollama#run LLM locally#DeepSeek local deployment#open-source LLM tool#local AI model#Ollama tutorial#llama.cpp
Share:

Related articles