Upload folder using huggingface_hub
Browse files- .gitattributes +4 -35
- README.md +57 -0
- benchmark/README.md +100 -0
- benchmark/benchmark_prompts.json +487 -0
- benchmark/charts/head_to_head_wins.png +0 -0
- benchmark/charts/intent_accuracy_delta.png +3 -0
- benchmark/charts/overall_metrics.png +0 -0
- benchmark/charts/per_intent_accuracy.png +3 -0
- benchmark/report.json +1347 -0
- chat.py +127 -0
- checkpoint.pt +3 -0
- config.json +26 -0
- config.py +9 -0
- docs/avoiding-gibberish.md +190 -0
- docs/intent-reference.md +157 -0
- docs/smartwatch-integration.md +195 -0
- model.py +182 -0
- onnx_sample.py +95 -0
- reply_utils.py +124 -0
- smartwatch_lm_merged.onnx +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +4 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,4 @@
|
|
| 1 |
-
*.
|
| 2 |
-
*.
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
benchmark/charts/intent_accuracy_delta.png filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
benchmark/charts/per_intent_accuracy.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- onnx
|
| 5 |
+
- smartwatch
|
| 6 |
+
- intent-classification
|
| 7 |
+
- text-generation
|
| 8 |
+
- wearable
|
| 9 |
+
library_name: onnxruntime
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Smartwatch LM v0.2
|
| 14 |
+
|
| 15 |
+
Exported from [collab-run-2](../collab-run-2) training. Small GPT for wrist-wearable chat with intent tags like `<INTENT:GET_STEPS>`.
|
| 16 |
+
|
| 17 |
+
## Model details
|
| 18 |
+
|
| 19 |
+
| Property | Value |
|
| 20 |
+
|----------|-------|
|
| 21 |
+
| Architecture | 6-layer causal GPT (**~15.4M params**) |
|
| 22 |
+
| Context length | 256 tokens |
|
| 23 |
+
| Vocab size | 5533 (BPE) |
|
| 24 |
+
| Best val loss | 0.3243 |
|
| 25 |
+
| Training data | tinydata.txt, deepdata.txt, tinydata1.txt, data1.txt, data3.txt |
|
| 26 |
+
| Export version | 0.2 |
|
| 27 |
+
|
| 28 |
+
## Files
|
| 29 |
+
|
| 30 |
+
| File | Purpose |
|
| 31 |
+
|------|---------|
|
| 32 |
+
| `smartwatch_lm_merged.onnx` | On-device inference (ONNX Runtime, opset 17, ~0 MB) |
|
| 33 |
+
| `checkpoint.pt` | PyTorch weights |
|
| 34 |
+
| `tokenizer.json` | BPE tokenizer |
|
| 35 |
+
| `config.json` | Architecture + ONNX I/O |
|
| 36 |
+
| `model.py` / `chat.py` | PyTorch load + REPL |
|
| 37 |
+
| `reply_utils.py` | BPE cleanup, intent parse, slot fill |
|
| 38 |
+
| `onnx_sample.py` | ONNX generate sample |
|
| 39 |
+
|
| 40 |
+
## Quick start
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
pip install numpy onnxruntime tokenizers
|
| 44 |
+
python onnx_sample.py "How many steps today?"
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
pip install torch tokenizers
|
| 49 |
+
python chat.py
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## ONNX I/O
|
| 53 |
+
|
| 54 |
+
- **Input:** `input_ids` int64 `[batch, seq]` (max seq = 256)
|
| 55 |
+
- **Output:** `logits` float `[batch, seq, vocab_size]`
|
| 56 |
+
|
| 57 |
+
See [Export-0.1 docs](docs/) for gibberish cleanup, intents, and device integration.
|
benchmark/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Smartwatch LM Quality Benchmark
|
| 2 |
+
|
| 3 |
+
Side-by-side quality comparison for exported models (default: **Export-0.1** vs **export-0.2**).
|
| 4 |
+
|
| 5 |
+
## Setup
|
| 6 |
+
|
| 7 |
+
```bash
|
| 8 |
+
pip install -r benchmark/requirements.txt
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
Both export folders must contain `checkpoint.pt` and `tokenizer.json`.
|
| 12 |
+
|
| 13 |
+
## Run
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
python benchmark/benchmark_quality.py
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
Common options:
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
python benchmark/benchmark_quality.py --verbose
|
| 23 |
+
python benchmark/benchmark_quality.py --output benchmark/report.json
|
| 24 |
+
python benchmark/benchmark_quality.py --model-a Export-0.1 --model-b export-0.2 --seed 42
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
Generation defaults match production guidance: `max_new_tokens=40`, `temperature=0.5`, `top_k=40`, fresh history per prompt, fixed seed for reproducibility.
|
| 28 |
+
|
| 29 |
+
## Metrics
|
| 30 |
+
|
| 31 |
+
| Metric | Meaning |
|
| 32 |
+
|--------|---------|
|
| 33 |
+
| **Intent accuracy** | Predicted intent matches expected (or is in `expected_intents` for combo cases) |
|
| 34 |
+
| **Intent parse rate** | Reply contains a valid `<INTENT:...>` tag |
|
| 35 |
+
| **Clean output rate** | Raw decode has no BPE junk (`Ġ`, `Ċ`) before cleanup |
|
| 36 |
+
| **Slot presence** | Fraction of expected slot placeholders found in the cleaned template |
|
| 37 |
+
|
| 38 |
+
Checkpoint `best_val_loss` is printed for reference only. v0.1 and v0.2 used different tokenizers and training corpora, so val loss is **not** a fair head-to-head score.
|
| 39 |
+
|
| 40 |
+
## Golden prompts
|
| 41 |
+
|
| 42 |
+
[`benchmark_prompts.json`](benchmark_prompts.json) holds ~39 prompts (one per intent found in `tinydata.txt`, plus Colab demo prompts).
|
| 43 |
+
|
| 44 |
+
Regenerate after training data changes:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
python benchmark/extract_prompts.py
|
| 48 |
+
python benchmark/extract_prompts.py --data tinydata/tinydata.txt --output benchmark/benchmark_prompts.json
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
Each entry:
|
| 52 |
+
|
| 53 |
+
```json
|
| 54 |
+
{
|
| 55 |
+
"id": "get_steps_...",
|
| 56 |
+
"prompt": "How many steps today?",
|
| 57 |
+
"expected_intent": "GET_STEPS",
|
| 58 |
+
"expected_intents": ["GET_STEPS"],
|
| 59 |
+
"expected_slots": ["STEPS_TODAY", "STEP_GOAL"],
|
| 60 |
+
"source": "tinydata.txt"
|
| 61 |
+
}
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Output
|
| 65 |
+
|
| 66 |
+
The runner prints:
|
| 67 |
+
|
| 68 |
+
- Overall metric table for both models
|
| 69 |
+
- Per-intent accuracy breakdown
|
| 70 |
+
- Counts of prompts only v0.1 got right, only v0.2 got right, and both missed
|
| 71 |
+
|
| 72 |
+
With `--verbose`, it also prints per-prompt predicted intents and replies.
|
| 73 |
+
|
| 74 |
+
With `--output`, it writes a JSON report suitable for CI or regression tracking.
|
| 75 |
+
|
| 76 |
+
## Charts
|
| 77 |
+
|
| 78 |
+
By default the runner saves four PNG charts to `benchmark/charts/`:
|
| 79 |
+
|
| 80 |
+
| Chart | Description |
|
| 81 |
+
|-------|-------------|
|
| 82 |
+
| `overall_metrics.png` | Grouped bar chart of all four quality metrics |
|
| 83 |
+
| `per_intent_accuracy.png` | Side-by-side accuracy for each intent |
|
| 84 |
+
| `head_to_head_wins.png` | Prompts both got right, only v0.1, only v0.2, both wrong |
|
| 85 |
+
| `intent_accuracy_delta.png` | Per-intent delta (export-0.2 minus Export-0.1) |
|
| 86 |
+
|
| 87 |
+
```bash
|
| 88 |
+
python benchmark/benchmark_quality.py --output benchmark/report.json
|
| 89 |
+
python benchmark/benchmark_quality.py --no-charts
|
| 90 |
+
python benchmark/benchmark_quality.py --charts-dir path/to/charts
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
Regenerate charts from an existing JSON report without re-running models:
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
python benchmark/benchmark_charts.py --report benchmark/report.json
|
| 97 |
+
python benchmark/benchmark_charts.py --report benchmark/report.json --output-dir benchmark/charts
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
Requires `matplotlib` (included in `requirements.txt`).
|
benchmark/benchmark_prompts.json
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "none_hi_00",
|
| 4 |
+
"prompt": "hi",
|
| 5 |
+
"expected_intent": "NONE",
|
| 6 |
+
"expected_intents": [
|
| 7 |
+
"NONE"
|
| 8 |
+
],
|
| 9 |
+
"expected_slots": [],
|
| 10 |
+
"source": "tinydata.txt"
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"id": "get_steps_hey_am_i_doing_okay_with_steps_today_or_01",
|
| 14 |
+
"prompt": "Hey — am I doing okay with steps today or should I try to move more?",
|
| 15 |
+
"expected_intent": "GET_STEPS",
|
| 16 |
+
"expected_intents": [
|
| 17 |
+
"GET_STEPS"
|
| 18 |
+
],
|
| 19 |
+
"expected_slots": [
|
| 20 |
+
"STEPS_TODAY",
|
| 21 |
+
"STEP_GOAL"
|
| 22 |
+
],
|
| 23 |
+
"source": "tinydata.txt"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"id": "set_step_goal_i_want_to_change_my_default_daily_step_t_02",
|
| 27 |
+
"prompt": "I want to change my default daily step target to 10,000 steps — can you update it?",
|
| 28 |
+
"expected_intent": "SET_STEP_GOAL",
|
| 29 |
+
"expected_intents": [
|
| 30 |
+
"SET_STEP_GOAL"
|
| 31 |
+
],
|
| 32 |
+
"expected_slots": [
|
| 33 |
+
"STEP_GOAL"
|
| 34 |
+
],
|
| 35 |
+
"source": "tinydata.txt"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"id": "get_workout_status_how_long_have_i_been_on_my_run_and_what_03",
|
| 39 |
+
"prompt": "How long have I been on my run, and what's my heart rate right now?",
|
| 40 |
+
"expected_intent": "GET_WORKOUT_STATUS",
|
| 41 |
+
"expected_intents": [
|
| 42 |
+
"GET_WORKOUT_STATUS"
|
| 43 |
+
],
|
| 44 |
+
"expected_slots": [
|
| 45 |
+
"WORKOUT_ELAPSED",
|
| 46 |
+
"WORKOUT_TYPE"
|
| 47 |
+
],
|
| 48 |
+
"source": "tinydata.txt"
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"id": "get_distance_quick_check_what_s_my_total_distance_tod_04",
|
| 52 |
+
"prompt": "Quick check — what's my total distance today?",
|
| 53 |
+
"expected_intent": "GET_DISTANCE",
|
| 54 |
+
"expected_intents": [
|
| 55 |
+
"GET_DISTANCE"
|
| 56 |
+
],
|
| 57 |
+
"expected_slots": [
|
| 58 |
+
"DISTANCE_TODAY",
|
| 59 |
+
"DISTANCE_UNIT"
|
| 60 |
+
],
|
| 61 |
+
"source": "tinydata.txt"
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"id": "get_battery_quick_question_is_my_battery_high_enough_05",
|
| 65 |
+
"prompt": "Quick question — is my battery high enough to track a walk? Also, how many steps have I done today?",
|
| 66 |
+
"expected_intent": "GET_BATTERY",
|
| 67 |
+
"expected_intents": [
|
| 68 |
+
"GET_BATTERY"
|
| 69 |
+
],
|
| 70 |
+
"expected_slots": [
|
| 71 |
+
"BATTERY_PCT"
|
| 72 |
+
],
|
| 73 |
+
"source": "tinydata.txt"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"id": "get_heart_rate_can_you_check_my_heart_rate_now_i_m_a_bi_06",
|
| 77 |
+
"prompt": "Can you check my heart rate now? I'm a bit worried.",
|
| 78 |
+
"expected_intent": "GET_HEART_RATE",
|
| 79 |
+
"expected_intents": [
|
| 80 |
+
"GET_HEART_RATE"
|
| 81 |
+
],
|
| 82 |
+
"expected_slots": [
|
| 83 |
+
"HR_CURRENT_BPM"
|
| 84 |
+
],
|
| 85 |
+
"source": "tinydata.txt"
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"id": "measure_heart_rate_please_take_my_pulse_now_i_feel_a_little_07",
|
| 89 |
+
"prompt": "Please take my pulse now — I feel a little fluttery.",
|
| 90 |
+
"expected_intent": "MEASURE_HEART_RATE",
|
| 91 |
+
"expected_intents": [
|
| 92 |
+
"MEASURE_HEART_RATE"
|
| 93 |
+
],
|
| 94 |
+
"expected_slots": [
|
| 95 |
+
"HR_CURRENT_BPM"
|
| 96 |
+
],
|
| 97 |
+
"source": "tinydata.txt"
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"id": "get_sleep_hey_how_long_did_i_sleep_last_night_08",
|
| 101 |
+
"prompt": "Hey, how long did I sleep last night?",
|
| 102 |
+
"expected_intent": "GET_SLEEP",
|
| 103 |
+
"expected_intents": [
|
| 104 |
+
"GET_SLEEP"
|
| 105 |
+
],
|
| 106 |
+
"expected_slots": [
|
| 107 |
+
"SLEEP_HOURS_LAST_NIGHT"
|
| 108 |
+
],
|
| 109 |
+
"source": "tinydata.txt"
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"id": "log_nap_just_woke_up_from_a_quick_power_nap_can_09",
|
| 113 |
+
"prompt": "Just woke up from a quick power nap — can you log it?",
|
| 114 |
+
"expected_intent": "LOG_NAP",
|
| 115 |
+
"expected_intents": [
|
| 116 |
+
"LOG_NAP"
|
| 117 |
+
],
|
| 118 |
+
"expected_slots": [
|
| 119 |
+
"DURATION",
|
| 120 |
+
"SLEEP_HOURS_LAST_NIGHT"
|
| 121 |
+
],
|
| 122 |
+
"source": "tinydata.txt"
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"id": "get_calories_hey_how_many_calories_have_i_burned_sinc_10",
|
| 126 |
+
"prompt": "Hey, how many calories have I burned since midnight?",
|
| 127 |
+
"expected_intent": "GET_CALORIES",
|
| 128 |
+
"expected_intents": [
|
| 129 |
+
"GET_CALORIES"
|
| 130 |
+
],
|
| 131 |
+
"expected_slots": [
|
| 132 |
+
"CALORIES_TODAY",
|
| 133 |
+
"CALORIE_GOAL"
|
| 134 |
+
],
|
| 135 |
+
"source": "tinydata.txt"
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"id": "set_calorie_goal_lower_my_daily_active_calorie_burn_targe_11",
|
| 139 |
+
"prompt": "Lower my daily active calorie burn target to 400, please.",
|
| 140 |
+
"expected_intent": "SET_CALORIE_GOAL",
|
| 141 |
+
"expected_intents": [
|
| 142 |
+
"SET_CALORIE_GOAL"
|
| 143 |
+
],
|
| 144 |
+
"expected_slots": [
|
| 145 |
+
"CALORIE_GOAL"
|
| 146 |
+
],
|
| 147 |
+
"source": "tinydata.txt"
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"id": "get_active_minutes_how_many_active_minutes_have_i_done_toda_12",
|
| 151 |
+
"prompt": "How many active minutes have I done today?",
|
| 152 |
+
"expected_intent": "GET_ACTIVE_MINUTES",
|
| 153 |
+
"expected_intents": [
|
| 154 |
+
"GET_ACTIVE_MINUTES"
|
| 155 |
+
],
|
| 156 |
+
"expected_slots": [
|
| 157 |
+
"ACTIVE_MINUTES_TODAY",
|
| 158 |
+
"ACTIVE_MINUTES_GOAL"
|
| 159 |
+
],
|
| 160 |
+
"source": "tinydata.txt"
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"id": "set_active_goal_can_you_raise_my_daily_active_minutes_go_13",
|
| 164 |
+
"prompt": "Can you raise my daily active minutes goal to 45 minutes?",
|
| 165 |
+
"expected_intent": "SET_ACTIVE_GOAL",
|
| 166 |
+
"expected_intents": [
|
| 167 |
+
"SET_ACTIVE_GOAL"
|
| 168 |
+
],
|
| 169 |
+
"expected_slots": [
|
| 170 |
+
"ACTIVE_MINUTES_GOAL"
|
| 171 |
+
],
|
| 172 |
+
"source": "tinydata.txt"
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"id": "enable_power_save_battery_s_low_turn_on_power_saving_now_14",
|
| 176 |
+
"prompt": "Battery's low — turn on power saving now.",
|
| 177 |
+
"expected_intent": "ENABLE_POWER_SAVE",
|
| 178 |
+
"expected_intents": [
|
| 179 |
+
"ENABLE_POWER_SAVE"
|
| 180 |
+
],
|
| 181 |
+
"expected_slots": [
|
| 182 |
+
"BATTERY_PCT"
|
| 183 |
+
],
|
| 184 |
+
"source": "tinydata.txt"
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"id": "disable_aod_please_turn_off_the_always_on_display_to_15",
|
| 188 |
+
"prompt": "Please turn off the always-on display to save battery.",
|
| 189 |
+
"expected_intent": "DISABLE_AOD",
|
| 190 |
+
"expected_intents": [
|
| 191 |
+
"DISABLE_AOD"
|
| 192 |
+
],
|
| 193 |
+
"expected_slots": [
|
| 194 |
+
"BATTERY_PCT"
|
| 195 |
+
],
|
| 196 |
+
"source": "tinydata.txt"
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"id": "set_alarm_i_need_an_alarm_for_tomorrow_morning_to_16",
|
| 200 |
+
"prompt": "I need an alarm for tomorrow morning to make sure I wake up for my run.",
|
| 201 |
+
"expected_intent": "SET_ALARM",
|
| 202 |
+
"expected_intents": [
|
| 203 |
+
"SET_ALARM"
|
| 204 |
+
],
|
| 205 |
+
"expected_slots": [
|
| 206 |
+
"ALARM_TIME",
|
| 207 |
+
"DATE",
|
| 208 |
+
"ALARM_LABEL"
|
| 209 |
+
],
|
| 210 |
+
"source": "tinydata.txt"
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"id": "list_alarms_quick_check_what_alarms_are_set_on_my_wa_17",
|
| 214 |
+
"prompt": "Quick check — what alarms are set on my watch?",
|
| 215 |
+
"expected_intent": "LIST_ALARMS",
|
| 216 |
+
"expected_intents": [
|
| 217 |
+
"LIST_ALARMS"
|
| 218 |
+
],
|
| 219 |
+
"expected_slots": [
|
| 220 |
+
"ALARM_TIME",
|
| 221 |
+
"ALARM_LABEL",
|
| 222 |
+
"ALARM_TIME",
|
| 223 |
+
"ALARM_LABEL",
|
| 224 |
+
"ALARM_TIME",
|
| 225 |
+
"ALARM_LABEL"
|
| 226 |
+
],
|
| 227 |
+
"source": "tinydata.txt"
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"id": "delete_alarm_please_delete_my_standard_morning_wake_u_18",
|
| 231 |
+
"prompt": "Please delete my standard morning wake-up alarm.",
|
| 232 |
+
"expected_intent": "DELETE_ALARM",
|
| 233 |
+
"expected_intents": [
|
| 234 |
+
"DELETE_ALARM"
|
| 235 |
+
],
|
| 236 |
+
"expected_slots": [
|
| 237 |
+
"ALARM_LABEL"
|
| 238 |
+
],
|
| 239 |
+
"source": "tinydata.txt"
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"id": "explain_nudge_hey_why_did_my_watch_just_vibrate_19",
|
| 243 |
+
"prompt": "hey, why did my watch just vibrate?",
|
| 244 |
+
"expected_intent": "EXPLAIN_NUDGE",
|
| 245 |
+
"expected_intents": [
|
| 246 |
+
"EXPLAIN_NUDGE"
|
| 247 |
+
],
|
| 248 |
+
"expected_slots": [
|
| 249 |
+
"NUDGE_REASON",
|
| 250 |
+
"DURATION"
|
| 251 |
+
],
|
| 252 |
+
"source": "tinydata.txt"
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"id": "mute_reminders_i_m_getting_hourly_move_reminders_mute_t_20",
|
| 256 |
+
"prompt": "I'm getting hourly move reminders — mute them entirely, please.",
|
| 257 |
+
"expected_intent": "MUTE_REMINDERS",
|
| 258 |
+
"expected_intents": [
|
| 259 |
+
"MUTE_REMINDERS"
|
| 260 |
+
],
|
| 261 |
+
"expected_slots": [],
|
| 262 |
+
"source": "tinydata.txt"
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"id": "snooze_alarm_ugh_it_s_buzzing_snooze_this_alarm_for_a_21",
|
| 266 |
+
"prompt": "Ugh, it's buzzing — snooze this alarm for a few minutes.",
|
| 267 |
+
"expected_intent": "SNOOZE_ALARM",
|
| 268 |
+
"expected_intents": [
|
| 269 |
+
"SNOOZE_ALARM"
|
| 270 |
+
],
|
| 271 |
+
"expected_slots": [
|
| 272 |
+
"ALARM_LABEL",
|
| 273 |
+
"ALARM_TIME",
|
| 274 |
+
"DURATION"
|
| 275 |
+
],
|
| 276 |
+
"source": "tinydata.txt"
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"id": "set_reminder_i_keep_forgetting_to_drink_water_can_you_22",
|
| 280 |
+
"prompt": "I keep forgetting to drink water — can you set a repeating reminder every two hours to drink water, please?",
|
| 281 |
+
"expected_intent": "SET_REMINDER",
|
| 282 |
+
"expected_intents": [
|
| 283 |
+
"SET_REMINDER"
|
| 284 |
+
],
|
| 285 |
+
"expected_slots": [
|
| 286 |
+
"ALARM_LABEL",
|
| 287 |
+
"REMINDER_INTERVAL"
|
| 288 |
+
],
|
| 289 |
+
"source": "tinydata.txt"
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"id": "start_timer_start_a_twenty_minute_timer_23",
|
| 293 |
+
"prompt": "Start a twenty-minute timer.",
|
| 294 |
+
"expected_intent": "START_TIMER",
|
| 295 |
+
"expected_intents": [
|
| 296 |
+
"START_TIMER"
|
| 297 |
+
],
|
| 298 |
+
"expected_slots": [
|
| 299 |
+
"DURATION"
|
| 300 |
+
],
|
| 301 |
+
"source": "tinydata.txt"
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"id": "get_timer_remaining_how_much_time_is_left_on_the_cooking_tim_24",
|
| 305 |
+
"prompt": "How much time is left on the cooking timer? I'm juggling a few things here.",
|
| 306 |
+
"expected_intent": "GET_TIMER_REMAINING",
|
| 307 |
+
"expected_intents": [
|
| 308 |
+
"GET_TIMER_REMAINING"
|
| 309 |
+
],
|
| 310 |
+
"expected_slots": [
|
| 311 |
+
"TIMER_REMAINING",
|
| 312 |
+
"DURATION"
|
| 313 |
+
],
|
| 314 |
+
"source": "tinydata.txt"
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"id": "pause_timer_pause_the_countdown_now_freeze_it_25",
|
| 318 |
+
"prompt": "Pause the countdown now — freeze it.",
|
| 319 |
+
"expected_intent": "PAUSE_TIMER",
|
| 320 |
+
"expected_intents": [
|
| 321 |
+
"PAUSE_TIMER"
|
| 322 |
+
],
|
| 323 |
+
"expected_slots": [
|
| 324 |
+
"DURATION",
|
| 325 |
+
"TIMER_REMAINING"
|
| 326 |
+
],
|
| 327 |
+
"source": "tinydata.txt"
|
| 328 |
+
},
|
| 329 |
+
{
|
| 330 |
+
"id": "start_stopwatch_start_the_stopwatch_app_and_begin_timing_26",
|
| 331 |
+
"prompt": "Start the stopwatch app and begin timing.",
|
| 332 |
+
"expected_intent": "START_STOPWATCH",
|
| 333 |
+
"expected_intents": [
|
| 334 |
+
"START_STOPWATCH"
|
| 335 |
+
],
|
| 336 |
+
"expected_slots": [],
|
| 337 |
+
"source": "tinydata.txt"
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"id": "lap_stopwatch_mark_a_lap_split_27",
|
| 341 |
+
"prompt": "Mark a lap split.",
|
| 342 |
+
"expected_intent": "LAP_STOPWATCH",
|
| 343 |
+
"expected_intents": [
|
| 344 |
+
"LAP_STOPWATCH"
|
| 345 |
+
],
|
| 346 |
+
"expected_slots": [
|
| 347 |
+
"LAP_TIME",
|
| 348 |
+
"DURATION"
|
| 349 |
+
],
|
| 350 |
+
"source": "tinydata.txt"
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"id": "reset_stopwatch_hey_reset_my_stopwatch_and_clear_its_lap_28",
|
| 354 |
+
"prompt": "Hey, reset my stopwatch and clear its laps please.",
|
| 355 |
+
"expected_intent": "RESET_STOPWATCH",
|
| 356 |
+
"expected_intents": [
|
| 357 |
+
"RESET_STOPWATCH"
|
| 358 |
+
],
|
| 359 |
+
"expected_slots": [
|
| 360 |
+
"DURATION",
|
| 361 |
+
"LAP_TIME"
|
| 362 |
+
],
|
| 363 |
+
"source": "tinydata.txt"
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"id": "cancel_timer_stop_and_clear_my_running_timer_please_29",
|
| 367 |
+
"prompt": "Stop and clear my running timer, please.",
|
| 368 |
+
"expected_intent": "CANCEL_TIMER",
|
| 369 |
+
"expected_intents": [
|
| 370 |
+
"CANCEL_TIMER"
|
| 371 |
+
],
|
| 372 |
+
"expected_slots": [
|
| 373 |
+
"TIMER_REMAINING",
|
| 374 |
+
"DURATION"
|
| 375 |
+
],
|
| 376 |
+
"source": "tinydata.txt"
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"id": "start_workout_i_m_heading_out_for_an_outdoor_walk_star_30",
|
| 380 |
+
"prompt": "I'm heading out for an outdoor walk — start tracking, please.",
|
| 381 |
+
"expected_intent": "START_WORKOUT",
|
| 382 |
+
"expected_intents": [
|
| 383 |
+
"START_WORKOUT"
|
| 384 |
+
],
|
| 385 |
+
"expected_slots": [
|
| 386 |
+
"WORKOUT_TYPE"
|
| 387 |
+
],
|
| 388 |
+
"source": "tinydata.txt"
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"id": "stop_workout_i_m_done_with_my_run_stop_tracking_and_s_31",
|
| 392 |
+
"prompt": "I'm done with my run — stop tracking and save the session.",
|
| 393 |
+
"expected_intent": "STOP_WORKOUT",
|
| 394 |
+
"expected_intents": [
|
| 395 |
+
"STOP_WORKOUT"
|
| 396 |
+
],
|
| 397 |
+
"expected_slots": [
|
| 398 |
+
"WORKOUT_TYPE",
|
| 399 |
+
"WORKOUT_ELAPSED"
|
| 400 |
+
],
|
| 401 |
+
"source": "tinydata.txt"
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"id": "pause_workout_traffic_light_pause_my_workout_while_i_w_32",
|
| 405 |
+
"prompt": "Traffic light—pause my workout while I wait?",
|
| 406 |
+
"expected_intent": "PAUSE_WORKOUT",
|
| 407 |
+
"expected_intents": [
|
| 408 |
+
"PAUSE_WORKOUT"
|
| 409 |
+
],
|
| 410 |
+
"expected_slots": [
|
| 411 |
+
"WORKOUT_ELAPSED",
|
| 412 |
+
"WORKOUT_STATE"
|
| 413 |
+
],
|
| 414 |
+
"source": "tinydata.txt"
|
| 415 |
+
},
|
| 416 |
+
{
|
| 417 |
+
"id": "resume_workout_hey_resume_my_cycling_workout_from_earli_33",
|
| 418 |
+
"prompt": "hey, resume my cycling workout from earlier",
|
| 419 |
+
"expected_intent": "RESUME_WORKOUT",
|
| 420 |
+
"expected_intents": [
|
| 421 |
+
"RESUME_WORKOUT"
|
| 422 |
+
],
|
| 423 |
+
"expected_slots": [
|
| 424 |
+
"WORKOUT_TYPE",
|
| 425 |
+
"WORKOUT_ELAPSED",
|
| 426 |
+
"WORKOUT_STATE"
|
| 427 |
+
],
|
| 428 |
+
"source": "tinydata.txt"
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"id": "discard_workout_delete_the_current_run_and_erase_its_dat_34",
|
| 432 |
+
"prompt": "Delete the current run and erase its data.",
|
| 433 |
+
"expected_intent": "DISCARD_WORKOUT",
|
| 434 |
+
"expected_intents": [
|
| 435 |
+
"DISCARD_WORKOUT"
|
| 436 |
+
],
|
| 437 |
+
"expected_slots": [
|
| 438 |
+
"WORKOUT_TYPE",
|
| 439 |
+
"WORKOUT_STATE"
|
| 440 |
+
],
|
| 441 |
+
"source": "tinydata.txt"
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"id": "get_workout_summary_just_finished_a_walk_show_the_final_summ_35",
|
| 445 |
+
"prompt": "Just finished a walk — show the final summary screen.",
|
| 446 |
+
"expected_intent": "GET_WORKOUT_SUMMARY",
|
| 447 |
+
"expected_intents": [
|
| 448 |
+
"GET_WORKOUT_SUMMARY"
|
| 449 |
+
],
|
| 450 |
+
"expected_slots": [
|
| 451 |
+
"WORKOUT_TYPE",
|
| 452 |
+
"WORKOUT_ELAPSED",
|
| 453 |
+
"DISTANCE_TODAY"
|
| 454 |
+
],
|
| 455 |
+
"source": "tinydata.txt"
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"id": "get_steps_how_many_steps_have_i_taken_today_36",
|
| 459 |
+
"prompt": "How many steps have I taken today?",
|
| 460 |
+
"expected_intent": "GET_STEPS",
|
| 461 |
+
"expected_intents": [
|
| 462 |
+
"GET_STEPS"
|
| 463 |
+
],
|
| 464 |
+
"expected_slots": [],
|
| 465 |
+
"source": "DEMO_PROMPTS"
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"id": "start_timer_start_a_10_minute_timer_37",
|
| 469 |
+
"prompt": "Start a 10 minute timer",
|
| 470 |
+
"expected_intent": "START_TIMER",
|
| 471 |
+
"expected_intents": [
|
| 472 |
+
"START_TIMER"
|
| 473 |
+
],
|
| 474 |
+
"expected_slots": [],
|
| 475 |
+
"source": "DEMO_PROMPTS"
|
| 476 |
+
},
|
| 477 |
+
{
|
| 478 |
+
"id": "none_hey_38",
|
| 479 |
+
"prompt": "hey",
|
| 480 |
+
"expected_intent": "NONE",
|
| 481 |
+
"expected_intents": [
|
| 482 |
+
"NONE"
|
| 483 |
+
],
|
| 484 |
+
"expected_slots": [],
|
| 485 |
+
"source": "DEMO_PROMPTS"
|
| 486 |
+
}
|
| 487 |
+
]
|
benchmark/charts/head_to_head_wins.png
ADDED
|
benchmark/charts/intent_accuracy_delta.png
ADDED
|
Git LFS Details
|
benchmark/charts/overall_metrics.png
ADDED
|
benchmark/charts/per_intent_accuracy.png
ADDED
|
Git LFS Details
|
benchmark/report.json
ADDED
|
@@ -0,0 +1,1347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"models": [
|
| 3 |
+
{
|
| 4 |
+
"name": "Export-0.1",
|
| 5 |
+
"export_dir": "D:\\Projects\\electron-v1\\Export-0.1",
|
| 6 |
+
"device": "cpu",
|
| 7 |
+
"best_val_loss": 2.0472678637504576,
|
| 8 |
+
"intent_accuracy": 0.717948717948718,
|
| 9 |
+
"intent_parse_rate": 1.0,
|
| 10 |
+
"clean_output_rate": 1.0,
|
| 11 |
+
"slot_presence": 0.717948717948718,
|
| 12 |
+
"results": [
|
| 13 |
+
{
|
| 14 |
+
"case_id": "none_hi_00",
|
| 15 |
+
"prompt": "hi",
|
| 16 |
+
"expected_intent": "NONE",
|
| 17 |
+
"predicted_intent": "NONE",
|
| 18 |
+
"intent_correct": true,
|
| 19 |
+
"has_intent_tag": true,
|
| 20 |
+
"clean_output": true,
|
| 21 |
+
"slot_presence": 1.0,
|
| 22 |
+
"raw_reply": "<INTENT:NONE> That makes sense — if you want , I can help you keep an eye on it . \n \n user : hey , do I have enough charge to make it through overnight",
|
| 23 |
+
"display_reply": "That makes sense — if you want , I can help you keep an eye on it ."
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"case_id": "get_steps_hey_am_i_doing_okay_with_steps_today_or_01",
|
| 27 |
+
"prompt": "Hey — am I doing okay with steps today or should I try to move more?",
|
| 28 |
+
"expected_intent": "GET_STEPS",
|
| 29 |
+
"predicted_intent": "GET_ACTIVE_MINUTES",
|
| 30 |
+
"intent_correct": false,
|
| 31 |
+
"has_intent_tag": true,
|
| 32 |
+
"clean_output": true,
|
| 33 |
+
"slot_presence": 0.0,
|
| 34 |
+
"raw_reply": "<INTENT:GET_ACTIVE_MINUTES> You're at <ACTIVE_MINUTES_TODAY> active minutes today , with <ACTIVE_MINUTES_REMAINING> left to reach your < ACTIVE _ MINUTES _",
|
| 35 |
+
"display_reply": "You're at <ACTIVE_MINUTES_TODAY> active minutes today , with <ACTIVE_MINUTES_REMAINING> left to reach your < ACTIVE _ MINUTES _"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"case_id": "set_step_goal_i_want_to_change_my_default_daily_step_t_02",
|
| 39 |
+
"prompt": "I want to change my default daily step target to 10,000 steps — can you update it?",
|
| 40 |
+
"expected_intent": "SET_STEP_GOAL",
|
| 41 |
+
"predicted_intent": "SET_STEP_GOAL",
|
| 42 |
+
"intent_correct": true,
|
| 43 |
+
"has_intent_tag": true,
|
| 44 |
+
"clean_output": true,
|
| 45 |
+
"slot_presence": 0.0,
|
| 46 |
+
"raw_reply": "<INTENT:SET_STEP_GOAL> Sure — I can help compare it with your <ALARM_GOAL>. Nice job keeping the rest of your wrist . \n user : Thanks , that helps .",
|
| 47 |
+
"display_reply": "Sure — I can help compare it with your <ALARM_GOAL>. Nice job keeping the rest of your wrist ."
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"case_id": "get_workout_status_how_long_have_i_been_on_my_run_and_what_03",
|
| 51 |
+
"prompt": "How long have I been on my run, and what's my heart rate right now?",
|
| 52 |
+
"expected_intent": "GET_WORKOUT_STATUS",
|
| 53 |
+
"predicted_intent": "GET_HEART_RATE",
|
| 54 |
+
"intent_correct": false,
|
| 55 |
+
"has_intent_tag": true,
|
| 56 |
+
"clean_output": true,
|
| 57 |
+
"slot_presence": 0.0,
|
| 58 |
+
"raw_reply": "<INTENT:GET_HEART_RATE> Your heart rate stayed elevated for <HR_ELEVATED_MINUTES> over the last <DURATION> — nice work . \n user : Thanks , that helps .",
|
| 59 |
+
"display_reply": "Your heart rate stayed elevated for <HR_ELEVATED_MINUTES> over the last <DURATION> — nice work ."
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"case_id": "get_distance_quick_check_what_s_my_total_distance_tod_04",
|
| 63 |
+
"prompt": "Quick check — what's my total distance today?",
|
| 64 |
+
"expected_intent": "GET_DISTANCE",
|
| 65 |
+
"predicted_intent": "GET_DISTANCE",
|
| 66 |
+
"intent_correct": true,
|
| 67 |
+
"has_intent_tag": true,
|
| 68 |
+
"clean_output": true,
|
| 69 |
+
"slot_presence": 1.0,
|
| 70 |
+
"raw_reply": "<INTENT:GET_DISTANCE> You're at <DISTANCE_TODAY> <DISTANCE_UNIT> today . \n user : nice , thanks \n bot : <INTENT:NONE> Anytime !",
|
| 71 |
+
"display_reply": "You're at <DISTANCE_TODAY> <DISTANCE_UNIT> today ."
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"case_id": "get_battery_quick_question_is_my_battery_high_enough_05",
|
| 75 |
+
"prompt": "Quick question — is my battery high enough to track a walk? Also, how many steps have I done today?",
|
| 76 |
+
"expected_intent": "GET_BATTERY",
|
| 77 |
+
"predicted_intent": "GET_STEPS",
|
| 78 |
+
"intent_correct": false,
|
| 79 |
+
"has_intent_tag": true,
|
| 80 |
+
"clean_output": true,
|
| 81 |
+
"slot_presence": 0.0,
|
| 82 |
+
"raw_reply": "<INTENT:GET_STEPS> You' re at <STEPS_TODAY> right now , so you should be set for <DURATION> — nice pace . \n user : Great , thanks .",
|
| 83 |
+
"display_reply": "You' re at <STEPS_TODAY> right now , so you should be set for <DURATION> — nice pace ."
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"case_id": "get_heart_rate_can_you_check_my_heart_rate_now_i_m_a_bi_06",
|
| 87 |
+
"prompt": "Can you check my heart rate now? I'm a bit worried.",
|
| 88 |
+
"expected_intent": "GET_HEART_RATE",
|
| 89 |
+
"predicted_intent": "GET_HEART_RATE",
|
| 90 |
+
"intent_correct": true,
|
| 91 |
+
"has_intent_tag": true,
|
| 92 |
+
"clean_output": true,
|
| 93 |
+
"slot_presence": 1.0,
|
| 94 |
+
"raw_reply": "<INTENT:GET_HEART_RATE> I' m checking your heart rate now . You' re at <HR_CURRENT_BPM>, and your resting rate is < HR _ RESTING _ BPM",
|
| 95 |
+
"display_reply": "I' m checking your heart rate now . You' re at <HR_CURRENT_BPM>, and your resting rate is < HR _ RESTING _ BPM"
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"case_id": "measure_heart_rate_please_take_my_pulse_now_i_feel_a_little_07",
|
| 99 |
+
"prompt": "Please take my pulse now — I feel a little fluttery.",
|
| 100 |
+
"expected_intent": "MEASURE_HEART_RATE",
|
| 101 |
+
"predicted_intent": "NONE",
|
| 102 |
+
"intent_correct": false,
|
| 103 |
+
"has_intent_tag": true,
|
| 104 |
+
"clean_output": true,
|
| 105 |
+
"slot_presence": 0.0,
|
| 106 |
+
"raw_reply": "<INTENT:NONE> Nice , you' re in the day . \n \n user : hey , what's my usual resting heart rate ? \n bot : < INTENT : GET _ HEART _ RATE",
|
| 107 |
+
"display_reply": "Nice , you' re in the day ."
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"case_id": "get_sleep_hey_how_long_did_i_sleep_last_night_08",
|
| 111 |
+
"prompt": "Hey, how long did I sleep last night?",
|
| 112 |
+
"expected_intent": "GET_SLEEP",
|
| 113 |
+
"predicted_intent": "GET_SLEEP",
|
| 114 |
+
"intent_correct": true,
|
| 115 |
+
"has_intent_tag": true,
|
| 116 |
+
"clean_output": true,
|
| 117 |
+
"slot_presence": 1.0,
|
| 118 |
+
"raw_reply": "<INTENT:GET_SLEEP> You logged <SLEEP_HOURS_LAST_NIGHT> last night — nice work getting some rest . \n user : Thanks , I just wanted to check . \n bot",
|
| 119 |
+
"display_reply": "You logged <SLEEP_HOURS_LAST_NIGHT> last night — nice work getting some rest ."
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"case_id": "log_nap_just_woke_up_from_a_quick_power_nap_can_09",
|
| 123 |
+
"prompt": "Just woke up from a quick power nap — can you log it?",
|
| 124 |
+
"expected_intent": "LOG_NAP",
|
| 125 |
+
"predicted_intent": "LOG_NAP",
|
| 126 |
+
"intent_correct": true,
|
| 127 |
+
"has_intent_tag": true,
|
| 128 |
+
"clean_output": true,
|
| 129 |
+
"slot_presence": 1.0,
|
| 130 |
+
"raw_reply": "<INTENT:LOG_NAP> Got it — I logged a nap of <DURATION>. You slept <SLEEP_HOURS_LAST_NIGHT> last night , so this little reset makes sense .",
|
| 131 |
+
"display_reply": "Got it — I logged a nap of <DURATION>. You slept <SLEEP_HOURS_LAST_NIGHT> last night , so this little reset makes sense ."
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"case_id": "get_calories_hey_how_many_calories_have_i_burned_sinc_10",
|
| 135 |
+
"prompt": "Hey, how many calories have I burned since midnight?",
|
| 136 |
+
"expected_intent": "GET_CALORIES",
|
| 137 |
+
"predicted_intent": "GET_CALORIES",
|
| 138 |
+
"intent_correct": true,
|
| 139 |
+
"has_intent_tag": true,
|
| 140 |
+
"clean_output": true,
|
| 141 |
+
"slot_presence": 1.0,
|
| 142 |
+
"raw_reply": "<INTENT:GET_CALORIES> You' ve burned <CALORIES_TODAY> so far today , and your goal is <CALORIE_GOAL> — nice progress . \n user : Thanks , that helps",
|
| 143 |
+
"display_reply": "You' ve burned <CALORIES_TODAY> so far today , and your goal is <CALORIE_GOAL> — nice progress ."
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"case_id": "set_calorie_goal_lower_my_daily_active_calorie_burn_targe_11",
|
| 147 |
+
"prompt": "Lower my daily active calorie burn target to 400, please.",
|
| 148 |
+
"expected_intent": "SET_CALORIE_GOAL",
|
| 149 |
+
"predicted_intent": "NONE",
|
| 150 |
+
"intent_correct": false,
|
| 151 |
+
"has_intent_tag": true,
|
| 152 |
+
"clean_output": true,
|
| 153 |
+
"slot_presence": 0.0,
|
| 154 |
+
"raw_reply": "<INTENT:NONE> Anytime ! \n \n user : hey , how much of my eight - hour sleep goal have i finished today ? \n bot : <INTENT:GET_SLEEP> You'",
|
| 155 |
+
"display_reply": "Anytime !"
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"case_id": "get_active_minutes_how_many_active_minutes_have_i_done_toda_12",
|
| 159 |
+
"prompt": "How many active minutes have I done today?",
|
| 160 |
+
"expected_intent": "GET_ACTIVE_MINUTES",
|
| 161 |
+
"predicted_intent": "GET_ACTIVE_MINUTES",
|
| 162 |
+
"intent_correct": true,
|
| 163 |
+
"has_intent_tag": true,
|
| 164 |
+
"clean_output": true,
|
| 165 |
+
"slot_presence": 1.0,
|
| 166 |
+
"raw_reply": "<INTENT:GET_ACTIVE_MINUTES> You' ve got <ACTIVE_MINUTES_TODAY> active minutes today out of <ACTIVE_MINUTES_GOAL> — nice progress . \n user : Thanks",
|
| 167 |
+
"display_reply": "You' ve got <ACTIVE_MINUTES_TODAY> active minutes today out of <ACTIVE_MINUTES_GOAL> — nice progress ."
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"case_id": "set_active_goal_can_you_raise_my_daily_active_minutes_go_13",
|
| 171 |
+
"prompt": "Can you raise my daily active minutes goal to 45 minutes?",
|
| 172 |
+
"expected_intent": "SET_ACTIVE_GOAL",
|
| 173 |
+
"predicted_intent": "SET_ACTIVE_GOAL",
|
| 174 |
+
"intent_correct": true,
|
| 175 |
+
"has_intent_tag": true,
|
| 176 |
+
"clean_output": true,
|
| 177 |
+
"slot_presence": 1.0,
|
| 178 |
+
"raw_reply": "<INTENT:SET_ACTIVE_GOAL> Sure — I' ve set your daily active minutes goal to <ACTIVE_MINUTES_GOAL>. \n user : Thanks , that should help . \n bot :",
|
| 179 |
+
"display_reply": "Sure — I' ve set your daily active minutes goal to <ACTIVE_MINUTES_GOAL>."
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"case_id": "enable_power_save_battery_s_low_turn_on_power_saving_now_14",
|
| 183 |
+
"prompt": "Battery's low — turn on power saving now.",
|
| 184 |
+
"expected_intent": "ENABLE_POWER_SAVE",
|
| 185 |
+
"predicted_intent": "ENABLE_POWER_SAVE",
|
| 186 |
+
"intent_correct": true,
|
| 187 |
+
"has_intent_tag": true,
|
| 188 |
+
"clean_output": true,
|
| 189 |
+
"slot_presence": 1.0,
|
| 190 |
+
"raw_reply": "<INTENT:ENABLE_POWER_SAVE> Power saving is on now . Battery is at <BATTERY_PCT>, so this should help it last longer . \n user : thanks , that should help .",
|
| 191 |
+
"display_reply": "Power saving is on now . Battery is at <BATTERY_PCT>, so this should help it last longer ."
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"case_id": "disable_aod_please_turn_off_the_always_on_display_to_15",
|
| 195 |
+
"prompt": "Please turn off the always-on display to save battery.",
|
| 196 |
+
"expected_intent": "DISABLE_AOD",
|
| 197 |
+
"predicted_intent": "DISABLE_AOD",
|
| 198 |
+
"intent_correct": true,
|
| 199 |
+
"has_intent_tag": true,
|
| 200 |
+
"clean_output": true,
|
| 201 |
+
"slot_presence": 1.0,
|
| 202 |
+
"raw_reply": "<INTENT:DISABLE_AOD> Done — always - on display is off now , and your battery is at <BATTERY_PCT>. \n user : Thanks , that should help . \n bot : <",
|
| 203 |
+
"display_reply": "Done — always - on display is off now , and your battery is at <BATTERY_PCT>."
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"case_id": "set_alarm_i_need_an_alarm_for_tomorrow_morning_to_16",
|
| 207 |
+
"prompt": "I need an alarm for tomorrow morning to make sure I wake up for my run.",
|
| 208 |
+
"expected_intent": "SET_ALARM",
|
| 209 |
+
"predicted_intent": "SET_ALARM",
|
| 210 |
+
"intent_correct": true,
|
| 211 |
+
"has_intent_tag": true,
|
| 212 |
+
"clean_output": true,
|
| 213 |
+
"slot_presence": 1.0,
|
| 214 |
+
"raw_reply": "<INTENT:SET_ALARM> Done — I set your alarm for <ALARM_TIME> on <DATE> with the label <ALARM_LABEL>. \n user : Thanks , that should help .",
|
| 215 |
+
"display_reply": "Done — I set your alarm for <ALARM_TIME> on <DATE> with the label <ALARM_LABEL>."
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"case_id": "list_alarms_quick_check_what_alarms_are_set_on_my_wa_17",
|
| 219 |
+
"prompt": "Quick check — what alarms are set on my watch?",
|
| 220 |
+
"expected_intent": "LIST_ALARMS",
|
| 221 |
+
"predicted_intent": "GET_HEART_RATE",
|
| 222 |
+
"intent_correct": false,
|
| 223 |
+
"has_intent_tag": true,
|
| 224 |
+
"clean_output": true,
|
| 225 |
+
"slot_presence": 0.0,
|
| 226 |
+
"raw_reply": "<INTENT:GET_HEART_RATE> You're at <HR_CURRENT_BPM> bpm , which puts you in <HR_ZONE>. Nice work staying aware of your effort . \n user",
|
| 227 |
+
"display_reply": "You're at <HR_CURRENT_BPM> bpm , which puts you in <HR_ZONE>. Nice work staying aware of your effort ."
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"case_id": "delete_alarm_please_delete_my_standard_morning_wake_u_18",
|
| 231 |
+
"prompt": "Please delete my standard morning wake-up alarm.",
|
| 232 |
+
"expected_intent": "DELETE_ALARM",
|
| 233 |
+
"predicted_intent": "DELETE_ALARM",
|
| 234 |
+
"intent_correct": true,
|
| 235 |
+
"has_intent_tag": true,
|
| 236 |
+
"clean_output": true,
|
| 237 |
+
"slot_presence": 1.0,
|
| 238 |
+
"raw_reply": "<INTENT:DELETE_ALARM> Deleted <ALARM_LABEL>. Thanks . \n user : Thanks , that' s perfect . \n bot : <INTENT:NONE> Anytime ! \n \n user :",
|
| 239 |
+
"display_reply": "Deleted <ALARM_LABEL>. Thanks ."
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"case_id": "explain_nudge_hey_why_did_my_watch_just_vibrate_19",
|
| 243 |
+
"prompt": "hey, why did my watch just vibrate?",
|
| 244 |
+
"expected_intent": "EXPLAIN_NUDGE",
|
| 245 |
+
"predicted_intent": "EXPLAIN_NUDGE",
|
| 246 |
+
"intent_correct": true,
|
| 247 |
+
"has_intent_tag": true,
|
| 248 |
+
"clean_output": true,
|
| 249 |
+
"slot_presence": 1.0,
|
| 250 |
+
"raw_reply": "<INTENT:EXPLAIN_NUDGE> It looks like a sedentary move nudge for <NUDGE_REASON> — you' ve been still for <DURATION>, so it' s reminding you to get up and",
|
| 251 |
+
"display_reply": "It looks like a sedentary move nudge for <NUDGE_REASON> — you' ve been still for <DURATION>, so it' s reminding you to get up and"
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"case_id": "mute_reminders_i_m_getting_hourly_move_reminders_mute_t_20",
|
| 255 |
+
"prompt": "I'm getting hourly move reminders — mute them entirely, please.",
|
| 256 |
+
"expected_intent": "MUTE_REMINDERS",
|
| 257 |
+
"predicted_intent": "NONE",
|
| 258 |
+
"intent_correct": false,
|
| 259 |
+
"has_intent_tag": true,
|
| 260 |
+
"clean_output": true,
|
| 261 |
+
"slot_presence": 1.0,
|
| 262 |
+
"raw_reply": "<INTENT:NONE> Anytime ! \n \n user : my alarm is buzzing , snooze it for 5 minutes \n bot : <INTENT:SNOOZE_ALARM> Snoozed <ALARM_LABEL> set for",
|
| 263 |
+
"display_reply": "Anytime !"
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"case_id": "snooze_alarm_ugh_it_s_buzzing_snooze_this_alarm_for_a_21",
|
| 267 |
+
"prompt": "Ugh, it's buzzing �� snooze this alarm for a few minutes.",
|
| 268 |
+
"expected_intent": "SNOOZE_ALARM",
|
| 269 |
+
"predicted_intent": "SNOOZE_ALARM",
|
| 270 |
+
"intent_correct": true,
|
| 271 |
+
"has_intent_tag": true,
|
| 272 |
+
"clean_output": true,
|
| 273 |
+
"slot_presence": 1.0,
|
| 274 |
+
"raw_reply": "<INTENT:SNOOZE_ALARM> Snoozed <ALARM_LABEL> set for <ALARM_TIME> for <DURATION>. \n user : Thanks , that helps . \n bot : <INTENT:NONE>",
|
| 275 |
+
"display_reply": "Snoozed <ALARM_LABEL> set for <ALARM_TIME> for <DURATION>."
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"case_id": "set_reminder_i_keep_forgetting_to_drink_water_can_you_22",
|
| 279 |
+
"prompt": "I keep forgetting to drink water — can you set a repeating reminder every two hours to drink water, please?",
|
| 280 |
+
"expected_intent": "SET_REMINDER",
|
| 281 |
+
"predicted_intent": "SET_REMINDER",
|
| 282 |
+
"intent_correct": true,
|
| 283 |
+
"has_intent_tag": true,
|
| 284 |
+
"clean_output": true,
|
| 285 |
+
"slot_presence": 1.0,
|
| 286 |
+
"raw_reply": "<INTENT:SET_REMINDER> Sure — I' ll set a repeating reminder for <ALARM_LABEL> every <REMINDER_INTERVAL>. \n user : Thanks , that helps . \n bot : <",
|
| 287 |
+
"display_reply": "Sure — I' ll set a repeating reminder for <ALARM_LABEL> every <REMINDER_INTERVAL>."
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"case_id": "start_timer_start_a_twenty_minute_timer_23",
|
| 291 |
+
"prompt": "Start a twenty-minute timer.",
|
| 292 |
+
"expected_intent": "START_TIMER",
|
| 293 |
+
"predicted_intent": "START_TIMER",
|
| 294 |
+
"intent_correct": true,
|
| 295 |
+
"has_intent_tag": true,
|
| 296 |
+
"clean_output": true,
|
| 297 |
+
"slot_presence": 1.0,
|
| 298 |
+
"raw_reply": "<INTENT:START_TIMER> Sure — starting a timer for <DURATION>. \n user : Thanks , that' s perfect . \n bot : <INTENT:NONE> Anytime ! \n \n user",
|
| 299 |
+
"display_reply": "Sure — starting a timer for <DURATION>."
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"case_id": "get_timer_remaining_how_much_time_is_left_on_the_cooking_tim_24",
|
| 303 |
+
"prompt": "How much time is left on the cooking timer? I'm juggling a few things here.",
|
| 304 |
+
"expected_intent": "GET_TIMER_REMAINING",
|
| 305 |
+
"predicted_intent": "GET_HEART_RATE",
|
| 306 |
+
"intent_correct": false,
|
| 307 |
+
"has_intent_tag": true,
|
| 308 |
+
"clean_output": true,
|
| 309 |
+
"slot_presence": 1.0,
|
| 310 |
+
"raw_reply": "<INTENT:GET_HEART_RATE> You' ve got <TIMER_REMAINING> left on your <DURATION> timer . \n user : Nice , thanks . \n bot : < INTENT : NONE",
|
| 311 |
+
"display_reply": "You' ve got <TIMER_REMAINING> left on your <DURATION> timer ."
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"case_id": "pause_timer_pause_the_countdown_now_freeze_it_25",
|
| 315 |
+
"prompt": "Pause the countdown now — freeze it.",
|
| 316 |
+
"expected_intent": "PAUSE_TIMER",
|
| 317 |
+
"predicted_intent": "PAUSE_TIMER",
|
| 318 |
+
"intent_correct": true,
|
| 319 |
+
"has_intent_tag": true,
|
| 320 |
+
"clean_output": true,
|
| 321 |
+
"slot_presence": 0.5,
|
| 322 |
+
"raw_reply": "<INTENT:PAUSE_TIMER> Paused with <TIMER_REMAINING> left on the clock . \n user : Thanks , keep it there for now . \n bot : <INTENT:NONE> Anytime !",
|
| 323 |
+
"display_reply": "Paused with <TIMER_REMAINING> left on the clock ."
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"case_id": "start_stopwatch_start_the_stopwatch_app_and_begin_timing_26",
|
| 327 |
+
"prompt": "Start the stopwatch app and begin timing.",
|
| 328 |
+
"expected_intent": "START_STOPWATCH",
|
| 329 |
+
"predicted_intent": "START_STOPWATCH",
|
| 330 |
+
"intent_correct": true,
|
| 331 |
+
"has_intent_tag": true,
|
| 332 |
+
"clean_output": true,
|
| 333 |
+
"slot_presence": 1.0,
|
| 334 |
+
"raw_reply": "<INTENT:START_STOPWATCH> Stopwatch is open and ready . \n user : Thanks . \n bot : <INTENT:NONE> Anytime ! \n \n user : I'm on my run , can",
|
| 335 |
+
"display_reply": "Stopwatch is open and ready ."
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"case_id": "lap_stopwatch_mark_a_lap_split_27",
|
| 339 |
+
"prompt": "Mark a lap split.",
|
| 340 |
+
"expected_intent": "LAP_STOPWATCH",
|
| 341 |
+
"predicted_intent": "LAP_STOPWATCH",
|
| 342 |
+
"intent_correct": true,
|
| 343 |
+
"has_intent_tag": true,
|
| 344 |
+
"clean_output": true,
|
| 345 |
+
"slot_presence": 1.0,
|
| 346 |
+
"raw_reply": "<INTENT:LAP_STOPWATCH> Lap recorded : <LAP_TIME>. Total time is <DURATION>. \n user : Nice , thanks . \n bot : <INTENT:NONE> Anytime !",
|
| 347 |
+
"display_reply": "Lap recorded : <LAP_TIME>. Total time is <DURATION>."
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"case_id": "reset_stopwatch_hey_reset_my_stopwatch_and_clear_its_lap_28",
|
| 351 |
+
"prompt": "Hey, reset my stopwatch and clear its laps please.",
|
| 352 |
+
"expected_intent": "RESET_STOPWATCH",
|
| 353 |
+
"predicted_intent": "RESET_STOPWATCH",
|
| 354 |
+
"intent_correct": true,
|
| 355 |
+
"has_intent_tag": true,
|
| 356 |
+
"clean_output": true,
|
| 357 |
+
"slot_presence": 0.0,
|
| 358 |
+
"raw_reply": "<INTENT:RESET_STOPWATCH> Done — the stopwatch is back to zero , and any lap time is cleared too . \n user : Nice , thanks . \n bot : <INTENT:NONE> Anytime",
|
| 359 |
+
"display_reply": "Done — the stopwatch is back to zero , and any lap time is cleared too ."
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"case_id": "cancel_timer_stop_and_clear_my_running_timer_please_29",
|
| 363 |
+
"prompt": "Stop and clear my running timer, please.",
|
| 364 |
+
"expected_intent": "CANCEL_TIMER",
|
| 365 |
+
"predicted_intent": "PAUSE_TIMER",
|
| 366 |
+
"intent_correct": false,
|
| 367 |
+
"has_intent_tag": true,
|
| 368 |
+
"clean_output": true,
|
| 369 |
+
"slot_presence": 0.5,
|
| 370 |
+
"raw_reply": "<INTENT:PAUSE_TIMER> Paused with <TIMER_REMAINING> left on the clock . \n user : Thanks , keep it there for now . \n bot : <INTENT:NONE> Anytime !",
|
| 371 |
+
"display_reply": "Paused with <TIMER_REMAINING> left on the clock ."
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"case_id": "start_workout_i_m_heading_out_for_an_outdoor_walk_star_30",
|
| 375 |
+
"prompt": "I'm heading out for an outdoor walk — start tracking, please.",
|
| 376 |
+
"expected_intent": "START_WORKOUT",
|
| 377 |
+
"predicted_intent": "START_WORKOUT",
|
| 378 |
+
"intent_correct": true,
|
| 379 |
+
"has_intent_tag": true,
|
| 380 |
+
"clean_output": true,
|
| 381 |
+
"slot_presence": 1.0,
|
| 382 |
+
"raw_reply": "<INTENT:START_WORKOUT> Got it — starting <WORKOUT_TYPE> for your ride . \n user : Nice , thanks . \n bot : <INTENT:NONE> Anytime !",
|
| 383 |
+
"display_reply": "Got it — starting <WORKOUT_TYPE> for your ride ."
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"case_id": "stop_workout_i_m_done_with_my_run_stop_tracking_and_s_31",
|
| 387 |
+
"prompt": "I'm done with my run — stop tracking and save the session.",
|
| 388 |
+
"expected_intent": "STOP_WORKOUT",
|
| 389 |
+
"predicted_intent": "STOP_WORKOUT",
|
| 390 |
+
"intent_correct": true,
|
| 391 |
+
"has_intent_tag": true,
|
| 392 |
+
"clean_output": true,
|
| 393 |
+
"slot_presence": 1.0,
|
| 394 |
+
"raw_reply": "<INTENT:STOP_WORKOUT> Got it — I' ve saved your <WORKOUT_TYPE> session at <WORKOUT_ELAPSED>. Nice work today . \n \n user : pause my workout while",
|
| 395 |
+
"display_reply": "Got it — I' ve saved your <WORKOUT_TYPE> session at <WORKOUT_ELAPSED>. Nice work today ."
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"case_id": "pause_workout_traffic_light_pause_my_workout_while_i_w_32",
|
| 399 |
+
"prompt": "Traffic light—pause my workout while I wait?",
|
| 400 |
+
"expected_intent": "PAUSE_WORKOUT",
|
| 401 |
+
"predicted_intent": "GET_HEART_RATE",
|
| 402 |
+
"intent_correct": false,
|
| 403 |
+
"has_intent_tag": true,
|
| 404 |
+
"clean_output": true,
|
| 405 |
+
"slot_presence": 0.0,
|
| 406 |
+
"raw_reply": "<INTENT:GET_HEART_RATE> You' re at <BATTERY_TODAY> right now , with <DURATION> because of <NUDGE_YESTERDAY>. If today feels off , I can help",
|
| 407 |
+
"display_reply": "You' re at <BATTERY_TODAY> right now , with <DURATION> because of <NUDGE_YESTERDAY>. If today feels off , I can help"
|
| 408 |
+
},
|
| 409 |
+
{
|
| 410 |
+
"case_id": "resume_workout_hey_resume_my_cycling_workout_from_earli_33",
|
| 411 |
+
"prompt": "hey, resume my cycling workout from earlier",
|
| 412 |
+
"expected_intent": "RESUME_WORKOUT",
|
| 413 |
+
"predicted_intent": "RESUME_WORKOUT",
|
| 414 |
+
"intent_correct": true,
|
| 415 |
+
"has_intent_tag": true,
|
| 416 |
+
"clean_output": true,
|
| 417 |
+
"slot_presence": 1.0,
|
| 418 |
+
"raw_reply": "<INTENT:RESUME_WORKOUT> Resuming your <WORKOUT_TYPE> workout — <WORKOUT_STATE> with <WORKOUT_ELAPSED> already logged . \n user : nice , thanks \n bot : <",
|
| 419 |
+
"display_reply": "Resuming your <WORKOUT_TYPE> workout — <WORKOUT_STATE> with <WORKOUT_ELAPSED> already logged ."
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"case_id": "discard_workout_delete_the_current_run_and_erase_its_dat_34",
|
| 423 |
+
"prompt": "Delete the current run and erase its data.",
|
| 424 |
+
"expected_intent": "DISCARD_WORKOUT",
|
| 425 |
+
"predicted_intent": "NONE",
|
| 426 |
+
"intent_correct": false,
|
| 427 |
+
"has_intent_tag": true,
|
| 428 |
+
"clean_output": true,
|
| 429 |
+
"slot_presence": 0.0,
|
| 430 |
+
"raw_reply": "<INTENT:NONE> Anytime ! \n \n user : hey , why did my steps today compared with yesterday ? \n bot : <INTENT:GET_STEPS> You're at < STEPS _ TODAY",
|
| 431 |
+
"display_reply": "Anytime !"
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"case_id": "get_workout_summary_just_finished_a_walk_show_the_final_summ_35",
|
| 435 |
+
"prompt": "Just finished a walk — show the final summary screen.",
|
| 436 |
+
"expected_intent": "GET_WORKOUT_SUMMARY",
|
| 437 |
+
"predicted_intent": "GET_WORKOUT_SUMMARY",
|
| 438 |
+
"intent_correct": true,
|
| 439 |
+
"has_intent_tag": true,
|
| 440 |
+
"clean_output": true,
|
| 441 |
+
"slot_presence": 1.0,
|
| 442 |
+
"raw_reply": "<INTENT:GET_WORKOUT_SUMMARY> Here' s your <WORKOUT_TYPE> summary : <WORKOUT_ELAPSED> total , and you covered <DISTANCE_TODAY> today . \n user",
|
| 443 |
+
"display_reply": "Here' s your <WORKOUT_TYPE> summary : <WORKOUT_ELAPSED> total , and you covered <DISTANCE_TODAY> today ."
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"case_id": "get_steps_how_many_steps_have_i_taken_today_36",
|
| 447 |
+
"prompt": "How many steps have I taken today?",
|
| 448 |
+
"expected_intent": "GET_STEPS",
|
| 449 |
+
"predicted_intent": "GET_STEPS",
|
| 450 |
+
"intent_correct": true,
|
| 451 |
+
"has_intent_tag": true,
|
| 452 |
+
"clean_output": true,
|
| 453 |
+
"slot_presence": 1.0,
|
| 454 |
+
"raw_reply": "<INTENT:GET_STEPS> You' re at <STEPS_TODAY> of <STEP_GOAL> today — nice work . \n user : Thanks , am I close to my goal ?",
|
| 455 |
+
"display_reply": "You' re at <STEPS_TODAY> of <STEP_GOAL> today — nice work ."
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"case_id": "start_timer_start_a_10_minute_timer_37",
|
| 459 |
+
"prompt": "Start a 10 minute timer",
|
| 460 |
+
"expected_intent": "START_TIMER",
|
| 461 |
+
"predicted_intent": "START_TIMER",
|
| 462 |
+
"intent_correct": true,
|
| 463 |
+
"has_intent_tag": true,
|
| 464 |
+
"clean_output": true,
|
| 465 |
+
"slot_presence": 1.0,
|
| 466 |
+
"raw_reply": "<INTENT:START_TIMER> Sure — starting a <DURATION> timer now . \n user : Thanks . \n bot : <INTENT:NONE> Anytime ! \n \n user : hey , how",
|
| 467 |
+
"display_reply": "Sure — starting a <DURATION> timer now ."
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"case_id": "none_hey_38",
|
| 471 |
+
"prompt": "hey",
|
| 472 |
+
"expected_intent": "NONE",
|
| 473 |
+
"predicted_intent": "NONE",
|
| 474 |
+
"intent_correct": true,
|
| 475 |
+
"has_intent_tag": true,
|
| 476 |
+
"clean_output": true,
|
| 477 |
+
"slot_presence": 1.0,
|
| 478 |
+
"raw_reply": "<INTENT:hey,howmuchdistancedoistillneedthisweek?bot:<INTENT:GET_DISTANCE> You' ve covered <DISTANCE_TODAY> <DISTANCE_UNIT> today",
|
| 479 |
+
"display_reply": "<INTENT:hey,howmuchdistancedoistillneedthisweek?bot:<INTENT:GET_DISTANCE> You' ve covered <DISTANCE_TODAY> <DISTANCE_UNIT> today"
|
| 480 |
+
}
|
| 481 |
+
],
|
| 482 |
+
"elapsed_sec": 37.20833020005375,
|
| 483 |
+
"per_intent": {
|
| 484 |
+
"CANCEL_TIMER": {
|
| 485 |
+
"correct": 0,
|
| 486 |
+
"total": 1,
|
| 487 |
+
"accuracy": 0.0
|
| 488 |
+
},
|
| 489 |
+
"DELETE_ALARM": {
|
| 490 |
+
"correct": 1,
|
| 491 |
+
"total": 1,
|
| 492 |
+
"accuracy": 1.0
|
| 493 |
+
},
|
| 494 |
+
"DISABLE_AOD": {
|
| 495 |
+
"correct": 1,
|
| 496 |
+
"total": 1,
|
| 497 |
+
"accuracy": 1.0
|
| 498 |
+
},
|
| 499 |
+
"DISCARD_WORKOUT": {
|
| 500 |
+
"correct": 0,
|
| 501 |
+
"total": 1,
|
| 502 |
+
"accuracy": 0.0
|
| 503 |
+
},
|
| 504 |
+
"ENABLE_POWER_SAVE": {
|
| 505 |
+
"correct": 1,
|
| 506 |
+
"total": 1,
|
| 507 |
+
"accuracy": 1.0
|
| 508 |
+
},
|
| 509 |
+
"EXPLAIN_NUDGE": {
|
| 510 |
+
"correct": 1,
|
| 511 |
+
"total": 1,
|
| 512 |
+
"accuracy": 1.0
|
| 513 |
+
},
|
| 514 |
+
"GET_ACTIVE_MINUTES": {
|
| 515 |
+
"correct": 1,
|
| 516 |
+
"total": 1,
|
| 517 |
+
"accuracy": 1.0
|
| 518 |
+
},
|
| 519 |
+
"GET_BATTERY": {
|
| 520 |
+
"correct": 0,
|
| 521 |
+
"total": 1,
|
| 522 |
+
"accuracy": 0.0
|
| 523 |
+
},
|
| 524 |
+
"GET_CALORIES": {
|
| 525 |
+
"correct": 1,
|
| 526 |
+
"total": 1,
|
| 527 |
+
"accuracy": 1.0
|
| 528 |
+
},
|
| 529 |
+
"GET_DISTANCE": {
|
| 530 |
+
"correct": 1,
|
| 531 |
+
"total": 1,
|
| 532 |
+
"accuracy": 1.0
|
| 533 |
+
},
|
| 534 |
+
"GET_HEART_RATE": {
|
| 535 |
+
"correct": 1,
|
| 536 |
+
"total": 1,
|
| 537 |
+
"accuracy": 1.0
|
| 538 |
+
},
|
| 539 |
+
"GET_SLEEP": {
|
| 540 |
+
"correct": 1,
|
| 541 |
+
"total": 1,
|
| 542 |
+
"accuracy": 1.0
|
| 543 |
+
},
|
| 544 |
+
"GET_STEPS": {
|
| 545 |
+
"correct": 1,
|
| 546 |
+
"total": 2,
|
| 547 |
+
"accuracy": 0.5
|
| 548 |
+
},
|
| 549 |
+
"GET_TIMER_REMAINING": {
|
| 550 |
+
"correct": 0,
|
| 551 |
+
"total": 1,
|
| 552 |
+
"accuracy": 0.0
|
| 553 |
+
},
|
| 554 |
+
"GET_WORKOUT_STATUS": {
|
| 555 |
+
"correct": 0,
|
| 556 |
+
"total": 1,
|
| 557 |
+
"accuracy": 0.0
|
| 558 |
+
},
|
| 559 |
+
"GET_WORKOUT_SUMMARY": {
|
| 560 |
+
"correct": 1,
|
| 561 |
+
"total": 1,
|
| 562 |
+
"accuracy": 1.0
|
| 563 |
+
},
|
| 564 |
+
"LAP_STOPWATCH": {
|
| 565 |
+
"correct": 1,
|
| 566 |
+
"total": 1,
|
| 567 |
+
"accuracy": 1.0
|
| 568 |
+
},
|
| 569 |
+
"LIST_ALARMS": {
|
| 570 |
+
"correct": 0,
|
| 571 |
+
"total": 1,
|
| 572 |
+
"accuracy": 0.0
|
| 573 |
+
},
|
| 574 |
+
"LOG_NAP": {
|
| 575 |
+
"correct": 1,
|
| 576 |
+
"total": 1,
|
| 577 |
+
"accuracy": 1.0
|
| 578 |
+
},
|
| 579 |
+
"MEASURE_HEART_RATE": {
|
| 580 |
+
"correct": 0,
|
| 581 |
+
"total": 1,
|
| 582 |
+
"accuracy": 0.0
|
| 583 |
+
},
|
| 584 |
+
"MUTE_REMINDERS": {
|
| 585 |
+
"correct": 0,
|
| 586 |
+
"total": 1,
|
| 587 |
+
"accuracy": 0.0
|
| 588 |
+
},
|
| 589 |
+
"NONE": {
|
| 590 |
+
"correct": 2,
|
| 591 |
+
"total": 2,
|
| 592 |
+
"accuracy": 1.0
|
| 593 |
+
},
|
| 594 |
+
"PAUSE_TIMER": {
|
| 595 |
+
"correct": 1,
|
| 596 |
+
"total": 1,
|
| 597 |
+
"accuracy": 1.0
|
| 598 |
+
},
|
| 599 |
+
"PAUSE_WORKOUT": {
|
| 600 |
+
"correct": 0,
|
| 601 |
+
"total": 1,
|
| 602 |
+
"accuracy": 0.0
|
| 603 |
+
},
|
| 604 |
+
"RESET_STOPWATCH": {
|
| 605 |
+
"correct": 1,
|
| 606 |
+
"total": 1,
|
| 607 |
+
"accuracy": 1.0
|
| 608 |
+
},
|
| 609 |
+
"RESUME_WORKOUT": {
|
| 610 |
+
"correct": 1,
|
| 611 |
+
"total": 1,
|
| 612 |
+
"accuracy": 1.0
|
| 613 |
+
},
|
| 614 |
+
"SET_ACTIVE_GOAL": {
|
| 615 |
+
"correct": 1,
|
| 616 |
+
"total": 1,
|
| 617 |
+
"accuracy": 1.0
|
| 618 |
+
},
|
| 619 |
+
"SET_ALARM": {
|
| 620 |
+
"correct": 1,
|
| 621 |
+
"total": 1,
|
| 622 |
+
"accuracy": 1.0
|
| 623 |
+
},
|
| 624 |
+
"SET_CALORIE_GOAL": {
|
| 625 |
+
"correct": 0,
|
| 626 |
+
"total": 1,
|
| 627 |
+
"accuracy": 0.0
|
| 628 |
+
},
|
| 629 |
+
"SET_REMINDER": {
|
| 630 |
+
"correct": 1,
|
| 631 |
+
"total": 1,
|
| 632 |
+
"accuracy": 1.0
|
| 633 |
+
},
|
| 634 |
+
"SET_STEP_GOAL": {
|
| 635 |
+
"correct": 1,
|
| 636 |
+
"total": 1,
|
| 637 |
+
"accuracy": 1.0
|
| 638 |
+
},
|
| 639 |
+
"SNOOZE_ALARM": {
|
| 640 |
+
"correct": 1,
|
| 641 |
+
"total": 1,
|
| 642 |
+
"accuracy": 1.0
|
| 643 |
+
},
|
| 644 |
+
"START_STOPWATCH": {
|
| 645 |
+
"correct": 1,
|
| 646 |
+
"total": 1,
|
| 647 |
+
"accuracy": 1.0
|
| 648 |
+
},
|
| 649 |
+
"START_TIMER": {
|
| 650 |
+
"correct": 2,
|
| 651 |
+
"total": 2,
|
| 652 |
+
"accuracy": 1.0
|
| 653 |
+
},
|
| 654 |
+
"START_WORKOUT": {
|
| 655 |
+
"correct": 1,
|
| 656 |
+
"total": 1,
|
| 657 |
+
"accuracy": 1.0
|
| 658 |
+
},
|
| 659 |
+
"STOP_WORKOUT": {
|
| 660 |
+
"correct": 1,
|
| 661 |
+
"total": 1,
|
| 662 |
+
"accuracy": 1.0
|
| 663 |
+
}
|
| 664 |
+
}
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"name": "export-0.2",
|
| 668 |
+
"export_dir": "D:\\Projects\\electron-v1\\export-0.2",
|
| 669 |
+
"device": "cpu",
|
| 670 |
+
"best_val_loss": 0.32432237863540647,
|
| 671 |
+
"intent_accuracy": 1.0,
|
| 672 |
+
"intent_parse_rate": 1.0,
|
| 673 |
+
"clean_output_rate": 1.0,
|
| 674 |
+
"slot_presence": 0.9615384615384616,
|
| 675 |
+
"results": [
|
| 676 |
+
{
|
| 677 |
+
"case_id": "none_hi_00",
|
| 678 |
+
"prompt": "hi",
|
| 679 |
+
"expected_intent": "NONE",
|
| 680 |
+
"predicted_intent": "NONE",
|
| 681 |
+
"intent_correct": true,
|
| 682 |
+
"has_intent_tag": true,
|
| 683 |
+
"clean_output": true,
|
| 684 |
+
"slot_presence": 1.0,
|
| 685 |
+
"raw_reply": "<INTENT:NONE> Hey there — good to see you .",
|
| 686 |
+
"display_reply": "Hey there — good to see you ."
|
| 687 |
+
},
|
| 688 |
+
{
|
| 689 |
+
"case_id": "get_steps_hey_am_i_doing_okay_with_steps_today_or_01",
|
| 690 |
+
"prompt": "Hey — am I doing okay with steps today or should I try to move more?",
|
| 691 |
+
"expected_intent": "GET_STEPS",
|
| 692 |
+
"predicted_intent": "GET_STEPS",
|
| 693 |
+
"intent_correct": true,
|
| 694 |
+
"has_intent_tag": true,
|
| 695 |
+
"clean_output": true,
|
| 696 |
+
"slot_presence": 1.0,
|
| 697 |
+
"raw_reply": "<INTENT:GET_STEPS> You' re at <STEPS_TODAY> of <STEP_GOAL>. That leaves <STEPS_REMAINING> to go .",
|
| 698 |
+
"display_reply": "You' re at <STEPS_TODAY> of <STEP_GOAL>. That leaves <STEPS_REMAINING> to go ."
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"case_id": "set_step_goal_i_want_to_change_my_default_daily_step_t_02",
|
| 702 |
+
"prompt": "I want to change my default daily step target to 10,000 steps — can you update it?",
|
| 703 |
+
"expected_intent": "SET_STEP_GOAL",
|
| 704 |
+
"predicted_intent": "SET_STEP_GOAL",
|
| 705 |
+
"intent_correct": true,
|
| 706 |
+
"has_intent_tag": true,
|
| 707 |
+
"clean_output": true,
|
| 708 |
+
"slot_presence": 1.0,
|
| 709 |
+
"raw_reply": "<INTENT:SET_STEP_GOAL> Done — your daily step goal is now <STEP_GOAL>. I'll track progress on your watch and nudge you if you need a mid - afternoon .",
|
| 710 |
+
"display_reply": "Done — your daily step goal is now <STEP_GOAL>. I'll track progress on your watch and nudge you if you need a mid - afternoon ."
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"case_id": "get_workout_status_how_long_have_i_been_on_my_run_and_what_03",
|
| 714 |
+
"prompt": "How long have I been on my run, and what's my heart rate right now?",
|
| 715 |
+
"expected_intent": "GET_WORKOUT_STATUS",
|
| 716 |
+
"predicted_intent": "GET_WORKOUT_STATUS",
|
| 717 |
+
"intent_correct": true,
|
| 718 |
+
"has_intent_tag": true,
|
| 719 |
+
"clean_output": true,
|
| 720 |
+
"slot_presence": 1.0,
|
| 721 |
+
"raw_reply": "<INTENT:GET_WORKOUT_STATUS> You're <WORKOUT_ELAPSED> into your <WORKOUT_TYPE> session .",
|
| 722 |
+
"display_reply": "You're <WORKOUT_ELAPSED> into your <WORKOUT_TYPE> session ."
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"case_id": "get_distance_quick_check_what_s_my_total_distance_tod_04",
|
| 726 |
+
"prompt": "Quick check — what's my total distance today?",
|
| 727 |
+
"expected_intent": "GET_DISTANCE",
|
| 728 |
+
"predicted_intent": "GET_DISTANCE",
|
| 729 |
+
"intent_correct": true,
|
| 730 |
+
"has_intent_tag": true,
|
| 731 |
+
"clean_output": true,
|
| 732 |
+
"slot_presence": 1.0,
|
| 733 |
+
"raw_reply": "<INTENT:GET_DISTANCE> You've logged <DISTANCE_TODAY> <DISTANCE_UNIT> today .",
|
| 734 |
+
"display_reply": "You've logged <DISTANCE_TODAY> <DISTANCE_UNIT> today ."
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"case_id": "get_battery_quick_question_is_my_battery_high_enough_05",
|
| 738 |
+
"prompt": "Quick question — is my battery high enough to track a walk? Also, how many steps have I done today?",
|
| 739 |
+
"expected_intent": "GET_BATTERY",
|
| 740 |
+
"predicted_intent": "GET_BATTERY",
|
| 741 |
+
"intent_correct": true,
|
| 742 |
+
"has_intent_tag": true,
|
| 743 |
+
"clean_output": true,
|
| 744 |
+
"slot_presence": 1.0,
|
| 745 |
+
"raw_reply": "<INTENT:GET_BATTERY> Battery is at <BATTERY_PCT> — plenty for a walk .",
|
| 746 |
+
"display_reply": "Battery is at <BATTERY_PCT> — plenty for a walk ."
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"case_id": "get_heart_rate_can_you_check_my_heart_rate_now_i_m_a_bi_06",
|
| 750 |
+
"prompt": "Can you check my heart rate now? I'm a bit worried.",
|
| 751 |
+
"expected_intent": "GET_HEART_RATE",
|
| 752 |
+
"predicted_intent": "GET_HEART_RATE",
|
| 753 |
+
"intent_correct": true,
|
| 754 |
+
"has_intent_tag": true,
|
| 755 |
+
"clean_output": true,
|
| 756 |
+
"slot_presence": 1.0,
|
| 757 |
+
"raw_reply": "<INTENT:GET_HEART_RATE> Your current heart rate is <HR_CURRENT_BPM>. That's a bit elevated , but if you feel dizzy , short of breath , or chest pain",
|
| 758 |
+
"display_reply": "Your current heart rate is <HR_CURRENT_BPM>. That's a bit elevated , but if you feel dizzy , short of breath , or chest pain"
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"case_id": "measure_heart_rate_please_take_my_pulse_now_i_feel_a_little_07",
|
| 762 |
+
"prompt": "Please take my pulse now — I feel a little fluttery.",
|
| 763 |
+
"expected_intent": "MEASURE_HEART_RATE",
|
| 764 |
+
"predicted_intent": "MEASURE_HEART_RATE",
|
| 765 |
+
"intent_correct": true,
|
| 766 |
+
"has_intent_tag": true,
|
| 767 |
+
"clean_output": true,
|
| 768 |
+
"slot_presence": 0.0,
|
| 769 |
+
"raw_reply": "<INTENT:MEASURE_HEART_RATE> I' m measuring your pulse now . Please hold still for a moment .",
|
| 770 |
+
"display_reply": "I' m measuring your pulse now . Please hold still for a moment ."
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"case_id": "get_sleep_hey_how_long_did_i_sleep_last_night_08",
|
| 774 |
+
"prompt": "Hey, how long did I sleep last night?",
|
| 775 |
+
"expected_intent": "GET_SLEEP",
|
| 776 |
+
"predicted_intent": "GET_SLEEP",
|
| 777 |
+
"intent_correct": true,
|
| 778 |
+
"has_intent_tag": true,
|
| 779 |
+
"clean_output": true,
|
| 780 |
+
"slot_presence": 1.0,
|
| 781 |
+
"raw_reply": "<INTENT:GET_SLEEP> You slept <SLEEP_HOURS_LAST_NIGHT> last night — nice work .",
|
| 782 |
+
"display_reply": "You slept <SLEEP_HOURS_LAST_NIGHT> last night — nice work ."
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"case_id": "log_nap_just_woke_up_from_a_quick_power_nap_can_09",
|
| 786 |
+
"prompt": "Just woke up from a quick power nap — can you log it?",
|
| 787 |
+
"expected_intent": "LOG_NAP",
|
| 788 |
+
"predicted_intent": "LOG_NAP",
|
| 789 |
+
"intent_correct": true,
|
| 790 |
+
"has_intent_tag": true,
|
| 791 |
+
"clean_output": true,
|
| 792 |
+
"slot_presence": 1.0,
|
| 793 |
+
"raw_reply": "<INTENT:LOG_NAP> Got it , logging a nap of <DURATION>. You had <SLEEP_HOURS_LAST_NIGHT> last night , so this should help a bit .",
|
| 794 |
+
"display_reply": "Got it , logging a nap of <DURATION>. You had <SLEEP_HOURS_LAST_NIGHT> last night , so this should help a bit ."
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"case_id": "get_calories_hey_how_many_calories_have_i_burned_sinc_10",
|
| 798 |
+
"prompt": "Hey, how many calories have I burned since midnight?",
|
| 799 |
+
"expected_intent": "GET_CALORIES",
|
| 800 |
+
"predicted_intent": "GET_CALORIES",
|
| 801 |
+
"intent_correct": true,
|
| 802 |
+
"has_intent_tag": true,
|
| 803 |
+
"clean_output": true,
|
| 804 |
+
"slot_presence": 1.0,
|
| 805 |
+
"raw_reply": "<INTENT:GET_CALORIES> You' ve burned <CALORIES_TODAY> so far today , and your goal is <CALORIE_GOAL> — nice work .",
|
| 806 |
+
"display_reply": "You' ve burned <CALORIES_TODAY> so far today , and your goal is <CALORIE_GOAL> — nice work ."
|
| 807 |
+
},
|
| 808 |
+
{
|
| 809 |
+
"case_id": "set_calorie_goal_lower_my_daily_active_calorie_burn_targe_11",
|
| 810 |
+
"prompt": "Lower my daily active calorie burn target to 400, please.",
|
| 811 |
+
"expected_intent": "SET_CALORIE_GOAL",
|
| 812 |
+
"predicted_intent": "SET_CALORIE_GOAL",
|
| 813 |
+
"intent_correct": true,
|
| 814 |
+
"has_intent_tag": true,
|
| 815 |
+
"clean_output": true,
|
| 816 |
+
"slot_presence": 1.0,
|
| 817 |
+
"raw_reply": "<INTENT:SET_CALORIE_GOAL> Done — your daily active calorie goal is now <CALORIE_GOAL>. I' ll keep track and let you know how you' re doing .",
|
| 818 |
+
"display_reply": "Done — your daily active calorie goal is now <CALORIE_GOAL>. I' ll keep track and let you know how you' re doing ."
|
| 819 |
+
},
|
| 820 |
+
{
|
| 821 |
+
"case_id": "get_active_minutes_how_many_active_minutes_have_i_done_toda_12",
|
| 822 |
+
"prompt": "How many active minutes have I done today?",
|
| 823 |
+
"expected_intent": "GET_ACTIVE_MINUTES",
|
| 824 |
+
"predicted_intent": "GET_ACTIVE_MINUTES",
|
| 825 |
+
"intent_correct": true,
|
| 826 |
+
"has_intent_tag": true,
|
| 827 |
+
"clean_output": true,
|
| 828 |
+
"slot_presence": 1.0,
|
| 829 |
+
"raw_reply": "<INTENT:GET_ACTIVE_MINUTES> You' ve got <ACTIVE_MINUTES_TODAY> active minutes so far , with a goal of <ACTIVE_MINUTES_GOAL>.",
|
| 830 |
+
"display_reply": "You' ve got <ACTIVE_MINUTES_TODAY> active minutes so far , with a goal of <ACTIVE_MINUTES_GOAL>."
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"case_id": "set_active_goal_can_you_raise_my_daily_active_minutes_go_13",
|
| 834 |
+
"prompt": "Can you raise my daily active minutes goal to 45 minutes?",
|
| 835 |
+
"expected_intent": "SET_ACTIVE_GOAL",
|
| 836 |
+
"predicted_intent": "SET_ACTIVE_GOAL",
|
| 837 |
+
"intent_correct": true,
|
| 838 |
+
"has_intent_tag": true,
|
| 839 |
+
"clean_output": true,
|
| 840 |
+
"slot_presence": 1.0,
|
| 841 |
+
"raw_reply": "<INTENT:SET_ACTIVE_GOAL> Done — your daily active minutes goal is now <ACTIVE_MINUTES_GOAL>.",
|
| 842 |
+
"display_reply": "Done — your daily active minutes goal is now <ACTIVE_MINUTES_GOAL>."
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"case_id": "enable_power_save_battery_s_low_turn_on_power_saving_now_14",
|
| 846 |
+
"prompt": "Battery's low — turn on power saving now.",
|
| 847 |
+
"expected_intent": "ENABLE_POWER_SAVE",
|
| 848 |
+
"predicted_intent": "ENABLE_POWER_SAVE",
|
| 849 |
+
"intent_correct": true,
|
| 850 |
+
"has_intent_tag": true,
|
| 851 |
+
"clean_output": true,
|
| 852 |
+
"slot_presence": 1.0,
|
| 853 |
+
"raw_reply": "<INTENT:ENABLE_POWER_SAVE> Power saving is on . Battery is at <BATTERY_PCT>, so I'll dim the screen , limit background sync , and reduce sensor use .",
|
| 854 |
+
"display_reply": "Power saving is on . Battery is at <BATTERY_PCT>, so I'll dim the screen , limit background sync , and reduce sensor use ."
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"case_id": "disable_aod_please_turn_off_the_always_on_display_to_15",
|
| 858 |
+
"prompt": "Please turn off the always-on display to save battery.",
|
| 859 |
+
"expected_intent": "DISABLE_AOD",
|
| 860 |
+
"predicted_intent": "DISABLE_AOD",
|
| 861 |
+
"intent_correct": true,
|
| 862 |
+
"has_intent_tag": true,
|
| 863 |
+
"clean_output": true,
|
| 864 |
+
"slot_presence": 1.0,
|
| 865 |
+
"raw_reply": "<INTENT:DISABLE_AOD> Done — always - on display is off , and your battery is at <BATTERY_PCT>.",
|
| 866 |
+
"display_reply": "Done — always - on display is off , and your battery is at <BATTERY_PCT>."
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"case_id": "set_alarm_i_need_an_alarm_for_tomorrow_morning_to_16",
|
| 870 |
+
"prompt": "I need an alarm for tomorrow morning to make sure I wake up for my run.",
|
| 871 |
+
"expected_intent": "SET_ALARM",
|
| 872 |
+
"predicted_intent": "SET_ALARM",
|
| 873 |
+
"intent_correct": true,
|
| 874 |
+
"has_intent_tag": true,
|
| 875 |
+
"clean_output": true,
|
| 876 |
+
"slot_presence": 1.0,
|
| 877 |
+
"raw_reply": "<INTENT:SET_ALARM> Got it — I set an alarm for <ALARM_TIME> on <DATE> with the label <ALARM_LABEL>.",
|
| 878 |
+
"display_reply": "Got it — I set an alarm for <ALARM_TIME> on <DATE> with the label <ALARM_LABEL>."
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"case_id": "list_alarms_quick_check_what_alarms_are_set_on_my_wa_17",
|
| 882 |
+
"prompt": "Quick check — what alarms are set on my watch?",
|
| 883 |
+
"expected_intent": "LIST_ALARMS",
|
| 884 |
+
"predicted_intent": "LIST_ALARMS",
|
| 885 |
+
"intent_correct": true,
|
| 886 |
+
"has_intent_tag": true,
|
| 887 |
+
"clean_output": true,
|
| 888 |
+
"slot_presence": 1.0,
|
| 889 |
+
"raw_reply": "<INTENT:LIST_ALARMS> Here are your active alarms : <ALARM_TIME> — <ALARM_LABEL>; <ALARM_TIME> — <ALARM_LABEL>; <ALARM_TIME>",
|
| 890 |
+
"display_reply": "Here are your active alarms : <ALARM_TIME> — <ALARM_LABEL>; <ALARM_TIME> — <ALARM_LABEL>; <ALARM_TIME>"
|
| 891 |
+
},
|
| 892 |
+
{
|
| 893 |
+
"case_id": "delete_alarm_please_delete_my_standard_morning_wake_u_18",
|
| 894 |
+
"prompt": "Please delete my standard morning wake-up alarm.",
|
| 895 |
+
"expected_intent": "DELETE_ALARM",
|
| 896 |
+
"predicted_intent": "DELETE_ALARM",
|
| 897 |
+
"intent_correct": true,
|
| 898 |
+
"has_intent_tag": true,
|
| 899 |
+
"clean_output": true,
|
| 900 |
+
"slot_presence": 1.0,
|
| 901 |
+
"raw_reply": "<INTENT:DELETE_ALARM> Got it — I deleted <ALARM_LABEL>.",
|
| 902 |
+
"display_reply": "Got it — I deleted <ALARM_LABEL>."
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"case_id": "explain_nudge_hey_why_did_my_watch_just_vibrate_19",
|
| 906 |
+
"prompt": "hey, why did my watch just vibrate?",
|
| 907 |
+
"expected_intent": "EXPLAIN_NUDGE",
|
| 908 |
+
"predicted_intent": "EXPLAIN_NUDGE",
|
| 909 |
+
"intent_correct": true,
|
| 910 |
+
"has_intent_tag": true,
|
| 911 |
+
"clean_output": true,
|
| 912 |
+
"slot_presence": 1.0,
|
| 913 |
+
"raw_reply": "<INTENT:EXPLAIN_NUDGE> It looks like a sedentary move nudge for <NUDGE_REASON> — you' ve been still for <DURATION>, so it' s reminding you to get up and",
|
| 914 |
+
"display_reply": "It looks like a sedentary move nudge for <NUDGE_REASON> — you' ve been still for <DURATION>, so it' s reminding you to get up and"
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"case_id": "mute_reminders_i_m_getting_hourly_move_reminders_mute_t_20",
|
| 918 |
+
"prompt": "I'm getting hourly move reminders — mute them entirely, please.",
|
| 919 |
+
"expected_intent": "MUTE_REMINDERS",
|
| 920 |
+
"predicted_intent": "MUTE_REMINDERS",
|
| 921 |
+
"intent_correct": true,
|
| 922 |
+
"has_intent_tag": true,
|
| 923 |
+
"clean_output": true,
|
| 924 |
+
"slot_presence": 1.0,
|
| 925 |
+
"raw_reply": "<INTENT:MUTE_REMINDERS> Got it — I' ve muted the hourly move reminders on your watch .",
|
| 926 |
+
"display_reply": "Got it — I' ve muted the hourly move reminders on your watch ."
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"case_id": "snooze_alarm_ugh_it_s_buzzing_snooze_this_alarm_for_a_21",
|
| 930 |
+
"prompt": "Ugh, it's buzzing — snooze this alarm for a few minutes.",
|
| 931 |
+
"expected_intent": "SNOOZE_ALARM",
|
| 932 |
+
"predicted_intent": "SNOOZE_ALARM",
|
| 933 |
+
"intent_correct": true,
|
| 934 |
+
"has_intent_tag": true,
|
| 935 |
+
"clean_output": true,
|
| 936 |
+
"slot_presence": 1.0,
|
| 937 |
+
"raw_reply": "<INTENT:SNOOZE_ALARM> Got it — snoozing <ALARM_LABEL> set for <ALARM_TIME> for <DURATION>. I'll buzz you again then .",
|
| 938 |
+
"display_reply": "Got it — snoozing <ALARM_LABEL> set for <ALARM_TIME> for <DURATION>. I'll buzz you again then ."
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"case_id": "set_reminder_i_keep_forgetting_to_drink_water_can_you_22",
|
| 942 |
+
"prompt": "I keep forgetting to drink water — can you set a repeating reminder every two hours to drink water, please?",
|
| 943 |
+
"expected_intent": "SET_REMINDER",
|
| 944 |
+
"predicted_intent": "SET_REMINDER",
|
| 945 |
+
"intent_correct": true,
|
| 946 |
+
"has_intent_tag": true,
|
| 947 |
+
"clean_output": true,
|
| 948 |
+
"slot_presence": 1.0,
|
| 949 |
+
"raw_reply": "<INTENT:SET_REMINDER> Got it — I' ll set a repeating reminder for <ALARM_LABEL> every <REMINDER_INTERVAL>.",
|
| 950 |
+
"display_reply": "Got it — I' ll set a repeating reminder for <ALARM_LABEL> every <REMINDER_INTERVAL>."
|
| 951 |
+
},
|
| 952 |
+
{
|
| 953 |
+
"case_id": "start_timer_start_a_twenty_minute_timer_23",
|
| 954 |
+
"prompt": "Start a twenty-minute timer.",
|
| 955 |
+
"expected_intent": "START_TIMER",
|
| 956 |
+
"predicted_intent": "START_TIMER",
|
| 957 |
+
"intent_correct": true,
|
| 958 |
+
"has_intent_tag": true,
|
| 959 |
+
"clean_output": true,
|
| 960 |
+
"slot_presence": 1.0,
|
| 961 |
+
"raw_reply": "<INTENT:START_TIMER> Got it — starting a timer for <DURATION>.",
|
| 962 |
+
"display_reply": "Got it — starting a timer for <DURATION>."
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"case_id": "get_timer_remaining_how_much_time_is_left_on_the_cooking_tim_24",
|
| 966 |
+
"prompt": "How much time is left on the cooking timer? I'm juggling a few things here.",
|
| 967 |
+
"expected_intent": "GET_TIMER_REMAINING",
|
| 968 |
+
"predicted_intent": "GET_TIMER_REMAINING",
|
| 969 |
+
"intent_correct": true,
|
| 970 |
+
"has_intent_tag": true,
|
| 971 |
+
"clean_output": true,
|
| 972 |
+
"slot_presence": 1.0,
|
| 973 |
+
"raw_reply": "<INTENT:GET_TIMER_REMAINING> The timer has <TIMER_REMAINING> remaining out of the <DURATION>.",
|
| 974 |
+
"display_reply": "The timer has <TIMER_REMAINING> remaining out of the <DURATION>."
|
| 975 |
+
},
|
| 976 |
+
{
|
| 977 |
+
"case_id": "pause_timer_pause_the_countdown_now_freeze_it_25",
|
| 978 |
+
"prompt": "Pause the countdown now — freeze it.",
|
| 979 |
+
"expected_intent": "PAUSE_TIMER",
|
| 980 |
+
"predicted_intent": "PAUSE_TIMER",
|
| 981 |
+
"intent_correct": true,
|
| 982 |
+
"has_intent_tag": true,
|
| 983 |
+
"clean_output": true,
|
| 984 |
+
"slot_presence": 1.0,
|
| 985 |
+
"raw_reply": "<INTENT:PAUSE_TIMER> Paused your timer — <TIMER_REMAINING> remaining of the <DURATION>. I'll keep it frozen until you say resume .",
|
| 986 |
+
"display_reply": "Paused your timer — <TIMER_REMAINING> remaining of the <DURATION>. I'll keep it frozen until you say resume ."
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"case_id": "start_stopwatch_start_the_stopwatch_app_and_begin_timing_26",
|
| 990 |
+
"prompt": "Start the stopwatch app and begin timing.",
|
| 991 |
+
"expected_intent": "START_STOPWATCH",
|
| 992 |
+
"predicted_intent": "START_STOPWATCH",
|
| 993 |
+
"intent_correct": true,
|
| 994 |
+
"has_intent_tag": true,
|
| 995 |
+
"clean_output": true,
|
| 996 |
+
"slot_presence": 1.0,
|
| 997 |
+
"raw_reply": "<INTENT:START_STOPWATCH> Stopwatch started — I'll record time on your wrist . Tap to lap or say \" stop \" to stop .",
|
| 998 |
+
"display_reply": "Stopwatch started — I'll record time on your wrist . Tap to lap or say \" stop \" to stop ."
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"case_id": "lap_stopwatch_mark_a_lap_split_27",
|
| 1002 |
+
"prompt": "Mark a lap split.",
|
| 1003 |
+
"expected_intent": "LAP_STOPWATCH",
|
| 1004 |
+
"predicted_intent": "LAP_STOPWATCH",
|
| 1005 |
+
"intent_correct": true,
|
| 1006 |
+
"has_intent_tag": true,
|
| 1007 |
+
"clean_output": true,
|
| 1008 |
+
"slot_presence": 1.0,
|
| 1009 |
+
"raw_reply": "<INTENT:LAP_STOPWATCH> Got it — lap recorded at <LAP_TIME>, with the run at <DURATION>.",
|
| 1010 |
+
"display_reply": "Got it — lap recorded at <LAP_TIME>, with the run at <DURATION>."
|
| 1011 |
+
},
|
| 1012 |
+
{
|
| 1013 |
+
"case_id": "reset_stopwatch_hey_reset_my_stopwatch_and_clear_its_lap_28",
|
| 1014 |
+
"prompt": "Hey, reset my stopwatch and clear its laps please.",
|
| 1015 |
+
"expected_intent": "RESET_STOPWATCH",
|
| 1016 |
+
"predicted_intent": "RESET_STOPWATCH",
|
| 1017 |
+
"intent_correct": true,
|
| 1018 |
+
"has_intent_tag": true,
|
| 1019 |
+
"clean_output": true,
|
| 1020 |
+
"slot_presence": 1.0,
|
| 1021 |
+
"raw_reply": "<INTENT:RESET_STOPWATCH> Stopwatch reset to <DURATION>, and the last lap is cleared from <LAP_TIME>.",
|
| 1022 |
+
"display_reply": "Stopwatch reset to <DURATION>, and the last lap is cleared from <LAP_TIME>."
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"case_id": "cancel_timer_stop_and_clear_my_running_timer_please_29",
|
| 1026 |
+
"prompt": "Stop and clear my running timer, please.",
|
| 1027 |
+
"expected_intent": "CANCEL_TIMER",
|
| 1028 |
+
"predicted_intent": "CANCEL_TIMER",
|
| 1029 |
+
"intent_correct": true,
|
| 1030 |
+
"has_intent_tag": true,
|
| 1031 |
+
"clean_output": true,
|
| 1032 |
+
"slot_presence": 0.5,
|
| 1033 |
+
"raw_reply": "<INTENT:CANCEL_TIMER> Got it — I canceled the timer with <TIMER_REMAINING> left and cleared it out .",
|
| 1034 |
+
"display_reply": "Got it — I canceled the timer with <TIMER_REMAINING> left and cleared it out ."
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"case_id": "start_workout_i_m_heading_out_for_an_outdoor_walk_star_30",
|
| 1038 |
+
"prompt": "I'm heading out for an outdoor walk — start tracking, please.",
|
| 1039 |
+
"expected_intent": "START_WORKOUT",
|
| 1040 |
+
"predicted_intent": "START_WORKOUT",
|
| 1041 |
+
"intent_correct": true,
|
| 1042 |
+
"has_intent_tag": true,
|
| 1043 |
+
"clean_output": true,
|
| 1044 |
+
"slot_presence": 1.0,
|
| 1045 |
+
"raw_reply": "<INTENT:START_WORKOUT> Got it — starting <WORKOUT_TYPE> now . Enjoy the walk .",
|
| 1046 |
+
"display_reply": "Got it — starting <WORKOUT_TYPE> now . Enjoy the walk ."
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"case_id": "stop_workout_i_m_done_with_my_run_stop_tracking_and_s_31",
|
| 1050 |
+
"prompt": "I'm done with my run — stop tracking and save the session.",
|
| 1051 |
+
"expected_intent": "STOP_WORKOUT",
|
| 1052 |
+
"predicted_intent": "STOP_WORKOUT",
|
| 1053 |
+
"intent_correct": true,
|
| 1054 |
+
"has_intent_tag": true,
|
| 1055 |
+
"clean_output": true,
|
| 1056 |
+
"slot_presence": 1.0,
|
| 1057 |
+
"raw_reply": "<INTENT:STOP_WORKOUT> Got it , I stopped your <WORKOUT_TYPE> and saved the session at <WORKOUT_ELAPSED>. Nice work today .",
|
| 1058 |
+
"display_reply": "Got it , I stopped your <WORKOUT_TYPE> and saved the session at <WORKOUT_ELAPSED>. Nice work today ."
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"case_id": "pause_workout_traffic_light_pause_my_workout_while_i_w_32",
|
| 1062 |
+
"prompt": "Traffic light—pause my workout while I wait?",
|
| 1063 |
+
"expected_intent": "PAUSE_WORKOUT",
|
| 1064 |
+
"predicted_intent": "PAUSE_WORKOUT",
|
| 1065 |
+
"intent_correct": true,
|
| 1066 |
+
"has_intent_tag": true,
|
| 1067 |
+
"clean_output": true,
|
| 1068 |
+
"slot_presence": 1.0,
|
| 1069 |
+
"raw_reply": "<INTENT:PAUSE_WORKOUT> Pausing your workout now . You've been active for <WORKOUT_ELAPSED>. Current state : <WORKOUT_STATE>. I'll keep it paused until you resume .",
|
| 1070 |
+
"display_reply": "Pausing your workout now . You've been active for <WORKOUT_ELAPSED>. Current state : <WORKOUT_STATE>. I'll keep it paused until you resume ."
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"case_id": "resume_workout_hey_resume_my_cycling_workout_from_earli_33",
|
| 1074 |
+
"prompt": "hey, resume my cycling workout from earlier",
|
| 1075 |
+
"expected_intent": "RESUME_WORKOUT",
|
| 1076 |
+
"predicted_intent": "RESUME_WORKOUT",
|
| 1077 |
+
"intent_correct": true,
|
| 1078 |
+
"has_intent_tag": true,
|
| 1079 |
+
"clean_output": true,
|
| 1080 |
+
"slot_presence": 1.0,
|
| 1081 |
+
"raw_reply": "<INTENT:RESUME_WORKOUT> Resuming your <WORKOUT_TYPE> workout . You' re back in <WORKOUT_STATE>, with <WORKOUT_ELAPSED> already logged .",
|
| 1082 |
+
"display_reply": "Resuming your <WORKOUT_TYPE> workout . You' re back in <WORKOUT_STATE>, with <WORKOUT_ELAPSED> already logged ."
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"case_id": "discard_workout_delete_the_current_run_and_erase_its_dat_34",
|
| 1086 |
+
"prompt": "Delete the current run and erase its data.",
|
| 1087 |
+
"expected_intent": "DISCARD_WORKOUT",
|
| 1088 |
+
"predicted_intent": "DISCARD_WORKOUT",
|
| 1089 |
+
"intent_correct": true,
|
| 1090 |
+
"has_intent_tag": true,
|
| 1091 |
+
"clean_output": true,
|
| 1092 |
+
"slot_presence": 1.0,
|
| 1093 |
+
"raw_reply": "<INTENT:DISCARD_WORKOUT> Got it — I' ll discard the <WORKOUT_TYPE> while it' s <WORKOUT_STATE>.",
|
| 1094 |
+
"display_reply": "Got it — I' ll discard the <WORKOUT_TYPE> while it' s <WORKOUT_STATE>."
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"case_id": "get_workout_summary_just_finished_a_walk_show_the_final_summ_35",
|
| 1098 |
+
"prompt": "Just finished a walk — show the final summary screen.",
|
| 1099 |
+
"expected_intent": "GET_WORKOUT_SUMMARY",
|
| 1100 |
+
"predicted_intent": "GET_WORKOUT_SUMMARY",
|
| 1101 |
+
"intent_correct": true,
|
| 1102 |
+
"has_intent_tag": true,
|
| 1103 |
+
"clean_output": true,
|
| 1104 |
+
"slot_presence": 1.0,
|
| 1105 |
+
"raw_reply": "<INTENT:GET_WORKOUT_SUMMARY> Here' s your <WORKOUT_TYPE> summary : <WORKOUT_ELAPSED> elapsed and <DISTANCE_TODAY> covered today .",
|
| 1106 |
+
"display_reply": "Here' s your <WORKOUT_TYPE> summary : <WORKOUT_ELAPSED> elapsed and <DISTANCE_TODAY> covered today ."
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"case_id": "get_steps_how_many_steps_have_i_taken_today_36",
|
| 1110 |
+
"prompt": "How many steps have I taken today?",
|
| 1111 |
+
"expected_intent": "GET_STEPS",
|
| 1112 |
+
"predicted_intent": "GET_STEPS",
|
| 1113 |
+
"intent_correct": true,
|
| 1114 |
+
"has_intent_tag": true,
|
| 1115 |
+
"clean_output": true,
|
| 1116 |
+
"slot_presence": 1.0,
|
| 1117 |
+
"raw_reply": "<INTENT:GET_STEPS> You' re at <STEPS_TODAY> of <STEP_GOAL> so far .",
|
| 1118 |
+
"display_reply": "You' re at <STEPS_TODAY> of <STEP_GOAL> so far ."
|
| 1119 |
+
},
|
| 1120 |
+
{
|
| 1121 |
+
"case_id": "start_timer_start_a_10_minute_timer_37",
|
| 1122 |
+
"prompt": "Start a 10 minute timer",
|
| 1123 |
+
"expected_intent": "START_TIMER",
|
| 1124 |
+
"predicted_intent": "START_TIMER",
|
| 1125 |
+
"intent_correct": true,
|
| 1126 |
+
"has_intent_tag": true,
|
| 1127 |
+
"clean_output": true,
|
| 1128 |
+
"slot_presence": 1.0,
|
| 1129 |
+
"raw_reply": "<INTENT:START_TIMER> Got it — starting a timer for <DURATION>.",
|
| 1130 |
+
"display_reply": "Got it — starting a timer for <DURATION>."
|
| 1131 |
+
},
|
| 1132 |
+
{
|
| 1133 |
+
"case_id": "none_hey_38",
|
| 1134 |
+
"prompt": "hey",
|
| 1135 |
+
"expected_intent": "NONE",
|
| 1136 |
+
"predicted_intent": "NONE",
|
| 1137 |
+
"intent_correct": true,
|
| 1138 |
+
"has_intent_tag": true,
|
| 1139 |
+
"clean_output": true,
|
| 1140 |
+
"slot_presence": 1.0,
|
| 1141 |
+
"raw_reply": "<INTENT:NONE> hi there — I'm listening .",
|
| 1142 |
+
"display_reply": "hi there — I'm listening ."
|
| 1143 |
+
}
|
| 1144 |
+
],
|
| 1145 |
+
"elapsed_sec": 31.05121770000551,
|
| 1146 |
+
"per_intent": {
|
| 1147 |
+
"CANCEL_TIMER": {
|
| 1148 |
+
"correct": 1,
|
| 1149 |
+
"total": 1,
|
| 1150 |
+
"accuracy": 1.0
|
| 1151 |
+
},
|
| 1152 |
+
"DELETE_ALARM": {
|
| 1153 |
+
"correct": 1,
|
| 1154 |
+
"total": 1,
|
| 1155 |
+
"accuracy": 1.0
|
| 1156 |
+
},
|
| 1157 |
+
"DISABLE_AOD": {
|
| 1158 |
+
"correct": 1,
|
| 1159 |
+
"total": 1,
|
| 1160 |
+
"accuracy": 1.0
|
| 1161 |
+
},
|
| 1162 |
+
"DISCARD_WORKOUT": {
|
| 1163 |
+
"correct": 1,
|
| 1164 |
+
"total": 1,
|
| 1165 |
+
"accuracy": 1.0
|
| 1166 |
+
},
|
| 1167 |
+
"ENABLE_POWER_SAVE": {
|
| 1168 |
+
"correct": 1,
|
| 1169 |
+
"total": 1,
|
| 1170 |
+
"accuracy": 1.0
|
| 1171 |
+
},
|
| 1172 |
+
"EXPLAIN_NUDGE": {
|
| 1173 |
+
"correct": 1,
|
| 1174 |
+
"total": 1,
|
| 1175 |
+
"accuracy": 1.0
|
| 1176 |
+
},
|
| 1177 |
+
"GET_ACTIVE_MINUTES": {
|
| 1178 |
+
"correct": 1,
|
| 1179 |
+
"total": 1,
|
| 1180 |
+
"accuracy": 1.0
|
| 1181 |
+
},
|
| 1182 |
+
"GET_BATTERY": {
|
| 1183 |
+
"correct": 1,
|
| 1184 |
+
"total": 1,
|
| 1185 |
+
"accuracy": 1.0
|
| 1186 |
+
},
|
| 1187 |
+
"GET_CALORIES": {
|
| 1188 |
+
"correct": 1,
|
| 1189 |
+
"total": 1,
|
| 1190 |
+
"accuracy": 1.0
|
| 1191 |
+
},
|
| 1192 |
+
"GET_DISTANCE": {
|
| 1193 |
+
"correct": 1,
|
| 1194 |
+
"total": 1,
|
| 1195 |
+
"accuracy": 1.0
|
| 1196 |
+
},
|
| 1197 |
+
"GET_HEART_RATE": {
|
| 1198 |
+
"correct": 1,
|
| 1199 |
+
"total": 1,
|
| 1200 |
+
"accuracy": 1.0
|
| 1201 |
+
},
|
| 1202 |
+
"GET_SLEEP": {
|
| 1203 |
+
"correct": 1,
|
| 1204 |
+
"total": 1,
|
| 1205 |
+
"accuracy": 1.0
|
| 1206 |
+
},
|
| 1207 |
+
"GET_STEPS": {
|
| 1208 |
+
"correct": 2,
|
| 1209 |
+
"total": 2,
|
| 1210 |
+
"accuracy": 1.0
|
| 1211 |
+
},
|
| 1212 |
+
"GET_TIMER_REMAINING": {
|
| 1213 |
+
"correct": 1,
|
| 1214 |
+
"total": 1,
|
| 1215 |
+
"accuracy": 1.0
|
| 1216 |
+
},
|
| 1217 |
+
"GET_WORKOUT_STATUS": {
|
| 1218 |
+
"correct": 1,
|
| 1219 |
+
"total": 1,
|
| 1220 |
+
"accuracy": 1.0
|
| 1221 |
+
},
|
| 1222 |
+
"GET_WORKOUT_SUMMARY": {
|
| 1223 |
+
"correct": 1,
|
| 1224 |
+
"total": 1,
|
| 1225 |
+
"accuracy": 1.0
|
| 1226 |
+
},
|
| 1227 |
+
"LAP_STOPWATCH": {
|
| 1228 |
+
"correct": 1,
|
| 1229 |
+
"total": 1,
|
| 1230 |
+
"accuracy": 1.0
|
| 1231 |
+
},
|
| 1232 |
+
"LIST_ALARMS": {
|
| 1233 |
+
"correct": 1,
|
| 1234 |
+
"total": 1,
|
| 1235 |
+
"accuracy": 1.0
|
| 1236 |
+
},
|
| 1237 |
+
"LOG_NAP": {
|
| 1238 |
+
"correct": 1,
|
| 1239 |
+
"total": 1,
|
| 1240 |
+
"accuracy": 1.0
|
| 1241 |
+
},
|
| 1242 |
+
"MEASURE_HEART_RATE": {
|
| 1243 |
+
"correct": 1,
|
| 1244 |
+
"total": 1,
|
| 1245 |
+
"accuracy": 1.0
|
| 1246 |
+
},
|
| 1247 |
+
"MUTE_REMINDERS": {
|
| 1248 |
+
"correct": 1,
|
| 1249 |
+
"total": 1,
|
| 1250 |
+
"accuracy": 1.0
|
| 1251 |
+
},
|
| 1252 |
+
"NONE": {
|
| 1253 |
+
"correct": 2,
|
| 1254 |
+
"total": 2,
|
| 1255 |
+
"accuracy": 1.0
|
| 1256 |
+
},
|
| 1257 |
+
"PAUSE_TIMER": {
|
| 1258 |
+
"correct": 1,
|
| 1259 |
+
"total": 1,
|
| 1260 |
+
"accuracy": 1.0
|
| 1261 |
+
},
|
| 1262 |
+
"PAUSE_WORKOUT": {
|
| 1263 |
+
"correct": 1,
|
| 1264 |
+
"total": 1,
|
| 1265 |
+
"accuracy": 1.0
|
| 1266 |
+
},
|
| 1267 |
+
"RESET_STOPWATCH": {
|
| 1268 |
+
"correct": 1,
|
| 1269 |
+
"total": 1,
|
| 1270 |
+
"accuracy": 1.0
|
| 1271 |
+
},
|
| 1272 |
+
"RESUME_WORKOUT": {
|
| 1273 |
+
"correct": 1,
|
| 1274 |
+
"total": 1,
|
| 1275 |
+
"accuracy": 1.0
|
| 1276 |
+
},
|
| 1277 |
+
"SET_ACTIVE_GOAL": {
|
| 1278 |
+
"correct": 1,
|
| 1279 |
+
"total": 1,
|
| 1280 |
+
"accuracy": 1.0
|
| 1281 |
+
},
|
| 1282 |
+
"SET_ALARM": {
|
| 1283 |
+
"correct": 1,
|
| 1284 |
+
"total": 1,
|
| 1285 |
+
"accuracy": 1.0
|
| 1286 |
+
},
|
| 1287 |
+
"SET_CALORIE_GOAL": {
|
| 1288 |
+
"correct": 1,
|
| 1289 |
+
"total": 1,
|
| 1290 |
+
"accuracy": 1.0
|
| 1291 |
+
},
|
| 1292 |
+
"SET_REMINDER": {
|
| 1293 |
+
"correct": 1,
|
| 1294 |
+
"total": 1,
|
| 1295 |
+
"accuracy": 1.0
|
| 1296 |
+
},
|
| 1297 |
+
"SET_STEP_GOAL": {
|
| 1298 |
+
"correct": 1,
|
| 1299 |
+
"total": 1,
|
| 1300 |
+
"accuracy": 1.0
|
| 1301 |
+
},
|
| 1302 |
+
"SNOOZE_ALARM": {
|
| 1303 |
+
"correct": 1,
|
| 1304 |
+
"total": 1,
|
| 1305 |
+
"accuracy": 1.0
|
| 1306 |
+
},
|
| 1307 |
+
"START_STOPWATCH": {
|
| 1308 |
+
"correct": 1,
|
| 1309 |
+
"total": 1,
|
| 1310 |
+
"accuracy": 1.0
|
| 1311 |
+
},
|
| 1312 |
+
"START_TIMER": {
|
| 1313 |
+
"correct": 2,
|
| 1314 |
+
"total": 2,
|
| 1315 |
+
"accuracy": 1.0
|
| 1316 |
+
},
|
| 1317 |
+
"START_WORKOUT": {
|
| 1318 |
+
"correct": 1,
|
| 1319 |
+
"total": 1,
|
| 1320 |
+
"accuracy": 1.0
|
| 1321 |
+
},
|
| 1322 |
+
"STOP_WORKOUT": {
|
| 1323 |
+
"correct": 1,
|
| 1324 |
+
"total": 1,
|
| 1325 |
+
"accuracy": 1.0
|
| 1326 |
+
}
|
| 1327 |
+
}
|
| 1328 |
+
}
|
| 1329 |
+
],
|
| 1330 |
+
"comparison": {
|
| 1331 |
+
"only_a": [],
|
| 1332 |
+
"only_b": [
|
| 1333 |
+
"get_steps_hey_am_i_doing_okay_with_steps_today_or_01",
|
| 1334 |
+
"get_workout_status_how_long_have_i_been_on_my_run_and_what_03",
|
| 1335 |
+
"get_battery_quick_question_is_my_battery_high_enough_05",
|
| 1336 |
+
"measure_heart_rate_please_take_my_pulse_now_i_feel_a_little_07",
|
| 1337 |
+
"set_calorie_goal_lower_my_daily_active_calorie_burn_targe_11",
|
| 1338 |
+
"list_alarms_quick_check_what_alarms_are_set_on_my_wa_17",
|
| 1339 |
+
"mute_reminders_i_m_getting_hourly_move_reminders_mute_t_20",
|
| 1340 |
+
"get_timer_remaining_how_much_time_is_left_on_the_cooking_tim_24",
|
| 1341 |
+
"cancel_timer_stop_and_clear_my_running_timer_please_29",
|
| 1342 |
+
"pause_workout_traffic_light_pause_my_workout_while_i_w_32",
|
| 1343 |
+
"discard_workout_delete_the_current_run_and_erase_its_dat_34"
|
| 1344 |
+
],
|
| 1345 |
+
"both_fail": []
|
| 1346 |
+
}
|
| 1347 |
+
}
|
chat.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Interactive chat with the exported Smartwatch LM.
|
| 3 |
+
|
| 4 |
+
Usage:
|
| 5 |
+
pip install torch tokenizers
|
| 6 |
+
python chat.py
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
from __future__ import annotations
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
import sys
|
| 13 |
+
from pathlib import Path
|
| 14 |
+
|
| 15 |
+
import torch
|
| 16 |
+
|
| 17 |
+
import config as cfg
|
| 18 |
+
from model import load_model
|
| 19 |
+
from reply_utils import build_prompt, extract_bot_reply_from_continuation, extract_intent_reply
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class ChatSession:
|
| 23 |
+
def __init__(
|
| 24 |
+
self,
|
| 25 |
+
checkpoint_path: Path | None = None,
|
| 26 |
+
tokenizer_path: Path | None = None,
|
| 27 |
+
device: str | None = None,
|
| 28 |
+
max_new_tokens: int | None = None,
|
| 29 |
+
temperature: float | None = None,
|
| 30 |
+
top_k: int | None = None,
|
| 31 |
+
):
|
| 32 |
+
self.model, self.tokenizer, self.device = load_model(
|
| 33 |
+
checkpoint_path, tokenizer_path, device
|
| 34 |
+
)
|
| 35 |
+
self.max_new_tokens = max_new_tokens or cfg.SAMPLE_MAX_NEW_TOKENS
|
| 36 |
+
self.temperature = temperature if temperature is not None else cfg.SAMPLE_TEMPERATURE
|
| 37 |
+
self.top_k = top_k if top_k is not None else cfg.SAMPLE_TOP_K
|
| 38 |
+
self.history: list[tuple[str, str]] = []
|
| 39 |
+
|
| 40 |
+
def reset(self) -> None:
|
| 41 |
+
self.history.clear()
|
| 42 |
+
|
| 43 |
+
@torch.no_grad()
|
| 44 |
+
def say(self, user_message: str) -> str:
|
| 45 |
+
user_message = user_message.strip()
|
| 46 |
+
if not user_message:
|
| 47 |
+
return ""
|
| 48 |
+
|
| 49 |
+
prompt = build_prompt(self.history, user_message)
|
| 50 |
+
start_ids = self.tokenizer.encode(prompt).ids
|
| 51 |
+
x = torch.tensor([start_ids], dtype=torch.long, device=self.device)
|
| 52 |
+
y = self.model.generate(
|
| 53 |
+
x,
|
| 54 |
+
max_new_tokens=self.max_new_tokens,
|
| 55 |
+
temperature=self.temperature,
|
| 56 |
+
top_k=self.top_k,
|
| 57 |
+
)
|
| 58 |
+
new_ids = y[0, len(start_ids) :].tolist()
|
| 59 |
+
continuation = self.tokenizer.decode(new_ids)
|
| 60 |
+
reply = extract_bot_reply_from_continuation(continuation)
|
| 61 |
+
self.history.append((user_message, reply))
|
| 62 |
+
return reply
|
| 63 |
+
|
| 64 |
+
def say_display(self, user_message: str) -> tuple[str, str, str]:
|
| 65 |
+
"""Return (raw_reply, intent, display_text)."""
|
| 66 |
+
raw = self.say(user_message)
|
| 67 |
+
parsed = extract_intent_reply(raw)
|
| 68 |
+
return raw, parsed.intent, parsed.template
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
def print_banner() -> None:
|
| 72 |
+
print("Smartwatch LM chat — type a message and press Enter.")
|
| 73 |
+
print("Commands: quit/exit | reset (clear history) | history")
|
| 74 |
+
print("-" * 60)
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def run_repl() -> None:
|
| 78 |
+
try:
|
| 79 |
+
session = ChatSession()
|
| 80 |
+
except FileNotFoundError as exc:
|
| 81 |
+
print(exc, file=sys.stderr)
|
| 82 |
+
sys.exit(1)
|
| 83 |
+
|
| 84 |
+
val_loss = None
|
| 85 |
+
ckpt_path = cfg.OUTPUT_DIR / "checkpoint.pt"
|
| 86 |
+
if ckpt_path.is_file():
|
| 87 |
+
checkpoint = torch.load(ckpt_path, map_location="cpu", weights_only=False)
|
| 88 |
+
val_loss = checkpoint.get("best_val_loss")
|
| 89 |
+
|
| 90 |
+
print_banner()
|
| 91 |
+
print(f"device: {session.device}")
|
| 92 |
+
if val_loss is not None:
|
| 93 |
+
print(f"checkpoint val loss: {val_loss:.4f}")
|
| 94 |
+
print()
|
| 95 |
+
|
| 96 |
+
while True:
|
| 97 |
+
try:
|
| 98 |
+
user_input = input("you> ").strip()
|
| 99 |
+
except (EOFError, KeyboardInterrupt):
|
| 100 |
+
print("\nbye")
|
| 101 |
+
break
|
| 102 |
+
|
| 103 |
+
if not user_input:
|
| 104 |
+
continue
|
| 105 |
+
lowered = user_input.lower()
|
| 106 |
+
if lowered in {"quit", "exit"}:
|
| 107 |
+
print("bye")
|
| 108 |
+
break
|
| 109 |
+
if lowered == "reset":
|
| 110 |
+
session.reset()
|
| 111 |
+
print("(history cleared)")
|
| 112 |
+
continue
|
| 113 |
+
if lowered == "history":
|
| 114 |
+
if not session.history:
|
| 115 |
+
print("(empty)")
|
| 116 |
+
for user_text, bot_text in session.history:
|
| 117 |
+
print(f"user: {user_text}\nbot: {bot_text}\n")
|
| 118 |
+
continue
|
| 119 |
+
|
| 120 |
+
_, intent, display = session.say_display(user_input)
|
| 121 |
+
print(f"bot> {display}")
|
| 122 |
+
if intent and intent != "NONE":
|
| 123 |
+
print(f" intent: {intent}")
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
run_repl()
|
checkpoint.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac7d9d1a4688dd528c436bdc4e26e7b7d1b3a666310a4ced972acfe7f29e2c38
|
| 3 |
+
size 52996277
|
config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "smartwatch_lm",
|
| 3 |
+
"vocab_size": 5533,
|
| 4 |
+
"n_layer": 6,
|
| 5 |
+
"n_head": 6,
|
| 6 |
+
"n_embd": 384,
|
| 7 |
+
"block_size": 256,
|
| 8 |
+
"dropout": 0.15,
|
| 9 |
+
"bias": false,
|
| 10 |
+
"onnx_input_names": [
|
| 11 |
+
"input_ids"
|
| 12 |
+
],
|
| 13 |
+
"onnx_output_names": [
|
| 14 |
+
"logits"
|
| 15 |
+
],
|
| 16 |
+
"onnx_opset": 17,
|
| 17 |
+
"onnx_file": "smartwatch_lm_merged.onnx",
|
| 18 |
+
"best_val_loss": 0.32432237863540647,
|
| 19 |
+
"data_files": [
|
| 20 |
+
"/content/tinydata.txt",
|
| 21 |
+
"/content/deepdata.txt",
|
| 22 |
+
"/content/tinydata1.txt",
|
| 23 |
+
"/content/data1.txt",
|
| 24 |
+
"/content/data3.txt"
|
| 25 |
+
]
|
| 26 |
+
}
|
config.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Generation defaults for the exported smartwatch LM."""
|
| 2 |
+
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
OUTPUT_DIR = Path(__file__).parent
|
| 6 |
+
|
| 7 |
+
SAMPLE_MAX_NEW_TOKENS = 120
|
| 8 |
+
SAMPLE_TEMPERATURE = 0.8
|
| 9 |
+
SAMPLE_TOP_K = 40
|
docs/avoiding-gibberish.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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-parameter** domain model. It outputs structured replies with intent tags and slot placeholders. Raw tokenizer decode can still contain **BPE artifacts**, **encoding glitches**, or **run-on text**. This guide lists what to strip, how to truncate, and includes copy-paste scripts in this repo.
|
| 4 |
+
|
| 5 |
+
**Scripts in this repo:**
|
| 6 |
+
|
| 7 |
+
| File | Purpose |
|
| 8 |
+
|------|---------|
|
| 9 |
+
| [`reply_utils.py`](../reply_utils.py) | `clean_reply`, `extract_bot_reply`, `extract_intent_reply`, `fill_slots` |
|
| 10 |
+
| [`onnx_sample.py`](../onnx_sample.py) | Full ONNX generate + cleanup pipeline |
|
| 11 |
+
| [`chat.py`](../chat.py) | PyTorch REPL using the same helpers |
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## Why gibberish appears
|
| 16 |
+
|
| 17 |
+
| Cause | Example | Fix |
|
| 18 |
+
|-------|---------|-----|
|
| 19 |
+
| BPE space marker left in decode | `ĠYou'reĠat` | Replace `Ġ` → space |
|
| 20 |
+
| BPE newline marker | `line oneĊline two` | Replace `Ċ` → newline |
|
| 21 |
+
| UTF-8 mojibake | `âĢĶ` instead of `—` | Replace known bad sequences |
|
| 22 |
+
| Model keeps generating | Fake next turn `\nuser: …` | Truncate at `\nuser:` |
|
| 23 |
+
| Model rambling | Multiple paragraphs | Take first line only |
|
| 24 |
+
| Broken intent tags | `< INTENT : GET_STEPS >` | Collapse spaces inside `<…>` |
|
| 25 |
+
| Hallucinated metrics | `8432 steps` | Use `<STEPS_TODAY>` slots instead (training constraint) |
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## Special characters to remove or replace
|
| 30 |
+
|
| 31 |
+
Apply these **in order** after every `tokenizer.decode()`:
|
| 32 |
+
|
| 33 |
+
### 1. BPE artifacts (always)
|
| 34 |
+
|
| 35 |
+
| Character | Unicode | Replace with |
|
| 36 |
+
|-----------|---------|--------------|
|
| 37 |
+
| `Ġ` | U+0120 | space (` `) |
|
| 38 |
+
| `Ċ` | U+010A | newline (`\n`) |
|
| 39 |
+
|
| 40 |
+
### 2. Mojibake sequences (when present)
|
| 41 |
+
|
| 42 |
+
| Bad sequence | Replace with |
|
| 43 |
+
|--------------|--------------|
|
| 44 |
+
| `âĢĶ` | `—` (em dash) |
|
| 45 |
+
| `âĢĻ` | `'` |
|
| 46 |
+
| `âĢĺ` | `'` |
|
| 47 |
+
| `’` | `'` |
|
| 48 |
+
| `–` | `—` |
|
| 49 |
+
|
| 50 |
+
### 3. Whitespace normalization
|
| 51 |
+
|
| 52 |
+
| Pattern | Action |
|
| 53 |
+
|---------|--------|
|
| 54 |
+
| Two or more spaces | Collapse to one space |
|
| 55 |
+
| Space before apostrophe (` '`) | Remove the space → `'` |
|
| 56 |
+
| Spaces inside angle brackets | Remove: `< STEP_GOAL >` → `<STEP_GOAL>` |
|
| 57 |
+
|
| 58 |
+
### 4. Do **not** remove
|
| 59 |
+
|
| 60 |
+
Keep these — they are part of the protocol:
|
| 61 |
+
|
| 62 |
+
- `<INTENT:NAME>` tags
|
| 63 |
+
- `<SLOT_NAME>` placeholders (filled by your app before display)
|
| 64 |
+
- Normal punctuation: `. , ! ? ' —`
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## Truncation rules (stop run-on output)
|
| 69 |
+
|
| 70 |
+
After cleaning characters, cut the reply to **one bot utterance**:
|
| 71 |
+
|
| 72 |
+
1. If `\nuser:` appears → discard everything from that point onward (model started a fake user turn).
|
| 73 |
+
2. If `\n\n` appears → keep only the text before the blank line.
|
| 74 |
+
3. Keep only the **first line** (everything before the first `\n`).
|
| 75 |
+
|
| 76 |
+
These rules are implemented in `extract_bot_reply()` in [`reply_utils.py`](../reply_utils.py).
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Generation settings that reduce gibberish
|
| 81 |
+
|
| 82 |
+
Use conservative sampling — this model is small (12M params):
|
| 83 |
+
|
| 84 |
+
| Parameter | Recommended | Effect |
|
| 85 |
+
|-----------|-------------|--------|
|
| 86 |
+
| `temperature` | **0.5** (max 0.8) | Less random word choice |
|
| 87 |
+
| `top_k` | **40** | Ignore unlikely tail tokens |
|
| 88 |
+
| `max_new_tokens` | **40** | Stop before rambling |
|
| 89 |
+
| `block_size` | **256** | Match model context; trim older history |
|
| 90 |
+
| EOS token id | **0** | Stop generating after EOS (skip first 2 steps) |
|
| 91 |
+
|
| 92 |
+
Store **unfilled** bot lines in history (`<STEPS_TODAY>` not `4,231`). Filled numbers in history confuse the model.
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## Prompt format
|
| 97 |
+
|
| 98 |
+
```
|
| 99 |
+
user: How many steps today?
|
| 100 |
+
bot: <INTENT:GET_STEPS> You're at <STEPS_TODAY> of <STEP_GOAL> — keep going!
|
| 101 |
+
user: thanks
|
| 102 |
+
bot:
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
Build with `build_prompt()` from [`reply_utils.py`](../reply_utils.py). The model continues after the final `bot:`.
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## Sample: clean text only (no model)
|
| 110 |
+
|
| 111 |
+
```bash
|
| 112 |
+
python reply_utils.py
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
```python
|
| 116 |
+
from reply_utils import clean_reply, extract_intent_reply, fill_slots
|
| 117 |
+
|
| 118 |
+
messy = "Ġ<INTENT:GET_STEPS>ĠYou'reĠatĠ<STEPS_TODAY>ĠâĢĶĠnice!\nuser: more"
|
| 119 |
+
|
| 120 |
+
parsed = extract_intent_reply(messy)
|
| 121 |
+
display = fill_slots(parsed.template, {"STEPS_TODAY": "4,231"})
|
| 122 |
+
|
| 123 |
+
print(parsed.intent) # GET_STEPS
|
| 124 |
+
print(display) # You're at 4,231 — nice!
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## Sample: PyTorch chat with cleanup
|
| 130 |
+
|
| 131 |
+
```bash
|
| 132 |
+
pip install torch tokenizers
|
| 133 |
+
python chat.py
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
```python
|
| 137 |
+
from chat import ChatSession
|
| 138 |
+
|
| 139 |
+
bot = ChatSession(temperature=0.5, max_new_tokens=40, top_k=40)
|
| 140 |
+
print(bot.say("How many steps today?"))
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
---
|
| 144 |
+
|
| 145 |
+
## Sample: ONNX with cleanup
|
| 146 |
+
|
| 147 |
+
```bash
|
| 148 |
+
pip install numpy onnxruntime tokenizers
|
| 149 |
+
python onnx_sample.py "How many steps today?"
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
Pipeline inside `onnx_sample.py`:
|
| 153 |
+
|
| 154 |
+
```
|
| 155 |
+
build_prompt → encode → ONNX loop (top-k, temp 0.5) → decode new tokens only
|
| 156 |
+
→ extract_bot_reply → extract_intent_reply → fill_slots → print
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
---
|
| 160 |
+
|
| 161 |
+
## Full runtime checklist
|
| 162 |
+
|
| 163 |
+
```
|
| 164 |
+
1. build_prompt(history with raw unfilled bot lines, user_message)
|
| 165 |
+
2. encode → generate (temp 0.5, top_k 40, max 40, EOS stop)
|
| 166 |
+
3. decode ONLY new token ids (not the full prompt)
|
| 167 |
+
4. clean_reply → extract_bot_reply → extract_intent_reply
|
| 168 |
+
5. fill_slots(template, sensor_map) → show / speak
|
| 169 |
+
6. append (user_message, raw_bot_line) to history
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
**Do not:**
|
| 173 |
+
|
| 174 |
+
- Show raw `Ġ` or mojibake to the user
|
| 175 |
+
- Put real sensor numbers back into conversation history
|
| 176 |
+
- Skip truncation at `\nuser:` or first newline
|
| 177 |
+
- Run temperature above 0.8 on this 12M model
|
| 178 |
+
|
| 179 |
+
**Do:**
|
| 180 |
+
|
| 181 |
+
- Run `clean_reply` on every decode path
|
| 182 |
+
- Validate intent names against your handler allowlist
|
| 183 |
+
- Trim history when approaching 256 tokens
|
| 184 |
+
|
| 185 |
+
---
|
| 186 |
+
|
| 187 |
+
## Related docs
|
| 188 |
+
|
| 189 |
+
- [Intent reference](./intent-reference.md) — all 35 intents and slots
|
| 190 |
+
- [Smartwatch integration](./smartwatch-integration.md) — device wiring
|
docs/intent-reference.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Wrist Wearable Assistant — Intent Reference
|
| 2 |
+
|
| 3 |
+
This document lists every intent the on-device model can emit. Your app parses these tags and runs the matching handler.
|
| 4 |
+
|
| 5 |
+
## How intents work
|
| 6 |
+
|
| 7 |
+
Bot lines in training data and at runtime use this format:
|
| 8 |
+
|
| 9 |
+
```
|
| 10 |
+
bot: <INTENT:GET_STEPS> You're at <STEPS_TODAY> of <STEP_GOAL> — keep going!
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
| Part | Role |
|
| 14 |
+
|------|------|
|
| 15 |
+
| `<INTENT:NAME>` | Tells the app **what to do** (fetch steps, start timer, etc.) |
|
| 16 |
+
| `<SLOT>` placeholders | Names **which values** the app injects from sensors/settings |
|
| 17 |
+
| Text after the tag | What the user **sees or hears** on the watch |
|
| 18 |
+
|
| 19 |
+
The model never outputs real metric values — only intents and slot tokens. Your runtime replaces slots with live data.
|
| 20 |
+
|
| 21 |
+
`NONE` is used when the bot only acknowledges or chats with no device action.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## Steps
|
| 26 |
+
|
| 27 |
+
| Intent | What it does | Typical slots |
|
| 28 |
+
|--------|--------------|---------------|
|
| 29 |
+
| `GET_STEPS` | Read step metrics from the pedometer: today’s count, goals, streaks, week/month totals, comparisons. | `<STEPS_TODAY>`, `<STEPS_YESTERDAY>`, `<STEP_GOAL>`, `<STEPS_REMAINING>`, `<STEP_GOAL_PCT>`, `<STEP_STREAK_DAYS>`, `<STEPS_WEEK_TOTAL>`, `<STEPS_LAST_WEEK_TOTAL>`, `<STEPS_MONTH_TOTAL>`, `<TIME>`, `<DATE>`, `<PERCENT>` |
|
| 30 |
+
| `SET_STEP_GOAL` | Change the user’s daily step target. | `<STEP_GOAL>` |
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Distance
|
| 35 |
+
|
| 36 |
+
| Intent | What it does | Typical slots |
|
| 37 |
+
|--------|--------------|---------------|
|
| 38 |
+
| `GET_DISTANCE` | Read distance metrics: today’s total, last session, units, weekly progress, lifetime mileage, hourly average. | `<DISTANCE_TODAY>`, `<DISTANCE_LAST_SESSION>`, `<DISTANCE_UNIT>`, `<DISTANCE_WEEK_REMAINING>`, `<DISTANCE_WEEK_BEST>`, `<DISTANCE_LIFETIME>`, `<DISTANCE_HOURLY_AVG>`, `<TIME>`, `<DATE>` |
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## Heart rate
|
| 43 |
+
|
| 44 |
+
| Intent | What it does | Typical slots |
|
| 45 |
+
|--------|--------------|---------------|
|
| 46 |
+
| `GET_HEART_RATE` | Read heart rate data: current BPM, resting rate, overnight low, session average, daily peak, elevated minutes, effort zone. | `<HR_CURRENT_BPM>`, `<HR_RESTING_BPM>`, `<HR_RESTING_OVERNIGHT_LOW>`, `<HR_AVG_SESSION>`, `<HR_PEAK_TODAY>`, `<HR_ELEVATED_MINUTES>`, `<HR_ZONE>`, `<DURATION>` |
|
| 47 |
+
| `MEASURE_HEART_RATE` | Trigger a live on-demand pulse reading from the optical sensor. | `<HR_CURRENT_BPM>` |
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Sleep
|
| 52 |
+
|
| 53 |
+
| Intent | What it does | Typical slots |
|
| 54 |
+
|--------|--------------|---------------|
|
| 55 |
+
| `GET_SLEEP` | Read sleep data: duration last night, sleep/wake times, weekly average, awake minutes, goal gap, weekend total. | `<SLEEP_HOURS_LAST_NIGHT>`, `<SLEEP_START_TIME>`, `<SLEEP_WAKE_TIME>`, `<SLEEP_AVG_WEEK>`, `<SLEEP_AWAKE_MINUTES>`, `<SLEEP_GOAL_HOURS>`, `<SLEEP_WEEKEND_TOTAL>`, `<DATE>`, `<DURATION>` |
|
| 56 |
+
| `LOG_NAP` | Record or confirm a short nap session. | `<DURATION>`, `<SLEEP_HOURS_LAST_NIGHT>`, `<TIME>` |
|
| 57 |
+
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
## Calories
|
| 61 |
+
|
| 62 |
+
| Intent | What it does | Typical slots |
|
| 63 |
+
|--------|--------------|---------------|
|
| 64 |
+
| `GET_CALORIES` | Read calorie burn: daily total, active burn, remaining to goal, yesterday comparison, per-mile estimate. | `<CALORIES_TODAY>`, `<CALORIES_ACTIVE>`, `<CALORIES_REMAINING>`, `<CALORIE_GOAL>`, `<CALORIE_GOAL_PCT>`, `<CALORIES_YESTERDAY>`, `<CALORIES_PER_MILE>`, `<DISTANCE_UNIT>`, `<DURATION>` |
|
| 65 |
+
| `SET_CALORIE_GOAL` | Change the user’s daily active calorie burn target. | `<CALORIE_GOAL>` |
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## Active minutes
|
| 70 |
+
|
| 71 |
+
| Intent | What it does | Typical slots |
|
| 72 |
+
|--------|--------------|---------------|
|
| 73 |
+
| `GET_ACTIVE_MINUTES` | Read movement time: today’s active minutes, remaining to goal, weekly total, most active day. | `<ACTIVE_MINUTES_TODAY>`, `<ACTIVE_MINUTES_REMAINING>`, `<ACTIVE_MINUTES_GOAL>`, `<ACTIVE_MINUTES_WEEK>`, `<MOST_ACTIVE_DAY>`, `<DURATION>`, `<TIME>`, `<DATE>` |
|
| 74 |
+
| `SET_ACTIVE_GOAL` | Change the user’s daily active minutes target. | `<ACTIVE_MINUTES_GOAL>` |
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## Battery
|
| 79 |
+
|
| 80 |
+
| Intent | What it does | Typical slots |
|
| 81 |
+
|--------|--------------|---------------|
|
| 82 |
+
| `GET_BATTERY` | Read power state: percentage, estimated days left, days since charge, charge complete status. | `<BATTERY_PCT>`, `<BATTERY_DAYS_LEFT>`, `<DAYS_SINCE_CHARGE>`, `<CHARGE_COMPLETE>`, `<DURATION>`, `<DATE>` |
|
| 83 |
+
| `ENABLE_POWER_SAVE` | Turn on low-power / battery saver mode on the device. | `<BATTERY_PCT>` |
|
| 84 |
+
| `DISABLE_AOD` | Turn off always-on display to reduce power draw. | `<BATTERY_PCT>` |
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
## Alarms and reminders
|
| 89 |
+
|
| 90 |
+
| Intent | What it does | Typical slots |
|
| 91 |
+
|--------|--------------|---------------|
|
| 92 |
+
| `SET_ALARM` | Create or update a wake alarm at a given time. | `<ALARM_TIME>`, `<ALARM_LABEL>`, `<DATE>`, `<TIME>` |
|
| 93 |
+
| `LIST_ALARMS` | Show all alarms currently stored on the device. | `<ALARM_TIME>`, `<ALARM_LABEL>` |
|
| 94 |
+
| `DELETE_ALARM` | Remove one or all alarms. | `<ALARM_LABEL>`, `<ALARM_TIME>` |
|
| 95 |
+
| `SNOOZE_ALARM` | Snooze the currently firing alarm for a short period. | `<ALARM_TIME>`, `<DURATION>`, `<ALARM_LABEL>` |
|
| 96 |
+
| `SET_REMINDER` | Schedule a recurring reminder (water, bedtime wind-down, move prompts). | `<ALARM_TIME>`, `<ALARM_LABEL>`, `<REMINDER_INTERVAL>`, `<TIME>` |
|
| 97 |
+
| `MUTE_REMINDERS` | Disable hourly move reminders or similar nudges. | *(none)* |
|
| 98 |
+
| `EXPLAIN_NUDGE` | Explain why the watch just vibrated (e.g. sedentary move nudge). | `<NUDGE_REASON>`, `<DURATION>`, `<TIME>` |
|
| 99 |
+
|
| 100 |
+
---
|
| 101 |
+
|
| 102 |
+
## Timers and stopwatch
|
| 103 |
+
|
| 104 |
+
| Intent | What it does | Typical slots |
|
| 105 |
+
|--------|--------------|---------------|
|
| 106 |
+
| `START_TIMER` | Start a countdown timer (cooking, stretch, etc.). | `<DURATION>`, `<TIME>` |
|
| 107 |
+
| `PAUSE_TIMER` | Pause an active countdown. | `<TIMER_REMAINING>`, `<DURATION>` |
|
| 108 |
+
| `CANCEL_TIMER` | Stop and clear a running timer. | `<TIMER_REMAINING>`, `<DURATION>` |
|
| 109 |
+
| `GET_TIMER_REMAINING` | Report time left on a timer or whether it has finished. | `<TIMER_REMAINING>`, `<DURATION>` |
|
| 110 |
+
| `START_STOPWATCH` | Open or start the stopwatch app. | *(none)* |
|
| 111 |
+
| `LAP_STOPWATCH` | Record a lap split on the stopwatch. | `<LAP_TIME>`, `<DURATION>` |
|
| 112 |
+
| `RESET_STOPWATCH` | Reset stopwatch to zero. | `<DURATION>`, `<LAP_TIME>` |
|
| 113 |
+
|
| 114 |
+
---
|
| 115 |
+
|
| 116 |
+
## Workout toggles
|
| 117 |
+
|
| 118 |
+
| Intent | What it does | Typical slots |
|
| 119 |
+
|--------|--------------|---------------|
|
| 120 |
+
| `START_WORKOUT` | Begin tracking a workout (walk, run, cycle, indoor cardio). | `<WORKOUT_TYPE>` |
|
| 121 |
+
| `PAUSE_WORKOUT` | Pause the active workout session. | `<WORKOUT_ELAPSED>`, `<WORKOUT_STATE>`, `<WORKOUT_TYPE>` |
|
| 122 |
+
| `RESUME_WORKOUT` | Resume a paused workout. | `<WORKOUT_ELAPSED>`, `<WORKOUT_STATE>`, `<WORKOUT_TYPE>` |
|
| 123 |
+
| `STOP_WORKOUT` | End the workout and save the session. | `<WORKOUT_ELAPSED>`, `<WORKOUT_TYPE>`, `<WORKOUT_STATE>` |
|
| 124 |
+
| `DISCARD_WORKOUT` | End the workout without saving data. | `<WORKOUT_TYPE>`, `<WORKOUT_STATE>` |
|
| 125 |
+
| `GET_WORKOUT_STATUS` | Check if a workout is running, paused, or left on by mistake; report elapsed time. | `<WORKOUT_ELAPSED>`, `<WORKOUT_STATE>`, `<WORKOUT_TYPE>` |
|
| 126 |
+
| `GET_WORKOUT_SUMMARY` | Show the post-workout summary screen (duration, distance, calories, HR). | `<WORKOUT_TYPE>`, `<WORKOUT_ELAPSED>`, `<DISTANCE_TODAY>`, `<DISTANCE_UNIT>`, `<CALORIES_ACTIVE>`, `<HR_AVG_SESSION>` |
|
| 127 |
+
|
| 128 |
+
---
|
| 129 |
+
|
| 130 |
+
## Non-action
|
| 131 |
+
|
| 132 |
+
| Intent | What it does | Typical slots |
|
| 133 |
+
|--------|--------------|---------------|
|
| 134 |
+
| `NONE` | Pure conversational reply — thanks, encouragement, clarification — with no sensor fetch or device command. | *(none)* |
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## Summary
|
| 139 |
+
|
| 140 |
+
| Category | Intents | Count |
|
| 141 |
+
|----------|---------|------:|
|
| 142 |
+
| Steps | `GET_STEPS`, `SET_STEP_GOAL` | 2 |
|
| 143 |
+
| Distance | `GET_DISTANCE` | 1 |
|
| 144 |
+
| Heart rate | `GET_HEART_RATE`, `MEASURE_HEART_RATE` | 2 |
|
| 145 |
+
| Sleep | `GET_SLEEP`, `LOG_NAP` | 2 |
|
| 146 |
+
| Calories | `GET_CALORIES`, `SET_CALORIE_GOAL` | 2 |
|
| 147 |
+
| Active minutes | `GET_ACTIVE_MINUTES`, `SET_ACTIVE_GOAL` | 2 |
|
| 148 |
+
| Battery | `GET_BATTERY`, `ENABLE_POWER_SAVE`, `DISABLE_AOD` | 3 |
|
| 149 |
+
| Alarms / reminders | `SET_ALARM`, `LIST_ALARMS`, `DELETE_ALARM`, `SNOOZE_ALARM`, `SET_REMINDER`, `MUTE_REMINDERS`, `EXPLAIN_NUDGE` | 7 |
|
| 150 |
+
| Timers / stopwatch | `START_TIMER`, `PAUSE_TIMER`, `CANCEL_TIMER`, `GET_TIMER_REMAINING`, `START_STOPWATCH`, `LAP_STOPWATCH`, `RESET_STOPWATCH` | 7 |
|
| 151 |
+
| Workout | `START_WORKOUT`, `PAUSE_WORKOUT`, `RESUME_WORKOUT`, `STOP_WORKOUT`, `DISCARD_WORKOUT`, `GET_WORKOUT_STATUS`, `GET_WORKOUT_SUMMARY` | 7 |
|
| 152 |
+
| Non-action | `NONE` | 1 |
|
| 153 |
+
| **Total** | | **35** |
|
| 154 |
+
|
| 155 |
+
---
|
| 156 |
+
|
| 157 |
+
Each wearable product may implement only a subset of these intents depending on hardware and firmware.
|
docs/smartwatch-integration.md
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Smartwatch Integration Guide
|
| 2 |
+
|
| 3 |
+
How to run **Smartwatch LM v0.1** on a wrist device and wire it to sensors, timers, and apps.
|
| 4 |
+
|
| 5 |
+
The model is a **12M-parameter** GPT exported as ONNX. It does not execute device actions itself — it emits **intent tags** and **slot placeholders** that your firmware parses and handles.
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## What you ship
|
| 10 |
+
|
| 11 |
+
| File | Size (approx.) | Purpose |
|
| 12 |
+
|------|----------------|---------|
|
| 13 |
+
| `smartwatch_lm_merged.onnx` | ~52 MB | ONNX Runtime inference |
|
| 14 |
+
| `tokenizer.json` | ~200 KB | Text ↔ token ids |
|
| 15 |
+
| `tokenizer_config.json` | small | Tokenizer metadata |
|
| 16 |
+
| `config.json` | small | Architecture and I/O names |
|
| 17 |
+
| `reply_utils.py` | small | Cleanup, intent parse, slot fill |
|
| 18 |
+
| `onnx_sample.py` | small | Reference ONNX generate loop |
|
| 19 |
+
|
| 20 |
+
Optional on PC: `checkpoint.pt`, `chat.py`, `model.py` for PyTorch chat and fine-tuning.
|
| 21 |
+
|
| 22 |
+
**ONNX I/O:**
|
| 23 |
+
|
| 24 |
+
- Input: `input_ids` — int64, shape `[batch, seq]`, max seq **256**
|
| 25 |
+
- Output: `logits` — float, shape `[batch, seq, vocab_size]` (vocab **3524**)
|
| 26 |
+
|
| 27 |
+
Sample the **last position** logits autoregressively until EOS or max tokens.
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
## Architecture
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
User input (touch / voice-to-text)
|
| 35 |
+
→ build_prompt()
|
| 36 |
+
→ tokenizer.encode()
|
| 37 |
+
→ ONNX generate loop
|
| 38 |
+
→ tokenizer.decode (new tokens only)
|
| 39 |
+
→ reply_utils.clean + extract_intent_reply
|
| 40 |
+
→ intent router → sensor handlers
|
| 41 |
+
→ fill_slots() → display / TTS
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
| Component | Role |
|
| 45 |
+
|-----------|------|
|
| 46 |
+
| LM | Intent + reply template with `<SLOT>` tokens |
|
| 47 |
+
| Router | Map `<INTENT:NAME>` to a handler |
|
| 48 |
+
| Handlers | Read/write device state |
|
| 49 |
+
| Slot map | Live values for `<STEPS_TODAY>`, `<BATTERY_PCT>`, etc. |
|
| 50 |
+
|
| 51 |
+
See [Intent reference](./intent-reference.md) for all 35 intents.
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Step 1 — Inference runtime
|
| 56 |
+
|
| 57 |
+
| Platform | Runtime |
|
| 58 |
+
|----------|---------|
|
| 59 |
+
| Wear OS | ONNX Runtime Mobile (NNAPI / XNNPACK) |
|
| 60 |
+
| watchOS | ORT Mobile or Core ML (consider INT8 quant) |
|
| 61 |
+
| Companion phone | ORT on phone, BLE to watch for display |
|
| 62 |
+
| Prototype | `python onnx_sample.py` on desktop |
|
| 63 |
+
|
| 64 |
+
Budget ~52 MB weights + activations. Quantization or phone-side inference helps on tight RAM.
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## Step 2 — Generation loop
|
| 69 |
+
|
| 70 |
+
Recommended settings (see [Avoiding gibberish](./avoiding-gibberish.md)):
|
| 71 |
+
|
| 72 |
+
```text
|
| 73 |
+
temperature = 0.5
|
| 74 |
+
top_k = 40
|
| 75 |
+
max_new_tokens = 40
|
| 76 |
+
block_size = 256
|
| 77 |
+
eos_token_id = 0
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
Reference implementations:
|
| 81 |
+
|
| 82 |
+
- ONNX: [`onnx_sample.py`](../onnx_sample.py)
|
| 83 |
+
- PyTorch: [`model.py`](../model.py) `GPT.generate()` + [`chat.py`](../chat.py)
|
| 84 |
+
|
| 85 |
+
---
|
| 86 |
+
|
| 87 |
+
## Step 3 — Prompt and history
|
| 88 |
+
|
| 89 |
+
```
|
| 90 |
+
user: How many steps today?
|
| 91 |
+
bot: <INTENT:GET_STEPS> You're at <STEPS_TODAY> of <STEP_GOAL> — keep going!
|
| 92 |
+
user: Set a 10 minute timer
|
| 93 |
+
bot:
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
Use `build_prompt()` from [`reply_utils.py`](../reply_utils.py).
|
| 97 |
+
|
| 98 |
+
- History stores **raw** bot lines with unfilled slots
|
| 99 |
+
- Never store display text with real numbers in history
|
| 100 |
+
- Drop oldest turns when encoded length nears 256 tokens
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## Step 4 — Cleanup and slots
|
| 105 |
+
|
| 106 |
+
Always run the cleanup pipeline from [`reply_utils.py`](../reply_utils.py):
|
| 107 |
+
|
| 108 |
+
1. `extract_bot_reply(prompt, generated)` — one line, no fake `\nuser:` tail
|
| 109 |
+
2. `extract_intent_reply(raw)` → intent + template
|
| 110 |
+
3. `fill_slots(template, slot_map)` → user-visible string
|
| 111 |
+
|
| 112 |
+
Example slot map:
|
| 113 |
+
|
| 114 |
+
```python
|
| 115 |
+
{
|
| 116 |
+
"STEPS_TODAY": "4,231",
|
| 117 |
+
"STEP_GOAL": "10,000",
|
| 118 |
+
"STEPS_REMAINING": "5,769",
|
| 119 |
+
"BATTERY_PCT": "67%",
|
| 120 |
+
"TIME": "2:15 PM",
|
| 121 |
+
}
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
Character cleanup (`Ġ`, mojibake, etc.) is documented in [Avoiding gibberish](./avoiding-gibberish.md).
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
## Step 5 — Intent router
|
| 129 |
+
|
| 130 |
+
```python
|
| 131 |
+
from reply_utils import fill_slots
|
| 132 |
+
|
| 133 |
+
def dispatch(intent: str, template: str, slots: dict[str, str]) -> str:
|
| 134 |
+
filled = fill_slots(template, slots)
|
| 135 |
+
if intent == "GET_STEPS":
|
| 136 |
+
refresh_step_cache(slots)
|
| 137 |
+
elif intent == "START_TIMER":
|
| 138 |
+
timer.start(slots.get("DURATION", "5 minutes"))
|
| 139 |
+
elif intent == "NONE":
|
| 140 |
+
pass
|
| 141 |
+
else:
|
| 142 |
+
log.warning("unsupported intent: %s", intent)
|
| 143 |
+
return filled
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
Validate intents against your allowlist before side effects.
|
| 147 |
+
|
| 148 |
+
---
|
| 149 |
+
|
| 150 |
+
## Example trace
|
| 151 |
+
|
| 152 |
+
**User:** “How many steps to hit my goal?”
|
| 153 |
+
|
| 154 |
+
1. Prompt ends with `bot:`
|
| 155 |
+
2. Model raw output: `<INTENT:GET_STEPS> You need <STEPS_REMAINING> more to reach <STEP_GOAL>.`
|
| 156 |
+
3. Handler refreshes step slots from pedometer
|
| 157 |
+
4. Display: `You need 5,769 more to reach 10,000.`
|
| 158 |
+
5. History stores unfilled raw bot line
|
| 159 |
+
|
| 160 |
+
---
|
| 161 |
+
|
| 162 |
+
## Testing on desktop
|
| 163 |
+
|
| 164 |
+
```bash
|
| 165 |
+
pip install torch tokenizers
|
| 166 |
+
python chat.py
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
```bash
|
| 170 |
+
pip install numpy onnxruntime tokenizers
|
| 171 |
+
python onnx_sample.py "How many steps today?"
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
```bash
|
| 175 |
+
python reply_utils.py # cleanup demo, no model
|
| 176 |
+
```
|
| 177 |
+
|
| 178 |
+
---
|
| 179 |
+
|
| 180 |
+
## Production checklist
|
| 181 |
+
|
| 182 |
+
- [ ] `smartwatch_lm_merged.onnx` + `tokenizer.json` bundled or downloaded once
|
| 183 |
+
- [ ] Generation: temp 0.5, top_k 40, max 40 tokens
|
| 184 |
+
- [ ] `reply_utils` cleanup on every decode path
|
| 185 |
+
- [ ] History uses unfilled slot templates only
|
| 186 |
+
- [ ] Intent allowlist matches implemented handlers
|
| 187 |
+
- [ ] Slot map from real sensors before `fill_slots`
|
| 188 |
+
- [ ] Fallback when parse fails or intent is unknown
|
| 189 |
+
|
| 190 |
+
---
|
| 191 |
+
|
| 192 |
+
## Related docs
|
| 193 |
+
|
| 194 |
+
- [Avoiding gibberish](./avoiding-gibberish.md) — special characters, truncation, sample scripts
|
| 195 |
+
- [Intent reference](./intent-reference.md) — all intents and slots
|
model.py
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""GPT model definition and checkpoint loading for exported smartwatch LM."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import math
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
import torch
|
| 9 |
+
import torch.nn as nn
|
| 10 |
+
import torch.nn.functional as F
|
| 11 |
+
from tokenizers import Tokenizer
|
| 12 |
+
|
| 13 |
+
import config as cfg
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class CausalSelfAttention(nn.Module):
|
| 17 |
+
def __init__(self, n_head: int, n_embd: int, block_size: int, dropout: float, bias: bool):
|
| 18 |
+
super().__init__()
|
| 19 |
+
assert n_embd % n_head == 0
|
| 20 |
+
self.n_head = n_head
|
| 21 |
+
self.n_embd = n_embd
|
| 22 |
+
self.head_dim = n_embd // n_head
|
| 23 |
+
self.c_attn = nn.Linear(n_embd, 3 * n_embd, bias=bias)
|
| 24 |
+
self.c_proj = nn.Linear(n_embd, n_embd, bias=bias)
|
| 25 |
+
self.attn_dropout = nn.Dropout(dropout)
|
| 26 |
+
self.resid_dropout = nn.Dropout(dropout)
|
| 27 |
+
self.register_buffer(
|
| 28 |
+
"bias",
|
| 29 |
+
torch.tril(torch.ones(block_size, block_size)).view(1, 1, block_size, block_size),
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 33 |
+
b, t, c = x.size()
|
| 34 |
+
q, k, v = self.c_attn(x).split(self.n_embd, dim=2)
|
| 35 |
+
k = k.view(b, t, self.n_head, self.head_dim).transpose(1, 2)
|
| 36 |
+
q = q.view(b, t, self.n_head, self.head_dim).transpose(1, 2)
|
| 37 |
+
v = v.view(b, t, self.n_head, self.head_dim).transpose(1, 2)
|
| 38 |
+
att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(self.head_dim))
|
| 39 |
+
att = att.masked_fill(self.bias[:, :, :t, :t] == 0, float("-inf"))
|
| 40 |
+
att = F.softmax(att, dim=-1)
|
| 41 |
+
att = self.attn_dropout(att)
|
| 42 |
+
y = att @ v
|
| 43 |
+
y = y.transpose(1, 2).contiguous().view(b, t, c)
|
| 44 |
+
return self.resid_dropout(self.c_proj(y))
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
class MLP(nn.Module):
|
| 48 |
+
def __init__(self, n_embd: int, dropout: float, bias: bool):
|
| 49 |
+
super().__init__()
|
| 50 |
+
self.c_fc = nn.Linear(n_embd, 4 * n_embd, bias=bias)
|
| 51 |
+
self.gelu = nn.GELU()
|
| 52 |
+
self.c_proj = nn.Linear(4 * n_embd, n_embd, bias=bias)
|
| 53 |
+
self.dropout = nn.Dropout(dropout)
|
| 54 |
+
|
| 55 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 56 |
+
return self.dropout(self.c_proj(self.gelu(self.c_fc(x))))
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
class Block(nn.Module):
|
| 60 |
+
def __init__(self, n_head: int, n_embd: int, block_size: int, dropout: float, bias: bool):
|
| 61 |
+
super().__init__()
|
| 62 |
+
self.ln1 = nn.LayerNorm(n_embd)
|
| 63 |
+
self.attn = CausalSelfAttention(n_head, n_embd, block_size, dropout, bias)
|
| 64 |
+
self.ln2 = nn.LayerNorm(n_embd)
|
| 65 |
+
self.mlp = MLP(n_embd, dropout, bias)
|
| 66 |
+
|
| 67 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 68 |
+
x = x + self.attn(self.ln1(x))
|
| 69 |
+
x = x + self.mlp(self.ln2(x))
|
| 70 |
+
return x
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
class GPT(nn.Module):
|
| 74 |
+
def __init__(
|
| 75 |
+
self,
|
| 76 |
+
vocab_size: int,
|
| 77 |
+
n_layer: int,
|
| 78 |
+
n_head: int,
|
| 79 |
+
n_embd: int,
|
| 80 |
+
block_size: int,
|
| 81 |
+
dropout: float,
|
| 82 |
+
bias: bool,
|
| 83 |
+
):
|
| 84 |
+
super().__init__()
|
| 85 |
+
self.block_size = block_size
|
| 86 |
+
self.transformer = nn.ModuleDict(
|
| 87 |
+
{
|
| 88 |
+
"wte": nn.Embedding(vocab_size, n_embd),
|
| 89 |
+
"wpe": nn.Embedding(block_size, n_embd),
|
| 90 |
+
"drop": nn.Dropout(dropout),
|
| 91 |
+
"h": nn.ModuleList(
|
| 92 |
+
[Block(n_head, n_embd, block_size, dropout, bias) for _ in range(n_layer)]
|
| 93 |
+
),
|
| 94 |
+
"ln_f": nn.LayerNorm(n_embd),
|
| 95 |
+
}
|
| 96 |
+
)
|
| 97 |
+
self.lm_head = nn.Linear(n_embd, vocab_size, bias=False)
|
| 98 |
+
self.transformer.wte.weight = self.lm_head.weight
|
| 99 |
+
self.apply(self._init_weights)
|
| 100 |
+
|
| 101 |
+
def _init_weights(self, module: nn.Module) -> None:
|
| 102 |
+
if isinstance(module, nn.Linear):
|
| 103 |
+
torch.nn.init.normal_(module.weight, mean=0.0, std=0.02)
|
| 104 |
+
if module.bias is not None:
|
| 105 |
+
torch.nn.init.zeros_(module.bias)
|
| 106 |
+
elif isinstance(module, nn.Embedding):
|
| 107 |
+
torch.nn.init.normal_(module.weight, mean=0.0, std=0.02)
|
| 108 |
+
|
| 109 |
+
def forward(self, idx: torch.Tensor, targets=None):
|
| 110 |
+
b, t = idx.size()
|
| 111 |
+
assert t <= self.block_size
|
| 112 |
+
pos = torch.arange(0, t, dtype=torch.long, device=idx.device)
|
| 113 |
+
x = self.transformer.drop(
|
| 114 |
+
self.transformer.wte(idx) + self.transformer.wpe(pos)
|
| 115 |
+
)
|
| 116 |
+
for block in self.transformer.h:
|
| 117 |
+
x = block(x)
|
| 118 |
+
x = self.transformer.ln_f(x)
|
| 119 |
+
logits = self.lm_head(x)
|
| 120 |
+
loss = None
|
| 121 |
+
if targets is not None:
|
| 122 |
+
loss = F.cross_entropy(logits.view(-1, logits.size(-1)), targets.view(-1))
|
| 123 |
+
return logits, loss
|
| 124 |
+
|
| 125 |
+
@torch.no_grad()
|
| 126 |
+
def generate(self, idx: torch.Tensor, max_new_tokens: int, temperature: float = 1.0, top_k=None):
|
| 127 |
+
for _ in range(max_new_tokens):
|
| 128 |
+
idx_cond = idx[:, -self.block_size :]
|
| 129 |
+
logits, _ = self(idx_cond)
|
| 130 |
+
logits = logits[:, -1, :] / max(temperature, 1e-8)
|
| 131 |
+
if top_k is not None:
|
| 132 |
+
v, _ = torch.topk(logits, min(top_k, logits.size(-1)))
|
| 133 |
+
logits[logits < v[:, [-1]]] = -float("Inf")
|
| 134 |
+
probs = F.softmax(logits, dim=-1)
|
| 135 |
+
idx_next = torch.multinomial(probs, num_samples=1)
|
| 136 |
+
idx = torch.cat((idx, idx_next), dim=1)
|
| 137 |
+
return idx
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
def resolve_checkpoint_paths(
|
| 141 |
+
checkpoint_path: Path | None = None,
|
| 142 |
+
tokenizer_path: Path | None = None,
|
| 143 |
+
) -> tuple[Path, Path]:
|
| 144 |
+
ckpt = checkpoint_path or cfg.OUTPUT_DIR / "checkpoint.pt"
|
| 145 |
+
tok = tokenizer_path or cfg.OUTPUT_DIR / "tokenizer.json"
|
| 146 |
+
if not ckpt.is_file():
|
| 147 |
+
raise FileNotFoundError(
|
| 148 |
+
f"Checkpoint not found at {ckpt}. Train first, then run collab-run-2/export_model.py."
|
| 149 |
+
)
|
| 150 |
+
if not tok.is_file():
|
| 151 |
+
raise FileNotFoundError(
|
| 152 |
+
f"Tokenizer not found at {tok}. Train first, then run collab-run-2/export_model.py."
|
| 153 |
+
)
|
| 154 |
+
return ckpt, tok
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
def load_model(
|
| 158 |
+
checkpoint_path: Path | None = None,
|
| 159 |
+
tokenizer_path: Path | None = None,
|
| 160 |
+
device: str | None = None,
|
| 161 |
+
) -> tuple[GPT, Tokenizer, str]:
|
| 162 |
+
ckpt_path, tok_path = resolve_checkpoint_paths(checkpoint_path, tokenizer_path)
|
| 163 |
+
dev = device or ("cuda" if torch.cuda.is_available() else "cpu")
|
| 164 |
+
|
| 165 |
+
tokenizer = Tokenizer.from_file(str(tok_path))
|
| 166 |
+
checkpoint = torch.load(ckpt_path, map_location=dev, weights_only=False)
|
| 167 |
+
model_config = checkpoint["model_config"]
|
| 168 |
+
|
| 169 |
+
model = GPT(
|
| 170 |
+
vocab_size=model_config["vocab_size"],
|
| 171 |
+
n_layer=model_config["n_layer"],
|
| 172 |
+
n_head=model_config["n_head"],
|
| 173 |
+
n_embd=model_config["n_embd"],
|
| 174 |
+
block_size=model_config["block_size"],
|
| 175 |
+
dropout=model_config["dropout"],
|
| 176 |
+
bias=model_config["bias"],
|
| 177 |
+
)
|
| 178 |
+
model.load_state_dict(checkpoint["model_state_dict"])
|
| 179 |
+
model.to(dev)
|
| 180 |
+
model.eval()
|
| 181 |
+
|
| 182 |
+
return model, tokenizer, dev
|
onnx_sample.py
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Minimal ONNX inference sample for the exported Smartwatch LM.
|
| 3 |
+
|
| 4 |
+
Requirements:
|
| 5 |
+
pip install numpy onnxruntime tokenizers
|
| 6 |
+
|
| 7 |
+
Usage:
|
| 8 |
+
python onnx_sample.py "How many steps today?"
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from __future__ import annotations
|
| 12 |
+
|
| 13 |
+
import argparse
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
import numpy as np
|
| 18 |
+
import onnxruntime as ort
|
| 19 |
+
from tokenizers import Tokenizer
|
| 20 |
+
|
| 21 |
+
from reply_utils import build_prompt, process_model_output
|
| 22 |
+
|
| 23 |
+
MODEL_DIR = Path(__file__).parent
|
| 24 |
+
ONNX_PATH = MODEL_DIR / "smartwatch_lm_merged.onnx"
|
| 25 |
+
TOKENIZER_PATH = MODEL_DIR / "tokenizer.json"
|
| 26 |
+
|
| 27 |
+
BLOCK_SIZE = 256
|
| 28 |
+
MAX_NEW_TOKENS = 40
|
| 29 |
+
TEMPERATURE = 0.5
|
| 30 |
+
TOP_K = 40
|
| 31 |
+
EOS_TOKEN_ID = 0
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def sample_next_token(logits: np.ndarray, temperature: float, top_k: int) -> int:
|
| 35 |
+
scaled = logits / max(temperature, 1e-8)
|
| 36 |
+
scaled = scaled - scaled.max()
|
| 37 |
+
probs = np.exp(scaled)
|
| 38 |
+
probs /= probs.sum()
|
| 39 |
+
k = min(top_k, probs.size)
|
| 40 |
+
top_idx = np.argpartition(probs, -k)[-k:]
|
| 41 |
+
top_probs = probs[top_idx]
|
| 42 |
+
top_probs /= top_probs.sum()
|
| 43 |
+
return int(np.random.choice(top_idx, p=top_probs))
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def generate(session: ort.InferenceSession, tokenizer: Tokenizer, prompt: str) -> str:
|
| 47 |
+
ids = tokenizer.encode(prompt).ids
|
| 48 |
+
prompt_len = len(ids)
|
| 49 |
+
|
| 50 |
+
for step in range(MAX_NEW_TOKENS):
|
| 51 |
+
seq = ids[-BLOCK_SIZE:]
|
| 52 |
+
x = np.array([seq], dtype=np.int64)
|
| 53 |
+
logits = session.run(None, {"input_ids": x})[0]
|
| 54 |
+
next_logits = logits[0, -1, :]
|
| 55 |
+
next_id = sample_next_token(next_logits, TEMPERATURE, TOP_K)
|
| 56 |
+
ids.append(next_id)
|
| 57 |
+
if step > 2 and next_id == EOS_TOKEN_ID:
|
| 58 |
+
break
|
| 59 |
+
|
| 60 |
+
return tokenizer.decode(ids[prompt_len:])
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def main() -> None:
|
| 64 |
+
parser = argparse.ArgumentParser(description="ONNX chat sample")
|
| 65 |
+
parser.add_argument("message", nargs="?", default="How many steps today?")
|
| 66 |
+
args = parser.parse_args()
|
| 67 |
+
|
| 68 |
+
if not ONNX_PATH.is_file():
|
| 69 |
+
print(f"Missing {ONNX_PATH.name}", file=sys.stderr)
|
| 70 |
+
sys.exit(1)
|
| 71 |
+
if not TOKENIZER_PATH.is_file():
|
| 72 |
+
print(f"Missing {TOKENIZER_PATH.name}", file=sys.stderr)
|
| 73 |
+
sys.exit(1)
|
| 74 |
+
|
| 75 |
+
session = ort.InferenceSession(str(ONNX_PATH), providers=["CPUExecutionProvider"])
|
| 76 |
+
tokenizer = Tokenizer.from_file(str(TOKENIZER_PATH))
|
| 77 |
+
|
| 78 |
+
prompt = build_prompt([], args.message)
|
| 79 |
+
continuation = generate(session, tokenizer, prompt)
|
| 80 |
+
|
| 81 |
+
slot_data = {
|
| 82 |
+
"STEPS_TODAY": "4,231",
|
| 83 |
+
"STEP_GOAL": "10,000",
|
| 84 |
+
"STEPS_REMAINING": "5,769",
|
| 85 |
+
}
|
| 86 |
+
raw, parsed, display = process_model_output(prompt, continuation, slot_data)
|
| 87 |
+
|
| 88 |
+
print(f"user> {args.message}")
|
| 89 |
+
print(f"raw> {raw}")
|
| 90 |
+
print(f"intent> {parsed.intent}")
|
| 91 |
+
print(f"bot> {display}")
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
if __name__ == "__main__":
|
| 95 |
+
main()
|
reply_utils.py
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Post-processing for Smartwatch LM chat replies (BPE gibberish removal).
|
| 3 |
+
|
| 4 |
+
Use after tokenizer.decode() — same logic is embedded in colab_all_in_one.py.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import re
|
| 10 |
+
from dataclasses import dataclass
|
| 11 |
+
|
| 12 |
+
_BPE_SPACE = "\u0120" # Ġ
|
| 13 |
+
_BPE_NEWLINE = "\u010a" # Ċ
|
| 14 |
+
|
| 15 |
+
_MOJIBAKE_REPLACEMENTS: tuple[tuple[str, str], ...] = (
|
| 16 |
+
("âĢĶ", "—"),
|
| 17 |
+
("âĢĻ", "'"),
|
| 18 |
+
("âĢĺ", "'"),
|
| 19 |
+
("’", "'"),
|
| 20 |
+
("–", "—"),
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def build_prompt(history: list[tuple[str, str]], user_message: str) -> str:
|
| 25 |
+
lines: list[str] = []
|
| 26 |
+
for user_text, bot_text in history:
|
| 27 |
+
lines.append(f"user: {user_text}")
|
| 28 |
+
lines.append(f"bot: {bot_text}")
|
| 29 |
+
lines.append(f"user: {user_message}")
|
| 30 |
+
lines.append("bot:")
|
| 31 |
+
return "\n".join(lines)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def _compact_tag(match: re.Match[str]) -> str:
|
| 35 |
+
inner = re.sub(r"\s+", "", match.group(1))
|
| 36 |
+
return f"<{inner}>"
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def clean_reply(text: str) -> str:
|
| 40 |
+
"""Remove ByteLevel BPE artifacts (Ġ Ċ) and fix broken punctuation."""
|
| 41 |
+
out = text.replace(_BPE_SPACE, " ").replace(_BPE_NEWLINE, "\n")
|
| 42 |
+
for bad, good in _MOJIBAKE_REPLACEMENTS:
|
| 43 |
+
out = out.replace(bad, good)
|
| 44 |
+
out = re.sub(r" +", " ", out)
|
| 45 |
+
out = re.sub(r"<\s*([^>]+?)\s*>", _compact_tag, out)
|
| 46 |
+
return out.replace(" '", "'").strip()
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def _first_bot_line(text: str) -> str:
|
| 50 |
+
"""Keep only the first bot utterance; drop hallucinated user turns."""
|
| 51 |
+
text = clean_reply(text.lstrip())
|
| 52 |
+
if re.match(r"^\s*user\s*:", text, re.IGNORECASE):
|
| 53 |
+
match = re.search(r"bot\s*:\s*(.+)", text, re.IGNORECASE | re.DOTALL)
|
| 54 |
+
if match:
|
| 55 |
+
text = match.group(1)
|
| 56 |
+
else:
|
| 57 |
+
return ""
|
| 58 |
+
text = re.sub(r"^\s*bot\s*:\s*", "", text, count=1, flags=re.IGNORECASE)
|
| 59 |
+
text = re.split(r"\n\s*user\s*:", text, maxsplit=1, flags=re.IGNORECASE)[0]
|
| 60 |
+
if "\n\n" in text:
|
| 61 |
+
text = text.split("\n\n", 1)[0]
|
| 62 |
+
return clean_reply(text.split("\n", 1)[0].strip())
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def extract_bot_reply(prompt: str, generated: str) -> str:
|
| 66 |
+
"""Strip prompt prefix and return one cleaned bot line."""
|
| 67 |
+
marker = prompt.rstrip() + " "
|
| 68 |
+
if generated.startswith(marker):
|
| 69 |
+
reply = generated[len(marker) :]
|
| 70 |
+
elif re.search(r"bot\s*:", generated, re.IGNORECASE):
|
| 71 |
+
reply = re.split(r"bot\s*:", generated, maxsplit=0, flags=re.IGNORECASE)[-1]
|
| 72 |
+
else:
|
| 73 |
+
reply = generated
|
| 74 |
+
return _first_bot_line(reply)
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def extract_bot_reply_from_continuation(continuation: str) -> str:
|
| 78 |
+
"""Decode only new tokens, then extract the first bot line."""
|
| 79 |
+
return _first_bot_line(continuation)
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
@dataclass
|
| 83 |
+
class ParsedReply:
|
| 84 |
+
intent: str
|
| 85 |
+
template: str
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def extract_intent_reply(text: str) -> ParsedReply:
|
| 89 |
+
cleaned = clean_reply(text)
|
| 90 |
+
match = re.search(r"<\s*INTENT\s*:[^>]+>", cleaned, re.IGNORECASE)
|
| 91 |
+
if not match:
|
| 92 |
+
first = cleaned.split("\n", 1)[0].strip()
|
| 93 |
+
return ParsedReply(intent="NONE", template=first or cleaned)
|
| 94 |
+
|
| 95 |
+
rest = cleaned[match.start() :]
|
| 96 |
+
rest = re.split(r"\nuser\s*:", rest, maxsplit=1, flags=re.IGNORECASE)[0]
|
| 97 |
+
line = rest.split("\n", 1)[0].strip()
|
| 98 |
+
|
| 99 |
+
intent_match = re.match(r"^<INTENT:([A-Z_]+)>\s*(.*)", line, re.IGNORECASE | re.DOTALL)
|
| 100 |
+
if intent_match:
|
| 101 |
+
return ParsedReply(intent=intent_match.group(1), template=intent_match.group(2).strip())
|
| 102 |
+
return ParsedReply(intent="NONE", template=line)
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def fill_slots(text: str, data: dict[str, str]) -> str:
|
| 106 |
+
return re.sub(
|
| 107 |
+
r"<([A-Z_]+)>",
|
| 108 |
+
lambda m: data.get(m.group(1), m.group(0)),
|
| 109 |
+
text,
|
| 110 |
+
)
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
def process_model_output(
|
| 114 |
+
prompt: str,
|
| 115 |
+
generated: str,
|
| 116 |
+
slot_data: dict[str, str] | None = None,
|
| 117 |
+
) -> tuple[str, ParsedReply, str]:
|
| 118 |
+
"""Raw continuation -> cleaned bot line -> intent parse -> slot-filled display."""
|
| 119 |
+
raw = extract_bot_reply_from_continuation(generated)
|
| 120 |
+
if not raw:
|
| 121 |
+
raw = extract_bot_reply(prompt, generated)
|
| 122 |
+
parsed = extract_intent_reply(raw)
|
| 123 |
+
display = fill_slots(parsed.template, slot_data or {})
|
| 124 |
+
return raw, parsed, display
|
smartwatch_lm_merged.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae31bdd84cf86fe027e19ce17677d04d9f9613d6a109acdfb01899cf431433c3
|
| 3 |
+
size 60231131
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 3 |
+
"model_max_length": 256
|
| 4 |
+
}
|