8000 modeltests: add -warmup flag for steady-state inference benchmarking by janpfeifer · Pull Request #97 · gomlx/go-huggingface · GitHub
[go: up one dir, main page]

Skip to content

modeltests: add -warmup flag for steady-state inference benchmarking - #97

Merged
janpfeifer merged 1 commit into
mainfrom
modeltests-warmup
Dec 1, 2026
Merged

janpfeifer merged 1 commit into
mainfrom
modeltests-warmup

Conversation

@janpfeifer
Copy link
Copy Markdown
Contributor

Adds an optional -warmup flag to modeltests so JIT-compiling backends (e.g. xla:cuda) and lazy-init GPU backends (cuda) run an untimed warmup pass before measuring steady-state Infer time.

Changes

  • modeltests/modeltests_test.go: Add -warmup flag.
  • modeltests/runner.go: Track WarmupTime per backend row and display a Warmup column in the summary table when -warmup is enabled.
  • modeltests/transformer_test.go: Run untimed warmup before timed runs in embed_single, embed_batch, prefill_logits, and teacher_forced_generate.
  • modeltests/timeseries_test.go: Run untimed warmup before timed inference.
  • docs/ModelTests.md, docs/CHANGELOG.md: Document the -warmup flag.

Verification

  • go test -v -count=1 ./modeltests -modeltests -warmup -backends="cuda;xla:cuda" -run "TestModels/(baai-bge-small-en-v1\.5|bge-base-en-v1\.5-gguf|minilm-l6-v2-gguf|gemma4-e4b|qwen3\.5-4b)" passed across all models on both cuda and xla:cuda.

@janpfeifer
janpfeifer merged commit 3cd9036 into main Dec 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0