Menu

logo
Artificial Analysis
HOME
logo

Llama 3.1 8B: API Provider Benchmarking & Analysis

Analysis of API providers for Llama 3.1 Instruct 8B across performance metrics including latency (time to first token), output speed (output tokens per second), price and others. API providers benchmarked include Microsoft Azure, Hyperbolic, Amazon Bedrock, Groq, Together.ai, Perplexity, Google, Fireworks, Cerebras, Simplismart, Deepinfra, Nebius, and SambaNova.
For comparison of Llama 3.1 8B to other models, see
Owner:
Meta
License:
Open
Context window:
128k
Link:

Comparison Summary

Output Speed (tokens/s):Llama 3.1 8B, Cerebras logo Cerebras (2206 t/s) and  Llama 3.1 8B, SambaNova logo SambaNova (1117 t/s) are the fastest providers of Llama 3.1 8B, followed by  Llama 3.1 8B, Groq logo Llama 3.1 8B, Groq,  Llama 3.1 8B, Simplismart logo Llama 3.1 8B, Simplismart &  Llama 3.1 8B, Fireworks logo Llama 3.1 8B, Fireworks.Latency (TTFT):Llama 3.1 8B Vertex, Google logo Google Vertex (0.19s) and  Llama 3.1 8B, Deepinfra logo Deepinfra (0.21s) have the lowest latency for Llama 3.1 8B, followed by  Llama 3.1 8B, Fireworks logo Llama 3.1 8B, Fireworks,  Llama 3.1 8B, Groq logo Llama 3.1 8B, Groq &  Llama 3.1 8B Turbo, Together.ai logo Llama 3.1 8B Turbo, Together.ai.Blended Price ($/M tokens):Llama 3.1 8B Vertex, Google logo Google Vertex ($0.00) and  Llama 3.1 8B Base, Nebius logo Nebius Base ($0.03) are the most cost-effective providers for Llama 3.1 8B, followed by  Llama 3.1 8B Fast, Nebius logo Llama 3.1 8B Fast, Nebius,  Llama 3.1 8B, Deepinfra logo Llama 3.1 8B, Deepinfra &  Llama 3.1 8B, Groq logo Llama 3.1 8B, Groq.Input Token Price:Llama 3.1 8B Vertex, Google logo Google Vertex ($0.00) and  Llama 3.1 8B Base, Nebius logo Nebius Base ($0.02) offer the lowest input token prices for Llama 3.1 8B, followed by  Llama 3.1 8B Fast, Nebius logo Llama 3.1 8B Fast, Nebius,  Llama 3.1 8B, Groq logo Llama 3.1 8B, Groq &  Llama 3.1 8B, Deepinfra logo Llama 3.1 8B, Deepinfra.Output Token Price:Llama 3.1 8B Vertex, Google logo Google Vertex ($0.00) and  Llama 3.1 8B, Deepinfra logo Deepinfra ($0.06) offer the lowest output token prices for Llama 3.1 8B, followed by  Llama 3.1 8B Base, Nebius logo Llama 3.1 8B Base, Nebius,  Llama 3.1 8B, Groq logo Llama 3.1 8B, Groq &  Llama 3.1 8B Fast, Nebius logo Llama 3.1 8B Fast, Nebius.

Highlights

Quality
Artificial Analysis Quality Index; Higher is better
Speed
Output Tokens per Second; Higher is better
Price
USD per 1M Tokens; Lower is better
Parallel Queries:
Prompt Length:

Quality & Capabilities

Quality Evaluations (Preliminary Results)

Evaluation results measured independently by Artificial Analysis; Higher is better
Artificial Analysis Quality Index
Reasoning & Knowledge (MMLU)
Quantitative Reasoning (MATH)
Coding (HumanEval)
Artificial Analysis Quality Index: Represents the the average of each provider's results across evaluations.

Context Window

Context Window: Tokens Limit; Higher is better
Context window: Maximum number of combined input & output tokens. Output tokens commonly have a significantly lower limit (varied by model).
Variance between providers: While models have their own context window, in cases this is limited by providers.

