跳到主内容
@wquguru
精选70MarkTechPost(RSS)模型发布/更新

Fastino 发布 GLiNER2.5:边界预测架构,去除跨度枚举

Fastino Releases GLiNER2.5: A Boundary-Prediction Architecture That Removes Span Enumeration From Information Extraction

原文
发到 X

Information extraction teams face a recurring choice. Small encoder models are cheap but rigid, and large language models are flexible but expensive per document. Fastino released GLiNER2.5 to narrow that gap. The release replaces span enumeration with boundary prediction: the model scores where an entity starts and ends instead of scoring every candidate span against a width grid. That single change removes the maximum entity width, allows a 4,096-word context, and keeps computation linear in sequence length for a fixed schema. It also unlocks joint entity-relation decoding, cross-task label constraints, and per-span attributes. Across 16 zero-shot benchmarks, the multilingual checkpoint reaches 56.17 overall macro F1 against 56.09 for GLiNER2, with a 24.75-point gain on XNLI. Three checkpoints ship on Hugging Face under Apache 2.0 at 74M, 194M, and 287M parameters.

信息抽取团队面临一个反复出现的选择。小型编码器模型成本低但僵化,大型语言模型灵活但每篇文档处理成本高。Fastino发布了GLiNER2.5以缩小这一差距。该版本用边界预测取代了跨度枚举:模型对实体起始和结束位置进行评分,而不是按宽度网格对每个候选跨度评分。这一单一改变消除了最大实体宽度限制,允许4,096词的上下文,并在固定模式下保持计算量随序列长度线性增长。它还解锁了联合实体-关系解码、跨任务标签约束和每跨度属性。在16个零样本基准测试中,多语言检查点在总体宏F1上达到56.17,而GLiNER2为56.09,在XNLI上提升了24.75个百分点。三个检查点以Apache 2.0许可在Hugging Face上发布,参数规模分别为74M、194M和287M。

Is it deployable?

它可部署吗?

Yes, Fastino released three GLiNER2.5 checkpoints on Hugging Face under Apache 2.0, with local inference on CPU, CUDA, or MPS via pip install "gliner2[local]" (Python 3.10+). No inference provider currently hosts the checkpoints, so self-hosting is the deployment path.

是的,Fastino在Hugging Face上以Apache 2.0许可发布了三个GLiNER2.5检查点,支持通过pip install "gliner2[local]"(Python 3.10+)在CPU、CUDA或MPS上进行本地推理。目前没有推理提供商托管这些检查点,因此自托管是部署路径。

  • Company level: any tier. The 74M and 194M checkpoints run on standard CPU boxes, so a two-person team can ship extraction without GPU budget. Larger orgs get a fine-tunable, privately hosted alternative to per-token LLM extraction.
  • Industries: legal and contract operations, healthcare and clinical documentation, financial services, insurance claims, customer support, and AI safety tooling.
  • Applications: PII detection and redaction, contract clause extraction, knowledge graphs for agent memory, agent and model routing, guardrail classification, clinical entity extraction with negation and dosage attributes.
  • 公司级别:任何层级。74M和194M检查点可在标准CPU机器上运行,因此两人团队无需GPU预算即可实现抽取。大型组织则获得一个可微调、私有托管的替代方案,替代按token计费的LLM抽取。
  • 行业:法律和合同运营、医疗保健和临床文档、金融服务、保险理赔、客户支持以及AI安全工具。
  • 应用:PII检测和脱敏、合同条款抽取、用于代理记忆的知识图谱、代理和模型路由、护栏分类、带否定和剂量属性的临床实体抽取。

What changed

变更内容

Earlier GLiNER models located entities by enumerating candidate spans: every start position paired with every allowed width, each scored against the schema. That design tied compute to a width axis and imposed a hard ceiling on entity length.

早期的GLiNER模型通过枚举候选跨度来定位实体:每个起始位置与每个允许宽度配对,每个跨度根据模式进行评分。该设计将计算量与宽度轴绑定,并对实体长度施加了硬性上限。

GLiNER2.5 removes enumeration. The shared encoder still processes text and schema queries in one pass. Instead of scoring spans, the model predicts start and end scores over token boundaries plus inside scores over tokens. A sparse proposal stage selects the most promising starts and ends per query and pairs them, with no restriction on distance. A reranking head then scores each candidate using boundary evidence and span content. Relation candidates are drawn from the same pool rather than a separate path.

GLiNER2.5 移除了枚举。共享编码器仍然在一次前向传播中处理文本和模式查询。模型不再对跨度进行评分,而是预测标记边界上的开始和结束分数以及标记内部的分数。一个稀疏提议阶段为每个查询选择最有希望的开始和结束,并将它们配对,不限制距离。然后,一个重排序头使用边界证据和跨度内容对每个候选进行评分。关系候选来自同一个池,而不是单独的路径。

Fastino team reports that computation stays linear in sequence length for a fixed schema and candidate budget.

Fastino 团队报告,对于固定的模式和候选预算,计算量随序列长度保持线性增长。

Five capabilities that follow

以下五个能力随之而来

  • Long-context extraction: Removing explicit span representations cut memory enough to train on sequences up to 4,096 words. The checkpoints ship with max_len=4096. The library also adds native chunking helpers (extract_entities_long, extract_long, Classifier.classify_long, JointIE.extract_long) that remap spans to character offsets in the original document.
  • Unlimited span length: GLiNER2 enumerated spans up to a fixed width, typically around twelve words; longer entities were never scored. In GLiNER2.5 a span can open at the first token and close at the last. A forty-word indemnification clause costs the same to locate as a two-word name.
  • Joint entity and relation extraction: Users declare entity types, typed relations, and structural rules (unique_head=True, no_self_loops()), and a beam search assembles a globally consistent graph. Invalid combinations are never admitted, so output conforms by construction. Check result.feasible before using the graph.
  • Constrained classification: C.implies and C.excludes rules bind labels across tasks during decoding. Fastino’s own GLiGuard guardrail model illustrates the problem being solved: without constraints, a prompt can be labeled safe while simultaneously flagged for prompt injection. If no valid assignment exists, the classifier raises an error.
  • Span attributes: Attribute groups such as sentiment attach to specific entity types via applies_to, and are decoded span-by-span in the same forward pass. Entities return qualified rather than flat.
  • 长上下文提取:移除显式跨度表示减少了内存占用,足以训练长达 4,096 个词的序列。检查点带有 max_len=4096。库还添加了原生分块辅助函数(extract_entities_long、extract_long、Classifier.classify_long、JointIE.extract_long),将跨度映射回原始文档中的字符偏移。
  • 无限跨度长度:GLiNER2 枚举了固定宽度的跨度,通常约为十二个词;更长的实体从未被评分。在 GLiNER2.5 中,跨度可以在第一个标记处开始,在最后一个标记处结束。一个四十词的赔偿条款与一个两词的名称定位成本相同。
  • 联合实体和关系提取:用户声明实体类型、类型化关系和结构规则(unique_head=True、no_self_loops()),并通过束搜索组装全局一致的图。无效组合永远不会被接受,因此输出在构造上符合要求。使用图之前请检查 result.feasible。
  • 约束分类:C.implies 和 C.excludes 规则在解码过程中跨任务绑定标签。Fastino 自己的 GLiGuard 护栏模型说明了正在解决的问题:没有约束,一个提示可以被标记为安全,同时被标记为提示注入。如果不存在有效的赋值,分类器会引发错误。
  • 跨度属性:诸如情感之类的属性组通过 applies_to 附加到特定实体类型,并在同一次前向传播中逐跨度解码。实体返回限定而非扁平。

The model family

模型家族

ModelParamsEncoderLanguage
gliner2.5-small-v174MDeBERTa-v3-xsmallEnglish
gliner2.5-base-v1194MDeBERTa-v3-baseEnglish
gliner2.5-multi-v1287MmDeBERTa-v3-baseMultilingual
模型参数编码器语言
gliner2.5-small-v174MDeBERTa-v3-xsmall英语
gliner2.5-base-v1194MDeBERTa-v3-base英语
gliner2.5-multi-v1287MmDeBERTa-v3-base多语言

All three share the same public API. Load with AutoExtractor, not the legacy GLiNER2 span loader.

这三个模型共享相同的公共 API。使用 AutoExtractor 加载,而不是传统的 GLiNER2 跨度加载器。

Benchmarks

基准测试

Fastino team evaluates zero-shot on 16 public datasets, reporting macro F1 against GLiNER2 at matched sizes.

Fastino团队在16个公开数据集上评估了零样本性能,报告了与GLiNER2在匹配规模下的宏F1分数。

Overall average: GLiNER2.5 Multi reaches 56.17 versus 56.09 for GLiNER2 Multi. GLiNER2.5 Base reaches 54.87 versus 53.34. The headline gain is XNLI, where Multi jumps to 62.30 from 37.55, a 24.75-point increase. Few-NERD improves for Base to 55.14 from 47.22. Romanian RONEC, an untrained language, improves for both.

总体平均分:GLiNER2.5 Multi达到56.17,而GLiNER2 Multi为56.09。GLiNER2.5 Base达到54.87,而GLiNER2 Base为53.34。最显著的提升是在XNLI上,Multi从37.55跃升至62.30,增加了24.75个百分点。Few-NERD在Base上从47.22提升至55.14。罗马尼亚语RONEC,一个未经训练的语言,在两个模型上都有所提升。

Key Takeaways

关键要点

  • Boundary prediction replaces span enumeration; entity width no longer costs compute.
  • Three Apache 2.0 checkpoints: 74M, 194M, 287M, all CPU-runnable.
  • Joint decoding returns schema-valid graphs, removing post-hoc validation layers.
  • Overall F1 rises to 56.17 (Multi) and 54.87 (Base); extraction average dips for Multi.
  • Chunking keeps a span only when both boundaries land in one chunk.
  • 边界预测取代了跨度枚举;实体宽度不再消耗计算资源。
  • 三个Apache 2.0检查点:74M、194M、287M,均可CPU运行。
  • 联合解码返回符合模式的图,移除了事后验证层。
  • 总体F1提升至56.17(Multi)和54.87(Base);提取平均分在Multi上略有下降。
  • 分块仅当跨度两端都落在同一块内时才保留该跨度。

Check out the Fastino technical blog, the GitHub repo, and the boundary architecture docs. Feel free to check out our GitHub Page for Tutorials, Codes and Notebooks.

查看Fastino技术博客、GitHub仓库和边界架构文档。欢迎查看我们的GitHub页面,获取教程、代码和笔记本。

Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

此外,欢迎在Twitter上关注我们,别忘了加入我们超过15万成员的ML SubReddit,并订阅我们的新闻通讯。等等!你在Telegram上吗?现在你也可以加入我们的Telegram群组。

The post Fastino Releases GLiNER2.5: A Boundary-Prediction Architecture That Removes Span Enumeration From Information Extraction appeared first on MarkTechPost.

文章《Fastino发布GLiNER2.5:一种从信息提取中移除跨度枚举的边界预测架构》首次出现在MarkTechPost上。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近