Profiles¶
A model plus the exact settings it is benchmarked with.
profiles ¶
LLM profiles: a model plus the exact settings it is benchmarked with. cloud_model() and local_model() make them.
Profile ¶
Profile(data: dict[str, Any] | str)
Bases: Handle
A model plus the settings it is benchmarked with (the app's "LLM profile"). Get one from cloud_model(), local_model() or profile(name); list_profiles() lists them all.
info
property
¶
info: dict[str, Any]
Everything the app knows about the profile (model, provider, last test, …).
update ¶
update(*, name: str | None = None, notes: str | None = None, tags: list[Any] | None = None, pricing: dict[str, Any] | None = None, remote_model: str | None = None, **params: Any) -> 'Profile'
Change settings, e.g. update(ctx=32768, cache_k="q4_0") or update(reasoning_effort="high"), and the name, notes, tags, pricing ({"input", "output", "cached"} USD per 1M tokens) or a cloud profile's model.
check ¶
check(exact: bool = False) -> dict[str, Any]
Memory fit for a local profile: verdict ("fits", "tight", "spill", "oom", …), projected GPU memory and warnings. exact=True asks llama-fit-params instead of estimating (needs llama.cpp and the downloaded file).
test ¶
test(quiet: bool = False) -> dict[str, Any]
Quick test (about 20 s locally): loads the model, measures speed and VRAM, and checks tool calling.
duplicate ¶
duplicate(name: str | None = None, **params: Any) -> 'Profile'
A copy ("
export ¶
export(path: Union[str, Path, None] = None) -> dict[str, Any]
The profile as a shareable file (settings, pricing and which model or vendor, never keys); written to path if given. import_profile() reads it back, here or on another machine.
profile_params ¶
profile_params(kind: str, given: dict[str, Any]) -> dict[str, Any]
Library keyword arguments -> the profile params dict (unknown names are rejected, not ignored).
list_profiles ¶
list_profiles(kind: str | None = None) -> list[Any]
Every profile in the data folder (optionally only "local" or "cloud").
profile ¶
A profile by id or by exact name (case-insensitive).
cloud_model ¶
cloud_model(vendor: str, model: str, *, api_key: str | None = None, name: str | None = None, base_url: str | None = None, api_style: str | None = None, budget_usd: float | None = None, pricing: Union[str, dict[str, Any], None] = 'auto', **params: Any) -> Profile
A cloud model to benchmark, e.g. cloud_model("anthropic", "claude-sonnet-5-5", reasoning_effort="low").
vendor: openai, anthropic, google, deepseek, moonshot, zai, qwen, minimax, xai, mistral, openrouter, groq, together, fireworks, cerebras, litellm (a LiteLLM proxy: see litellm_model()), or custom (any OpenAI-compatible base_url, such as Ollama or vLLM: see ollama_model() and openai_compatible()). api_key: stored encrypted in the data folder; when omitted, the saved key or the usual environment variable (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, …) is used. The key only ever reaches LLMDyno's proxy. budget_usd: hard spend cap for this provider (new providers default to $5). pricing: "auto" looks the model up in OpenRouter's catalog; or {"input": $, "output": $, "cached": $} per 1M tokens. Other keywords are profile settings: ctx, max_output_tokens, reasoning_effort, temperature, top_p, api_style, extra_body.
local_model ¶
local_model(repo: str | None = None, *, quant: str | None = None, path: Union[str, Path, None] = None, name: str | None = None, download: bool = True, quiet: bool = False, **params: Any) -> Profile
A GGUF model run by llama.cpp on this machine.
From Hugging Face: local_model("unsloth/Qwen3.8-27B-GGUF", quant="UD-Q3_K_XL", ctx=49152) downloads the file (resumable, checksum-verified) unless it is already in the data folder; download=False only uses what is there. From disk: local_model(path="D:/models/qwen.gguf") registers the file where it is (no copy). Other keywords are profile settings: ctx, cache_k / cache_v (or kv_cache for both), gpu_layers, n_cpu_moe, flash_attn, thinking, max_output_tokens, temperature, top_p, top_k, min_p, …
import_profile ¶
import_profile(source: Union[str, Path, dict[str, Any]]) -> Profile
Create a profile from an exported profile file (a path or the dict Profile.export() returned). Its model must already be downloaded here, or a provider of its vendor added, first.
profile_defaults ¶
profile_defaults(kind: str = 'local', model: Any = None) -> dict[str, Any]
The settings a new profile starts from: for "local", tuned to a model (Model, id or name) and this machine; for "cloud", the cloud defaults.