Summary Analysis

Output Speed vs. Price

Output Speed: Output Tokens per Second; Price: Price: USD per 1M Tokens
Most attractive quadrant
Output Speed: Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).
Price: Price per token, represented as USD per million Tokens. Price is a blend of Input & Output token prices (3:1 ratio).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Latency vs. Output Speed

Latency: Seconds to First Token Received; Output Speed: Output Tokens per Second
Most attractive quadrant
Size represents Price (USD per M Tokens)
Output Speed: Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).
Latency: Time to first token of tokens received, in seconds, after API request sent. For models which do not support streaming, this represents time to receive the completion.
Price: Price per token, represented as USD per million Tokens. Price is a blend of Input & Output token prices (3:1 ratio).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Pricing: Input and Output Prices

USD per 1M Tokens; Lower is better
Input price
Output price
Input price: Price per token included in the request/message sent to the API, represented as USD per million Tokens.
Output price: Price per token generated by the model (received from the API), represented as USD per million Tokens.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Pricing: Cached Input Tokens

ModelsCache Pricing Notes
Google Vertex logoGoogle Vertex
  • Context caching available for Gemini 1.5 Flash/Pro, which allows for a discounted rate on cache hits
  • The cache has a default TTL (Time to Live) of 1 hour, which can be modified through the API
Pricing Cached Input Tokens: Some providers offer a caching layer for input tokens, which can help reduce API usage costs.

Speed

Measured by Output Speed (tokens per second)

Output Speed

Output Tokens per Second; Higher is better
Output Speed: Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Output Speed Variance

Output Tokens per Second; Results by percentile; Higher is better
Median, Other points represent 5th, 25th, 75th, 95th Percentiles respectively
Output Speed: Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).
Boxplot: Shows variance of measurements
Picture of the author
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Output Speed, Over Time

Output Tokens per Second; Higher is better
Smaller, emerging providers offer high output speed, though precise speeds delivered vary day-to-day.
Output Speed: Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).
Over time measurement: Median measurement per day, based on 8 measurements each day at different times. Labels represent start of week's measurements.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Output Speed by Input Token Count (Context Length)

Output Tokens per Second; Higher is better
100 input tokens
1k input tokens
10k input tokens
100k input tokens
Input Tokens Length: Length of tokens provided in the request. See Prompt Options above to see benchmarks of different input prompt lengths across other charts.
Output Speed: Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Latency

Measured by Time (seconds) to First Token

Latency

Seconds to First Token Received; Lower is better
Latency: Time to first token of tokens received, in seconds, after API request sent. For models which do not support streaming, this represents time to receive the completion.
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.

Latency Variance

Seconds to First Token Received; Results by percentile; Lower median is better
Median, Other points represent 5th, 25th, 75th, 95th Percentiles respectively
Latency: Time to first token of tokens received, in seconds, after API request sent. For models which do not support streaming, this represents time to receive the completion.
Boxplot: Shows variance of measurements
Picture of the author

Latency, Over Time

Seconds to First Token Received; Lower is better
Latency: Time to first token of tokens received, in seconds, after API request sent. For models which do not support streaming, this represents time to receive the completion.
Over time measurement: Median measurement per day, based on 8 measurements each day at different times. Labels represent start of week's measurements.

Latency by Input Token Count (Context Length)

Seconds to First Token Received; Lower is better
100 input tokens
1k input tokens
10k input tokens
100k input tokens
Input Tokens Length: Length of tokens provided in the request. See Prompt Options above to see benchmarks of different input prompt lengths across other charts.
Latency: Time to first token of tokens received, in seconds, after API request sent. For models which do not support streaming, this represents time to receive the completion.
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.

Total Response Time

Time to receive 100 tokens output, calculated from latency and output speed metrics

Total Response Time vs. Price

