kniv v8 tiny (ettin-encoder-17m)

One English encoder for full linguistic analysis and knowledge extraction. Name your entity types and relations at inference time, or give none and get schema-free facts.

  • Linguistic layer: part of speech, morphology, lemmas, named entities, dependency trees, semantic roles, dialogue act and sentiment per sentence, coreference.
  • Knowledge layer: entities of the types you name, facts for the relations you name (a name plus an optional description), and for every fact its polarity, modality, holder and time. In a conversation each speaker is an entity, so "I live in Berlin" yields (user, lives in, Berlin).
  • Fact verifier (new in v8): reads every candidate fact again in its context, decides whether the text states it, and sets its polarity and modality.
  • Schema-free facts (new in v8): (subject, predicate, object) facts decoded from the linguistic layer, with no relation schema needed. The verifier keeps the ones the text states, and each maps to the nearest known relation.

The tiny model is a distilled student. Its knowledge layer and verifier learned from the two v8 teachers (kniv-v8-xlarge-u-en and kniv-v8-xlarge-d-en). It is the smallest and fastest v8 model, built for CPUs and browsers.

The kniv v8 models, smallest first:

model base encoder role
kniv-v8-tiny-en (this model) ettin-encoder-17m distilled student
kniv-v8-small-en ettin-encoder-32m distilled student
kniv-v8-medium-en ettin-encoder-68m distilled student
kniv-v8-large-en ModernBERT-base distilled student
kniv-v8-xlarge-d-en deberta-v3-large teacher
kniv-v8-xlarge-u-en UltraBERT-380M teacher

What changed from v7.1

v8 keeps v7.1's encoder and linguistic layer and retrains the knowledge layer. Against kniv-v7-tiny-en (v7.1.2), the model of the same size:

  • 18 points more precise on held-out short texts at v7.1 tiny's recall, with 308 fewer false facts per 100 texts.
  • Stronger on new relations: CoNLL04 (mostly relations it never trained on) 0.203 -> 0.456 with gold entities; FewRel zero-shot 0.773 -> 0.849 (5-way).
  • Exact on 147 of 400 templated business conversations (v7.1: 22).
  • New outputs: schema-free facts and the fact verifier (above).

The tagging, parsing, NER, semantic-role, dialogue-act and coreference outputs are those of v7.1.2. v7 stays available at kniv-v7-tiny-en.

Upgrading from v7.1. Change the repository name and the import: v8's package is kniv_v8 (v7's is kniv_v7). The interface is the same, with new output fields (below). kniv_v7 does not run v8 models: it would skip the verifier. The two packages can be loaded in one process.

Model details

developed by Dragonscale (dragonscale-ai)
model type multi-task transformer encoder with a fact verifier
version kniv v8.0 (ettin-17m-s-v8f3t, verifier ettin-17m-s-v8f3t-ver3own), 2026-11-28
previous version kniv-v7-tiny-en (v7.1.2)
base model jhu-clsp/ettin-encoder-17m
input up to 1,024 subwords per window
language English
licence Apache-2.0

Uses

Intended. Analysing English prose and conversations; extracting entities and facts for your own schema without fine-tuning, or schema-free facts, for agent memory, knowledge graphs, search and document analytics.

Out of scope.

  • Languages other than English.
  • Acting on extracted facts without review where errors matter (medical, legal, financial or employment decisions about people).
  • Profiling individuals without their consent.

Installation

Everything needed to run the model is in this repository: the ONNX graphs, the tokenizer, the settings, and the kniv_v8 Python package that turns text into results. Download the repository and put it on your Python path.

pip install onnxruntime tokenizers numpy huggingface_hub
import sys
from huggingface_hub import snapshot_download

path = snapshot_download("dragonscale-ai/kniv-v8-tiny-en")    # includes kniv_v8/
sys.path.insert(0, path)
from kniv_v8 import Kniv

Quick start

kniv = Kniv(path)
out = kniv.analyse(
    turns=[("user", "I live in Berlin and work for Siemens."),
           ("assistant", "Nice, how long have you been there?")],
    relations=[{"name": "lives in", "description": "the place where the head resides"},
               {"name": "employer", "description": "the organization the head works for"}],
    entity_types=[{"name": "location"}, {"name": "organization"}, {"name": "person"}])

w = out[0]
for f in w["facts"]:
    print(w["entities"][f["head"]]["text"], f["relation"], w["entities"][f["tail"]]["text"],
          f["polarity"], f["modality"])
# user lives in Berlin positive asserted
# user employer Siemens positive asserted

A negated statement, and schema-free facts with open_facts=True:

out = kniv.analyse(
    "Henry Wager Halleck (January 16, 1815 โ€“ January 9, 1872) was a United States Army "
    "officer, scholar, and lawyer. He did not join the Confederate army.",
    relations=[{"name": "date of birth", "description": "date on which the subject was born"},
               {"name": "date of death", "description": "date on which the subject died"},
               {"name": "military branch", "description": "branch to which this person belongs"}],
    entity_types=[{"name": "person"}, {"name": "organization"}, {"name": "date"}],
    open_facts=True)

w = out[0]
for f in w["facts"]:
    print(w["entities"][f["head"]]["text"], f["relation"], w["entities"][f["tail"]]["text"],
          f["polarity"], f["modality"])
# Henry Wager Halleck date of birth January 16 , 1815 positive asserted
# Henry Wager Halleck date of death January 9 , 1872 positive asserted
# Henry Wager Halleck military branch United States Army positive asserted
# Henry Wager Halleck military branch Confederate army negative asserted
for f in w["open_facts"]:
    print(f["subject"]["text"], "|", f["predicate"]["text"], "|", f["object"]["text"],
          f["polarity"], "->", f["nearest_relation"]["name"])
# Henry Wager Halleck | join | the Confederate army negative -> military branch    (INT8 only, verifier 0.20 at the threshold; fp32 drops it)
# Henry Wager Halleck | was | a United States Army officer positive -> military branch

These are this model's outputs, the same in fp32 and INT8 unless a line says otherwise. (The first sentence is from the English Wikipedia article on Henry Halleck, CC BY-SA 4.0.) Pass text as kniv.analyse(text, ...) (paragraphs separated by blank lines) or a conversation as turns. analyse returns one record per window:

key content
tokens, sentences words; sentence spans (and speakers)
words per word: pos, morph, lemma, head (0 = root, else 1-based), deprel
ner [type, start, end) named-entity spans
srl frames: predicate and args as [role, start, end)
sentence_layers per sentence: dialogue acts (cls), sentiment
coref clusters of [start, end] word spans (inclusive)
entities type, text, mentions, spans (speakers first in a conversation)
facts head, relation, tail (indices into entities), margin, polarity, modality, holder, time; v8: verifier (the probability that the text states the fact, where the verifier read it) and verdict
open_facts with open_facts=True: subject, predicate, object, polarity, modality, holder, time, verifier, nearest_relation (name, similarity)

verdict is one of supported, not_supported, negated, hypothetical, planned, desired, questioned, reported; polarity and modality follow it. kniv.extract(...) returns entities and facts only. Without entity_types, entities get six coarse types (PER, ORG, LOC, TIME, NUM, MISC).

Settings

The verifier's settings are in calibration.json under "verifier" and can be changed on the Kniv object at run time. The guide says when to change them.

setting value effect
ver_threshold 0.6 a fact the verifier reads is kept at probability โ‰ฅ this
ver_veto 0.0 for the 96 common relations the model was trained on (place of birth, employer, ...), the relation margin decides; at 0 the verifier never vetoes them
open_threshold 0.2 schema-free facts are kept at verifier probability โ‰ฅ this
ver_speakers margin the relation margin alone decides facts with a speaker as an argument ("I live in ..."); the verifier reads every other fact

Lower ver_threshold for recall, raise it for precision. Kniv(path, verifier=False) turns the verifier off: decisions come from the relation margin alone, as in v7.1, at v7.1's speed.

Variants

variant load for
fp32 Kniv(path) reference
FP16 Kniv(path, variant="fp16") half the download; GPUs (providers=["CUDAExecutionProvider"])
INT8 Kniv(path, int8=True) CPU speed

int8=True loads block-wise 8-bit encoder passes and verifier, and tracks fp32 closely. On held-out texts 96.3% of facts are the same as fp32, the verifier's keep-or-drop decision changes on 0.45% of the facts it reads, and every linguistic and benchmark score is within 0.2 points.

PyTorch

model.pt holds the PyTorch weights of the encoder and its heads. They are used through the model code in kniv-nlp-models. The fact verifier is in the ONNX graphs only.

How it works

One encoder runs up to four times per window:

  1. Plain pass. Every linguistic head, coreference and the entity typer.
  2. Label pass. Your type and relation names become vectors, cached per schema.
  3. Marker pass. The window with every entity mention marked. Every entity pair is scored against every relation; the best candidates go on.
  4. Verifier pass (v8). The marked window again, with the candidate facts after it. A small adapter and head read each candidate in context and give a verdict: supported, not supported, negated, hypothetical, planned, desired, questioned or reported.

Schema-free facts are decoded by rules from the plain pass's parse, roles and coreference, then read by the verifier like any candidate.

Results

Scores are on held-out test data. The v7.1 column is kniv-v7-tiny-en, the model of the same size, in the same protocol.

benchmark v8 v7.1
part of speech (UD English EWT, UPOS accuracy) 0.968 0.968
lemma / morphology (exact match) 0.973 / 0.969 0.973 / 0.969
dependencies (UAS / LAS) 0.926 / 0.904 0.926 / 0.904
named entities (OntoNotes 5, F1) 0.818 0.818
semantic roles (end to end, F1) 0.754 0.754
dialogue acts (F1) 0.753 0.753
coreference (LitBank, CoNLL F1) 0.608 0.608
Facts in short texts: precision at v7.1's recall 0.403 (+18.2 [+14.8, +21.4] points) 0.221
Facts in short texts: false facts per 100 texts at that recall 220 (-308 [-378, -243]) 528
Business conversations, templated: exact / precision / recall 147 / 400, 0.723 / 0.496 22 / 400, 0.862 / 0.096
Business conversations, natural: exact / precision / recall 3 / 212, 0.151 / 0.468 4 / 212, 0.303 / 0.173
CoNLL04 relations, gold / predicted entities (F1) 0.456 / 0.316 0.203 / 0.157
Re-DocRED, gold / predicted entities (F1) 0.644 / 0.546 0.644 / 0.543
FewRel zero-shot, 5 / 10 / 15-way (macro F1) 0.849 / 0.699 / 0.627 0.773 / 0.609 / 0.487
CrossNER, entity types (mean F1 of 4 domains) 0.434 0.434
Few-NERD, entity types (F1) 0.429 0.429
Schema-free facts: precision / true facts per text 0.808 / 0.88 -

Facts in short texts is a fact-precision test on 500 held-out short texts (prose and conversations) with each text's own relation schema: every fact either model returns is checked by two LLM judges, and a fact counts as correct when both judges find the text states it. It reports precision at v7.1's recall (points, with a 95% paired bootstrap interval) and the false facts per 100 texts at that recall. Business conversations are held-out conversations with a known set of facts each, templated and natural; a conversation counts as exact when its facts are exactly the expected ones. CoNLL04 relations are mostly ones the model never trained on, read with the verifier at its default threshold. Schema-free facts are judged the same way on a sample of the held-out short texts: the precision of the facts kept at open_threshold and the true facts kept per text.

Speed

CPU time against v7.1 of the same size (INT8, the same machine):

text v8 / v7.1
100 short texts 2.33x
one 500-word window 3.07x

The verifier pass accounts for most of the added time. Where speed matters more than precision, Kniv(path, verifier=False) runs at v7.1's speed.

Bias, risks and limitations

The guide covers the verifier's settings and the known failure modes and their workarounds.

  • Coverage. People, places and organisations from well-covered regions are recognised and related more reliably than others.
  • Privacy. The model extracts facts about people, speakers included. Store and use them with the consent and data-protection care that implies.
  • Facts are candidates. Each fact carries its confidence (verifier, margin). Treat it as a candidate, not verified truth, and keep a human in the loop where facts about people drive decisions.
  • Natural conversations. The tiny is exact on 3 of 212 natural business conversations; it finds about half their facts, and many of the facts it returns there are wrong. For conversational memory, use a larger v8 model.
  • Speaker facts skip the verifier (ver_speakers), so they have v7.1-style precision.
  • Schema-free facts come from rules over the parse and roles, so they miss facts the parse gets wrong. Their predicates are the text's own words, and the nearest known relation they map to is not always the right one; check nearest_relation before relying on it.
  • Entity grouping is rule-based. Partial names ("Obama" / "Barack Obama") are not merged.
  • Per-window facts. Facts are not linked across windows or documents.
  • Long windows. Text past 1,024 subwords in a window is not analysed.
  • English only.

Changelog

v8.0 (2026-11-28). First v8 release: the fact verifier, schema-free facts, a retrained knowledge layer and leading articles trimmed from reported mentions ("the relationship" -> "relationship"). The linguistic layer is v7.1.2's.

Licence

Apache-2.0. The base encoder (jhu-clsp/ettin-encoder-17m) is MIT.

Citation

@misc{kniv_v8_2026,
  title        = {kniv v8: one encoder for linguistic analysis, schema-conditioned and schema-free knowledge extraction},
  author       = {{Dragonscale}},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/dragonscale-ai/kniv-v8-tiny-en}}
}

Contact

Questions and issues: https://github.com/rustic-ai/kniv-nlp-models/issues.

Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for dragonscale-ai/kniv-v8-tiny-en

Quantized
(17)
this model

Collection including dragonscale-ai/kniv-v8-tiny-en

Article mentioning dragonscale-ai/kniv-v8-tiny-en