Skip to content

vllm_server: max_tokens beyond model context makes every request fail, run still reports Success with 0.0 #310

Open

Description

@abhishekraok

Found during a GPU parity run of the new reasoning-regime tasks (popqa:chat, omega_500; PRs #307/#308) against oe-eval.

Repro: olmo-eval beaker launch -m Qwen/Qwen3-8B -t omega_500 -G 1 ... — omega_500/popqa:chat register max_tokens=131072 (mirroring oe-eval's post-training configs), but Qwen3-8B's max_model_len is 40960.

What happens (experiment 01M0MYH78J79E15EX61PXMC1KD):

  1. Every single request 400s: max_tokens=131072 cannot be greater than max_model_len=max_total_tokens=40960.
  2. The dispatch layer logs each as a WARNING (process_fn raised BadRequestError), scores the empty outputs, and the run completes with exit 0 and a green Success row showing 0.0000 — 14,767 instances "processed" in 263s.

Two asks:

  1. Clamp max_tokens to the model context in the vllm_server provider, the way oe-eval does (Running with effective max_gen_toks of 65192 instead of 65536! — it uses max_model_len - longest_prompt). The provider already knows max_length (configured or discovered from /models) and has a remote-tokenizer path, so per-request min(params.max_tokens, max_length - prompt_tokens) is feasible; even a coarse max_length - margin clamp would prevent the failure mode.
  2. Fail loudly: a run where 100% of requests raised BadRequestError should not finalize as Success/0.0. This looks like a sibling of Fail fast when provider has a terminal failure #300 (fail fast on terminal provider failure) — a 400 that deterministically affects every request is terminal in practice.

Without a clamp, every task in the 131k-token post-training regime silently produces zeros on any model with a smaller context window. Workaround used for the parity runs: per-task -o max_tokens=<context - 4096>.

Happy to take a stab at the clamp if the approach sounds right.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B9VUctQuzfAtrdpk4wDjEx

Activity

  1. abhishekraok commented on Aug 23, 2026

    @abhishekraok
    CollaboratorAuthor

    Scope refinement from a second session's runs (cross-architecture SFT battery): with provider.kind=vllm (offline) and max_tokens <= context no problem appears, so the missing clamp looks vllm_server-specific — offline vLLM tolerates it, the OpenAI-compatible server 400s. The 131k regime defaults made it reachable either way; the task-side half is now fixed at source: #307/#308/#309 switched their reasoning-regime variants to max_tokens=None ("generate to the context limit" per the provider contract), which matches oe-eval's effective clamped behavior on any context size. The provider-side asks stand: clamp (or assert loudly) in vllm_server, and don't report Success/0.0 when 100% of requests raise BadRequestError.

    🤖 Generated with Claude Code

  2. abhishekraok commented on Sep 17, 2026

    @abhishekraok
    CollaboratorAuthor

    Claude Code · https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ

    Re-checked against main 73770ec, still valid; assigned to @gregorybchris as eval owner.

    • Task side is fixed at source: the reasoning-regime tasks now use max_tokens=None. Still reachable from tasks with explicit large caps (frontierscience 32768, safety judge 32768) on a smaller-context server.
    • Provider side unchanged: inference/dispatch.py:127 logs BadRequestError per request and continues; inference/errors.py classifies only EngineDeadError as terminal, so a run where every request 400s still finalizes as Success/0.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions