Hosting Open-Source Models — Day Companion

Hosting Open-Source Models — Day Companion

Hosting Open-Source Models

Day Companion · Sep 21, 2026 · 10 AM – 2 PM PT · Liz Howard

Workshop 1 · ~2 hours

Backends — Run Models as APIs

Pick a backend, install it, serve a model, and call it with curl. By the end your laptop is an API server.

What Can I Run? → Pick your chip, slide your RAM, see which models fit with benchmark quality scores and copy-pasteable install commands. Model Hosting Calculator → Full hosting plan: hardware match, benchmark quality badges, break-even vs API costs, install commands.
The Drop-In Pattern

Every backend serves an OpenAI-compatible API. Change the base URL, done — your app doesn’t know it switched providers.

Ollama

The starting point. One command to install, one to pull a model, one to serve it. Best for personal use and small teams.

llama.cpp / llama-server

Bare metal control. Context size, GPU layer allocation, quantization knobs that Ollama hides. For when you need to tune.

MLX

The fastest local option on Apple Silicon. Uses unified memory directly — no copying between CPU and GPU.

vLLM

Production serving. Batched inference, tensor parallelism, PagedAttention. For 10+ concurrent users on NVIDIA GPUs.

The Decision Tree

Apple Silicon → MLX. NVIDIA + many users → vLLM. Simple setup → Ollama. No GPU → rent cloud or CPU mode.

Quick Start

ollama pull qwen3:8b
ollama serve

# In another terminal:
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3:8b","messages":[{"role":"user","content":"Say hello in three languages."}]}'

Workshop 2 · ~2 hours

Hosting — Put It on the Internet

Take the model you’re serving locally and make it reachable from outside your network — securely, cheaply, and without port forwarding.

Cost Comparison Calculator → Self-hosting electricity costs vs API bills. Find your break-even point. AI Cost Calculator → Model your full AI workload costs across providers and use cases.
Enterprise Cost Calculator
Production hosting: interactive vs API service vs batch processing. Break-even across GPU rental, per-token API, spot, and self-hosted.
Omni Model Benchmarks → Compare models by coding, reasoning, and agentic benchmarks with live OpenRouter pricing.
Cloudflare Tunnel

Free. Your machine, your model, accessible at your domain. No static IP, no port forwarding, no firewall config.

Old Man Yells at Cloud: The cloud is other people servers. Serverless is just other people server lifecycle.
Cloud GPU Providers

RunPod, Vast.ai, Modal, Lambda. Spot instances from $0.20/hr. Serverless (Modal) means pay only when running.

Managed Inference

OpenRouter: one API key, any model. Groq: fastest inference on custom LPU. Together.ai, Fireworks, Replicate.

The Proxy Pattern

Put a proxy between users and the model. It holds the real API key, enforces per-user budgets, and logs everything.

Monitoring

What to watch: requests/min, tokens/sec, error rate, cost/day, p95 latency. You need a log and a script, not Grafana.


Quick Reference

Model Recommendations

Use CaseModelSizeWhy
General assistantQwen3 8B~6 GBBest quality-per-GB in 2026
Code generationQwen3 Coder 8B~6 GBTrained on code, fast
EmbeddingsQwen3-Embedding-0.6B~1 GBTiny, fast, surprisingly good
Long documentsQwen3 32B~20 GB128K context, strong reasoning
Maximum qualityQwen 3.8 27B~15 GBNewest, highest benchmarks
Best value (MoE)Qwen 3.5 35B-A3B~7 GB35B quality in 7 GB via MoE
Minimum costQwen3 0.6B~1 GBRuns on anything, including phones

Cost Comparison

SetupMonthly CostControl
Self-hosted (your Mac)$0Full
Cloud GPU (spot, 2 hr/day)$24Full
OpenRouter (Qwen3 8B)$5–20Some
Cloud GPU (24/7)$290Full
OpenAI API (GPT-4o)$60–200+Some
ChatGPT Plus$20None

Hardware → Model Fit

Your RAM / VRAMMax Practical ModelGood Default
8 GB4B quantizedQwen3 4B Q4
16 GB14B quantizedQwen 3.5 9B Q4
32 GB32B quantizedQwen 3.8 27B Q4
48 GB+70B quantizedLlama 3.3 70B Q4
BLEEDING EDGE

For the Nerds

Speculative Decoding
Free 2-5x speed. Draft model guesses, big model verifies. --speculative-model Qwen3-0.6B
Two 3090s > One 4090
Last consumer GPU with NVLink. 48GB pooled VRAM at 112 GB/s for ,600. 70B models across two GPUs.
KV Cache Offloading
24GB GPU serves 1M context. Spill attention state to NVMe. Faster than recomputing prefill.
QLoRA + Unsloth
Fine-tune 70B on a 4090 for bash. 15 min for 7B on 1K examples. Your domain, your model.
LLMs on Phones
iPhone 17 Pro: Qwen3 4B at 40 tok/s offline. Private LLM app. Heat is the limit, not RAM.
Disaggregated Serving
The architecture after vLLM. Separate prefill and decode onto different GPUs. How Kimi scales.

Full cheat sheet: /x/bleeding-edge-inference

LIVE RESOURCES

Everything Else

Full Curriculum →
The complete course material with all sections, exercises, and code blocks.
CJ Trowbridge — Hardware Builds →
Budget AI server builds: Orange Pi Ollama server, dual P40 Analysis Lab, micro cyberdeck.
Live Benchmark Results (tested tonight)
Tesla P40 24GB ($0.11/hr): Qwen3 8B at 41 tok/s warm, 25 cold. Qwen3 14B at 25 tok/s. VRAM: 40-57%.
RTX 3060 12GB ($0.06/hr): GPU not detected — CPU fallback at 3 tok/s. Always check nvidia-smi!
Cost per million tokens self-hosted: $0.034 vs $0.10 DeepInfra vs $3-15 frontier.