许可证: cc-by-nc-4.0
标签:
- llama3.2
- 幻觉检测
- 声明验证
- 事实依据性
- oumi
- 监督微调
- teen-d
语言: 英文
任务类型: 文本分类
基础模型: meta-llama/Llama-3.2-3B-Instruct
数据集:
- oumi-ai/oumi-anli-subset
- oumi-ai/oumi-c2d-d2c-subset
- oumi-ai/oumi-synthetic-claims
- oumi-ai/oumi-synthetic-document-claims
评估指标:
- 准确率
- F1分数
TD-HallOumi-3B:专用于幻觉检测/声明验证的Llama 3.2 3B模型
本模型是基于meta-llama/Llama-3.2-3B-Instruct
微调的版本,专门适配声明验证和幻觉检测任务。它能评估响应中的声明是否得到给定上下文文档的支持。
这项工作灵感来源于并使用了Oumi AI的HallOumi项目开发的数据集,该项目旨在通过可验证的输出建立对AI系统的信任。这个30亿参数的模型由TEEN-DIFFERENT社区提供。
性能表现
在oumi-ai/oumi-groundedness-benchmark上评估幻觉检测的宏观F1分数:

- **TD-HallOumi-3B*达到68.00%**的宏观F1分数。
- 高效性:这个30亿参数的模型超越了OpenAI o1、Llama 3.1 405B和Gemini 1.5 Pro等更大模型。
- 竞争力:紧随Claude Sonnet 3.5(69.60%)之后。
该模型以显著更少的参数提供了强大的幻觉检测能力。
模型详情
- 基础模型: meta-llama/Llama-3.2-3B-Instruct
- 微调任务: 给定上下文文档和响应(包含一个或多个声明),模型预测每个声明是否被上下文
<|支持|>
或<|不支持|>
。
- 模型输出格式: 模型被训练为输出特定标签(
<|支持|>
或<|不支持|>
),表示在结构化提示格式中呈现的声明的验证状态(参见使用方法部分)。
- 语言: 英文
训练数据
本模型通过监督微调(SFT)在Oumi AI为声明验证任务策划的混合数据集上进行微调:
组合的训练数据使用了为对话式SFT格式化的messages
列。
训练过程
- 框架: TRL(Transformer Reinforcement Learning库)SFT Trainer。
- 适配方法: 在微调过程中使用了低秩适应(LoRA),参数如下:
lora_r
: 64
lora_alpha
: 128
lora_dropout
: 0.05
lora_target_modules
: q_proj
, k_proj
, v_proj
, o_proj
, gate_proj
, up_proj
, down_proj
- 最终模型: 虽然使用LoRA训练,但此处托管的最终模型工件包含完全合并的权重,将LoRA适配融入基础模型以便于部署。
- 关键超参数:
- 训练轮次: 1
- 学习率: 4.0e-5(带100步热身的余弦调度)
- 优化器: AdamW(融合)
- 每设备批量大小: 2
- 梯度累积步数: 8(有效批量大小=16*设备数量)
- 权重衰减: 0.01
- 最大序列长度: 8192
- 精度:
bfloat16
- 梯度检查点: 启用(
use_reentrant=False
)
- 分词器: 使用了基础Llama 3.2分词器,训练期间添加了特殊填充标记
<|finetune_right_pad_id|>
。本仓库中包含的分词器文件反映了这一点。
完整训练配置可在Github找到。
评估
完整训练配置可在Github找到。
预期用途
本模型设计用于针对提供的上下文文档进行声明验证。其主要用例是检测LLM(或人工撰写文本)生成的文本中与源文档相比的幻觉或未支持的陈述。
它不适用于通用聊天机器人或事实依据性验证之外的任务。
局限性与偏差
- 继承偏差: 作为meta-llama/Llama-3.2-3B-Instruct的微调版本,本模型可能继承基础模型训练数据中的偏差。
- 合成数据偏差: 微调数据主要由Llama-3.1-405B-Instruct生成,可能包含生成模型特有的偏差或限制。
- 特异性: 模型专为其训练的声明验证任务格式而优化。在显著不同的提示结构或任务上性能可能下降。
- 上下文依赖: 验证准确性完全依赖于提供的上下文文档的质量和相关性。模型无法验证上下文中未包含的通用世界知识声明。
- 微妙性: 尽管训练时考虑了微妙性(根据HallOumi项目目标),复杂或高度细微的声明可能仍难以正确验证。
引用
如果您使用此模型,请考虑引用基础模型、数据集、Oumi AI HallOumi项目及此特定微调模型工件:
此微调模型(TD-HallOumi-3B):
@misc{teen_d_halloumi_3b_2024,
author = {Tarun Reddi and Teen Different},
title = {TD-HallOumi-3B: Fine-tuned Llama-3.2-3B-Instruct for Claim Verification},
month = {April},
year = {2025},
url = {\url{https://huggingface.co/TEEN-D/TD-HallOumi-3B}}
}
基础模型:
@misc{meta2024llama32,
title = {Introducing Llama 3.2: The Next Generation of Open Weights AI Models},
author = {Meta AI},
year = {2024},
url = {https://ai.meta.com/blog/llama-3-2-ai-models/}
}
数据集:
@misc{oumiANLISubset,
author = {Jeremiah Greer},
title = {Oumi ANLI Subset},
month = {March},
year = {2025},
url = {https://huggingface.co/datasets/oumi-ai/oumi-anli-subset}
}
@misc{oumiC2DAndD2CSubset,
author = {Jeremiah Greer},
title = {Oumi C2D and D2C Subset},
month = {March},
year = {2025},
url = {https://huggingface.co/datasets/oumi-ai/oumi-c2d-d2c-subset}
}
@misc{oumiSyntheticClaims,
author = {Jeremiah Greer},
title = {Oumi Synthetic Claims},
month = {March},
year = {2025},
url = {https://huggingface.co/datasets/oumi-ai/oumi-synthetic-claims}
}
@misc{oumiSyntheticDocumentClaims,
author = {Jeremiah Greer},
title = {Oumi Synthetic Document Claims},
month = {March},
year = {2025},
url = {https://huggingface.co/datasets/oumi-ai/oumi-synthetic-document-claims}
}
@misc{oumiGroundednessBenchmark,
author = {Jeremiah Greer},
title = {Oumi Groundedness Benchmark},
month = {March},
year = {2025},
url = {https://huggingface.co/datasets/oumi-ai/oumi-groundedness-benchmark}
}
Oumi平台与HallOumi项目:
@software{oumi2025,
author = {Oumi Community},
title = {Oumi: an Open, End-to-end Platform for Building Large Foundation Models},
month = {January},
year = {2025},
url = {https://github.com/oumi-ai/oumi}
}
@article{halloumi2025,
author = {Greer, Jeremiah and Koukoumidis, Manos and Aisopos, Konstantinos and Schuler, Michael},
title = {Introducing HallOumi: A State-of-the-Art Claim-Verification Model},
journal = {Oumi AI Blog},
year = {2025},
month = {April},
url = {https://oumi.ai/blog/posts/introducing-halloumi}
}