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

Knowledgator发布GLiFormer:5.75亿参数编码器实现零生成

Knowledgator Releases GLiFormer: A 575M-Parameter Encoder That Hits 91.10 F1 on Nested JSON Extraction Without Generating Tokens

原文
发到 X
推荐理由

做信息抽取的同学必看,这个新编码器用纯Encoder架构实现了接近大模型的嵌套JSON提取能力,且推理极快,值得替换现有LLM管线。

Knowledgator Engineering has released GLiFormer, a schema-conditioned encoder framework for information extraction. One model handles named-entity recognition (NER), text classification, relation extraction, nested JSON structuring, and text embeddings. You pass labels and extraction schemas at inference time. Two checkpoints are on Hugging Face. GLiFormer Base v1 has 264.2M parameters, and GLiFormer Large v1 has 575.6M.

Knowledgator Engineering 发布了 GLiFormer,这是一种用于信息抽取的模式条件编码器框架。一个模型即可处理命名实体识别(NER)、文本分类、关系抽取、嵌套 JSON 结构化以及文本嵌入。在推理时传入标签和抽取模式。Hugging Face 上提供了两个检查点。GLiFormer Base v1 拥有 264.2M 参数,GLiFormer Large v1 拥有 575.6M 参数。

Deployable today? Yes. Both checkpoints are Apache 2.0, install with pip install gliformer, and run on CPU or GPU.

现在可以部署吗?可以。两个检查点均采用 Apache 2.0 许可证,通过 pip install gliformer 安装,并可在 CPU 或 GPU 上运行。

The Problem It Targets

它针对的问题

Extraction stacks often chain separate models. One tags entities, another classifies documents, and a third rebuilds records. The research team argues these tasks share one core operation. Encode the source, represent the requested concepts, then score their compatibility.

抽取流程通常将多个独立模型串联使用。一个模型标记实体,另一个对文档进行分类,第三个则重建记录。研究团队认为这些任务共享一个核心操作:编码源文本,表示所需的概念,然后评估它们的兼容性。

LLMs can emit nested JSON, but they generate field names, punctuation, and values token by token. GLiFormer removes output generation from that path.

大语言模型(LLMs)可以输出嵌套 JSON,但它们是逐个 token 地生成字段名、标点和值。GLiFormer 从该路径中移除了输出生成环节。

How GLiFormer Works

GLiFormer 的工作原理

GLiFormer builds on GLiNER and generalizes its label matching through an ‘anchor.’ An anchor is the object each runtime label gets scored against. It can be a group vector for classification, an entity pair for relations, or a record slot.

GLiFormer 建立在 GLiNER 之上,并通过“锚点”泛化了其标签匹配机制。锚点是每个运行时标签所针对评分的对象。它可以是用于分类的组向量、用于关系的实体对,或用于记录的槽位。

The source is encoded once. Multiple schemas for the same document then run as task-local groups over that shared encoding. Head compute still grows with the number of groups, labels, and anchors.

源文本仅被编码一次。随后,针对同一文档的多个模式作为任务局部组在该共享编码上运行。头部计算量仍随组数、标签数和锚点数增加而增长。

For NER, the head scores start, end, and inside evidence for every token and label pair. Independent sigmoid outputs let nested mentions and shared boundaries coexist.

对于 NER,头部会对每个 token-标签对评分起始、结束和内部证据。独立的 sigmoid 输出使得嵌套提及和共享边界能够共存。

Structuring runs in 4 stages:

结构化过程分为 4 个阶段:

  • Ground field values as spans taken directly from the source text.
  • Assign spans to unordered record slots, trained with Hungarian matching.
  • Predict directed parent-child links, restricted to paths the schema allows.
  • Assemble nested JSON with a deterministic decoder.
  • 将字段值 grounding 为直接从源文本中提取的跨度(spans)。
  • 将跨度分配给无序的记录槽位,训练时使用匈牙利匹配算法。
  • 预测有向的父子链接,限制在模式允许的路径内。
  • 使用确定性解码器组装嵌套 JSON。

Values are source spans, so the model cannot invent value text missing from the input. Span selection, record assignment, and hierarchy can still be wrong.

值是源文本中的跨度,因此模型无法编造输入中缺失的值文本。跨度的选择、记录的分配以及层级结构仍可能出现错误。

Checkpoints and Training

检查点与训练

Both v1 checkpoints use the gliformer-layout model type with 5 heads: NER, classification, joint relations, multilevel structuring, and embeddings. Each configures a 12-word maximum span width and 100 record anchors. Full specs sit in the pretrained models docs.

两个 v1 检查点均使用具有 5 个头部的 gliformer-layout 模型类型:NER、分类、联合关系、多层级结构和嵌入。每个配置都设置了最大跨度宽度为 12 个词,以及 100 个记录锚点。完整规格请参阅预训练模型文档。

SpecBase v1Large v1
Parameters264.2M575.6M
Encoder layers1224
Embedding dimension7681024
Configured max_len16,3848,192
规格Base v1Large v1
参数264.2M575.6M
编码器层数1224
嵌入维度7681024
配置的最大长度16,3848,192

GLiFormer-base starts from a DeBERTa backbone further pretrained on 100 billion tokens. The paper documents 1,357,671 examples for broad multitask training and 372,090 for task-focused post-training.

GLiFormer-base 基于 DeBERTa 骨干网络,并在 1000 亿个 token 上进行了进一步预训练。论文记录了用于广泛多任务训练的 1,357,671 个示例和用于任务聚焦后训练的 372,090 个示例。

Benchmarks

基准测试

All scores below are reported by Knowledgator.

以下所有分数均由 Knowledgator 报告。

  • Nested JSON (500 examples): Large scores 91.10 F1 and Base 87.20. GPT-5.6-luna scores 91.96 and GPT-5-mini 82.56. The metric is order-free and boundary-tolerant, not exact JSON match.
  • Classification (13 datasets): Large reaches 75.03 mean macro-F1 and Base 72.36. GLiNER2.5 scores 64.89, while GPT-5-mini leads at 79.79.
  • CrossNER (5 domains): Base averages 65.10 F1 and Large 64.35. Gemma-4-31B-IT reaches 70.74.
  • Relations (4 benchmarks): Large averages 21.33 micro-F1 and Base 18.94. GLiNER-Relex reaches 25.6 and Gemma-4-31B-IT 25.08.
  • 嵌套 JSON(500 个示例):Large 得分为 91.10 F1,Base 为 87.20。GPT-5.6-luna 得分为 91.96,GPT-5-mini 为 82.56。该指标是无序且边界容忍的,并非精确的 JSON 匹配。
  • 分类(13 个数据集):Large 达到 75.03 的平均宏 F1,Base 为 72.36。GLiNER2.5 得分为 64.89,而 GPT-5-mini 以 79.79 领先。
  • CrossNER(5 个领域):Base 平均 F1 为 65.10,Large 为 64.35。Gemma-4-31B-IT 达到 70.74。
  • 关系(4 个基准):Large 平均微 F1 为 21.33,Base 为 18.94。GLiNER-Relex 达到 25.6,Gemma-4-31B-IT 为 25.08。

On combined NER and classification aggregates, the paper reports Large beats Gemma-4-E4B with about 14× fewer parameters.

在组合 NER 和分类聚合方面,论文报告 Large 以约少 14 倍的参数击败了 Gemma-4-E4B。

Speed Without Token Generation

无 Token 生成的速度

Knowledgator timed GLiFormer-base on 40 structuring documents at batch size 1. Median latency was 69 ms on an NVIDIA RTX PRO 6000 Blackwell GPU in FP16. On an 8-thread AMD EPYC 9B45 CPU in FP32, it was 547 ms.

Knowledgator 在批量大小为 1 的情况下对 40 份结构化文档计时了 GLiFormer-base。在 NVIDIA RTX PRO 6000 Blackwell GPU 上使用 FP16 时,中位延迟为 69 毫秒。在 8 线程 AMD EPYC 9B45 CPU 上使用 FP32 时,为 547 毫秒。

The key claim ‘up to 95.8× faster’ figure is an analytical estimate, not a measured LLM run. It assumes prefill at 2,000 input tokens per second and generation at 60 output tokens per second. It excludes queueing, network delay, and hidden reasoning, and assumes nothing about accuracy parity.

关键声明“快达 95.8 倍”的数据是分析估算值,而非测量的 LLM 运行结果。它假设预填充速度为每秒 2,000 个输入 token,生成速度为每秒 60 个输出 token。它排除了排队、网络延迟和隐藏推理,并且不对准确性等同性做任何假设。

Using It

使用方法

The GitHub repo and model card show a short structuring call:

GitHub 仓库和模型卡片展示了一个简短的结构化调用:

代码 · 6
records = model.structure(
    "Alice works at Acme.",
    {"employee": ["name", "company"]},
)
print(records)
# {'employee': [{'name': 'Alice', 'company': 'Acme'}]}
代码 · 6
records = model.structure(
    "Alice works at Acme.",
    {"employee": ["name", "company"]},
)
print(records)
# {'employee': [{'name': 'Alice', 'company': 'Acme'}]}

Nested Pydantic schemas work for multilevel records. One inference call can also run entities, classes, and structures together. Use joint_relations for relations, since the v1 checkpoints lack an open relation head.

嵌套 Pydantic 模式适用于多级记录。一次推理调用也可以同时运行实体、类别和结构。使用 joint_relations 进行关系提取,因为 v1 检查点缺少开放的关系头。

Key Takeaways

关键要点

  • GLiFormer runs NER, classification, relations, nested JSON, and embeddings on one encoder.
  • Large hits 91.10 structuring F1, close to GPT-5.6-luna at 91.96.
  • Base reports 69 ms median GPU latency with zero generated output tokens.
  • Relation extraction still trails GLiNER-Relex and larger LLMs.
  • Apache 2.0 weights install via pip and self-host on CPU or GPU.
  • GLiFormer 在一个编码器上运行 NER、分类、关系、嵌套 JSON 和嵌入。
  • Large 达到 91.10 的结构化 F1,接近 GPT-5.6-luna 的 91.96。
  • Base 报告的中位 GPU 延迟为 69 毫秒,且没有生成的输出 token。
  • 关系提取仍落后于 GLiNER-Relex 和更大的 LLM。
  • Apache 2.0 权重可通过 pip 安装,并在 CPU 或 GPU 上自托管。

Check out the Paper, Model Weights, GitHub Repo, and Docs. All credit goes to the researcher of this project. 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.

查看论文、模型权重、GitHub 仓库和文档。所有功劳归于本项目的研究者。此外,欢迎在 Twitter 上关注我们,别忘了加入我们有 15 万+成员的 ML SubReddit 并订阅我们的新闻通讯。等等!你在 Telegram 上吗?现在你也可以加入我们 Telegram 群组。

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us

需要与我们合作推广您的 GitHub 仓库、Hugging Face 页面、产品发布或网络研讨会等吗?请与我们联系

The post Knowledgator Releases GLiFormer: A 575M-Parameter Encoder That Hits 91.10 F1 on Nested JSON Extraction Without Generating Tokens appeared first on MarkTechPost.

MarkTechPost 上首先刊登的文章《Knowledgator 发布 GLiFormer:一款在嵌套 JSON 提取中无需生成 Token 即可达到 91.10 F1 分数的 5.75 亿参数编码器》。

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件