--- license: cc-by-nc-4.0 language: - bn - en base_model: xlm-roberta-base pipeline_tag: text-classification library_name: onnxruntime tags: - bengali - bangla - information-extraction - event-extraction - onnx - int8 - quantized - news --- # newsintel-event-type Multi-label event-type router: accident / disaster / crime (a document may fire several). Part of **NewsIntel AI** — a CPU-deployable, LLM-free pipeline that extracts structured public-safety events (accidents, disasters, crimes) from Bangladeshi news in **Bengali and English**. This model is stage **2 · router — accident/disaster/crime** of that chain: ``` document → relevance gate → event-type router → evidence selection → NER → relation extraction → knowledge graph → structured event JSON ``` ## Model details | | | |---|---| | Base model | `xlm-roberta-base` | | Task | `event_type` | | Input | `text` | | Max length | 256 | | Format | ONNX INT8 (dynamic quantization), ~279 MB | | Version | `cf651b4757647` | | Languages | Bengali (primary, ~96% of training corpus), English | ### Labels - `accident` - `disaster` - `crime` ### Thresholds - `accident`: 0.675 - `disaster`: 0.75 - `crime`: 0.55 ### Decision rule ``` p = sigmoid(logits); fired[i] = p[i] >= thresholds[labels[i]] ``` These values also ship machine-readable in `model_manifest.json`, so a serving process can consume the model without hardcoding anything. ## Evaluation | Metric | Value | |---|---| | macro-F1 | 0.8841 | ## Usage ```python from huggingface_hub import snapshot_download import onnxruntime as ort, numpy as np from transformers import AutoTokenizer d = snapshot_download("saidylive/newsintel-event-type", revision="cf651b4757647", allow_patterns=["model_int8.onnx", "*.json", "*.model"]) tok = AutoTokenizer.from_pretrained(d) sess = ort.InferenceSession(f"{d}/model_int8.onnx", providers=["CPUExecutionProvider"]) enc = tok("সাভারে বাস-ট্রাকের সংঘর্ষে নিহত ২", return_tensors="np") logits = sess.run(None, {k: v for k, v in enc.items() if k in {i.name for i in sess.get_inputs()}})[0] # decision rule (from model_manifest.json): # p = sigmoid(logits); fired[i] = p[i] >= thresholds[labels[i]] ``` ## Training data & provenance Trained on the **`bd_eng_news_daily`** Kaggle corpus of Bangladeshi news (~713k articles, ~96% Bengali by character ratio). Labels are **silver, not human-annotated**: a teacher LLM produced structured event annotations, which were distilled into these small models. No manual annotation was performed at any stage. This matters for how you read the metrics: they measure **agreement with LLM-generated labels**, not with human ground truth. There is no human-labelled evaluation set. ## Limitations & bias - **Silver labels cap the ceiling.** Systematic teacher-LLM errors are inherited. - **Domain-specific.** Tuned to Bangladeshi public-safety news; expect degradation on other domains, regions, or registers. - **Opinion pieces leak through.** Editorials and foreign wire stories are sometimes classified as events by the upstream gate/router. - **Entity noise.** NER tags some generic Bengali nouns (e.g. রাজধানীর "of the capital", সদর "HQ") as locations. - **No calibration.** Confidence-style outputs are uncalibrated; do not read them as probabilities of correctness. - **INT8 quantization** trades a little accuracy for ~4× size reduction and CPU speed. - **Not for high-stakes use.** Casualty counts and event classifications are unverified model output and must not be used for emergency response, journalism, or policy without human review. ## License Released under **cc-by-nc-4.0** — free to share and adapt **for non-commercial purposes** with attribution. Note that the training corpus consists of copyrighted news articles and the labels were LLM-distilled; downstream users are responsible for their own compliance. ## Citation ```bibtex @software{newsintel_ai, title = {NewsIntel AI: distilled multilingual event extraction for Bangladeshi news}, author = {Md. Sheikh Saidy}, year = {2026}, url = {https://huggingface.co/saidylive/newsintel-event-type} } ```