Meta LlamaGuard 2 8B Token Cost Calculator

Model: Meta: LlamaGuard 2 8B, Context: 8192, Cost: $0.2 per 1M input tokens, $0.2 per 1M output tokens

Note: Calculation is approximate based on public data. Prices may change, check official websites.

This calculator helps estimate the cost of using the Meta LlamaGuard 2 8B model. Understanding token costs is crucial for managing your expenses when working with large language models.

The model has a context window of 8192 tokens.

Pricing:

  • Input Tokens: $0.2 per 1 million tokens
  • Output Tokens: $0.2 per 1 million tokens

Formula:

Total Cost = (Number of Input Tokens / 1,000,000 * Input Cost per 1M Tokens) + (Number of Output Tokens / 1,000,000 * Output Cost per 1M Tokens)

Example:

For 10,000 input tokens and 5,000 output tokens in a single request:

Input Cost = (10,000 / 1,000,000) * $0.2 = $0.002

Output Cost = (5,000 / 1,000,000) * $0.2 = $0.001

Total Cost = $0.002 + $0.001 = $0.003