Hinglish Smart-Home NLU β€” deployed INT8 ONNX bundle

On-device joint intent + sub-action + slot NLU for bilingual (English / Hindi / code-switched Hinglish) smart-home voice commands. Distilled from a 12-layer MuRIL teacher to a 6-layer student, task-vocab pruned, and dynamic-INT8 quantised to ONNX. Runs torch-free on onnxruntime + a NumPy CRF Viterbi decoder β€” built to fit a Raspberry Pi 4 (≀50 MB flash, ≀512 MB RAM for the whole voice pipeline).

Dataset: Chapsi/hinglish-smart-home-nlu.

Bundle contents

  • model_int8.onnx β€” quantised encoder + intent/sub-action/slot heads
  • crf.npz β€” CRF transition/start/end params (slot decoding, NumPy Viterbi)
  • tokenizer/ β€” WordPiece tokenizer (pruned task vocab; load with tokenizers, not transformers)
  • label_maps.json, intents_v1.yaml, normalisation.yaml, thresholds.json

Offline evaluation (test split)

Offline evaluation (test)

Device: cpu (torch 2.13.0+cpu)

Model comparison

model size IA en/hi/hing Slot F1 SEM OOD FAR
INT8 ONNX (deployed) 48MB 0.990/0.988/0.997 0.893 0.911 0.009

Gate scorecard β€” INT8 ONNX (deployed)

Gate Target Actual Status
IA English >=0.98 0.9900 βœ…
IA Hindi >=0.94 0.9883 βœ…
IA Hinglish >=0.94 0.9966 βœ…
SEM_full >=0.80 0.9112 βœ…
Slot F1 >=0.85 0.8935 βœ…
OOD FAR <0.05 0.0095 βœ…
Bundle size ≀50 MB 48.3 MB βœ…

Overall: ALL GATES PASS βœ…

These are honest numbers: the deployed INT8 model currently passes all gates. Improvement plan tracked in the source repo's nlu-improvement-plan.md. Use accordingly β€” this is a dissertation research artifact, not a production model.

Usage

The runtime lives in the source repo (pipeline/nlu/infer.py), torch-free:

from tokenizers import Tokenizer
import onnxruntime as ort, numpy as np, json
# load model_int8.onnx + tokenizer/tokenizer.json + crf.npz + label_maps.json,
# run the encoder, argmax the intent/sub-action heads, Viterbi-decode slots with the CRF params.
# See pipeline/nlu/infer.py for the reference implementation.

Attribution

Trained on our own hand-authored/synthesised utterances plus filtered public corpora used at training time only (MASSIVE-Hindi, MTOP-Hindi, CoMTIC, Hinglish-TOP) β€” those are not redistributed here. Base encoder: google/muril-base-cased. M.Tech dissertation artifact.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support