State Hints EN - teamswyg/laya-tools GitHub Wiki

Using content, emoji and state hints

한국어 · Complete English guide · Improvement issue #155

The target is cheap Riido content classification for label, emoji and work-state suggestions. Further model/reasoning-level routing is outside this target. People and agents use the same Go command and JSON.

Current development model v0.2

The first pilot covers development progress, completion-report and question marks. 🛠️, ✅ and ❓ are configurable candidates; actual Riido catalog mappings remain unverified. A completion report identifies an assertion in text, not proof of execution success or completed work.

V0.2 model and training files contain an actual supervised warm start from the existing Go model:320 new fictional messages, cross-entropy plus AdamW,400 updates with a fresh optimizer. It is a complete32,960-byte classifier with the same size, not Laya-derived weights, LoRA or distillation.

Same new synthetic40-case evaluation Parent Go v0.1 Warm-start v0.2
Correct overall 22/40 (55%) 34/40 (85%)
Correct completion reports 1/5 5/5
Correct questions 0/5 4/5
Non-unclear suggestions accepted at0.9 3/40 17/40

All17 accepted suggestions were correct in this small evaluation; this does not establish100% production precision. Six classification errors remain recorded; each language scored17/20. Four candidates were selected using validation NLL, the selected model was calibrated on40 separate cases, and only then was the40-case final evaluation opened. The larger2,048-bin candidates were not selected. All data are synthetic, not product ground truth. The final cases are now exposed and cannot select another model. Plan and complete results.

PR157 passed all required CI and the bot merged an identical source tree. All18 published files,347,460 bytes, were downloaded at fixed HF revision 81335eadd9f2753d3b86c932e9b00c636714e3b4 and byte/SHA-verified. Models stay on HF; Go source stays on GitHub. V1 files are unchanged.

Withhf installed, explicitly download the model. The runtime never automatically downloads it; omitting--model uses unlearned rules.

hf download JooYoon/riidolaya-statehint-go-v0.2 statehint.rsh --revision 81335eadd9f2753d3b86c932e9b00c636714e3b4 --local-dir ./models/statehint-v0.2
riidolaya state-hint --model ./models/statehint-v0.2/statehint.rsh --text 'Where is the retry count for this API configured?'

Four CLI examples using the downloaded model matched the expected intents, but only the question crossed0.9 and suggested a label/emoji. Progress0.858, completion-report0.821 and planned0.815 abstained. The catalog was synthetic and state changes/service writes were zero. Peak OS RSS was5,488,640 bytes (5.23MiB), including model load, JSON and planning for that short process. Actual Riido reads and long-running service memory remain unmeasured. A separate500,000-call repeated-text warm scoring profile averaged1.89µs, excluding JSON, planning, startup, OS RSS and GPU. These measurements have different scopes.

Next application plan: development pilot. The bridge currently provides a read-only interface and synthetic tests; no actual private Riido reader is connected.

First version v0.1 history

riidolaya state-hint --text "Please cancel this work." --json
riidolaya state-hint --model ./statehint.rsh --jsonl < requests.jsonl

Without a model, the command uses explicitly unlearned rules. intent is one of eight meanings; emoji_code is a display suggestion. Optional context supplies current label candidates, state, version and events. Output remains mode:shadow, mutation_executed:false; no API write, reaction or notification occurs. A JSON trusted:true is not evidence of real permission or facts.

The actually supervised Go model is32,960bytes. It scored317/400 on synthetic development evaluation,85% Korean and73.5% English, but misclassified all50 completion reports as progress. The136 non-unclear predictions accepted at0.9 were all correct within this development set, not independent product or production accuracy. Warm scoring of one repeated short text took about2µs, excluding JSON, policy, startup and total memory.

The original Laya final linear's1,025 parameters were also actually fine-tuned on MPS. Frozen-prefix and reload checks passed, but correct answers remained148/400 before/after; Korean accuracy was12.5%. The4,252-byte replacement requires the full Laya backbone and is not a standalone low-memory model.

The2,400 rows are fictional variants of96 language-specific templates and48 bilingual concept pairs. They are not private user content or2,400 independent product truths. Both models remain development-only. Next work uses fresh evaluation families, completion/progress contrasts, multilingual comparisons and a trusted adapter's shadow observations.

PR #154 · Source CI

Development files: Go v0.1 · Laya final layer v0.1. All31 published files were downloaded completely and byte/SHA-verified. Required CI passed and the bot merged the identical source tree. Model files are kept on HF, not GitHub.