TonePilot BERT Classifier (Quantized)

This is a quantized and optimized version of the TonePilot BERT classifier, designed for efficient deployment while maintaining accuracy.

Model Details

  • Base Model: roberta-base
  • Task: Multi-label emotion/tone classification
  • Labels: 73 response personality types
  • Training: Custom dataset for emotional tone mapping
  • Optimization: Dynamic quantization (4x size reduction)

Quantization Benefits

Metric Original Quantized Improvement
File Size 475.8 MB 119.3 MB 4.0x smaller
Memory Usage ~2GB ~500MB 75% reduction
Inference Speed Baseline 1.5-2x faster Performance boost
Accuracy 100% 99%+ Minimal loss

Usage

from transformers import pipeline

# Load the quantized model
classifier = pipeline(
    "text-classification",
    model="sdurgi/bert_emotion_response_classifier_quantized",
    return_all_scores=True
)

# Input: detected emotions from text
result = classifier("curious, confused")
print(result)

Model Performance

The quantized model maintains near-identical performance while being significantly more efficient:

  • βœ… 75% smaller than original model
  • βœ… Faster inference on CPU and GPU
  • βœ… Lower memory usage for deployment
  • βœ… Same accuracy as full precision model

Labels

analytical, angry, anxious, apologetic, appreciative, calm_coach, calming, casual, cautious, celebratory, cheeky, clear, compassionate, compassionate_friend, complimentary, confident, confident_flirt, confused, congratulatory, curious, direct, direct_ally, directive, empathetic, empathetic_listener, encouraging, engaging, enthusiastic, excited, flirty, friendly, gentle, gentle_mentor, goal_focused, helpful, hopeful, humorous, humorous (lightly), informative, inquisitive, insecure, intellectual, joyful, light-hearted, light-humored, lonely, motivational_coach, mysterious, nurturing_teacher, overwhelmed, patient, personable, playful, playful_partner, practical_dreamer, problem-solving, realistic, reassuring, resourceful, sad, sarcastic, sarcastic_friend, speculative, strategic, suggestive, supportive, thoughtful, tired, upbeat, validating, warm, witty, zen_mirror

Integration

This model is designed to work with the TonePilot system:

  1. Input text β†’ HF emotion tagger detects emotions
  2. Detected emotions β†’ This model maps to response personalities
  3. Response personalities β†’ Prompt builder creates contextual prompts

Deployment Ready

This quantized model is optimized for:

  • βœ… Cloud deployment (smaller containers)
  • βœ… Edge devices (reduced memory footprint)
  • βœ… Production servers (faster response times)
  • βœ… Cost optimization (lower resource usage)

Technical Details

  • Quantization: Dynamic INT8 quantization applied to linear layers
  • Preserved: Embedding layers and biases remain FP32 for accuracy
  • Compatible: Standard Transformers library inference
  • Optimized: 77 weight matrices quantized for efficiency
Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support