bluryar / uie-base-ONNX

huggingface.co
Total runs: 30
24-hour runs: 0
7-day runs: 3
30-day runs: 6
Model's Last Updated: December 15 2024
feature-extraction

Introduction of uie-base-ONNX

Model Details of uie-base-ONNX

UIE ONNX模型使用指南

本指南介绍如何使用和导出UIE (Universal Information Extraction) 模型的ONNX版本。

模型说明

UIE模型是一个通用信息抽取模型,基于BERT架构。该模型可以导出为ONNX格式以实现更快的推理速度。

模型输入

模型接受以下输入张量:

  • input_ids : 形状为 [batch_size, sequence_length] 的整型张量
  • attention_mask : 形状为 [batch_size, sequence_length] 的整型张量
  • token_type_ids : 形状为 [batch_size, sequence_length] 的整型张量

其中:

  • batch_size : 批处理大小,可变
  • sequence_length : 序列长度,可变
  • 所有输入张量的数据类型均为 int64
模型输出

模型输出以下张量:

  • start_prob : 形状为 [batch_size, sequence_length] 的浮点张量,表示每个位置作为实体开始的概率
  • end_prob : 形状为 [batch_size, sequence_length] 的浮点张量,表示每个位置作为实体结束的概率
使用示例
import onnxruntime as ort

tokenizer = AutoTokenizer.from_pretrained("xusenlin/uie-base")
session = ort.InferenceSession("path/to/model.onnx")


intput = "张三与B公司签订了一份合同,约定了合同金额为100万元,合同期限为一年。"
schema = ["人名", "公司", "金额", "时间"]
input_ids_tensor, attention_mask, token_type_ids, offsets_mapping = tokenizer(
    intput,
    schema[0],
    return_tensors="pt",
    return_offsets_mapping=True,
    add_special_tokens=True
)
inputs = {
    "input_ids": input_ids_tensor, # shape: [batch_size, sequence_length]
    "attention_mask": attention_mask, # shape: [batch_size, sequence_length]
    "token_type_ids": token_type_ids # shape: [batch_size, sequence_length]
}
outputs = session.run(None, inputs)
start_probs, end_probs = outputs

# use offsets_mapping and start_probs, end_probs to get the entities
# ...

Runs of bluryar uie-base-ONNX on huggingface.co

30
Total runs
0
24-hour runs
0
3-day runs
3
7-day runs
6
30-day runs

More Information About uie-base-ONNX huggingface.co Model

uie-base-ONNX huggingface.co

uie-base-ONNX huggingface.co is an AI model on huggingface.co that provides uie-base-ONNX's model effect (), which can be used instantly with this bluryar uie-base-ONNX model. huggingface.co supports a free trial of the uie-base-ONNX model, and also provides paid use of the uie-base-ONNX. Support call uie-base-ONNX model through api, including Node.js, Python, http.

uie-base-ONNX huggingface.co Url

https://huggingface.co/bluryar/uie-base-ONNX

bluryar uie-base-ONNX online free

uie-base-ONNX huggingface.co is an online trial and call api platform, which integrates uie-base-ONNX's modeling effects, including api services, and provides a free online trial of uie-base-ONNX, you can try uie-base-ONNX online for free by clicking the link below.

bluryar uie-base-ONNX online free url in huggingface.co:

https://huggingface.co/bluryar/uie-base-ONNX

uie-base-ONNX install

uie-base-ONNX is an open source model from GitHub that offers a free installation service, and any user can find uie-base-ONNX on GitHub to install. At the same time, huggingface.co provides the effect of uie-base-ONNX install, users can directly use uie-base-ONNX installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

uie-base-ONNX install url in huggingface.co:

https://huggingface.co/bluryar/uie-base-ONNX

Url of uie-base-ONNX

uie-base-ONNX huggingface.co Url

Provider of uie-base-ONNX huggingface.co

bluryar
ORGANIZATIONS

Other API from bluryar

huggingface.co

Total runs: 2.0K
Run Growth: 1.1K
Growth Rate: 56.20%
Updated:April 21 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 18 2025