gliner-relex-large-v1.0

69
license:apache-2.0
by
knowledgator
Other
OTHER
New
69 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Code Examples

📦 Installationbash
pip install gliner -U
📦 Installationpython
from gliner import GLiNER

# Load the model
model = GLiNER.from_pretrained("knowledgator/gliner-relex-large-v1.0")

# Define your entity types and relation types
entity_labels = ["location", "person", "date", "structure"]
relation_labels = ["located in", "designed by", "completed in"]

# Input text
text = "The Eiffel Tower, located in Paris, France, was designed by engineer Gustave Eiffel and completed in 1889."

# Run inference - returns both entities and relations
entities, relations = model.inference(
    texts=[text],
    labels=entity_labels,
    relations=relation_labels,
    threshold=0.3,
    relation_threshold=0.5,
    return_relations=True,
    flat_ner=False
)

# Print entities
print("Entities:")
for entity in entities[0]:
    print(f"  {entity['text']} -> {entity['label']} (score: {entity['score']:.3f})")

# Print relations
print("\nRelations:")
for relation in relations[0]:
    head = relation["head"]["text"]
    tail = relation["tail"]["text"]
    rel_type = relation["relation"]
    score = relation["score"]
    print(f"  {head} --[{rel_type}]--> {tail} (score: {score:.3f})")

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.