# Sampling defaults and coding guidance This release starts the pinned SGLang runtime with: ```text --sampling-defaults model ``` For OpenAI-compatible chat requests, SGLang resolves each nullable sampling field in this order: 1. an explicit value in the request; 2. the pinned model's `generation_config.json`; 3. SGLang/OpenAI fallback defaults. The exact model revision pinned by this recipe contains: ```json { "do_sample": true, "temperature": 1.0, "top_k": 20, "top_p": 0.95 } ``` Therefore, when a client omits sampling fields, the effective production values are: | Parameter | Effective default | Source | |---|---:|---| | `temperature` | `1.0` | model generation config | | `top_p` | `0.95` | model generation config | | `top_k` | `20` | model generation config | | `min_p` | `0.0` | SGLang fallback | | `presence_penalty` | `0.0` | OpenAI request fallback | | `frequency_penalty` | `0.0` | OpenAI request fallback | | `repetition_penalty` | `1.0` | SGLang fallback; no repetition penalty | | `min_tokens` | `0` | OpenAI request fallback | | `n` | `1` | OpenAI request fallback | | `seed` | unset | nondeterministic unless supplied | | `ignore_eos` | `false` | OpenAI request fallback | | maximum completion | `65,536` tokens | recipe policy clamp | | reasoning mode | model-native `xhigh` when the client does not disable/lower it | chat-template policy | ## Coding and agent tasks The source model's official [Best Practices](https://huggingface.co/Qwen/Qwen3.8-Flash-Next#best-practices) recommend: - Thinking mode: `temperature=1.0`, `top_p=0.95`, `top_k=20`, `min_p=0.0`, `presence_penalty=0.0`, `repetition_penalty=1.0`. - Instruct/non-thinking mode: `temperature=0.7`, `top_p=0.80`, `top_k=20`, `min_p=0.0`, `presence_penalty=1.5`, `repetition_penalty=1.0`. The same source model card reports its DeepSWE 1.1, SWE-bench Pro, and SWE-bench Multilingual coding evaluations at `temperature=1.0`, `top_p=0.95`, and a 256K context window. Consequently, this recipe's omitted-parameter defaults exactly match the model-author settings used for thinking/agentic coding evaluation. That is strong model-specific evidence, but it is not a claim that this NVFP4 deployment independently swept every sampling combination on SWE-bench. Production qualification covered semantic correctness, tools, strict JSON, multimodal behavior, cache reuse, throughput, and resources. It did not perform a local coding-quality A/B across temperatures and penalties. For non-thinking coding requests, send the non-thinking values explicitly because changing `reasoning_effort` does not automatically rewrite the sampler: ```json { "reasoning_effort": "none", "temperature": 0.7, "top_p": 0.8, "top_k": 20, "min_p": 0.0, "presence_penalty": 1.5, "frequency_penalty": 0.0, "repetition_penalty": 1.0 } ``` For normal thinking/agentic coding, fields may be omitted or stated explicitly: ```json { "reasoning_effort": "xhigh", "temperature": 1.0, "top_p": 0.95, "top_k": 20, "min_p": 0.0, "presence_penalty": 0.0, "frequency_penalty": 0.0, "repetition_penalty": 1.0 } ``` `temperature=0` is useful for deterministic correctness and throughput probes. In this pinned SGLang build it normalizes to greedy target sampling (`top_k=1`). The production benchmark harnesses use it to make comparisons reproducible; that does not make greedy decoding the model-author recommendation for agentic coding quality. ## Target top-k versus speculative top-k The launcher flag: ```text --speculative-eagle-topk 1 ``` controls how many draft candidates MTP proposes. It is not the target model's user-facing `top_k`. With `--speculative-use-rejection-sampling`, the target model still follows the request's resolved sampler—normally `top_k=20`—and verifies draft proposals through exact rejection sampling. ## Client behavior This recipe does not inject hidden sampling values at the reverse proxy. OpenAI-compatible clients may override any supported field per request. Record explicit values in quality experiments; otherwise a client upgrade can change behavior even when the server is unchanged. Sanitized live-resolution evidence is recorded in [`evidence/production-sampling-defaults.json`](../evidence/production-sampling-defaults.json). Authoritative references: - [Qwen3.8-Flash-Next generation config](https://huggingface.co/Qwen/Qwen3.8-Flash-Next/blob/main/generation_config.json) - [Qwen3.8-Flash-Next model card and Best Practices](https://huggingface.co/Qwen/Qwen3.8-Flash-Next#best-practices) - [SGLang sampling parameters](https://docs.sglang.io/basic_usage/sampling_params.html)