GLiNER-MoE-MultiLingual (safetensors, transformers-loadable)
This is a safetensors conversion of
Mayank6255/GLiNER-MoE-MultiLingual,
re-packaged to load through transformers.AutoModel with trust_remote_code=True -- no separate
git clone of the original fork needed, since that
fork's gliner package is vendored directly into this repo (gliner_lib/).
- Architecture, weights, and training: unchanged -- all credit to the original author, Mayank Rakesh, and to the underlying GLiNER and Sparse-MoE embedding work it builds on.
- Original model card: see the source repo for supported languages, benchmark numbers, and citations.
- License: apache-2.0, inherited from the original.
- Code change vs. the original fork: one import (
onnxruntime) was made optional in the vendored copy so normal torch inference doesn't require it installed. No other logic was changed. - Per the original model card, this checkpoint was trained for a single epoch and scores ~43% average F1 across its zero-shot NER benchmark suite -- treat it as a research/proof-of-concept checkpoint rather than a production-grade NER model.
Requirements
pip install "transformers>=4.38.2,<=4.45.2" safetensors sentencepiece torch
(version range matches the original fork's own requirements.txt; untested outside it)
Loading
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("masterofaudio2077/gliner-moe-multilingual-transformers", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("masterofaudio2077/gliner-moe-multilingual-transformers")
entities = model.predict_entities(
"Cristiano Ronaldo plays for Al Nassr.",
["Person", "Team"],
threshold=0.3,
)
for e in entities:
print(e["text"], "=>", e["label"])