惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
Vercel News
Vercel News
U
Unit 42
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
N
Netflix TechBlog - Medium
GbyAI
GbyAI
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
M
MIT News - Artificial intelligence
D
Docker
IT之家
IT之家
Stack Overflow Blog
Stack Overflow Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Ollama Cheat Sheet: Local LLMs, Models, API & Integration...
Vishnu Damwa · 2026-05-20 · via DEV Community
Cover image for Ollama Cheat Sheet: Local LLMs, Models, API & Integration (2026)

Vishnu Damwala

TL;DR

  • Ollama runs open LLMs locally: Llama 3.3, Mistral, Gemma, DeepSeek, Qwen, Phi, and vision models
  • ollama run llama3.3 — pull and start in one command
  • REST API on localhost:11434 — chat completions, generate, embeddings
  • Python and JavaScript libraries for integration
  • Modelfile for customizing system prompts, temperature, and context window

Ollama made local LLMs accessible to anyone who could run a Docker container. No Hugging Face model downloads to manage manually. No inference server configuration. ollama run llama3.3 downloads the model and opens a chat session. It has become the standard way to run open models locally, with a library of thousands of community models on top of the official catalog.


Quick Start

# Install (macOS, Linux, Docker)
curl -fsSL https://ollama.com/install.sh | sh

# Pull and run a model
ollama run llama3.3

# Run a single prompt
ollama run llama3.3 "Explain Docker containers in one sentence."

# REST API
curl http://localhost:11434/api/chat -d '{
  "model": "llama3.3:8b",
  "messages": [{"role": "user", "content": "Hello"}],
  "stream": false
}'

Enter fullscreen mode Exit fullscreen mode


Popular Models (May 2026)

Model Size Memory
llama3.3:70b 70B ~128GB VRAM
llama3.3:8b 8B ~8GB VRAM
deepseek-r1:8b 8B ~8GB VRAM
qwen3:8b 8B ~8GB VRAM
gemma3:4b 4B ~4GB VRAM
phi4:3.8b 3.8B ~4GB VRAM
llava:7b 7B ~12GB VRAM

Python Integration

pip install ollama

Enter fullscreen mode Exit fullscreen mode

import ollama

response = ollama.chat(
    model='llama3.3:8b',
    messages=[
        {'role': 'system', 'content': 'You are a code reviewer.'},
        {'role': 'user', 'content': 'Review: def add(a, b): return a + b'},
    ]
)
print(response['message']['content'])

# Streaming
for chunk in ollama.chat(model='llama3.3:8b',
                          messages=[{'role': 'user', 'content': 'Hello'}]):
    print(chunk['message']['content'], end='', flush=True)

Enter fullscreen mode Exit fullscreen mode


Originally published at meshworld.in