help-calc

08 Numbers and Units

Databricks Meta Llama 3.3 Cost per Token

Card 08-0210 · Updated · Standard formula, shown below

Total cost 0.0002 USD
Input cost
0.0001 USD
Result, rounded to 4 decimal places
Output cost
0.0001 USD
Result, rounded to 4 decimal places
Input tokens
1000 tokens
Input
You enter
Input tokens (tokens), Output tokens (tokens), Input price per 1K tokens (USD), Output price per 1K tokens (USD)
You get
Total cost (USD), Input cost (USD), Output cost (USD)
Rounding
4 dp

Databricks Meta Llama 3.3 cost per token varies by deployment type, but as a general rule, serverless inference on Databricks charges roughly $0.0001 to $0.0002 per 1,000 input tokens and $0.0002 to $0.0004 per 1,000 output tokens for the 70B model. This article explains the pricing structure, how to estimate your actual cost, and what factors can change the number.

Formula

The cost of running Meta Llama 3.3 on Databricks is calculated by multiplying the number of tokens processed by the price per token, separately for input and output. The formula is:

Total Cost = (Input Tokens / 1000 × Input Price per 1K) + (Output Tokens / 1000 × Output Price per 1K)

Where:

  • Input Tokens – the number of tokens in your prompt (including system instructions and any conversation history).
  • Output Tokens – the number of tokens the model generates in its response.
  • Input Price per 1K – the cost per 1,000 input tokens, typically lower than output price.
  • Output Price per 1K – the cost per 1,000 output tokens, typically higher.

Prices are usually quoted per 1,000 tokens (sometimes per 1 million), so always check the unit. The calculator above lets you enter any price you find on your Databricks invoice or pricing page.

Worked Example

Using the default values in the calculator: 1,000 input tokens at $0.0001 per 1K and 500 output tokens at $0.0002 per 1K.

  1. Input cost = (1,000 / 1,000) × 0.0001 = 1 × 0.0001 = $0.0001
  2. Output cost = (500 / 1,000) × 0.0002 = 0.5 × 0.0002 = $0.0001
  3. Total cost = $0.0001 + $0.0001 = $0.0002

So a typical API call with a short prompt and a brief answer costs about two-tenths of a cent. For a million such calls, that adds up to $200, which is why token pricing matters at scale.

Why Databricks Pricing Is Not a Single Number

Databricks does not publish a fixed per-token price for Meta Llama 3.3 because the cost depends on how you run the model. There are three main deployment options, each with a different billing model:

  • Serverless inference – you pay per token, and Databricks manages the infrastructure. This is the easiest to estimate but often the most expensive per token.
  • Provisioned throughput – you reserve a fixed amount of compute (e.g., a number of GPUs) and pay per hour, regardless of how many tokens you process. The per-token cost then depends on how heavily you use the reserved capacity.
  • Self-managed on your own cloud – you run the model on your own VMs or Kubernetes cluster, paying only for the underlying cloud compute. The per-token cost is a function of your hardware utilization and is the most variable.

Most people asking about “cost per token” are looking at serverless, because that is the only one with a direct per-token price. But if you have steady, high-volume workloads, provisioned or self-managed can be far cheaper per token.

How to Find Your Actual Price

Because prices change and vary by region and contract, you need to check your Databricks workspace or invoice rather than relying on a third-party blog. Here is how to get the real number:

  1. Log into your Databricks account and go to the Billing or Usage page.
  2. Look for a line item with “Llama 3.3” or “Foundation Model” and note the unit price (usually per 1K tokens).
  3. If you use provisioned throughput, find the hourly rate for the GPU instance you are using (e.g., A10G or A100) and divide by your expected tokens per hour.
  4. For self-managed, use your cloud provider’s price for the GPU instance and estimate tokens per second from your own benchmarks.

If you are on a Databricks free trial or community edition, you may not have access to Llama 3.3 at all – check the model catalog in your workspace.

What Affects the Cost per Token in Practice

