Skip to content

feat: start the 8b and 30b without a speech model; speech input opt-in - #9

Merged
planetf1 merged 3 commits into
mainfrom
fix/pin-asr-revision
Oct 22, 2026
Merged

planetf1 merged 3 commits into
mainfrom
fix/pin-asr-revision

Conversation

@planetf1

@planetf1 planetf1 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What changes for users

The container now starts with the 8b and 30b checkpoints given nothing but the checkpoint. Before, it stopped at startup: those checkpoints enable speech input, which makes granite-switch load a speech model while the engine starts, and the image runs with the Hub offline and did not contain that model. Decisions never use speech, so serve.sh now switches speech input off by default and no speech model is needed.

To keep speech input, set SYSTEMONE_SPEECH_INPUT=1 and make the speech model available. The README lists the ways: build with --build-arg WITH_ASR=1 (bakes it in), mount a Hub cache and set HF_HUB_CACHE, or set HF_HUB_OFFLINE=0. With the switch on and the model missing, serve.sh stops before vLLM with a message naming the model and these options.

The cost of the default is that /v1/chat/completions on the same server takes no audio input unless the switch is on.

docker build --build-arg WITH_ASR=1 also works again. It was failing at the step that downloads the speech model, because the model repository's main had moved off the commit the Dockerfile pins. The build now fetches the pinned commit, so it does not change when the model repository does.

Mechanism

  • serve.sh passes --hf-overrides '{"asr_enabled": false}' unless SYSTEMONE_SPEECH_INPUT=1. Any value other than 0 or 1 is refused. The preflight check only runs when the switch is on.
  • WITH_ASR stays 0 by default; the image holds no speech model unless built with WITH_ASR=1.
  • The ASR step ran hf download of main and then required refs/main to equal ASR_REVISION. It now runs hf download --revision $ASR_REVISION. A download by commit writes no refs/main, and the offline lookup for revision main (which granite-switch uses) reads that file, so the step writes it and checks the pinned snapshot directory exists.
  • README, docs/TESTING.md and docs/STATUS.md follow. tests/test_serve_sh.py runs serve.sh against a stub vllm.

Limitations

  • Served under enroot, not docker run itself: its ENTRYPOINT, --gpus all handling and --ipc=host were not exercised.
  • Speech input on was tested on the 8b with the model from a mounted cache. The WITH_ASR=1 image (model baked in) was served on the 8b earlier, before the switch existed, and the 30b was not run with speech input on.
  • The cause is upstream: granite-switch loads the speech model even when no audio request can arrive. This works around it.
  • No release is planned for this change.

Testing

  • The default and WITH_ASR=1 images build (linux/amd64).
  • Default image, through serve.sh, only the checkpoint mounted, Hub offline: the 8b on one H100, and the 30b on two H100s with --tensor-parallel-size 2. On each, e2e_check 11/11, probe_check 6/6 and accuracy_check pass. The server log shows the override applied and never names the speech model.
  • SYSTEMONE_SPEECH_INPUT=1 with the speech model from a mounted cache: the 8b starts and passes the same checks.
  • Negative control, SYSTEMONE_SPEECH_INPUT=1 with no speech model anywhere: serve.sh exits 1 with the preflight message and vLLM never starts.
  • tests/test_serve_sh.py and tests/test_preflight.py pass; ruff and the pre-commit hooks pass.

The WITH_ASR=1 build downloaded the speech model's main branch and then checked that
refs/main equalled the pinned commit. The model repository moved on main, so the check failed and
the build stopped, for anyone building the image.

Download the pinned commit with --revision instead, so the build no longer changes when the model
repository does. A download by commit writes no refs/main, and the offline lookup for revision
main reads it, so the Dockerfile writes it and checks that the pinned snapshot exists.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
…e slim one

The 8b and 30b checkpoints enable speech input and the image runs with the Hub offline, so the
plain image could not start with them. WITH_ASR now defaults to 1; WITH_ASR=0 builds the slim
image. The README, TESTING.md and the preflight message follow. STATUS.md records the default
image served from the checkpoint alone: the 8b on one H100 and the 30b on two with tensor
parallelism.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
@planetf1 planetf1 changed the title fix: download the pinned speech-model revision, not main feat: bake the speech model into the default image, pinned by revision Oct 22, 2026
…out a speech model

The 8b and 30b checkpoints enable speech input, which makes granite-switch load a speech model
at startup that decisions never use. serve.sh now passes --hf-overrides '{"asr_enabled": false}'
unless SYSTEMONE_SPEECH_INPUT=1, so the checkpoint alone is enough. With it set to 1 the preflight
runs as before. WITH_ASR goes back to 0 (the speech model is no longer baked in by default);
WITH_ASR=1 still bakes it in for the opt-in path. The README, TESTING.md and STATUS.md follow.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
@planetf1 planetf1 changed the title feat: bake the speech model into the default image, pinned by revision feat: start the 8b and 30b without a speech model; speech input opt-in Oct 22, 2026
@planetf1
planetf1 marked this pull request as ready for review October 22, 2026 20:56
@planetf1
planetf1 merged commit b0a848a into main Oct 22, 2026
3 checks passed
@planetf1
planetf1 deleted the fix/pin-asr-revision branch October 22, 2026 21:03
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