中文简介
microsoft/HARC 是 microsoft 在 Hugging Face 发布的模型仓库,当前卡片主要关联文本生成与推理。本站固定记录上游版本 460119b86dd4,同步到 20 个文件,文件元数据合计 29.78 GB;访问状态为“公开”,许可证字段为“mit”。
上游模型卡 / 数据集卡
【README 卡片中文译介】
以下内容依据上游仓库 microsoft/HARC 的固定版本 README、卡片字段和文件元数据进行中文结构化整理。它保留便于选型的关键信息,完整技术细节、代码示例和许可文本请同时查看上游原文。
【资源概览】
microsoft/HARC 是 microsoft 在 Hugging Face 发布的模型仓库,当前卡片主要关联文本生成与推理。本站固定记录上游版本 460119b86dd4,同步到 20 个文件,文件元数据合计 29.78 GB;访问状态为“公开”,许可证字段为“mit”。
【适用方向】
适合在真实样本上评估文本生成与推理能力,并比较质量、时延和资源消耗。 建议先用小规模样本验证推理框架、输入输出格式和任务指标,再决定是否进入完整权重获取、量化或部署评估。
【版本与规格】
固定版本:460119b86dd4。 任务标签:文本生成与推理。 语言字段:en。 库标记:peft。 上游标注的基础模型:meta-llama/Llama-3.1-8B-Instruct, Qwen/Qwen2.5-7B-Instruct。 上游页面记录的最近更新时间:2026-07-02。
【文件信息】
上游 API 返回 20 个文件,文件元数据合计 29.78 GB。 已保存文件清单中的主要扩展名:.json 10 个、.md 3 个、.jinja 2 个、.safetensors 2 个、.png 1 个、.txt 1 个。 当前较大的文件包括:adapters/harc_llama3.1_8b/adapter_model.safetensors(320.06 MB);adapters/harc_qwen2.5_7b/adapter_model.safetensors(308.05 MB);adapters/harc_llama3.1_8b/tokenizer.json(16.41 MB)。
【运行或处理环境】
仓库文件元数据合计 29.78 GB。 实际显存与内存由精度、量化方式、上下文长度、批量、并发、MoE 专家加载方式和推理框架共同决定,不能只凭参数名或仓库大小作部署承诺;应在目标格式和目标硬件上实测。
【使用边界】
许可证显示为“mit”,具体用途限制、附加政策和归属要求仍以上游原文为准。 模型输出、工具调用和生成内容可能出现错误、偏见或安全风险,面向业务前应建立任务级评测、权限隔离和人工确认。
HARC: Coupling Harmfulness and Refusal Directions for Robust Safety Alignment Model description HARC couples a model's internal *harmfulness* and *refusal* directions at both prompt-side and response-side token positions, using an additive margin-hinge loss on cosine projections of the residual stream. The intervention is confined to a low-dimensional harmfulness–refusal subspace within a small set of selected layers, which improves robustness to jailbreak attacks while preserving general capability and avoiding the over-refusal regression typical of broader safety tuning. This repository contains the HARC LoRA adapters.** The adapter is applied to attention and MLP projections and trained with a composite objective: **(i)** the margin-hinge coupling loss **(ii)** a KL-divergence retention term anchoring benign outputs to the base model **(iii)** a cross-entropy term supervising refusal text on harmful prompts. Training directions are extracted via difference-of-means on contrastive prompt sets and periodically recomputed with EMA blending. The adapter adds ~1% trainable parameters and leaves the base architecture unchanged. **Backbone models:** Llama-3.1-8B-Instruct, Qwen-2.5-7B-Instruct **Collection:** HARC Collection **Paper:** arXiv:2607.00572 **Code:** github.com/microsoft/HARC The HARC collection | Repo | Contents | License | |---|---|---| | **microsoft/HARC** (this repo) | LoRA adapters for both backbones | MIT | | microsoft/HARC-Llama-3.1-8B-Instruct | Merged full model | Llama 3.1 Community License | | microsoft/HARC-Qwen2.5-7B-Instruct | Merged full model | Apache-2.0 | Use this repo if you want the lightweight adapters to load on top of your own copy of the base model; use the merged-model repos if you want a single ready-to-run checkpoint. Repository structure How to use Use the base model's standard chat template in both cases. Option A — pre-merged full model (simplest) Loads directly from the merged-model repo; no base download or PEFT required. Optio
适用场景
适合在真实样本上评估文本生成与推理能力,并比较质量、时延和资源消耗。 建议先用小规模样本验证推理框架、输入输出格式和任务指标,再决定是否进入完整权重获取、量化或部署评估。
模型参数
固定版本:460119b86dd4。 任务标签:文本生成与推理。 语言字段:en。 库标记:peft。 上游标注的基础模型:meta-llama/Llama-3.1-8B-Instruct, Qwen/Qwen2.5-7B-Instruct。 上游页面记录的最近更新时间:2026-07-02。
文件说明
上游 API 返回 20 个文件,文件元数据合计 29.78 GB。 已保存文件清单中的主要扩展名:.json 10 个、.md 3 个、.jinja 2 个、.safetensors 2 个、.png 1 个、.txt 1 个。 当前较大的文件包括:adapters/harc_llama3.1_8b/adapter_model.safetensors(320.06 MB);adapters/harc_qwen2.5_7b/adapter_model.safetensors(308.05 MB);adapters/harc_llama3.1_8b/tokenizer.json(16.41 MB)。
上游文件元数据
.gitattributes1.96 KBadapters/harc_llama3.1_8b/adapter_config.json1.08 KBadapters/harc_llama3.1_8b/adapter_model.safetensors320.06 MBadapters/harc_llama3.1_8b/chat_template.jinja4.51 KBadapters/harc_llama3.1_8b/README.md5.10 KBadapters/harc_llama3.1_8b/special_tokens_map.json325 Badapters/harc_llama3.1_8b/tokenizer.json16.41 MBadapters/harc_llama3.1_8b/tokenizer_config.json49.37 KBadapters/harc_qwen2.5_7b/adapter_config.json1.08 KBadapters/harc_qwen2.5_7b/adapter_model.safetensors308.05 MBadapters/harc_qwen2.5_7b/added_tokens.json605 Badapters/harc_qwen2.5_7b/chat_template.jinja2.45 KB
硬件建议
仓库文件元数据合计 29.78 GB。 实际显存与内存由精度、量化方式、上下文长度、批量、并发、MoE 专家加载方式和推理框架共同决定,不能只凭参数名或仓库大小作部署承诺;应在目标格式和目标硬件上实测。
注意事项
许可证显示为“mit”,具体用途限制、附加政策和归属要求仍以上游原文为准。 模型输出、工具调用和生成内容可能出现错误、偏见或安全风险,面向业务前应建立任务级评测、权限隔离和人工确认。
获取、校验与交付
咨询此资源时只需发送本页链接或资源准确全称。橙子AI科技会继续核对版本、文件与类型、README资料卡、许可证和访问条件,并在合法访问权限、许可证及平台规则允许的前提下,协助海内外下载、完整性校验及网盘或硬盘交付;本官网本身不托管或下载资源文件。
- 大模型获取与国内转存服务
- 大模型怎么下载:Hugging Face 官方方式与国内交付完整指南
- 国内下载 Hugging Face 模型很慢或经常中断怎么办
- DeepSeek、ChatGPT、豆包、Kimi 能否下载到本地
本页面为橙子AI科技基于固定版本上游卡片整理的中文信息与服务说明,不代表资源作者或平台官方页面。实际许可、访问和使用条件以上游原文为准。