CoolFace
Modelpublic

RavinduSen/JaneGPT-v2

sourceHugging Facemitupdated 6mo agoView on Hugging Face
2likes9downloads
Model Card

JaneGPT v2 — Intent Classification Model

A lightweight, fast, and accurate intent classification model built from scratch for virtual assistant command understanding.

7.8M parameters | 22 intent classes | 88.6% validation accuracy | ~17ms inference on GPU

[image]


Why I Built This

I'm building JANE — a fully offline, privacy-first AI voice assistant. Llama 3 8B was causing 10–22 second delays for simple commands like "turn up the volume."

That's not a voice assistant. That's a waiting game.

So I designed JaneGPT v2 from scratch — a model that does exactly one job, does it fast, and runs on consumer hardware without any cloud dependency.


Model Details

PropertyValue
ArchitectureDecoder-only Transformer + Classification Head
Parameters~7.8M
Embedding dim256
Attention heads8
KV heads (GQA)4
Layers8
FF hidden dim672
Max sequence length256
Vocab size8,192
TokenizerCustom BPE
Training accuracy~96.7%
Validation accuracy88.6%
Checkpoint size~30MB

Architecture Decisions & Why

ChoiceReason
GQA (4 KV heads, 8 attention heads)Reduces memory without losing expressiveness
RoPE positional encodingBetter length generalization than learned embeddings
SwiGLU activationSmoother gradients than ReLU at this model size
RMSNormSimpler and faster than LayerNorm
Custom BPE tokenizerTrained specifically on command-style text

Supported Intents (22 classes)

CategoryIntents
Volumevolume_up, volume_down, volume_set, volume_mute
Brightnessbrightness_up, brightness_down, brightness_set
Mediamedia_play, media_pause, media_next, media_previous
Appsapp_launch, app_close, app_switch
Browserbrowser_search
Productivityset_reminder, screenshot
Screenread_screen, explain_screen
Controlundo, quit_jane
Conversationchat

Performance

InputPredicted IntentConfidence
"increase the volume"volume_up86%
"make it louder"volume_up90%
"turn down the brightness"brightness_down80%
"open chrome"app_launch98%
"play some music"media_play96%
"search for cats on youtube"browser_search94%
"set a reminder for 5 minutes"set_reminder96%
"take a screenshot"screenshot88%
"undo that"undo92%
"hello"chat97%

Quick Start

Installation

python
git clone https://huggingface.co/RavinduSen/JaneGPT-v2
cd JaneGPT-v2
pip install -r requirements.txt

Basic Usage

python
from classifier import JaneGPTClassifier

classifier = JaneGPTClassifier()

intent, confidence = classifier.predict("turn up the volume")
print(f"Intent: {intent}, Confidence: {confidence:.2%}")
# Output: Intent: volume_up, Confidence: 86.10%

intent, confidence = classifier.predict("open chrome")
print(f"Intent: {intent}, Confidence: {confidence:.2%}")
# Output: Intent: app_launch, Confidence: 98.10%

With Conversation Context

python
intent, confidence = classifier.predict(
    "not enough",
    context={"last_intent": "volume_up"}
)
# Output: Intent: volume_up, Confidence: 79.00%

Training Setup

ComponentDetails
HardwareNVIDIA RTX 3050Ti (4GB VRAM)
CPUAMD Ryzen 9 5900HX
RAM16GB
AdditionalGoogle Colab (extended training runs)
FrameworkPyTorch 2.0+
Training dataCustom command dataset (claude assisted generation under author supervision)

Limitations

  • Intent classification only — does not generate text
  • 22 classes — commands outside supported set classified as chat
  • English only
  • Optimized for short inputs (1–15 words)
  • No entity extraction — returns intent label only

Use Cases

  • Virtual assistant command routing
  • Smart home intent classification
  • Voice command understanding
  • Chatbot intent detection
  • Edge device deployment (small enough for embedded systems)

Part of the JANE Project

This model is the intelligence core of JANE — a fully offline, privacy-first AI voice assistant.

🔗 JANE AI Assistant on GitHub 🔗 JaneGPT-v2 on GitHub


Created By

Ravindu Senanayake — Computer Science Undergraduate, Sri Lanka

Built from scratch — architecture, tokenizer, and training pipeline designed and implemented by the author.

![GitHub](https://github.com/Ravindu-S)