Skip to main content
SGLang supports the SynthID Text tournament watermark on NVIDIA CUDA. Watermarking is per request and OFF by default; watermarked and unwatermarked requests share batches. For the default Aaronson-Gumbel algorithm, and for the settings both algorithms share, see Text Watermarking.

Server configuration

Store the configuration in a file readable only by the server account. The keys below are public test values, not production secrets:
default_enabled and enforce_all work as for Gumbel; see Server configuration. Fields of the other algorithm are rejected.

Request control

Requests turn watermarking on and off with the watermark object described in Per-request control; with synthid only its enabled field is accepted. Greedy requests (top_k 1 or temperature 0) are never watermarked.

Sampling

A watermarked row is sampled as follows:
  1. Penalties, logit bias, and the grammar mask apply as usual.
  2. The row keeps its num_candidates highest logits, applies its temperature, then its request top-k, top-p, and min-p.
  3. The tournament reweights the remaining candidates by their g-values for the row’s context.
  4. The stock sampler draws from the result.
Unwatermarked rows in the same batch draw the same tokens as on a server without watermarking. Returned logprobs describe the logits before the watermark; an unwatermarked row’s match a server without watermarking up to float rounding (about 1e-7). SGLANG_RETURN_ORIGINAL_LOGPROB keeps its meaning. A returned sampling mask describes the watermarked support the token was drawn from.

Speculative decoding

SynthID supports EAGLE and EAGLE3 with --speculative-eagle-topk 1, --speculative-use-rejection-sampling, and at most 8 --speculative-num-draft-tokens:
The watermark applies to the target distribution at verification; the draft model proposes as usual. Rejection sampling then emits tokens from the watermarked target distribution, and only accepted tokens, including the bonus token, advance a request’s watermark state.

Unsupported configurations

--watermark-algorithm synthid is rejected with:
  • SGLANG_ENABLE_NV_MEGA_RUNTIME_OPTIMIZATION;
  • --rl-on-policy-target, since the watermark changes the sampling distribution.
The restrictions of --enable-watermark that hold for every algorithm, such as PD disaggregation and custom logit processors, are listed under Compatibility.

State and detection

A request’s context starts empty (zero tokens), not from the prompt, and holds its last ngram_len - 1 generated tokens. A request resumed after retraction replays its generated tokens, so its watermark continues as if uninterrupted. The repeated-context history is a bounded ring: a context can be watermarked again after it is evicted. To score text, recompute each generated token’s g-values with the same keys, ngram_len, context_history_size, and skip_first_ngram_calls, starting from the same empty context. Calibrate detection thresholds for the output length and the false-positive rate required; a low score is not proof of authorship.