ONNX Model Zoo

dean2023/cn-roberta-wwm-ext-car

By dean2023 · ↓ 0 · ♥ 0 · Updated 2025-02-23

What's in this repo

This page lists the files in dean2023/cn-roberta-wwm-ext-car, including cn_roberta_v1.onnx.

  • 1 ONNX models (.onnx files)
  • 8 files, including 3 .json, 1 .md, 1 .onnx, 1 .rknn, 1 .txt
  • Last updated 2025-02-23

ONNX files

File Size Download
cn_roberta_v1.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Chinese-RoBERTa-wwm-ext RKNN Deployment Model

基于 hfl/chinese-roberta-wwm-ext 的领域适配训练模型,支持ONNX推理和RK3588芯片部署。

模型概述

本模型是基于 RoBERTa-wwm-ext 架构,在汽车领域中文文本数据上进行微调的预训练语言模型,特点包括:

  • 支持动态输入长度(最大 128 tokens)
  • 提供PyTorch/ONNX/RKNN三种格式
  • 针对RK3588芯片进行内核优化

主要特性

✅ 领域适配:使用汽车论坛、维修手册等专业语料微调
✅ 部署友好:提供量化后的ONNX/RKNN模型
✅ 硬件加速:RKNN模型针对NPU计算单元优化

硬件要求

格式 最低要求
PyTorch CPU / NVIDIA GPU (显存 ≥4GB)
ONNX 支持ONNX Runtime的CPU/GPU环境
RKNN Rockchip RK3588开发板

快速开始

环境安装

pip install -r requirements.txt

Pytorch 推理

from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("dean2023/cn-roberta-wwm-ext-car")
model = AutoModelForSequenceClassification.from_pretrained("dean2023/cn-roberta-wwm-ext-car")

inputs = tokenizer("发动机异响可能的原因有哪些?", return_tensors="pt")
outputs = model(**inputs)

RK3588 推理

from rknnlite.api import RKNNLite

rknn = RKNNLite()
rknn.load_rknn('./models/cn_roberta_v1.rknn')
rknn.init_runtime()

If you want to go further, please refer to the code.

Model info

transformers onnx RKNN RK3588 zero-shot-classification en zh base_model:hfl/chinese-roberta-wwm-ext base_model:quantized:hfl/chinese-roberta-wwm-ext doi:10.57967/hf/4593 license:mit endpoints_compatible
↓ 0 ♥ 0

Created: 2025-02-22

Updated: 2025-02-23

View on Hugging Face

Files (8)

.gitattributes
README.md
cn_roberta_v1.onnx ONNX
cn_roberta_v1.rknn
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models