Skip to main content

Module inference_modes

Module inference_modes 

Source
Expand description

Multi-mode inference — keep parallel approaches, do not dump one pipeline.

Timothy (2026-07-09): different modes rather than replacing the portable resident path. Modes are selected by env / API; each has a honest role:

ModeRole
Portablewgpu resident decode/prefill (DX12/Vulkan/Metal) — default product path
CudaTcPrefer forge CUDA WMMA / TC GEMM when dims allow; fall back to Portable
QuantGraphAggressive INT4/INT8 + mid hybrid hints + post graph repair
FastVerifyOllama-like full-speed decode (no mid-token Sentinel tax) → post-turn CML/graph self-heal + HTML

Modes compose toggles already in inference_bench; they do not invent a second engine. Graph-hybrid quality recovery is neuro-symbolic: LLM proposes, graph + Logic VM grounds, domain engines compute exact subproblems.

Enums§

InferenceMode
Active inference approach for this process.

Functions§

active_inference_mode
Resolve mode from QUALIA_INFERENCE_MODE at the cold configuration boundary.
apply_mode_toggles
Apply mode-specific defaults without changing the mode atom (used at first infer).
bootstrap_inference_mode
One-shot: resolve env, apply toggles, return mode (call from agent entry).
fast_verify_html_default
FastVerify defaults to returning plain healed text; HTML when this is true.
post_turn_verify_enabled
Post-turn verify + self-heal (graph/CML/HTML) before finalising the turn.
prefer_tensor_core_gemm
True when dense forge GEMM should try tensor-core path first.
quant_graph_grounding_enabled
True when agent should run graph / Webizen grounding after proposals. FastVerify also grounds — but only post-turn (see post_turn_verify_enabled).
rights_mode_enabled
True when operator asked for rights-grade defaults (QUALIA_RIGHTS_MODE).
sentinel_mid_decode_enabled
Mid-decode Webizen Sentinel / logit-ring governance active? Off in FastVerify so decode matches Ollama-style uninterrupted generation.
set_inference_mode
Set process mode and apply associated toggles. Env still wins on next read if set.