模型

Llama-Prompt-Guard-2-22M

meta-llama/Llama-Prompt-Guard-2-22M

查看上游原文 ↗
上游访问:需要申请 本站服务:可咨询 内容检查:AI 辅助整理并检查 许可证:llama4 上游版本:11614a155199

中文简介

meta-llama/Llama-Prompt-Guard-2-22M 是 meta-llama 在 Hugging Face 发布的模型仓库,当前卡片主要关联向量表示与检索、文本生成与推理。本站固定记录上游版本 11614a155199,同步到 11 个文件,文件元数据合计 541.29 MB;访问状态为“需要申请”,许可证字段为“llama4”。

UPSTREAM README

上游模型卡 / 数据集卡

在 Hugging Face 查看原文 ↗

【README 卡片中文译介】

以下内容依据上游仓库 meta-llama/Llama-Prompt-Guard-2-22M 的固定版本 README、卡片字段和文件元数据进行中文结构化整理。它保留便于选型的关键信息,完整技术细节、代码示例和许可文本请同时查看上游原文。

【资源概览】
meta-llama/Llama-Prompt-Guard-2-22M 是 meta-llama 在 Hugging Face 发布的模型仓库,当前卡片主要关联向量表示与检索、文本生成与推理。本站固定记录上游版本 11614a155199,同步到 11 个文件,文件元数据合计 541.29 MB;访问状态为“需要申请”,许可证字段为“llama4”。

【适用方向】
适合评估提示词与模型输出的安全分类、风险拦截和内容治理流程。 建议先用小规模样本验证推理框架、输入输出格式和任务指标,再决定是否进入完整权重获取、量化或部署评估。

【版本与规格】
固定版本:11614a155199。 任务标签:向量表示与检索、文本生成与推理。 语言字段:en, fr, de, hi, it, pt, es, th。 架构:DebertaV2ForSequenceClassification。 上游 Safetensors 元数据显示参数量约 70.83 M。 库标记:transformers。 模型类型字段:deberta-v2。 上游页面记录的最近更新时间:2025-04-29。

【文件信息】
上游 API 返回 11 个文件,文件元数据合计 541.29 MB。 已保存文件清单中的主要扩展名:.json 4 个、.md 3 个、无扩展名 2 个、.chk 1 个、.safetensors 1 个。 当前较大的文件包括:model.safetensors(270.22 MB);tokenizer.json(8.26 MB);README.md(18.60 KB)。

【运行或处理环境】
仓库文件元数据合计 541.29 MB。 按每参数 2 字节只计算 BF16 权重,理论下限约 135.10 MB;这不包含 KV Cache、激活值、框架开销或并发余量。 实际显存与内存由精度、量化方式、上下文长度、批量、并发、MoE 专家加载方式和推理框架共同决定,不能只凭参数名或仓库大小作部署承诺;应在目标格式和目标硬件上实测。

【使用边界】
许可证显示为“llama4”,具体用途限制、附加政策和归属要求仍以上游原文为准。 该仓库需要由用户本人按上游要求申请访问,是否批准及何时批准由资源权利方决定。 模型输出、工具调用和生成内容可能出现错误、偏见或安全风险,面向业务前应建立任务级评测、权限隔离和人工确认。

已有简体中文译文 · Codex 基于固定版本 README 与上游元数据生成中文结构化译介 · 2026-07-25 22:47

Llama Prompt Guard 2 Model Card Model Information We are launching two classifier models as part of the Llama Prompt Guard 2 series, an updated version of v1: Llama Prompt Guard 2 86M and a new, smaller version, Llama Prompt Guard 2 22M. LLM-powered applications are vulnerable to prompt attacks—prompts designed to subvert the developer's intended behavior. Prompt attacks fall into two primary categories: Prompt Injections: manipulate untrusted third-party and user data in the context window to make a model execute unintended instructions. Jailbreaks: malicious instructions designed to override the safety and security features directly built into a model. Both Llama Prompt Guard 2 models detect both prompt injection and jailbreaking attacks, trained on a large corpus of known vulnerabilities. We’re releasing Prompt Guard as an open-source tool to help developers reduce prompt attack risks with a straightforward yet highly customizable solution. Summary of Changes from Prompt Guard 1 Improved Performance: Modeling strategy updates yield substantial performance gains, driven by expanded training datasets and a refined objective function that reduces false positives on out-of-distribution data. Llama Prompt Guard 2 22M, a 22 million parameter Model: A smaller, faster version based on DeBERTa-xsmall. Llama Prompt Guard 2 22M reduces latency and compute costs by 75%, with minimal performance trade-offs. Adversarial-attack resistant tokenization: We refined the tokenization strategy to mitigate adversarial tokenization attacks, such as whitespace manipulations and fragmented tokens. Simplified binary classification: Both Prompt Guard 2 models focus on detecting explicit, known attack patterns, labeling prompts as “benign” or “malicious”. Model Scope Classification: Llama Prompt Guard 2 models classify prompts as ‘malicious’ if the prompt explicitly attempts to override prior instructions embedded into or seen by an LLM. This classification considers only the intent to supe

公开页仅展示原文摘录;完整模型卡或数据集卡请前往上游仓库查看。

适用场景

适合评估提示词与模型输出的安全分类、风险拦截和内容治理流程。 建议先用小规模样本验证推理框架、输入输出格式和任务指标,再决定是否进入完整权重获取、量化或部署评估。

模型参数

固定版本:11614a155199。 任务标签:向量表示与检索、文本生成与推理。 语言字段:en, fr, de, hi, it, pt, es, th。 架构:DebertaV2ForSequenceClassification。 上游 Safetensors 元数据显示参数量约 70.83 M。 库标记:transformers。 模型类型字段:deberta-v2。 上游页面记录的最近更新时间:2025-04-29。

文件说明

上游 API 返回 11 个文件,文件元数据合计 541.29 MB。 已保存文件清单中的主要扩展名:.json 4 个、.md 3 个、无扩展名 2 个、.chk 1 个、.safetensors 1 个。 当前较大的文件包括:model.safetensors(270.22 MB);tokenizer.json(8.26 MB);README.md(18.60 KB)。

上游文件元数据

  • .gitattributes1.48 KB
  • checklist.chk261 B
  • config.json870 B
  • LICENSE7.38 KB
  • model.safetensors270.22 MB
  • MODEL_CARD.md9.52 KB
  • README.md18.60 KB
  • special_tokens_map.json286 B
  • tokenizer.json8.26 MB
  • tokenizer_config.json1.25 KB
  • USE_POLICY.md5.66 KB

硬件建议

仓库文件元数据合计 541.29 MB。 按每参数 2 字节只计算 BF16 权重,理论下限约 135.10 MB;这不包含 KV Cache、激活值、框架开销或并发余量。 实际显存与内存由精度、量化方式、上下文长度、批量、并发、MoE 专家加载方式和推理框架共同决定,不能只凭参数名或仓库大小作部署承诺;应在目标格式和目标硬件上实测。

注意事项

许可证显示为“llama4”,具体用途限制、附加政策和归属要求仍以上游原文为准。 该仓库需要由用户本人按上游要求申请访问,是否批准及何时批准由资源权利方决定。 模型输出、工具调用和生成内容可能出现错误、偏见或安全风险,面向业务前应建立任务级评测、权限隔离和人工确认。

获取、校验与交付

咨询此资源时只需发送本页链接或资源准确全称。橙子AI科技会继续核对版本、文件与类型、README资料卡、许可证和访问条件,并在合法访问权限、许可证及平台规则允许的前提下,协助海内外下载、完整性校验及网盘或硬盘交付;本官网本身不托管或下载资源文件。

第三方资源声明

本页面为橙子AI科技基于固定版本上游卡片整理的中文信息与服务说明,不代表资源作者或平台官方页面。实际许可、访问和使用条件以上游原文为准。