Total: Response Time: Seconds to Output 100 Tokens; Price: Price: USD per 1M Tokens
Most attractive quadrant
Price: Price per token, represented as USD per million Tokens. Price is a blend of Input & Output token prices (3:1 ratio).
Total Response Time: Time to receive a 100 token response. Calculated based on Latency (time to receive first token) and Output Speed (output tokens per second).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.

Total Response Time

Seconds to Output 100 Tokens; Lower is better
Total Response Time: Time to receive a 100 token response. Calculated based on Latency (time to receive first token) and Output Speed (output tokens per second).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.

Total Response Time, Over Time

Seconds to Output 100 Tokens; Lower is better
Total Response Time: Time to receive a 100 token response. Calculated based on Latency (time to receive first token) and Output Speed (output tokens per second).
Over time measurement: Median measurement per day, based on 8 measurements each day at different times. Labels represent start of week's measurements.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

Total Response Time by Input Token Count (Context Length)

Seconds to Output 100 Tokens; Lower is better
100 input tokens
1k input tokens
10k input tokens
100k input tokens
Input Tokens Length: Length of tokens provided in the request. See Prompt Options above to see benchmarks of different input prompt lengths across other charts.
Total Response Time: Time to receive a 100 token response. Calculated based on Latency (time to receive first token) and Output Speed (output tokens per second).
Median: Figures represent median (P50) measurement over the past 14 days or otherwise to reflect sustained changes in performance.
Notes: Llama 3.1 8B, Cerebras: 8k context, Llama 3.1 8B, SambaNova: 16k context

API Features

API Features: Function (Tool) Calling & JSON Mode

ModelsFunction callingJSON Mode
Cerebras logoCerebras
Hyperbolic logoHyperbolic
Amazon logoAmazon
Nebius Fast logoNebius Fast
Nebius Base logoNebius Base
Google Vertex logoGoogle Vertex
Azure logoAzure
Fireworks logoFireworks
Deepinfra logoDeepinfra
Groq logoGroq
SambaNova logoSambaNova
Perplexity logoPerplexity
Together.ai Turbo logoTogether.ai Turbo
Simplismart logoSimplismart
Function (Tool) Calling: Indicates whether the provider supports function calling in their API. Function calling is also known as 'Tool Calling'.
JSON Mode: Indicates whether the provider supports JSON mode in their API. When JSON mode is enabled, the models will always return a valid JSON object.

Summary Table of Key Comparison Metrics

Features
Price
Output tokens/s
Latency
Cerebras logo
Meta logo
Llama 3.1 8B
8k
53
$0.10
2,206.0
0.37
Hyperbolic logo
Meta logo
Llama 3.1 8B
128k
54
$0.10
112.8
0.49
Amazon Bedrock logo
Meta logo
Llama 3.1 8B
128k
53
$0.22
90.3
0.37
Nebius Fast logo
Meta logo
Llama 3.1 8B Fast
128k
53
$0.04
183.2
0.57
Nebius Base logo
Meta logo
Llama 3.1 8B Base
128k
53
$0.03
65.9
0.60
Google Vertex logo
Meta logo
Llama 3.1 8B Vertex
128k
53
$0.00
120.0
0.19
Microsoft Azure logo
Meta logo
Llama 3.1 8B
128k
53
$0.38
58.0
0.40
Fireworks logo
Meta logo
Llama 3.1 8B
128k
53
$0.20
268.9
0.26
Deepinfra logo
Meta logo
Llama 3.1 8B
128k
53
$0.06
78.0
0.21
Groq logo
Meta logo
Llama 3.1 8B
128k
53
$0.06
750.4
0.26
SambaNova logo
Meta logo
Llama 3.1 8B
16k
52
$0.13
1,116.9
0.42
Perplexity logo
Meta logo
Llama 3.1 8B
128k
53
$0.20
157.2
0.36
Together.ai Turbo logo
Meta logo
Llama 3.1 8B Turbo
128k
52
$0.18
154.8
0.36
Simplismart logo
Meta logo
Llama 3.1 8B
128k
52
$0.15
342.1
0.41