SpanMarker XLM-RoBERTa Base FewNERD (ONNX)

ONNX export of tomaarsen/span-marker-xlm-roberta-base-fewnerd-fine-super for browser-based inference.

Model Details

  • Base model: XLM-RoBERTa Base (multilingual, 10+ languages)
  • Training data: FewNERD fine-grained supervised
  • Entity types: 66 types + O (including building-hotel, building-airport, location-GPE, location-park, location-bodiesofwater, location-mountain, etc.)
  • Quantization: INT8 dynamic quantization on encoder

Files

File Size Description
encoder.onnx ~266 MB XLM-RoBERTa encoder (INT8 quantized)
classifier.onnx 0.4 MB Linear classifier (1536 -> 67 classes)
labels.json 2 KB ID to label mapping
tokenizer.json 17 MB SentencePiece tokenizer

Inference

SpanMarker uses a custom architecture:

  1. Tokenize input and enumerate all spans (up to entity_max_length=8 tokens)
  2. Insert start/end marker tokens into the sequence
  3. Run encoder to get hidden states
  4. Extract start marker embeddings from [start_idx : start_idx + n_pairs]
  5. Extract end marker embeddings from [start_idx + n_pairs : start_idx + n_pairs*2]
  6. Concatenate start+end -> (n_pairs, 1536) features
  7. Pad to (256, 1536) and run classifier -> (256, 67) logits
  8. Softmax + filter non-O predictions above threshold

Limitations

  • Fixed sequence length of 512 (batch=1)
  • Longer texts need to be chunked (the original model does this internally with batching)
  • INT8 quantization slightly reduces scores (~0.05-0.1 lower) but maintains correct predictions

License

CC-BY-SA-4.0 (same as original model)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Berk/span-marker-xlm-roberta-base-fewnerd-onnx

Dataset used to train Berk/span-marker-xlm-roberta-base-fewnerd-onnx