How the LLMFIT Advanced Configuration Panel (CalcConfig) Tunes Efficiency and Scoring Weights

The LLMFIT TUI's Advanced Configuration panel (opened with the A key) exposes the efficiency factor and run-mode scoring weights that directly control how the engine calculates tokens-per-second estimates and ranks model fit, defaulting to an efficiency factor of 0.55 with customizable multipliers for GPU, CPU, and MoE execution paths.

The Advanced Configuration panel—internally referred to as CalcConfig—in LLMFIT's terminal interface allows users to fine-tune the mathematical parameters behind model fitting without editing configuration files. According to the AlexsJones/llmfit source code, this popup controls the efficiency scalar and scoring weights that transform raw hardware specifications into actionable performance rankings.

Where Efficiency and Scoring Parameters Live

The tunable values are distributed across the core library and TUI layers. Understanding their locations helps trace how a user edit in the interface propagates to the final fit calculation.

Core Configuration Defaults in plan.rs

In llmfit-core/src/plan.rs, the system defines the default efficiency factor of 0.55 and the per-mode speed multipliers. This file establishes the baseline assumptions about hardware overhead, including kernel launch latency and KV-cache read penalties calibrated against published benchmarks like llama.cpp on Apple Silicon and NVIDIA T4 GPUs. The comments in this module explicitly document how these constants interact with the Advanced Configuration panel.

Runtime Calculation Logic in fit.rs

The llmfit-core/src/fit.rs file contains the analyze_with_config() function that consumes the user-provided configuration. Inside this module, the efficiency factor multiplies the raw throughput computed from model size, quantization speed, and hardware bandwidth. The run-mode multipliers (such as gpu_multiplier or cpu_multiplier) are applied as penalties or bonuses to alter the effective TPS for each possible execution path.

TUI State Management in tui_app.rs

The llmfit-tui/src/tui_app.rs file holds the AdvancedConfig struct in the App state. When the user modifies values in the popup, the TUI updates this in-memory structure before passing it to the core analysis functions. The rendering logic in llmfit-tui/src/tui_ui.rs uses ratatui widgets to draw the modal interface.

How the CalcConfig Panel Adjusts Model Scoring

The panel provides direct control over two mathematical levers: the global efficiency scalar and the per-mode scoring weights. These adjustments propagate through the planning and fitting pipeline to alter final recommendations.

Opening the Advanced Configuration Modal

Press A in the TUI to open the popup. The interface renders a modal containing editable fields for:

  • efficiency – The base multiplier for TPS (default ≈ 0.55)
  • gpu_multiplier, cpu_multiplier, moe_multiplier – Speed modifiers for each run mode
  • Composite score weighting factors – Optional penalties for memory usage or other constraints

Efficiency Factor and Throughput Calculation

The efficiency factor accounts for real-world overhead not captured by theoretical bandwidth calculations. When fit.rs processes a model evaluation, it multiplies the raw tokens-per-second estimate by this scalar. Users with atypical hardware configurations can raise or lower this value from the default 0.55 to better reflect actual inference performance observed in their environment.

Run-Mode Multipliers and Composite Scoring

After adjusting the base TPS, the system applies run-mode multipliers to penalize or favor specific execution strategies. For example, increasing the cpu_multiplier makes CPU fallback paths appear more competitive in the rankings, while decreasing the moe_multiplier penalizes mixture-of-experts offloading strategies. The plan.rs module then builds a composite score combining throughput, memory-fit constraints, and these user-defined penalties to produce the final model ranking.

Propagation from UI to Analysis Engine

When the user confirms changes in the modal, the TUI clones the AdvancedConfig struct and passes it to the core library:

// Inside the TUI event loop (simplified)
if key == Key::Char('A') {
    // Open the Advanced Configuration modal
    app.show_advanced_config = true;
}

// When the modal is submitted:
let cfg = app.advanced_config.clone(); // contains efficiency & multipliers
let results = llmfit_core::fit::analyze_with_config(&specs, &db, cfg);
display::render_table(&results);

The analyze_with_config() entry point receives the updated weights and immediately recalculates the fit scores, allowing the TUI to re-render the model table with new rankings.

Practical Tuning Example

Users can persist custom configurations through the TUI without rebuilding the binary. The following excerpt from the documentation shows how the panel is described to end users:


# Example snippet from `docs/tui.md` (excerpt)

### Advanced Configuration (`A`)

Press `A` to open the Advanced Configuration popup. This panel lets you tune the
parameters behind TPS estimation, run mode penalties, and composite scoring…

By adjusting the efficiency factor downward (e.g., to 0.45), users running memory-constrained systems can force the planner to favor smaller quantization formats. Conversely, increasing specific run-mode multipliers prioritizes GPU execution paths over CPU fallbacks when both are technically viable.

Summary

  • The Advanced Configuration panel (CalcConfig) opens with the A key in the LLMFIT TUI.
  • The efficiency factor (default 0.55) in llmfit-core/src/plan.rs scales raw TPS estimates to account for kernel overhead and memory controller effects.
  • Scoring weights include per-run-mode multipliers (GPU, CPU, MoE) that penalize or boost specific execution strategies during fit calculation in llmfit-core/src/fit.rs.
  • The AdvancedConfig struct in llmfit-tui/src/tui_app.rs stores user edits and propagates them via fit::analyze_with_config().
  • Changes take effect immediately, re-ranking the model table to reflect hardware-specific performance tuning.

Frequently Asked Questions

What is the default efficiency factor in LLMFIT?

The default efficiency factor is 0.55, as defined in llmfit-core/src/plan.rs. This scalar encodes assumptions about kernel overhead, KV-cache reads, and memory-controller latency based on benchmarks from common hardware like Apple Silicon and NVIDIA T4 GPUs. Users can adjust this value in the Advanced Configuration panel to match their specific hardware characteristics.

How do I access the Advanced Configuration panel in the LLMFIT TUI?

Press the A key while the TUI is focused. This opens a modal popup rendered by llmfit-tui/src/tui_ui.rs where you can edit the efficiency factor and run-mode multipliers. The panel uses ratatui widgets for input fields and updates the in-memory AdvancedConfig struct stored in llmfit-tui/src/tui_app.rs when you confirm your changes.

Which run-mode multipliers can I adjust in CalcConfig?

The panel exposes multipliers for GPU, CPU, and MoE (Mixture-of-Experts) execution paths. These parameters, stored in the AdvancedConfig struct, directly influence the effective TPS calculation in llmfit-core/src/fit.rs. Increasing a multiplier makes that execution mode appear faster in the composite scoring algorithm, while decreasing it applies a penalty.

How does changing the efficiency factor affect model recommendations?

The efficiency factor acts as a global scalar on the raw tokens-per-second calculation derived from hardware bandwidth and model size. Lowering the factor (e.g., from 0.55 to 0.40) reduces the calculated throughput across all models, causing the planner in llmfit-core/src/plan.rs to favor smaller models or more aggressive quantization strategies. Raising the factor has the opposite effect, suggesting the hardware can sustain higher throughput than the conservative defaults assume.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →