Instructions to use TheWiderLensInitiative/laya-for-clara with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use TheWiderLensInitiative/laya-for-clara with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Clara
How to use TheWiderLensInitiative/laya-for-clara with Clara:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
laya-for-clara

The front door of Clara, a free, private AI assistant that runs entirely on your own PC, with an Android app (source code · ▶️ 1-minute demo · 🧪 beta testers wanted).
A fine-tune of convaiinnovations/laya (ModernBERT-large + a decision head, 421M parameters). One model answers five questions, each in about 0.35 seconds on a CPU: four about the user's message, and one about a button Clara's browser is about to click:
| Question | Choices | What Clara does with it |
|---|---|---|
| route | chat · task · schedule |
chat → the local model answers directly (fast). task → the agent with tools. schedule → reminders. |
| effort | quick · deep |
quick → the agent runs with thinking off (seconds). deep → thinking on, for research, planning, judgment. |
| need | browser · search · email_calendar · apps · computer · create · memory · other |
Tasks only. browser starts Clara's browser right away, even without a site name ("find me a table for two on OpenTable"); the others add tool guidance for the agent. |
| followup | continue · new |
Sees Clara's last reply. continue sends the message back to the task she just did ("which one has the better warranty"); new starts fresh or goes to chat ("thanks!"). |
| risk (new in v9) | commits · safe |
Sees a control the browser is about to click (button "Done"), the site, the page title and any open dialog. A second opinion next to Clara's word list: at P(commits) ≥ 0.8 she asks the user first. It can only add an approval, never remove one. |
Earlier releases: the four-question model (v8) is tagged
v8; the route + effort model is taggedv2.
Use
Each question has its own calibration temperature, stored in rl_agent_config.json. laya_unified.py (in this repo)
applies them when decoding, and refuses to load if a question's wording or answer order differs from training.
Plain laya.Agent picks the same answers, but its probabilities are uncalibrated, so use load_agent when you rely on them.
from huggingface_hub import snapshot_download
import sys
path = snapshot_download("TheWiderLensInitiative/laya-for-clara")
sys.path.insert(0, path) # the question definitions and the decoder live in this repo
from laya_unified import load_agent
from laya_contract import QUESTIONS
from router_spec import state
from followup_spec import followup_state
from risk_spec import risk_state
agent = load_agent(path, device="cpu")
msg = "find me a table for two on OpenTable this saturday"
answers = agent.predict(state(msg), {k: QUESTIONS[k] for k in ("route", "effort", "need")})["answers"]
print({k: (a["choice"], round(a["probabilities"][a["choice"]], 2)) for k, a in answers.items()})
last = "I found the RTX 3090 for $649 used and $699 refurbished. Want me to watch the price?"
fu = agent.predict(followup_state("which one has the better warranty", last), {"followup": QUESTIONS["followup"]})
print(fu["answers"]["followup"]["choice"]) # continue
click = risk_state('button "OK"', "outlook.live.com", "Mail - Inbox", "Delete 14 messages? This can't be undone.")
rk = agent.predict(click, {"risk": QUESTIONS["risk"]})["answers"]["risk"]
print(rk["choice"], round(rk["probabilities"]["commits"], 2)) # commits: ask the user first
How Clara uses the probabilities: routes are accepted at P ≥ 0.9 (below that, the local LLM gives a second opinion);
quick only when P(quick) ≥ 0.8; need and followup at P ≥ 0.6; a click asks the user when P(commits) ≥ 0.8. Asking two questions in one predict call is not
faster than two calls.
Training
- Start: the original Laya checkpoint (not the earlier fine-tune), with Laya, Transformers, NumPy and Safetensors versions pinned to Clara's Bridge.
- v9 (this release): continued from v8 to add
risk, with a distillation penalty that keeps route, effort, need and followup where they were. 471 hand-written risk examples (379 controls on 94 training pages, 92 on 30 test pages of real-style controls, not model-generated); the test pages share no control name, site or page title with training, and the data script refuses to build if any overlap or near-duplicate slips in. Splits: 3,223 training, 659 development, 676 calibration examples. - v8 data: 2,977 training, 602 development and 600 calibration examples, balanced across the four message questions:
the earlier route/effort data, Bonsai-generated need and follow-up examples, and agent-written contrast pairs
(e.g. booking a table versus adding a confirmed booking to the calendar; reviewing many emails versus showing one).
Labels were filtered and reviewed by an assistant (22 corrections, 57 exclusions); they were not adjudicated by people.
All synthetic: no real user messages. Data, label reviews and scripts are in the Clara repo under
laya/. - Recipe: cross-entropy fine-tuning with balanced task sampling, continued from a recorded candidate with a
replay/distillation penalty that preserves route, effort and need while teaching follow-ups. Epoch 2 was selected by
development log loss, then one temperature per question was fitted on untouched calibration examples in CPU serving
precision.
clara_training_manifest.jsonrecords versions, data and base hashes, arguments and temperatures.
Evaluation
| Set (v9) | route | effort | need | followup |
|---|---|---|---|---|
| Established held-out suites (hand-labeled) | 40/40 | 40/40 | 49/50 | 36/36 |
| Development challenge (64) | 15/16 | 16/16 | 16/16 | 16/16 |
Fresh check written after v8's release (48, unified_fresh_check.json) |
12/12 | 12/12 | 12/12 | 12/12 |
risk on the 92 held-out test controls: 80/92 correct at the 0.8 policy. Used the way Clara uses it, next to her browser's word list, it catches 22 of 27 risky buttons (the word list alone: 14) and asks needlessly on 7 of 65 safe ones (alone: 4). Still missed: soft confirmations whose risk comes from the page around them ("Looks good" on an order summary, "Yes" in a delete dialog, "Apply now", "Request a tour"). The final audit (64 frozen cases) was run for v8 and not re-run for v9.
The established suites informed development, so they are regression checks rather than independent estimates; the final audit and the fresh check were not used for training or tuning. All sets are small and written by the project. Expect some mistakes on messages unlike anything in the training data.
Limitations
- English only, tuned for a personal assistant that can use a computer, browser, email, calendar, files, connected apps and smart home. The question wording is part of the model: change it and you need to retrain.
- It classifies; it doesn't answer. A wrong
quickcosts some answer quality, a wrongdeepcosts some time; Clara keeps her approval prompts regardless of what this model says.
License and credits
Apache-2.0, like its base model. Built on Laya by ConvAI Innovations and ModernBERT by Answer.AI. Made by The Wider Lens Initiative Project.
Made by
Created by DevIgnite × The Wider Lens Initiative Project · clara.thewiderlens.info · thewiderlens.info · clara@thewiderlens.info
- Downloads last month
- 53
Model tree for TheWiderLensInitiative/laya-for-clara
Base model
convaiinnovations/laya