Most AI tasks no longer need a frontier model Read launch post

GLiNER relex Large

An open extraction model that pulls entities, and the relations between them, out of text. knowledgator/gliner-relex-large-v1.0

  • Accuracy

    FewRel, F1 · not measured

  • Time per request

    Not timed one request at a time

  • Serverless price

    $0.22

    per 1M tokens

Call it

from sie_sdk import SIEClient
​
client = SIEClient(api_key="API keysk-sie-…")
​
text = "textDavid Michael Draiman (born March 13, 1973) is an American singer who is best known as the lead vocalist of the band···named "The Vengeful One". They produced it over a year before, and along with it announced a new album, Immortalized."
result = client.extract(
"modelknowledgator/gliner-relex-large-v1.0",
{"text": text},
labels=[
"person", "organization", "location", "date",
"work, product or event",
],
options={
"relation_labels": [
"country of citizenship", "notable work",
"part of", "performer", "publication date",
"participant of", "member of",
"country of origin", "date of birth",
"cast member", "inception", "record label",
],
"threshold": 0.3,
"relation_threshold": 0.7,
},
)
for relation in result["relations"]:
print(relation["head"], relation["relation"], relation["tail"])
import { SIEClient } from '@superlinked/sie-sdk';

const client = new SIEClient(undefined, { apiKey: 'sk-sie-…' });

const text = "David Michael Draiman (born March 13, 1973) is an American singer who is best known as the lead vocalist of the band···named \"The Vengeful One\". They produced it over a year before, and along with it announced a new album, Immortalized.";
const result = await client.extract(
  'knowledgator/gliner-relex-large-v1.0',
  { text },
  {
    labels: [
      "person", "organization", "location", "date",
      "work, product or event",
    ],
    adapterOptions: {
      relation_labels: [
        "country of citizenship", "notable work",
        "part of", "performer", "publication date",
        "participant of", "member of",
        "country of origin", "date of birth",
        "cast member", "inception", "record label",
      ],
      threshold: 0.3,
      relation_threshold: 0.7,
    },
  },
);
for (const relation of result.relations) {
  console.log(relation.head, relation.relation, relation.tail);
}
curl https://api.superlinked.com/v1/extract/knowledgator%2Fgliner-relex-large-v1.0 \
  -H "Authorization: Bearer sk-sie-…" \
  -H "Content-Type: application/json" \
  -d "{\"items\":[{\"text\":\"David Michael Draiman (born March 13, 1973) is an American singer who is best known as the lead vocalist of the band···\\\"The Vengeful One\\\". They produced it over a year before, and along with it announced a new album, Immortalized.\"}],\"params\":{\"labels\":[\"person\",\"organization\",\"location\",\"date\",\"work, product or event\"],\"options\":{\"relation_labels\":[\"country of citizenship\",\"notable work\",\"part of\",\"performer\",\"publication date\",\"participant of\",\"member of\",\"country of origin\",\"date of birth\",\"cast member\",\"inception\",\"record label\"],\"threshold\":0.3,\"relation_threshold\":0.7}}}"
Build the "Knowledge graph" capability into my app using the Superlinked Inference Engine (SIE).

Context
- SIE is an OpenAI-style inference API. Python SDK: `from sie_sdk import SIEClient`; TypeScript: `@superlinked/sie-sdk`.
- Base URL: https://api.superlinked.com (or my regional endpoint). Auth: Bearer key from env `SIE_API_KEY` (never hard-code it).
- Model: knowledgator/gliner-relex-large-v1.0 (SIE primitive: /extract). Keep the model id configurable.

Task
- Input: a block of text.
- Behaviour: return the relations the text states between entities of the named types, each as its head, relation type and tail
- Send the one /extract call shown in the SDK snippet: the entity types as labels and the relation types in options.relation_labels, with the thresholds it names. Read each relation's head, relation and tail from the returned item's relations.

Deliverables
- A typed client wrapper, an application-level function for this task, error handling for timeouts/empty input, and unit tests with a stubbed client.
- Wire it into my existing stack (ask me which framework if unclear) and add a short usage example.

Next to the other relation models

Next to the other relation models
Model FewRel, F1 Time per request Serverless price Size
gliner2 large v1 fastino 0.435 Not timed $0.186 per 1M tokens 486M
gliner2 base v1 fastino 0.400 Not timed $0.0929 per 1M tokens 208M
glirel large v0 jackboyla 0.264 Not timed Run in your cloud 467M
All 4 relation models

Facts

Size
467M parameters
License
Apache-2.0
Reads
Text, up to 2,048 tokens
Endpoint
extract
Evaluation
Accuracy
Run on SIE against the public dataset named in each figure
Prices
Serverless list prices

Run GLiNER relex Large on Serverless or in your own cloud

SIE Cluster

Kubernetes in your own cloud, backed by our engineers.

  • Terraform modules for your cloud
  • Apache-2.0, same engine as Serverless
  • GPU workers scale to zero between jobs
  • Separate worker pools for each tenant
Agent prompt Deploy SIE to our AWS account with the superlinked/sie/aws Terraform module. Docs: superlinked.com/docs/deployment.Deploy SIE to our Google Cloud project with the superlinked/sie/google Terraform module. Docs: superlinked.com/docs/deployment.Deploy SIE to our Azure subscription with the superlinked/sie/azure Terraform module. Docs: superlinked.com/docs/deployment.Deploy SIE to our Alibaba Cloud account with the superlinked/sie/alicloud Terraform module. Docs: superlinked.com/docs/deployment.

SIE Local

The open-source server on your own machine.

  • NVIDIA
  • One container, no cluster
  • Process your data fully offline
  • Same SDK and model IDs as Serverless
docker run --gpus all -p 8080:8080 ghcr.io/superlinked/sie-server:latest-cuda12-default

Talk to us

Tell us about your use case and we'll get back to you shortly.

Apply for an inference grant

Free capacity on our hosted cluster for selected projects. Tell us what you run and we reply by email.