Entropic 2.9.4
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::TierConfig Struct Reference

Tier-specific model configuration. More...

#include <entropic/types/config.h>

Inheritance diagram for entropic::TierConfig:
Collaboration diagram for entropic::TierConfig:

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 &param_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.
 
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).
 
- 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 keep_warm = false
 Pre-warm model at startup.
 
bool use_mlock = true
 Lock model in system RAM.
 
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).
 
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.
 

Detailed Description

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)

Version
1.9.2 — added adapter_path, adapter_scale

Definition at line 425 of file config.h.

Member Function Documentation

◆ get_param()

std::string entropic::TierConfig::get_param ( const std::string &  param_name) const
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.

Parameters
param_nameParameter name (e.g., "explicit_completion").
Returns
Value string, or empty if unknown. @utility
Version
2.0.1

Definition at line 530 of file config.h.

◆ has_capability()

bool entropic::TierConfig::has_capability ( const std::string &  name) const
inline

Return true if this tier declares the named capability.

Parameters
nameLowercase capability name (e.g., "vision").
Returns
true if the capabilities vector contains name. @utility
Version
2.1.8

Definition at line 511 of file config.h.

Member Data Documentation

◆ adapter_path

std::optional<std::filesystem::path> entropic::TierConfig::adapter_path

Optional path to LoRA adapter .gguf file.

If set, orchestrator loads and activates on tier transition.

Version
1.9.2

Definition at line 435 of file config.h.

◆ adapter_scale

float entropic::TierConfig::adapter_scale = 1.0f

LoRA scaling factor (0.0–2.0, default 1.0).

Version
1.9.2

Definition at line 439 of file config.h.

◆ auto_chain

std::optional<std::string> entropic::TierConfig::auto_chain

Target tier name (nullopt = defer to identity)

Definition at line 429 of file config.h.

◆ capabilities

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.

Version
2.1.8

Definition at line 455 of file config.h.

◆ enable_thinking

std::optional<bool> entropic::TierConfig::enable_thinking

gh#86

Definition at line 486 of file config.h.

◆ frequency_penalty

std::optional<float> entropic::TierConfig::frequency_penalty

gh#85

Definition at line 478 of file config.h.

◆ grammar

std::optional<std::filesystem::path> entropic::TierConfig::grammar

Grammar file path.

Definition at line 428 of file config.h.

◆ identity

std::optional<std::filesystem::path> entropic::TierConfig::identity

Identity prompt path (nullopt = bundled)

Definition at line 426 of file config.h.

◆ identity_disabled

bool entropic::TierConfig::identity_disabled = false

true if identity explicitly disabled

Definition at line 427 of file config.h.

◆ max_output_tokens

std::optional<int> entropic::TierConfig::max_output_tokens

Per-tier max output tokens from identity frontmatter (gh#82).

nullopt = not configured; same precedence as temperature.

Version
2.4.4

Definition at line 467 of file config.h.

◆ min_p

std::optional<float> entropic::TierConfig::min_p

gh#85

Definition at line 476 of file config.h.

◆ presence_penalty

std::optional<float> entropic::TierConfig::presence_penalty

gh#85

Definition at line 477 of file config.h.

◆ repeat_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.

Version
2.5.4

Definition at line 485 of file config.h.

◆ routable

std::optional<bool> entropic::TierConfig::routable

None = defer to identity frontmatter.

Definition at line 430 of file config.h.

◆ speculative_mtp

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.

Version
2.9.4

Definition at line 502 of file config.h.

◆ temperature

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).

Version
2.4.4

Definition at line 462 of file config.h.

◆ tool_call_mode

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).

Version
2.8.2

Definition at line 493 of file config.h.

◆ top_k

std::optional<int> entropic::TierConfig::top_k

gh#85

Definition at line 475 of file config.h.

◆ top_p

std::optional<float> entropic::TierConfig::top_p

Per-tier sampler knobs from identity frontmatter (gh#85).

nullopt = not configured; applied as the tier baseline (an explicit per-call param override wins). Same precedence policy as temperature.

Version
2.5.3

Definition at line 474 of file config.h.


The documentation for this struct was generated from the following file: