Settings and references¶
Settings, tokens and Artificial Analysis reference numbers.
settings ¶
Settings and tokens (Hugging Face).
Settings ¶
Settings(data: dict[str, Any])
The app's settings (the Settings page). Read them as attributes or keys:
s = llmdyno.settings()
s.cloud_concurrency, s["weights"], s.data_dir, s.hf_token_set
s.update(cloud_concurrency=4, electricity_usd_per_kwh=0.30)
Editable: models_dir, runs_dir, electricity_usd_per_kwh, theme, onboarded, default_vram_margin_mib, cloud_concurrency, weights, quality_weights, llama_port. The rest (data_dir, port, llama_cpp, hf_token_set, …) are read-only here.
update ¶
update(**changes: Any) -> 'Settings'
Change and save settings, e.g. update(cloud_concurrency=4). Weights merge into the current ones.
set_hf_token ¶
set_hf_token(token: str) -> None
Save a Hugging Face token (encrypted in the data folder) for gated models and higher rate limits.
references ¶
Artificial Analysis reference numbers: key, refresh and per-profile overrides.
LLMDyno can show each profile's Artificial Analysis coding index next to its own results, so you can see how a model ranks publicly and how it did on your machine and harness. It needs a free Artificial Analysis API key.
aa_reference ¶
aa_reference() -> dict[str, Any]
Whether a key is set and when the data was fetched, each profile's matched model and score ("matches", by profile id, with "manual" for hand-picked ones), and the model list to pick matches from.
refresh_aa ¶
refresh_aa(force: bool = False) -> dict[str, Any]
Download the latest Artificial Analysis numbers (cached for a day; the free tier allows 100 requests a day). Returns {"models", "fetched_at"}.
set_aa_key ¶
set_aa_key(key: str) -> dict[str, Any]
Save an Artificial Analysis API key (encrypted in the data folder).
set_aa_match ¶
set_aa_match(profile: Any, slug: str | None) -> dict[str, Any]
Pick which Artificial Analysis model a profile is compared with (its slug from aa_reference()["model_list"]), or None to go back to the automatic match. Returns every override.