Skip to content

Studio: no sampling seed in the UI, so a generation cannot be reproduced #9090

Closed

Description

@danielhanchen

Summary

There is no way to pin a sampling seed from the Studio UI, so a generation cannot be reproduced. The backend already accepts and forwards a seed, so the gap is only in the frontend's parameter set.

Detail

InferenceParams in studio/frontend/src/features/chat/types/runtime.ts is the full set of knobs the UI can send:

temperature, topP, topK, minP, repetitionPenalty, presencePenalty,
maxSeqLength, maxTokens, systemPrompt, systemVariables,
checkpoint, trustRemoteCode, fastMode

No seed. Meanwhile seed is a recognised field on the backend side (it appears in studio/backend/assets/configs/inference_defaults.json) and is forwarded to llama-server, so the capability exists and is simply unreachable from the UI.

Why it matters, with a concrete cost

This is not hypothetical. While verifying #9054 I needed to establish whether two Studio builds rendered the same reply, which requires the model to emit the same tokens twice. On this host it does not:

configuration run A run B
as shipped (--parallel 4, spec decoding on, UI sampling) 488 chars 373 chars
temperature 0, top_k 1, top_p 1, seed forced at the wire 3,960 chars 150 chars
n_parallel=1, speculative decoding off, temperature 0, top_k 1, seed forced identical, repeatedly

Getting a reproducible generation at all required rewriting the outgoing /v1/chat/completions body from outside the app with a Playwright route handler, because the UI cannot express a seed. Anyone comparing two builds, chasing a regression, or filing a reproducible bug report hits the same wall.

Note the seed alone is not sufficient (row two shows that), but it is necessary, and it is the only one of the three levers that has no UI at all.

Suggested direction

Add seed to InferenceParams and surface it in the Run settings panel, blank meaning "unset" so nothing changes for users who do not touch it.

Provenance

Found while verifying #9012, #9014 and #9054. Independent of all three: it is a missing field, present identically on their merge bases and heads, so it should not be bisected onto them.

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