Smartwatch LM v0.1

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.

Model details

Property Value
Architecture 6-layer causal GPT (~12M params)
Context length 256 tokens
Vocab size 3524 (BPE)
Export version 0.1

Files in this repo

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

ONNX inference

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?"

PyTorch chat

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?"))

Prompt format

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.

Documentation

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

Intended use

On-device smartwatch / wearable assistant demos. Not intended for general-purpose chat or safety-critical applications.

Limitations

  • Trained on synthetic data; behavior on real user phrasing may vary
  • Does not output real metric values โ€” only intents and slot tokens
  • Small 12M model with limited reasoning capability
Downloads last month
34
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ 1 Ask for provider support