CoolFace
Modelpublic

cstr/gliner-deberta-GGUF

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes237downloads
Model Card

GLiNER DeBERTa-v3 GGUF

GGUF conversions of urchade/gliner_medium-v2.1 for CrispEmbed inference.

Zero-shot Named Entity Recognition — detect arbitrary entity types at inference time, no retraining needed. Apache-2.0 licensed.

Model variants

FileQuantSizeNotes
gliner-deberta-f32.ggufF32747 MBFull precision
gliner-deberta-q8_0.ggufQ8_0198 MBRecommended
gliner-deberta-q4_k.ggufQ4_K152 MBMax compression

Q80 produces identical entities to F32. Q4K may merge adjacent spans at high compression.

Architecture

DeBERTa-v3-base encoder (12 layers, 768 hidden, disentangled attention with log-bucketed relative positions) + 768-to-512 linear projection + BiLSTM (hidden=256) + GLiNER markerV0 span-label matching head (start+end concatenation).

209M parameters. Based on microsoft/deberta-v3-base with SentencePiece tokenizer (128K vocab).

Usage

bash
# CLI
./crispembed -m gliner-deberta-q8_0.gguf \
  --ner "Tim Cook announced the new iPhone in Cupertino" \
  --ner-labels "person,organization,location,product" --json

# Auto-download
./crispembed -m gliner-deberta \
  --ner "Barack Obama was born in Hawaii" --json

# Server
./crispembed-server --ner gliner-deberta-q8_0.gguf --port 8080
curl -X POST http://localhost:8080/ner/extract \
  -d '{"text": "Tim Cook at Apple", "labels": ["person", "organization"]}'
python
from crispembed import CrispNER

ner = CrispNER("gliner-deberta-q8_0.gguf")
entities = ner.extract(
    "Apple Inc. was founded by Steve Jobs in Cupertino, California",
    labels=["person", "organization", "location"],
)
for e in entities:
    print(f"{e['text']} => {e['label']} ({e['score']:.2f})")
# Apple Inc. => organization (1.00)
# Steve Jobs => person (1.00)
# Cupertino => location (0.99)
# California => location (0.97)

Parity

C++ output matches Python GLiNER library (gliner==0.2.26) — same entities detected on all test inputs. Scores within 0.02-0.09 of PyTorch reference (expected for F32 precision differences in DeBERTa disentangled attention).

License

Apache-2.0 — fully permissive, no revenue cap.

Conversion

bash
python models/convert-gliner-deberta-to-gguf.py \
  --model /path/to/gliner_medium-v2.1 \
  --output gliner-deberta-f32.gguf
./crispembed-quantize gliner-deberta-f32.gguf gliner-deberta-q8_0.gguf q8_0
./crispembed-quantize gliner-deberta-f32.gguf gliner-deberta-q4_k.gguf q4_k

Provenance and EU AI Act Art. 53 note

  • —Upstream model: urchade/gliner_medium-v2.1 — published by urchade.
  • —Upstream licence: apache-2.0. This repository redistributes under the same terms; it grants no rights the upstream licence does not.
  • —What was done here: format conversion and/or quantisation only (GGUF/GGML). No training, no fine-tuning, no merging, no distillation, no change to architecture, vocabulary or capability. Only the numeric representation of the upstream weights differs.
  • —Training data: documented — where it is documented at all — by the upstream provider; see the upstream model card. No training data was used, added or selected by this repository.
  • —Provider status: under Regulation (EU) 2024/1689 the upstream authors remain the provider of this model. Converting the serialisation format does not make this repository the provider of a new general-purpose AI model, and no such claim is made. Questions about training content, copyright policy or model capability belong upstream.