Even after you have a per-token price, your actual bill can vary dramatically based on how you use the model. Key factors include:

  • Context length – a longer prompt means more input tokens. A 2,000-token prompt costs twice as much as a 1,000-token prompt, even if the output is identical.
  • Output length – the model generates tokens one by one, so longer answers cost more. You can set a max_tokens limit to cap this.
  • Number of requests – obviously, more calls = more cost. But batching can reduce the effective cost per token because the GPU is used more efficiently.
  • Caching – if you send the same system prompt repeatedly, Databricks may cache it, reducing the billed input tokens. This is not always available, so check your usage report.
  • Region – prices can differ between AWS, Azure, and GCP regions. US East is often cheaper than Asia Pacific, for example.

One common misconception is that the model’s context window (e.g., 128K tokens) means you pay for the full window even if you only use 1,000 tokens. That is false – you are billed only for the tokens you actually send and receive.

Comparing Llama 3.3 to Other Models on Databricks

Meta Llama 3.3 70B is a mid-to-large model, so its per-token cost sits between smaller models like Llama 3.1 8B and larger ones like Llama 3.1 405B. As a rough guide:

  • Llama 3.1 8B – about 5–10× cheaper per token than 70B.
  • Llama 3.3 70B – the model in question, balances quality and cost.
  • Llama 3.1 405B – about 3–5× more expensive than 70B.

When choosing a model, consider not just the per-token price but the quality you need. For simple classification or extraction, an 8B model may be enough; for complex reasoning, the 70B is often worth the extra cost. Databricks also hosts other open models like Mixtral and DBRX, each with their own pricing.

Common Problems and How to Avoid Them

Users often make mistakes when estimating Llama 3.3 costs. Here are the most common pitfalls:

  • Mixing input and output prices – output tokens are almost always more expensive, so using the input price for everything will understate your bill.
  • Forgetting system prompts – a long system prompt is sent with every request. If you have a 500-token system prompt and 1,000 requests, that is 500,000 input tokens you might not have counted.
  • Ignoring retries – if your code retries failed requests, each retry bills you again. Make sure your error handling does not loop infinitely.
  • Using the wrong token count – tokens are not words. A 1,000-word prompt can be 1,300 tokens or more, depending on the language and formatting. Use the model’s tokenizer to count accurately.

To avoid surprises, set up billing alerts in Databricks and monitor your usage daily. The calculator above is a good planning tool, but it is only as accurate as the price you enter.

Frequently Asked Questions

Is Meta Llama 3.3 free on Databricks?

No, Meta Llama 3.3 is not free on Databricks. You pay for the compute and the per-token usage, just like any other model. Some Databricks trials include free credits, but those are limited and not intended for production workloads.

How many tokens are in a typical request?

A typical request might have 500–2,000 input tokens (including system prompt) and 200–1,000 output tokens. A 1,000-word document is roughly 1,300 tokens, and a 500-word answer is about 650 tokens. Use an online tokenizer to count your exact text.

Can I reduce the cost by using a smaller model?

Yes, switching to Llama 3.1 8B or another small model can cut your per-token cost by 80–90%. However, you may need to accept lower accuracy on complex tasks. Test with your own data to see if the smaller model is good enough.

Does Databricks charge for tokens that fail or time out?

Generally, you are charged for tokens that are processed, even if the final response fails or times out. The model may have generated partial output before an error, and those output tokens are billed. Always check your usage report to see what was actually charged.

How do I estimate the cost for a whole project?

Estimate your average tokens per request (input + output), multiply by the number of requests you expect, and then multiply by the per-token price. For example, 10,000 requests × 1,500 tokens × $0.0000002 per token = $3. Use the calculator above with your numbers.

Related

Formula used
in tokens_in | Input tokens | tokens | 1000 | 1 | 1000000
in tokens_out | Output tokens | tokens | 500 | 1 | 1000000
in price_in | Input price per 1K tokens | USD | 0.0001 | 0 | 1
in price_out | Output price per 1K tokens | USD | 0.0002 | 0 | 1
out cost | Total cost | USD | (tokens_in / 1000 * price_in) + (tokens_out / 1000 * price_out) | 4
out cost_in | Input cost | USD | tokens_in / 1000 * price_in | 4
out cost_out | Output cost | USD | tokens_out / 1000 * price_out | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this shelf

The whole Numbers and Units shelf →