Llama Guard logo

Llama Guard基于 LLM 的安全保护机制,预防人类-AI 交互中的不安全内容分类。

4.6 (5)
Daniel Nikulshyn审阅者 Daniel Nikulshyn·更新 2026年5月

概览

Llama Guard 是一款基于 Meta 的 Llama 模型构建的安全分类器,旨在评估用户提示和模型回复中可能的有害内容。它会输出安全标签以及被违反的具体策略类别,因而非常适合作为聊天机器人及其他生成式 AI 系统周围的安全防护层。 该模型在一个可配置的分类体系上进行训练,涵盖了暴力、性内容、仇恨、自残和犯罪建议等类别。由于分类体系直接包含在提示中,开发者可以在无需重新训练的情况下对政策进行调整或扩展,从而将审核功能定制到他们的具体应用或司法辖区。 Llama Guard以开源权重方式发布,可以自托管与LLM pipeline并行使用,实时过滤输入和输出,为需要透明性、可定制化或本地部署的团队提供闭源审核API的替代方案。

主要功能

  • 基于 LLM 的输入和输出内容管理
  • 多类别危害分类
  • (可以通过提示)自定义政策分类.taxonomy
  • 来自Meta的可公开的权重
  • 兼容Llama和其他LLM栈
  • 输出安全/不安全标签和违反类别

价格

模型
Freemium
评分
4.6 / 5 (5)

使用场景

聊天机器人输入和输出内容管理

将Llama Guard作为安全防护屏障在生产环境中包围聊天机器人,以筛选用户提示和模型响应,阻塞在未被允许的情况下到达最终用户时的不安全内容。

自定义政策执行

适应提示中基于分类 taxaomy 的分类以匹配应用的具体 政策或法域要求而无需重新训练安全模型。

内部托管合规层

将开放权重部署在内部环境中,以进行数据流出不允许的情况下审计和管理 LL M 流量。

红队分析和数据集过滤

将 Llama Guard 用于对会话数据集进行有害类别标记,以支持安全评估、精调数据收养、红队分析等。

优点 & 缺点

优点

  • 开放权重使自托管和审计成为可能
  • (通过提示)可以自定义安全分类 taxaomy
  • 将用户输入和模型输出都标记为有害或不安全
  • 可以轻松整合到现有LLM管道
  • 可与LLM LLM管道一起部署

缺点

  • 要求GPU资源才能进行高效运行
  • 可能会产生假阳性或漏管微妙的危害
  • 需要专业知识进行部署和调整
  • 性能较为偏向于英文

对决战绩

在万神殿中参与了 4 对决。

1
第1
0
第2
0
第3

Last 4 battles

评测

4.6

5 个评分的平均值。

5
3
4
2
3
0
2
0
1
0

登录以留下评测。

Tomáš Novák

Tomáš Novák

Apr 4, 2026

Use it every day

Honestly didn't expect to like it this much. Compatible with Llama and other LLM stacks is exactly what I needed, and integrates easily into existing LLM pipelines. but I reach for it almost every day now and it just clicks.

IB

Ingrid Bauer

Mar 24, 2026

Solid for our team

We rolled this out across the team last quarter and open weights enable self-hosting and auditing. LLM-based input and output moderation fits neatly into how we already work, and compatible with Llama and other LLM stacks removed a step we used to do by hand. but it has held up under daily use.

TA

Tariq Aziz

Feb 22, 2026

Use it every day

Honestly didn't expect to like it this much. Compatible with Llama and other LLM stacks is exactly what I needed, and open weights enable self-hosting and auditing. but I reach for it almost every day now and it just clicks.

Daniel Schmidt

Daniel Schmidt

Sep 6, 2025

Years in this space

I've evaluated a lot of these over the years. What stands out here is compatible with Llama and other LLM stacks — handled better than most — and open weights enable self-hosting and auditing. Requires GPU resources to run efficiently is my one real gripe. Worth the time if this is your use case.

Aaliyah Johnson

Aaliyah Johnson

Jun 17, 2025

Compared a few options

Evaluated this against two competitors. Where it wins: lLM-based input and output moderation and integrates easily into existing LLM pipelines. Where it lags: english-centric performance. On balance the feature set — especially lLM-based input and output moderation — justifies the 4 stars for our use case.

问答

Is Llama Guard compatible with other LLM stacks?

Yes, Llama Guard is compatible with Llama and other LLM stacks, and can be self-hosted alongside an LLM pipeline.

Asked by Jarrah Whitlock · Sep 19, 2025

What are the system requirements to run Llama Guard?

Llama Guard requires GPU resources to run efficiently.

Asked by Sven Bergqvist · Aug 12, 2025

Can I customize the safety taxonomy?

Yes, the taxonomy is provided in the prompt itself, allowing developers to adapt or extend the policy without retraining, tailoring moderation to their specific application or jurisdiction.

Asked by Chioma Nwosu · Aug 11, 2025

What is Llama Guard used for?

Llama Guard is used for classifying unsafe content in human-AI conversations, evaluating both user prompts and model responses for potentially harmful content.

Asked by Faisal Rahman · Jun 19, 2025

提问

管理表格形件组杀统计 的替代品