Meta: LlamaGuard 2 8B

Text input Text output
Author's Description

This safeguard model has 8B parameters and is based on the Llama 3 family. Just like is predecessor, [LlamaGuard 1](https://huggingface.co/meta-llama/LlamaGuard-7b), it can do both prompt and response classification. LlamaGuard 2 acts as a normal LLM would, generating text that indicates whether the given input/output is safe/unsafe. If deemed unsafe, it will also share the content categories violated. For best results, please use raw prompt input or the `/completions` endpoint, instead of the chat API. It has demonstrated strong performance compared to leading closed-source models in human evaluations. To read more about the model release, [click here](https://ai.meta.com/blog/meta-llama-3/). Usage of this model is subject to [Meta's Acceptable Use Policy](https://llama.meta.com/llama3/use-policy/).

Key Specifications
Cost
$$
Context
8K
Parameters
8B
Released
May 12, 2024
Speed
Ability
Reliability
Supported Parameters

This model supports the following parameters:

Logit Bias Stop Min P Top P Max Tokens Frequency Penalty Temperature Presence Penalty
Performance Summary

Meta's LlamaGuard 2 8B, a safeguard model based on the Llama 3 family, demonstrates exceptional speed and cost-effectiveness. It consistently ranks among the fastest models across seven benchmarks and offers highly competitive pricing across six benchmarks. Designed for prompt and response classification, it generates text indicating safety and violated content categories. However, the benchmark results indicate that LlamaGuard 2 8B is not intended for general-purpose generative tasks. It achieved 0.0% accuracy across Hallucinations, Ethics, Mathematics, Instruction Following, Reasoning, and Coding benchmarks. Its performance in Email Classification was also very low at 2.0% accuracy. This suggests that the model's architecture and training are highly specialized for its intended safety classification role, rather than for tasks requiring factual recall, complex reasoning, or content generation. Its strength lies purely in its designated function as a content moderation tool, where its speed and cost efficiency would be significant advantages.

Model Pricing

Current Pricing

Feature Price (per 1M tokens)
Prompt $0.2
Completion $0.2

Price History

Available Endpoints
Provider Endpoint Name Context Length Pricing (Input) Pricing (Output)
Together
Together | meta-llama/llama-guard-2-8b 8K $0.2 / 1M tokens $0.2 / 1M tokens
Benchmark Results
Benchmark Category Reasoning Strategy Free Executions Accuracy Cost Duration
Other Models by meta-llama