|
Entropic 2.14.3
Local-first agentic inference engine
|
Tier-specific model configuration. More...
#include <entropic/types/config.h>


Public Member Functions | |
| bool | has_capability (const std::string &name) const |
| Return true if this tier declares the named capability. | |
| std::string | get_param (const std::string ¶m_name) const |
| Get a named parameter derived from tier config fields. | |
Public Attributes | |
| std::optional< std::filesystem::path > | identity |
| Identity prompt path (nullopt = bundled) | |
| bool | identity_disabled = false |
| true if identity explicitly disabled | |
| std::optional< std::filesystem::path > | grammar |
| Grammar file path. | |
| std::optional< std::string > | auto_chain |
| Target tier name (nullopt = defer to identity) | |
| std::optional< bool > | routable |
| None = defer to identity frontmatter. | |
| bool | requires_context = false |
gh#162 (v2.13.0): refuse a delegation to this tier that carries no context file references. | |
| std::optional< std::filesystem::path > | adapter_path |
| Optional path to LoRA adapter .gguf file. | |
| float | adapter_scale = 1.0f |
| LoRA scaling factor (0.0–2.0, default 1.0). | |
| std::vector< std::string > | capabilities |
| Declared tier capabilities (gh#41). | |
| std::optional< float > | temperature |
| Per-tier sampler temperature from identity frontmatter (gh#82). | |
| std::optional< int > | max_output_tokens |
| Per-tier max output tokens from identity frontmatter (gh#82). | |
| std::optional< float > | top_p |
| Per-tier sampler knobs from identity frontmatter (gh#85). | |
| std::optional< int > | top_k |
| gh#85 | |
| std::optional< float > | min_p |
| gh#85 | |
| std::optional< float > | presence_penalty |
| gh#85 | |
| std::optional< float > | frequency_penalty |
| gh#85 | |
| std::optional< float > | repeat_penalty |
| Per-tier repeat_penalty + enable_thinking from identity frontmatter (gh#86). | |
| std::optional< bool > | enable_thinking |
| gh#86 | |
| std::optional< std::string > | tool_call_mode |
| Per-tier tool-call generation mode (gh#103). | |
| std::optional< bool > | speculative_mtp |
| Per-tier MTP speculative-decode override (gh#108). | |
| std::optional< bool > | require_tool_call |
| gh#134 (v2.10.4): require this tier to end every turn with a tool call. | |
Public Attributes inherited from entropic::ModelConfig | |
| std::filesystem::path | path |
| Resolved model file path. | |
| std::string | adapter = "qwen35" |
| Chat adapter name. | |
| int | context_length = 16384 |
| Context window size (512–131072) | |
| int | gpu_layers = -1 |
| GPU offload layers (-1 = all) | |
| bool | gpu_layers_auto = false |
Derive gpu_layers from free VRAM at admission (gh#148). | |
| bool | keep_warm = false |
| Keep this model resident in host RAM (WARM) when it leaves the active slot, instead of unloading it (gh#157). | |
| bool | use_mlock = true |
| Lock model in system RAM. | |
| int | cpu_moe_layers = 0 |
EXPERIMENTAL: layers whose ROUTED-EXPERT tensors go to the host while everything else follows gpu_layers (gh#153, decision #42(iii)). | |
| int | reasoning_budget = -1 |
| Think token budget (-1 = unlimited) | |
| std::string | cache_type_k = "f16" |
| KV cache key quantization type. | |
| std::string | cache_type_v = "f16" |
| KV cache value quantization type. | |
| int | n_batch = 512 |
| Batch size for prompt processing. | |
| int | n_ubatch = 0 |
| Physical micro-batch size for prompt processing (gh#23 MVP item 5). | |
| int | n_threads = 0 |
| CPU threads (0 = auto-detect) | |
| std::string | tensor_split |
| Multi-GPU tensor split ratios (empty = single GPU) | |
| std::string | split_mode |
| Multi-GPU split mode for model load (gh#23 MVP item 6). | |
| int | main_gpu = 0 |
| Primary GPU index for model load (gh#23 MVP item 7). | |
| bool | offload_kqv = true |
| Offload KQV ops (incl. | |
| float | rope_freq_base = 0.0f |
| RoPE base frequency override (gh#23 MVP item 9). | |
| float | rope_freq_scale = 0.0f |
| RoPE frequency scaling factor (gh#23 MVP item 10). | |
| int | n_parallel = 1 |
| Max parallel sequences per context (gh#23 MVP item 11). | |
| int | max_sessions = 1 |
| Resident per-caller conversation sessions this tier keeps KV for (gh#144). | |
| bool | flash_attn = true |
| Enable flash attention. | |
| std::optional< std::vector< std::string > > | allowed_tools |
| Tool whitelist (nullopt = all) | |
| std::filesystem::path | mmproj_path |
| Vision projector GGUF path. | |
| std::string | model_format = "gguf" |
| Expected model format. | |
Tier-specific model configuration.
Extends ModelConfig with identity resolution and tier-specific behavioral fields. Identity prompt resolution: absent/nullopt → bundled default (ships with entropic-engine) disabled=true → disabled entirely path set → custom file (must exist, validated at load)
Every std::optional member below means "operator did not set this", NOT "set to the default". The per-tier sampler knobs stay nullopt so the orchestrator applies the inherited global/profile value instead of silently overriding it.
@req REQ-TYPE-005
|
inline |
Get a named parameter derived from tier config fields.
Encapsulates policy mappings (e.g., auto_chain presence implies no explicit_completion). Keeps this logic on the data struct instead of in facade callbacks.
| param_name | Parameter name (e.g., "explicit_completion"). |
| std::optional<std::filesystem::path> entropic::TierConfig::adapter_path |
| float entropic::TierConfig::adapter_scale = 1.0f |
| std::optional<std::string> entropic::TierConfig::auto_chain |
| std::vector<std::string> entropic::TierConfig::capabilities |
Declared tier capabilities (gh#41).
Free-form lowercase strings — canonical values are "text" and "vision". Missing / empty in YAML resolves to {"text"} at config-load time so every pre-v2.1.8 tier config stays valid without modification. The orchestrator inspects this set when it sees a message with image content_parts; if no configured tier carries "vision", the run is rejected with ENTROPIC_ERROR_NO_VISION_TIER.
Order is not significant. Duplicates are tolerated but idiomatic configs deduplicate.
| std::optional<bool> entropic::TierConfig::enable_thinking |
| std::optional<float> entropic::TierConfig::frequency_penalty |
| std::optional<std::filesystem::path> entropic::TierConfig::grammar |
| std::optional<std::filesystem::path> entropic::TierConfig::identity |
| std::optional<int> entropic::TierConfig::max_output_tokens |
| std::optional<float> entropic::TierConfig::presence_penalty |
| std::optional<float> entropic::TierConfig::repeat_penalty |
Per-tier repeat_penalty + enable_thinking from identity frontmatter (gh#86).
nullopt = not configured; same precedence as the other sampler knobs. enable_thinking flows to the GGUF chat template via GenerationParams.enable_thinking.
| std::optional<bool> entropic::TierConfig::require_tool_call |
gh#134 (v2.10.4): require this tier to end every turn with a tool call.
nullopt/false = llama.cpp's COMMON_CHAT_TOOL_CHOICE_AUTO (the model may answer in prose); true = COMMON_CHAT_TOOL_CHOICE_REQUIRED, under which upstream sets grammar_lazy=false so the tool-call grammar binds from the FIRST sampled token — narrate-then-stop becomes structurally unrepresentable rather than corrected after the fact by the empty-turn nudge (which measured 0/12 recovery past the third nudge, gh#134).
Opt-in per tier: front-office tiers legitimately answer in prose, so this must never be global. Inert unless the tier stages tools.
gh#162 (v2.13.0): refuse a delegation to this tier that carries no context file references.
For a tier whose tool set cannot SEARCH — a reader with read_file and nothing else — a contextless task is structurally unanswerable, and the observed failure is the child inventing a path. The tool boundary refuses instead, so the lead gets an error it can fix in the same turn rather than a confident answer about a file that does not exist. YAML: models.tiers.<name>.requires_context: true.
| std::optional<bool> entropic::TierConfig::routable |
| std::optional<bool> entropic::TierConfig::speculative_mtp |
Per-tier MTP speculative-decode override (gh#108).
nullopt = inherit InferenceConfig::speculative.mtp (the global flag); when set, this tier's effective MTP-attempt decision regardless of the global value. Lets a consumer keep MTP on globally while opting a specific identity/model out (e.g. a grammar-heavy tier that should always run plain decode) rather than an all-or-nothing global switch.
| std::optional<float> entropic::TierConfig::temperature |
Per-tier sampler temperature from identity frontmatter (gh#82).
nullopt = not configured; the orchestrator leaves the incoming GenerationParams temperature in place. When set, applied as the tier baseline (an explicit per-call override still wins).
| std::optional<std::string> entropic::TierConfig::tool_call_mode |
Per-tier tool-call generation mode (gh#103).
nullopt = engine default ("batch"). "sequential" halts generation at the first closed tool call (the family close marker is appended to GenerationParams.stop) so a tier doing dependent tracing observes each result before the next call; "batch" keeps generating (parallel/independent calls preserved).
| std::optional<float> entropic::TierConfig::top_p |