tumblit-nlp-intent

Tiny intent classifier for the tumblit app's on-device NLP pipeline.

Model Details

  • Base model: prajjwal1/bert-mini (4 layers, 256 hidden, 11.3M params)
  • Task: 11-class intent classification
  • INT8 ONNX size: 11.75 MB (fits <30MB PWA budget)
  • Training data: ~1,350 examples mapped from tumblit's 30K+ NLP training corpus + synthetic data

Intents (11 classes)

ID Intent Description
0 log_mood Log mood/emotion
1 log_cycle Log menstrual cycle data
2 log_expense Log expense/spending
3 log_symptom Log health symptom
4 query_mood Query mood history/trends
5 query_expense Query expense history
6 query_cycle Query cycle predictions/history
7 set_reminder Set a reminder/alarm
8 delete_data Delete/erase data
9 export_data Export/download data
10 help Help/FAQ/instructions

Performance

Metric Value
Val F1 (weighted) 0.8952
Val Accuracy 0.8966
Smoke Test (20 phrases) 19/20 (95%)
INT8 ONNX Size 11.75 MB

Usage

ONNX Runtime (recommended for on-device)

from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline

model = ORTModelForSequenceClassification.from_pretrained(
    "tumbleet/tumblit-nlp-intent", subfolder="onnx-int8"
)
tokenizer = AutoTokenizer.from_pretrained(
    "tumbleet/tumblit-nlp-intent", subfolder="onnx-int8"
)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
result = classifier("feeling happy today")
# [{'label': 'log_mood', 'score': 0.764}]

Transformers.js (browser/PWA)

import { pipeline } from '@xenova/transformers';
const classifier = await pipeline(
    'text-classification',
    'tumbleet/tumblit-nlp-intent',
    { quantized: true }
);
const result = await classifier('feeling happy today');

Training

Fine-tuned prajjwal1/bert-mini for 15 epochs on ~1,350 intent examples derived from tumblit's production NLP training data (30K+ examples, 246 intents mapped to 11 target classes) plus synthetic examples for underrepresented intents.

License

MIT

Downloads last month
3
Safetensors
Model size
11.2M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Evaluation results