Module 1: Decision Framework for LLM Access

Quantitative Trade-offs: A Comparison with Real Data

Capsule overview

You already know the 5 evaluation dimensions and the landscape of options. Now you need quantitative data to validate your decision.

This capsule gives you real, up-to-date benchmarks (February 2026) to compare providers objectively. No more "OpenAI is fast" (vague), but "OpenAI: 1.5s latency vs Ollama: 5.8s" (specific).

The data comes from:

  • Official provider pricing (February 2026)
  • Public benchmarks (Artificial Analysis, LMSys)
  • In-house tests on standard hardware
  • Up-to-date privacy policies

Important: This data may change. Validate current prices in the resource links before making final decisions.


💰 Cost Comparison

Updated pricing (February 2026):

OpenAI API:

ModelInput ($/1M tokens)Output ($/1M tokens)ContextBest for
GPT-4-turbo$10.00$30.00128kComplex tasks
GPT-4$30.00$60.008kMaximum quality
GPT-3.5-turbo$0.50$1.5016kCost/quality balance

Example calculation (10k queries/day):

GPT-3.5-turbo:
- 10k queries × 500 tokens on average × 30 days = 150M tokens/month
- Input (300 tokens): 150M × 0.6 × $0.50/1M = $45
- Output (200 tokens): 150M × 0.4 × $1.50/1M = $90
- Total: $135/month

Local Ollama:

