Downloads · 30 days
14
10% of all-time downloads
prathamkode/smartwatch-lm-0.1
smartwatch-lm-0.1 is a text generation model from prathamkode. Use it when you need the model to write or continue text. It is set up for onnxruntime. The card lists the license as mit.
Small GPT-style language model trained for wrist-wearable assistant chat. The model learns conversational replies and emits intent tags such as <INTENT:GETSTEPS that your app can parse and route to device handlers.
Downloads · 30 days
14
10% of all-time downloads
All-time downloads
135
Public
Repo size
104 MB
Likes
5
Public
Click a slice to open those files.
.onnx54.1 MB · 52%
From the Hugging Face model README
Small GPT-style language model trained for wrist-wearable assistant chat. The model learns conversational replies and emits intent tags such as <INTENT:GET_STEPS> that your app can parse and route to device handlers.
| Property | Value |
|---|---|
| Architecture | 6-layer causal GPT (~12M params) |
| Context length | 256 tokens |
| Vocab size | 3524 (BPE) |
| Export version | 0.1 |
| File | Purpose |
|---|---|
smartwatch_lm_merged.onnx | On-device inference (ONNX Runtime, opset 17) |
checkpoint.pt | PyTorch weights for fine-tuning or local chat |
tokenizer.json | BPE tokenizer (Hugging Face Tokenizers format) |
tokenizer_config.json | Tokenizer metadata |
config.json | Model architecture and ONNX I/O names |
model.py | PyTorch model definition + checkpoint loader |
chat.py | Interactive PyTorch chat |
reply_utils.py | Gibberish cleanup, intent parse, slot fill |
onnx_sample.py | ONNX generate + cleanup sample script |
config.py | Generation defaults |
Inputs: input_ids — int64 tensor, shape [batch, seq] (max seq = 256)
Outputs: logits — float tensor, shape [batch, seq, vocab_size]
Works with ONNX Runtime (CPU, WASM, WebGPU). The merged ONNX file is a single ~52 MB artifact.
import numpy as np
import onnxruntime as ort
session = ort.InferenceSession("smartwatch_lm_merged.onnx", providers=["CPUExecutionProvider"])
x = np.zeros((1, 8), dtype=np.int64)
logits = session.run(None, {"input_ids": x})[0]
print(logits.shape) # (1, 8, 3524)
Quick chat with cleanup:
pip install numpy onnxruntime tokenizers
python onnx_sample.py "How many steps today?"
pip install torch tokenizers
python chat.py
from chat import ChatSession
bot = ChatSession(temperature=0.5, max_new_tokens=40, top_k=40)
print(bot.say("How many steps have I taken today?"))
user: How many steps have I taken today?
bot: <INTENT:GET_STEPS> You're at <STEPS_TODAY> of <STEP_GOAL> — keep going!
The model predicts the next token. Slot placeholders like <STEPS_TODAY> are filled by your runtime with live sensor data.
| Guide | Description |
|---|---|
| Avoiding gibberish | Special characters to strip, truncation rules, sample scripts |
| Intent reference | All 35 intents and slot placeholders |
| Smartwatch integration | End-to-end device wiring |
On-device smartwatch / wearable assistant demos. Not intended for general-purpose chat or safety-critical applications.