Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ollama Cloud Inference Benchmark

A benchmark that tests every model on Ollama Cloud for inference speed and token cost.

What it measures

Metric Description
TTFT Time to first token (ms). Lower is better.
Total time Full response time (ms). Lower is better.
Tokens/sec Output tokens per second. Higher is better.
Output tokens Total tokens generated across all prompts.
OpenAI-equiv cost What this would cost at $5/1M input, $15/1M output.
Success rate Fraction of prompts that returned a response.

Results

See the leaderboard:

Run it yourself

  1. Get an Ollama Cloud API key from https://ollama.com/settings/keys
  2. Copy .env.example to .env and add your key:
    cp .env.example .env
    # edit .env and replace the placeholder with your key
    
  3. Install Python 3 and requests:
    pip install requests
    
  4. Run the benchmark:
    python3 benchmark.py
    

The script:

  • Fetches all available models from Ollama Cloud
  • Sends 5 prompts to each model via streaming API
  • Measures TTFT, total time, token count, and tokens/sec
  • Computes the OpenAI-equivalent cost (what you would pay at GPT-4o-class rates)
  • Saves results incrementally after each model
  • Generates markdown and HTML leaderboards

Prompts

  1. Explain quantum entanglement in one paragraph for a high school student.
  2. Write a Python function that checks if a string is a valid palindrome.
  3. What are the main differences between TCP and UDP? List 5 key differences.
  4. Write a haiku about the ocean, then explain the imagery in two sentences.
  5. Give 3 tips for improving sleep quality, with a one-sentence explanation for each.

Methodology

  • Temperature 0, seed 42 for reproducibility
  • Streaming API for TTFT measurement
  • Token counts estimated at ~4 chars per token
  • 60s timeout per request, 1 retry on failure
  • OpenAI-equivalent pricing: $5/1M input + $15/1M output (GPT-4o-class)
  • Ollama Cloud is free during beta — the cost column shows what you would pay elsewhere

Requirements

  • Python 3.10+
  • requests library
  • An Ollama Cloud API key

About

Ollama Cloud inference benchmark — TTFT, tokens/sec, and OpenAI-equivalent cost across all models

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages