🚀 gliner_small_news-v2.1 模型卡片
本模型是對 GLiNER 進行微調後的成果,旨在提高其在廣泛主題下的準確性,尤其在長上下文新聞實體提取方面表現出色。如下表所示,在 18 個基準數據集上,這些微調後的模型相較於基礎 GLiNER 模型的零樣本準確率最高提升了 7.5%。

基礎數據集 AskNews-NER-v0 的設計目標是通過強化國家、語言、主題和時間的多樣性,來實現全球視角的多元化。用於微調此模型的所有數據均為合成生成。在對開放網絡新聞文章進行翻譯和總結時,使用了 WizardLM 13B v1.2;而在實體提取方面,則使用了 Llama3 70b instruct。關於數據多元化和微調方法的詳細內容,請參考我們發表在 ArXiv 上的論文。
🚀 快速開始
使用以下代碼即可開始使用該模型:
from gliner import GLiNER
model = GLiNER.from_pretrained("EmergentMethods/gliner_small_news-v2.1")
text = """
The Chihuahua State Public Security Secretariat (SSPE) arrested 35-year-old Salomón C. T. in Ciudad Juárez, found in possession of a stolen vehicle, a white GMC Yukon, which was reported stolen in the city's streets. The arrest was made by intelligence and police analysis personnel during an investigation in the border city. The arrest is related to a previous detention on February 6, which involved armed men in a private vehicle. The detainee and the vehicle were turned over to the Chihuahua State Attorney General's Office for further investigation into the case.
"""
labels = ["person", "location", "date", "event", "facility", "vehicle", "number", "organization"]
entities = model.predict_entities(text, labels)
for entity in entities:
print(entity["text"], "=>", entity["label"])
輸出結果如下:
Chihuahua State Public Security Secretariat => organization
SSPE => organization
35-year-old => number
Salomón C. T. => person
Ciudad Juárez => location
GMC Yukon => vehicle
February 6 => date
Chihuahua State Attorney General's Office => organization
✨ 主要特性
- 對 GLiNER 進行微調,提高了在廣泛主題下的準確性,特別是長上下文新聞實體提取。
- 基於合成數據進行訓練,數據來源廣泛且具有多樣性。
- 模型體積小巧,適用於高吞吐量的生產場景。
💻 使用示例
基礎用法
from gliner import GLiNER
model = GLiNER.from_pretrained("EmergentMethods/gliner_small_news-v2.1")
text = """
The Chihuahua State Public Security Secretariat (SSPE) arrested 35-year-old Salomón C. T. in Ciudad Juárez, found in possession of a stolen vehicle, a white GMC Yukon, which was reported stolen in the city's streets. The arrest was made by intelligence and police analysis personnel during an investigation in the border city. The arrest is related to a previous detention on February 6, which involved armed men in a private vehicle. The detainee and the vehicle were turned over to the Chihuahua State Attorney General's Office for further investigation into the case.
"""
labels = ["person", "location", "date", "event", "facility", "vehicle", "number", "organization"]
entities = model.predict_entities(text, labels)
for entity in entities:
print(entity["text"], "=>", entity["label"])
📚 詳細文檔
模型詳情
模型描述
本新聞微調模型的合成數據來自 AskNews API。我們在國家、語言、主題和時間方面都進行了多樣化處理。
國家分佈情況:

實體類型:

主題:

模型來源(可選)
使用方式
直接使用
顧名思義,該模型旨在進行通用實體提取。儘管我們使用新聞數據對其進行了微調,但它在 18 個基準數據集上的準確率最高提升了 7.5%。這意味著廣泛且多樣化的基礎數據集有助於模型識別和提取更多類型的實體。
該模型體積小巧,可用於高吞吐量的生產場景。這也是我們將其許可為 Apache 2.0 的原因之一。目前,AskNews 正在其系統中使用此微調模型進行實體提取。
偏差、風險和侷限性
儘管數據集的目標是減少偏差並提高多樣性,但它仍然偏向於西方語言和國家。這一侷限性源於 Llama2 在翻譯和摘要生成方面的能力。此外,由於使用 Llama2 對開放網絡文章進行摘要,Llama2 訓練數據中的任何偏差也會存在於該數據集中。同樣,由於使用 Llama3 從摘要中提取實體,Llama3 中存在的任何偏差也會出現在當前數據集中。

模型訓練詳情
訓練數據集為 AskNews-NER-v0。
其他訓練細節可在 配套論文 中找到。
環境影響
- 硬件類型:1xA4500
- 使用時長:10 小時
- 碳排放:0.6 千克(根據 機器學習影響計算器)
引用信息
BibTeX:待添加
APA:待添加
模型作者
Elin Törnquist,Emergent Methods,郵箱:elin at emergentmethods.ai
Robert Caulk,Emergent Methods,郵箱:rob at emergentmethods.ai
模型聯繫方式
Elin Törnquist,Emergent Methods,郵箱:elin at emergentmethods.ai
Robert Caulk,Emergent Methods,郵箱:rob at emergentmethods.ai
📄 許可證
本模型採用 Apache 2.0 許可證。