GLiNER2
Safetensors
Chinese
English
extractor
intent-classification
slot-filling
information-extraction
home-robot
chinese
Instructions to use Icerm/gliner2-robot-multi-v11 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use Icerm/gliner2-robot-multi-v11 with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("Icerm/gliner2-robot-multi-v11") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - Notebooks
- Google Colab
- Kaggle
gliner2-robot-multi-v11
面向家用机器人语音指令的中文/英文意图识别与槽位抽取模型。基于 fastino/gliner2-multi-v1 (mDeBERTa-v3-base 编码器)全参数微调,可直接理解中文,无需先翻译成英文。
支持的意图(10 类)
go_to(导航)、bring(取物)、set_device(设备控制)、find_person
(找人)、stop(停止)、clean(清扫)、set_medication_reminder
(用药提醒)、query_medication(用药查询)、patrol(巡逻)、
check_status(状态查询)。
训练方式
- 训练数据:22,000 条中英均衡语料(每意图、每语言各 1,000 条,另含等量 界外负例),来源包括能力模板生成、Amazon MASSIVE(CC-BY-4.0)、 GPSRCmdGen(MIT)语法扩展,以及经过槽位字面校验的本地 LLM 改写增强。
- 训练配置:3 个 epoch、batch 8、encoder lr 1e-5、task lr 5e-4,
官方
GLiNER2TrainerAPI。 - 本仓库为按端到端管线指标(而非验证损失)选出的 epoch-2 检查点。
评测结果(110 条配对中文保留集)
| 指标 | 数值 |
|---|---|
| 意图准确率 | 91% |
| 槽位 F1 | 90.5% |
| 完全匹配 | 83% |
| 界外拒绝率 | 90% |
同一保留集的英文版本:意图 98%、完全匹配 83%。
使用
配套推理代码(含意图/槽位模式构建、中文分词与能力接地校验)见发布仓库;
也可直接用 gliner2 库加载:
from gliner2 import GLiNER2
model = GLiNER2.from_pretrained("Icerm/gliner2-robot-multi-v11")
schema = model.create_schema()
schema = schema.classification("intent", {"set_device": "操作家中设备", "check_status": "查询设备状态"})
schema = schema.entities({"device": "要操作的设备", "state": "目标状态", "location": "房间"})
print(model.extract("厨房 的 灯 现在 还 开着 吗", schema, include_confidence=True))
注意:中文输入需要先按词分隔(推理代码使用 jieba,并把领域词表注入 分词器),推理时的实体描述应与部署配置保持一致。
- Downloads last month
- 14
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for Icerm/gliner2-robot-multi-v11
Base model
fastino/gliner2-multi-v1