TRANSFORMER PORTFOLIO · PROJECT 04

Long-Document Question Answering

An evidence-grounded Document AI system combining a QASPER-fine-tuned Longformer evaluation pipeline with a free, serverless browser QA demonstration.

LongformerQASPERTransformers.jsONNX RuntimeEvidence Grounding
Transparent deployment: the live Static Space runs a browser-compatible DistilBERT QA Transformer over retrieved document chunks. The linked Longformer model is the separately trained and evaluated Python model.
REAL BENCHMARK

QASPER evaluation results

200 evaluation examples
Exact Match12.50%Fine-tuned Longformer
Token F126.66%vs. 16.16% base Longformer
Evidence Recovery49.00%vs. 30.00% base Longformer
Evidence Token Recall60.14%vs. 45.88% base Longformer
ModelExact MatchToken F1Evidence RecoveryEvidence Token Recall
BERT truncated to 5121.50%7.37%26.00%41.34%
Base Longformer + windows6.00%16.16%30.00%45.88%
QASPER-fine-tuned Longformer12.50%26.66%49.00%60.14%
STEP 1

Provide a document

Sourcepasted-text
Characters0
Words0
PrivacyBrowser only
STEP 2

Ask a focused question

ModelNot loaded
InferenceNot started
Choose a sample, upload a document, or paste text to begin.
STEP 3

Inspect grounded output

Total chunks
QA candidates
Latency
Runtime
Answer
No answer generated yet.
Confidence proxy
Supporting paragraph
No supporting paragraph selected yet.
Highlighted evidence
Highlighted evidence will appear here.
Diagnostics and candidate answers
{}
SYSTEM DESIGN

Long-document processing flow

Document input
Overlapping chunks
Lexical candidate retrieval
Browser Transformer QA
Answer + supporting evidence
MODEL DISCLOSURE

Core model versus live browser model

ComponentEvaluated Python projectLive Static Space
Modelanmol-unitmole/longformer-qasper-document-qaXenova/distilbert-base-cased-distilled-squad
Context strategyLongformer sparse attention + sliding windowsRetrieval over overlapping short chunks
Inference locationPython / PyTorchVisitor browser / ONNX Runtime
PurposeTraining, benchmarking, long-context evaluationFree interactive portfolio demonstration
Responsible use: This educational demo can return incomplete or incorrect answers. The confidence value is an uncalibrated model score. Do not upload confidential, proprietary, sensitive, regulated, or personally identifiable documents. Always review the supporting evidence.