[GW] Real multi-turn chat: Inkling template + streaming REPL

chat_template renders the plain-text subset of chat_template.jinja (effort
header before first non-system message, role/content_text/end_message tags,
assistant turns closed with content_model_end_sampling, effort-0 model opener);
4 CPU tests. chat::chat_turn tokenizes the rendered prompt and drives the
Lean-proven serve_gen FSM, streaming decoded text; run_chat is an interactive
multi-turn REPL. CLI: vetta-infer chat <dir> [effort] [max_new].

MEASURED live (release, gfx1150): 3-turn Italian chat answers correctly and
keeps context ('La capitale della Francia e Parigi.' / '...del Giappone e
Tokyo.'). GPU test chat_turn_paris green. Workspace -D warnings green.
This commit is contained in:
adm committed 2026-12-01 17:18:27 +01:00
1 parent 1df8342f96
commit 0a46c4dd7b
6 files changed
+288

No files matched your search

+5
View File
@@ -12,9 +12,14 @@
pub mod session;
pub mod chat_template;
#[cfg(feature = "hip")]
pub mod serve;
#[cfg(feature = "hip")]
pub mod chat;
/// Python-repr float spelling (always a decimal point), as `strata-ctl` emits.
fn fmt_float(v: f64) -> String {
let s = format!("{v}");