ONNX Model Zoo

Mozilla/tinybert-uncased-autofill

By Mozilla · ↓ 4 · ♥ 2 · Updated 2025-01-17

What's in this repo

This page lists the files in Mozilla/tinybert-uncased-autofill, including model.onnx, model_bnb4.onnx, model_fp16.onnx and more.

  • 8 ONNX models (.onnx files)
  • 17 files, including 8 .onnx, 5 .json, 1 .md, 1 .safetensors, 1 .txt
  • Last updated 2025-01-17

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_bnb4.onnx — Download
onnx/model_fp16.onnx — Download
onnx/model_int8.onnx — Download
onnx/model_q4.onnx — Download
onnx/model_q4f16.onnx — Download
onnx/model_quantized.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

Cross-Encoder for MS Marco with TinyBert

This is a fine-tuned version of the model checkpointed at cross-encoder/ms-marco-MiniLM-L-4-v2.

It was fine-tuned on html tags and labels generated using Fathom.

How to use this model in transformers

from transformers import pipeline

classifier = pipeline(
	"text-classification",
	model="Mozilla/tinybert-uncased-autofill"
)

print(
	classifier('Card information input Card number cc-number <SEP> <SEP> input First name <SEP> <SEP>')
)

Model Training Info

HyperParameters = {
    'learning_rate': 2.3878733582558547e-05,
    'num_train_epochs': 21,
    'weight_decay': 0.0005288040458920454,
    'per_device_train_batch_size': 32
}

More information on how the model was trained can be found here: https://github.com/mozilla/smart_autofill

Model Performance

Test Performance:
Precision: 0.913
Recall: 0.872
F1: 0.887

             precision    recall  f1-score   support

      cc-csc      0.943     0.950     0.946       139
      cc-exp      1.000     0.883     0.938        60
cc-exp-month      0.954     0.922     0.938        90
 cc-exp-year      0.904     0.934     0.919        91
     cc-name      0.835     0.989     0.905        92
   cc-number      0.953     0.970     0.961       167
     cc-type      0.920     0.940     0.930       183
       email      0.918     0.927     0.922       205
  given-name      0.727     0.421     0.533        19
   last-name      0.833     0.588     0.690        17
       other      0.994     0.994     0.994      8000
 postal-code      0.980     0.951     0.965       102

    accuracy                          0.985      9165
   macro avg      0.913     0.872     0.887      9165
weighted avg      0.986     0.985     0.985      9165

Model info

text-classification transformers
transformers onnx safetensors bert text-classification en dataset:Mozilla/autofill_dataset base_model:cross-encoder/ms-marco-MiniLM-L4-v2 base_model:quantized:cross-encoder/ms-marco-MiniLM-L4-v2 license:apache-2.0 text-embeddings-inference endpoints_compatible
↓ 4 ♥ 2

Created: 2024-10-18

Updated: 2025-01-17

View on Hugging Face

Files (17)

.gitattributes
README.md
config.json
model.safetensors
onnx/model.onnx ONNX
onnx/model_bnb4.onnx ONNX
onnx/model_fp16.onnx ONNX
onnx/model_int8.onnx ONNX
onnx/model_q4.onnx ONNX
onnx/model_q4f16.onnx ONNX
onnx/model_quantized.onnx ONNX
onnx/model_uint8.onnx ONNX
quantize_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models