CostValueNotes
Hardware setup$500-5000Depends on the GPU (RTX 4090: $1800, Mac M2: $2000)
Operational$0/monthElectricity ~$10/month (negligible)
Maintenance$0-500/monthIf you need DevOps (20% of a senior's time = $500)

Example calculation:

Year 1:
- Hardware: $2000 (one-time)
- Operational: $0 × 12 = $0
- Maintenance: $200/month × 12 = $2400
- Total: $4400 year 1

Year 2+:
- Hardware: $0 (already bought)
- Operational: $0
- Maintenance: $2400/year
- Total: $2400/year

Break-even vs OpenAI ($135/month = $1620/year):
- Year 1: Ollama more expensive ($4400 vs $1620)
- Year 2: OpenAI cheaper ($1620 vs $2400)
- **Conclusion: OpenAI CHEAPER** for this volume

Ollama is cheaper when volume is HIGH (>1M queries/month).


OpenRouter:

ModelPrice ($/1M tokens)vs OpenAISavings
GPT-3.5-turbo$0.50Same0%
Claude 3 Haiku$0.2550%50%
Mixtral 8x7B$0.2452%95% vs GPT-4
Llama 2 70B$0.7040% cheaper than GPT-3.5-

Advantage: You can use cheap models for simple queries and GPT-4 for complex ones.

Hybrid strategy:
- 80% simple queries: Mixtral ($0.24/1M) = $108/month
- 20% complex queries: GPT-4 ($20/1M) = $600/month
- Total: $708/month

vs OpenAI GPT-4 only: $3000/month
Savings: $2292/month (76%)

Modal serverless:

ResourceCostNotes
CPU (vCPU-second)$0.000180For small models
GPU A10G$0.000700/s~$2.52/hour
GPU A100$0.002500/s~$9/hour
Cold startFreeBut it adds latency

Example calculation (Mistral 7B on A10G):

10k queries/day:
- On average 3s/query (GPU time)
- 10k × 3s = 30,000s GPU/day
- 30,000s × $0.0007 = $21/day = $630/month

vs OpenAI GPT-3.5: $135/month
→ Modal is 4.6x MORE EXPENSIVE for this volume

**Conclusion: Modal is better for VARIABLE traffic, not constant.**

⚡ Speed Comparison

Latency benchmarks (prompt 200 tokens → output 200 tokens):

Source: In-house tests + Artificial Analysis (January 2026)

ProviderTime to First TokenTokens/secondTotal latencyConsistency
OpenAI GPT-3.5300ms90 tok/s1.5sHigh (±200ms)
OpenAI GPT-4800ms40 tok/s3.2sHigh (±300ms)
OpenRouter Mixtral400ms70 tok/s2.1sMedium (±500ms)
Ollama Mistral 7B (M2 Mac)1200ms35 tok/s5.8sMedium (±1s)
Ollama Llama 2 70B (A100 GPU)600ms60 tok/s3.5sHigh (±400ms)
Modal Mistral 7B (warm)400ms80 tok/s1.9sHigh (±300ms)
Modal Mistral 7B (cold)3500ms80 tok/s5.4sN/A

Observations:

  1. OpenAI GPT-3.5 is the fastest (1.5s)
  2. Local Ollama varies A LOT (hardware dependent)
  3. Modal has a cold start problem (3.5s overhead on the first request)
  4. Consistency matters: OpenAI is predictable, local Ollama can vary

🏆 Quality Comparison

Accuracy benchmarks (MMLU, MT-Bench):

Source: LMSys Chatbot Arena + OpenAI evals (January 2026)

ModelMMLU (%)MT-BenchSpanishBest for
GPT-4-turbo86.4%9.32ExcellentComplex reasoning
GPT-3.5-turbo70.0%8.39ExcellentQuality/cost balance
Claude 3 Opus86.8%9.18ExcellentLong texts
Mixtral 8x7B70.6%8.30Very goodOpen-source quality
Mistral 7B62.5%7.60GoodLightweight local
Llama 2 70B68.9%8.18GoodLocal with quality
Llama 2 13B54.8%6.89BasicPrototypes

Interpretation:

  • 86%+ MMLU: Complex tasks (legal, medical, financial)
  • 70-85% MMLU: Chatbots, support, general writing
  • 60-70% MMLU: Prototypes, development
  • <60% MMLU: Experimentation only

For an e-commerce chatbot (basic support): 70%+ is enough

  • ✅ GPT-3.5, Claude 3, Mixtral, Llama 2 70B
  • ⚠️ Mistral 7B (borderline)
  • ❌ Llama 2 13B (insufficient)

🔐 Privacy Comparison

Data retention policies (February 2026):

ProviderRetentionTrainingLocationGDPRHIPAA
OpenAI API30 days (can change)NO (opt-out by default)US (Azure)PartialNo
Local OllamaNEVER (doesn't leave)NEVERYour hardware✅ Compliant✅ Compliant
OpenRouterVariable (depends on model)VariableUS + othersPartialNo
ModalDuring executionNOUS (AWS)PartialNo
LM StudioNEVER (local)NEVERYour laptop✅ Compliant✅ Compliant

Official sources:

Interpretation:

If you need strict HIPAA/GDPR:

  • ✅ ONLY local options (Ollama, LM Studio)
  • ❌ OpenAI, Modal, OpenRouter are NOT compliant without a BAA (Business Associate Agreement)

If data is public:

  • ✅ Any option works
  • Consider simplicity and cost as the main factors

🎯 Comparative Scorecard

Example project: E-commerce chatbot (10k queries/day)

DimensionOpenAI GPT-3.5Ollama Mistral 7BOpenRouter MixtralModal MistralWinner
Cost/month$135$2200* (year 1)$108$630OpenRouter
Latency1.5s5.8s2.1s1.9s (warm)OpenAI
Quality (MMLU)70%62.5%70.6%70.6%OpenRouter
PrivacyMedium (30d)Maximum (local)MediumMediumOllama
SimplicityHigh (1 day)Medium (1 wk)High (1 day)Medium (2-3 days)OpenAI/Router
ScalabilityAutoManualAutoAutoOpenAI/Modal

*Year 1 includes $2k hardware. Year 2+: $2400/year.

Analysis:

For this specific project (e-commerce, 10k queries/day):

If priority = Speed + Simplicity:OpenAI API wins (1.5s, setup 1 day)

If priority = Cost:OpenRouter wins ($108/month, 20% cheaper than OpenAI)

If priority = Privacy:Ollama wins (100% local), but the year-1 cost is 16x more expensive


📊 Summary

Key concepts:

  1. Cost is NOT binary (free/expensive):

    • OpenAI: $135/month for 10k queries
    • Ollama: $0 operational, but $2200 year 1 (hardware + DevOps)
    • OpenRouter: $108/month (20% saving vs OpenAI)
    • Modal: $630/month (4.6x more expensive for constant volume)
  2. Speed varies significantly:

    • OpenAI: 1.5s (fastest)
    • Modal warm: 1.9s (almost the same)
    • OpenRouter: 2.1s (acceptable)
    • Local Ollama: 5.8s (3.8x slower on modest hardware)
  3. Quality is converging:

    • GPT-4: 86% MMLU (leader)
    • GPT-3.5/Mixtral: ~70% (enough for most use cases)
    • Mistral 7B: 62.5% (prototypes)
  4. Privacy is binary (local vs cloud):

    • Ollama/LM Studio: 100% private
    • OpenAI/Modal/OpenRouter: Cloud (acceptable policies but not zero-trust)
  5. Use data to validate the decision:

    • Don't decide by "feeling" alone
    • Calculate the exact cost for YOUR volume
    • Benchmark on YOUR hardware (if local)

🔗 Additional resources

  1. Artificial Analysis - LLM Comparison - Up-to-date benchmarks
  2. OpenAI Pricing - Official, up-to-date
  3. OpenRouter Model Pricing - Compare all models
  4. LMSys Chatbot Arena - Quality leaderboard
  5. Modal Pricing Calculator - Estimate serverless costs

⚠️ Important: Pricing changes frequently. Validate these numbers BEFORE deciding (the links above are always up to date).


➡️ Next step

Next capsule: 06-real-world-use-cases.md

Now that you have quantitative data, you'll see real-world use cases where the framework was applied:

  • Startup with no budget
  • Enterprise with sensitive data
  • Quick prototype
  • Scalable production

You'll learn from real decisions and why each provider was chosen.


Reading time: 10-12 minutes
Next: 06-real-world-use-cases.md