From 3536ef58f613b9f448a040b09417aa057e52bc2d Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 2 Apr 2026 14:23:53 -0700 Subject: [PATCH] bench: add prompt calibration, context size flag, and NumCtx reporting (#15158) Add --num-ctx flag to set context size, and report NumCtx in model info header. Calibrate tokens-per-word ratio during warmup using actual tokenization metrics from the model, replacing the fixed 1.3 heuristic. This produces more accurate prompt token counts for --prompt-tokens. Also add fetchContextLength() to query running model context via /api/ps.