thalamus: interactive sampling parameter controls
F5 screen now shows temperature, top_p, top_k with interactive adjustment: - Up/down: select parameter - Left/right: adjust value (0.05 steps for temp/top_p, 5 for top_k) - Updates Agent and display immediately via HotkeyAction Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
dd009742ef
commit
c2c5530ecc
3 changed files with 61 additions and 7 deletions
|
|
@ -928,6 +928,16 @@ pub async fn run(cli: crate::user::CliArgs) -> Result<()> {
|
|||
HotkeyAction::KillProcess => session.kill_processes().await,
|
||||
HotkeyAction::Interrupt => session.interrupt().await,
|
||||
HotkeyAction::CycleAutonomy => session.cycle_autonomy(),
|
||||
HotkeyAction::AdjustSampling(param, delta) => {
|
||||
if let Ok(mut agent) = session.agent.try_lock() {
|
||||
match param {
|
||||
0 => { agent.temperature = (agent.temperature + delta).clamp(0.0, 2.0); app.temperature = agent.temperature; }
|
||||
1 => { agent.top_p = (agent.top_p + delta).clamp(0.0, 1.0); app.top_p = agent.top_p; }
|
||||
2 => { agent.top_k = (agent.top_k as f32 + delta).max(0.0) as u32; app.top_k = agent.top_k; }
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue