Topos Facts v0.1 · reader

Topos Facts reads one message and writes structured facts about its author, such as a goal, a move or a new job, across 27 fact packs. It uses two small encoders and no generative model.

This repo holds the reader: a DeBERTa-v3-large extractive question-answering model that fills the free-text fields of a fact by copying a span out of the message. It cannot write text that is not in the message. If no span clears its threshold, the field is left empty. The facts themselves are decided by the gate, Dialogues/topos-facts-gate-v0.1, whose card describes the whole pipeline, its evaluation and its limitations.

Try it: use the widget on this page with a question in the form below, or run the whole pipeline in the Dialogues/topos-facts Space.

Questions

The reader was trained on one question per free-text field:

  • What <field> of the author's <predicate> does the message state?, for example What destination of the author's trip does the message state?
  • What does the message state about the author's <predicate>?, for single-value predicates such as medication or allergy.

All the questions are listed in topos_facts_spec.json in the gate repo. A span is kept when its start and end score beats the "no answer" score by at least -6.0, it is at most 30 tokens long, and the input is capped at 512 tokens.

Usage

from transformers import pipeline

qa = pipeline("question-answering", model="Dialogues/topos-facts-reader-v0.1")
qa(question="What destination of the author's trip does the message state?",
   context="Finally booked it: two weeks in Lisbon at the end of May.", handle_impossible_answer=True)

For the full gate-then-reader pipeline, use topos_facts.py from the gate repo.

In the browser

onnx/model_fp16.onnx is an fp16 ONNX export for transformers.js, which is what the Space runs:

import { AutoModelForQuestionAnswering, AutoTokenizer } from "@huggingface/transformers";
const model = await AutoModelForQuestionAnswering.from_pretrained("Dialogues/topos-facts-reader-v0.1", { dtype: "fp16", device: "webgpu" });

With both models in fp16, the pipeline matches PyTorch on the gold set (1,079 of 1,080 pairs identical). There is no int8 export: quantizing to int8 moves the gate's scores far enough to break its 0.985–0.99 thresholds.

Training

  • Base: deepset/deberta-v3-large-squad2 by deepset, licensed under CC-BY-4.0. This model is a fine-tuned derivative of it.
  • Data: private and not released. A question's answer is the fact's value where the message contains it, and it is marked unanswerable where the value is only implied. No example on this page comes from the training data.
  • Fine-tuning: AdamW at learning rate 1e-5, batch size 16, 512 tokens, 4 epochs, seed 13.

Licence and attribution

CC-BY-4.0, inherited from the base model. If you use or redistribute this model, credit deepset for deberta-v3-large-squad2 and Dialogues for this fine-tune, and link to the licence.

Made by Dialogues for Topos.

Downloads last month
35
Safetensors
Model size
0.4B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Dialogues/topos-facts-reader-v0.1

Quantized
(1)
this model

Space using Dialogues/topos-facts-reader-v0.1 1