ONNX Model Zoo

dewdev/mdeberta-v3-base-squad2-onnx

By dewdev · ↓ 3 · ♥ 1 · Updated 2025-02-20

What's in this repo

This page lists the files in dewdev/mdeberta-v3-base-squad2-onnx, including model.onnx, model_int16.onnx, model_int4.onnx and more.

  • 7 ONNX models (.onnx files)
  • 17 files, including 7 .onnx, 5 .json, 1 .md, 1 .safetensors, 1 .bin, 1 .py
  • Last updated 2025-02-20

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_int16.onnx — Download
onnx/model_int4.onnx — Download
onnx/model_int8.onnx — Download
onnx/model_uint16.onnx — Download
onnx/model_uint4.onnx — Download
onnx/model_uint8.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

this is a clone of https://huggingface.co/timpal0l/mdeberta-v3-base-squad2 and converted to onnx formats.

This model can be used for Extractive QA

It has been finetuned for 3 epochs on SQuAD2.0.

Usage

from transformers import pipeline

qa_model = pipeline("question-answering", "timpal0l/mdeberta-v3-base-squad2")
question = "Where do I live?"
context = "My name is Tim and I live in Sweden."
qa_model(question = question, context = context)
# {'score': 0.975547730922699, 'start': 28, 'end': 36, 'answer': ' Sweden.'}

Evaluation on SQuAD2.0 dev set

{
    "epoch": 3.0,
    "eval_HasAns_exact": 79.65587044534414,
    "eval_HasAns_f1": 85.91387795001529,
    "eval_HasAns_total": 5928,
    "eval_NoAns_exact": 82.10260723296888,
    "eval_NoAns_f1": 82.10260723296888,
    "eval_NoAns_total": 5945,
    "eval_best_exact": 80.8809904826076,
    "eval_best_exact_thresh": 0.0,
    "eval_best_f1": 84.00551406448994,
    "eval_best_f1_thresh": 0.0,
    "eval_exact": 80.8809904826076,
    "eval_f1": 84.00551406449004,
    "eval_samples": 12508,
    "eval_total": 11873,
    "train_loss": 0.7729689576483615,
    "train_runtime": 9118.953,
    "train_samples": 134891,
    "train_samples_per_second": 44.377,
    "train_steps_per_second": 0.925
}

DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing

DeBERTa improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. With those two improvements, DeBERTa out perform RoBERTa on a majority of NLU tasks with 80GB training data.

In DeBERTa V3, we further improved the efficiency of DeBERTa using ELECTRA-Style pre-training with Gradient Disentangled Embedding Sharing. Compared to DeBERTa, our V3 version significantly improves the model performance on downstream tasks. You can find more technique details about the new model from our paper.

Please check the official repository for more implementation details and updates.

mDeBERTa is multilingual version of DeBERTa which use the same structure as DeBERTa and was trained with CC100 multilingual data. The mDeBERTa V3 base model comes with 12 layers and a hidden size of 768. It has 86M backbone parameters with a vocabulary containing 250K tokens which introduces 190M parameters in the Embedding layer. This model was trained using the 2.5T CC100 data as XLM-R.

Model info

pytorch onnx safetensors deberta-v2 deberta deberta-v3 mdeberta question-answering qa multilingual af am
↓ 3 ♥ 1

Created: 2025-02-20

Updated: 2025-02-20

View on Hugging Face

Files (17)

.gitattributes
README.md
added_tokens.json
config.json
model.safetensors
onnx/model.onnx ONNX
onnx/model_int16.onnx ONNX
onnx/model_int4.onnx ONNX
onnx/model_int8.onnx ONNX
onnx/model_uint16.onnx ONNX
onnx/model_uint4.onnx ONNX
onnx/model_uint8.onnx ONNX
pytorch_model.bin
special_tokens_map.json
to_onnx.py
tokenizer.json
tokenizer_config.json

Related models