Instructions to use Thibault-GAREL/opener-zs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Thibault-GAREL/opener-zs with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Thibault-GAREL/opener-zs", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - GLiNER
How to use Thibault-GAREL/opener-zs with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("Thibault-GAREL/opener-zs") - Notebooks
- Google Colab
- Kaggle
OPENER-ZS — zero-shot open-world NER
This repo hosts the contrastively fine-tuned Matryoshka embedder of OPENER, used in its zero-shot operating point (OPENER-ZS). It needs no target labels: you give it text and the candidate type names.
OPENER is a three-stage pipeline:
GLiNER-L (frozen detector) → this fine-tuned embedder → label-name prototypes (+ transductive refine + detector fusion).
Usage (turnkey)
pip install opener-ner
from opener import OpenerZS
m = OpenerZS.from_pretrained("Thibault-GAREL/opener-zs") # + auto-downloads GLiNER-L
ents = m.predict(
"Marie Curie discovered radium at the University of Paris.",
labels=["person", "discovery", "organization", "location"],
)
Each detected mention is typed by cosine similarity to the nearest label-name
prototype, transductively refined on the unlabelled inputs, and fused with GLiNER's
own zero-shot label (score += β·detector_score, β = 0.05).
How it was trained
- Base:
nomic-ai/nomic-embed-text-v1.5(Matryoshka, Apache-2.0). - Stage 1: Triplet margin loss (margin 1) on CoNLL-2003 training spans.
- Stage 2: error-driven hard-negative mining (8000 triplets, 65% hard, 3 epochs) on the type pairs the model most often confuses.
- Mentions are embedded in context (
[ENT] … [/ENT], task prefixclassification:).
Results (13-dataset benchmark)
OPENER-ZS reaches 39.4 end-to-end AMI, the best of the compared zero-shot systems (ahead of GLiNER-L 38.9 and a zero-shot OWNER 34.3), at ~180 ms / 1.7 Wh per sentence.
License & credits
MIT. Base embedder Apache-2.0 (nomic-ai/nomic-embed-text-v1.5); detector GLiNER
(urchade/gliner_large-v2.1). From the OPENER research code (LyRIDS Symposium 2026).
- Downloads last month
- 37
Model tree for Thibault-GAREL/opener-zs
Base model
nomic-ai/nomic-embed-text-v1.5