From 6b4f5e5fd0d07d5a7e6ca571408e138f98aa1cce Mon Sep 17 00:00:00 2001 From: JustVugg Date: Wed, 15 Jul 2026 23:02:35 +0200 Subject: [PATCH] glm: bilingual (EN+IT) oracle-mismatch message, lead with English (#271) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running a real model with no PROMPT lands in oracle self-test mode, which compares against ref_glm.json — the TINY model's oracle. The guard that detects the vocab mismatch and points the user at PROMPT=/coli chat was Italian-only, which read as a crash to English users (#271, galmok). Lead with English, keep an IT footer, and add the `coli chat` hint. Co-Authored-By: Claude Opus 4.8 --- c/glm.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/c/glm.c b/c/glm.c index ac13f90..5ab77e5 100644 --- a/c/glm.c +++ b/c/glm.c @@ -5772,10 +5772,17 @@ int main(int argc, char **argv){ * Non e' un bug del motore — vedi #76. */ { int maxid=0; for(int i=0;imaxid) maxid=full[i]; if(m.c.vocab>1000 && maxid<1000 && !getenv("REF_FORCE")){ - fprintf(stderr,"ERRORE: ref_glm.json e' l'oracolo del modello TINY (token max %d, ma il tuo vocab e' %d).\n" - " Self-test motore: SNAP=./glm_tiny TF=1 ./glm 64 16 16 (atteso 32/32)\n" - " Prova reale: PROMPT=\"Ciao\" NGEN=32 SNAP= ./glm 64\n" - " REF_FORCE=1 per eseguire comunque il confronto (senza senso).\n", maxid, m.c.vocab); + fprintf(stderr, + "ERROR: no PROMPT given, so this is oracle self-test mode — but ref_glm.json is the TINY\n" + " model's oracle (max token %d) and your model's vocab is %d. Nothing to validate here.\n" + " Engine self-test: SNAP=./glm_tiny TF=1 ./glm 64 16 16 (expect 32/32)\n" + " Real generation: PROMPT=\"Hello\" NGEN=32 SNAP= ./glm 64\n" + " or: python coli chat --model \n" + " REF_FORCE=1 to run the comparison anyway (meaningless).\n" + " --- IT ---\n" + " Nessun PROMPT: modo auto-validazione, ma ref_glm.json e' l'oracolo del modello TINY\n" + " (token max %d, il tuo vocab e' %d). Usa PROMPT=... per generare davvero (vedi sopra).\n", + maxid, m.c.vocab, maxid, m.c.vocab); return 1; } }