repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
sglang | test/registered/unit/models/test_vit_pos_embed_interpolate.py | .py | """Bit-exact unit test for the vectorized ViT position-embedding interpolation.
The vectorized path (``fast_pos_embed_interpolate_vectorized``) removes the
per-image Python loop / CPU<->GPU sync of the legacy implementations. It is meant
to be a pure speedup, so it must be numerically *identical* (bit-exact, rtol=0
at... | 119 | 4,683 |
sglang | test/registered/unit/models/test_qwen3_embedding_registration.py | .py | """Unit tests for native registration of the bare ``Qwen3Model`` embedding arch.
Checkpoints such as ``microsoft/harrier-oss-v1-0.6b`` declare
``architectures=["Qwen3Model"]`` (a bare Qwen3 backbone). These must resolve to
the native SGLang implementation (``sglang.srt.models.qwen3_embedding.Qwen3Model``)
and be serve... | 62 | 2,998 |
sglang | test/registered/unit/models/test_zaya_cca.py | .py | """Numerical and state-cache correctness tests for the ZAYA1 CCA module.
The CCA per-request conv-state cache must satisfy the following invariants,
which are each exercised by a dedicated test case:
1. A single-chunk extend forward (no prefix) is numerically equivalent to the
reference torch implementation that p... | 784 | 31,114 |
sglang | test/registered/unit/models/test_deepseek_mla_dispatch.py | .py | """Hermetic unit tests for DeepSeek MLA attention-method dispatch on ROCm.
`_dispatch_mla_subtype` picks the forward method for MLA attention. On ROCm the
fused-decode-MLA + fused-RoPE fast path (`MLA_FUSED_ROPE_ROCM`) is only correct
for the aiter attention backend; taking it under the triton backend GPU-faults
on gf... | 100 | 4,040 |
sglang | test/registered/unit/models/test_nemotron_h_weight_loading.py | .py | """
Unit tests for NemotronHForCausalLM.load_weights.
Regression test for Nemotron-H expert scale checkpoint tensors that map to
parameters absent from the current runtime model.
"""
from sglang.test.ci.ci_register import register_cpu_ci
register_cpu_ci(est_time=4, suite="base-a-test-cpu")
import unittest
from type... | 140 | 4,607 |
sglang | test/registered/unit/models/test_deepseek_v4_rope_policy.py | .py | """Unit tests for DeepSeek-V4 layer-level RoPE selection."""
import unittest
from types import SimpleNamespace
from unittest.mock import patch
import torch
from torch import nn
import sglang.srt.models.deepseek_v4 as deepseek_v4
from sglang.kernels.ops.attention.deepseek_v4_rope import precompute_freqs_cis
from sgla... | 146 | 5,308 |
sglang | test/registered/unit/models/test_locate_anything.py | .py | """Unit tests for srt/models/locate_anything.py — no server, no weight loading.
Covers the InternVL-style ``mlp1`` projector shape and the optional box-grammar
logit processor's constrained-decoding state machine.
"""
import unittest
import numpy as np
import torch
from sglang.srt.configs import LocateAnythingConfi... | 341 | 14,047 |
sglang | test/registered/unit/configs/test_laguna_config.py | .py | """Regression: SGLang must not double-apply Laguna's YaRN mscale.
attention_factor is the final mscale, but SGLang multiplies attn_factor onto its
own default, so a naive copy squares it (factor 128: 1.4852 -> 2.2058). These
tests build the actual rotary embedding via ``get_rope`` and assert its served
``mscale`` matc... | 83 | 3,236 |
sglang | test/registered/unit/configs/test_model_config.py | .py | """Unit tests for hybrid attention model configuration."""
import unittest
from types import SimpleNamespace
from sglang.srt.configs.model_config import (
ModelConfig,
get_hybrid_layer_ids,
is_embedding_gemma,
)
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import Cust... | 75 | 2,363 |
sglang | test/registered/unit/configs/test_model_config_shapes.py | .py | """Unit tests for ModelConfig shape normalization."""
import unittest
from types import SimpleNamespace
from sglang.srt.configs.model_config import ModelConfig
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
register_cpu_ci(est_time=1, suite="base-a-test-cpu")... | 72 | 2,266 |
sglang | test/registered/unit/configs/test_model_config_parser_registry.py | .py | """Unit tests for srt/configs/model_config_parser_registry.py"""
import unittest
from transformers import PretrainedConfig
from sglang.srt.configs.model_config_parser_registry import (
_MODEL_CONFIG_PARSER_REGISTRY,
ModelConfigParserBase,
get_model_config_parser,
register_model_config_parser,
)
from ... | 63 | 2,057 |
sglang | test/registered/unit/configs/test_model_config_scaling.py | .py | import math
import unittest
from sglang.srt.configs.model_config import ModelConfig, compute_mla_mscale_scaling
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
register_cpu_ci(est_time=1, suite="base-a-test-cpu")
def _mla_scaling(rope_scaling) -> tuple[float,... | 98 | 3,330 |
sglang | test/registered/unit/configs/test_cohere2_moe_config.py | .py | """Regression tests for Cohere2MoeConfig import (sgl-project/sglang#28233).
Before the fix, applying ``huggingface_hub.dataclasses.strict`` to
``Cohere2MoeConfig`` — which is not a stdlib ``@dataclass`` — raised
``StrictDataclassDefinitionError`` at *import* time on
``transformers==5.3.0`` + ``huggingface_hub==1.9.0``... | 61 | 2,346 |
sglang | test/registered/unit/configs/test_zaya_config.py | .py | """Unit tests for ``sglang.srt.configs.zaya.ZayaConfig``."""
import unittest
from transformers import AutoConfig
from sglang.srt.configs.zaya import ZayaConfig, register_zaya_config
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
register_cpu_ci(est_time=5, s... | 102 | 4,429 |
sglang | test/registered/unit/configs/test_linear_attn_model_registry.py | .py | """Unit tests for srt/configs/linear_attn_model_registry.py"""
import unittest
from sglang.srt.configs.linear_attn_model_registry import (
_LINEAR_ATTN_MODEL_REGISTRY,
LinearAttnModelSpec,
get_linear_attn_config,
get_linear_attn_spec_by_arch,
import_backend_class,
register_linear_attn_model,
)... | 162 | 5,636 |
sglang | test/registered/unit/configs/test_locate_anything_config.py | .py | """Unit tests for ``sglang.srt.configs.locate_anything.LocateAnythingConfig``."""
import unittest
from transformers.models.qwen2 import Qwen2Config
from sglang.srt.configs import LocateAnythingConfig
from sglang.srt.configs.kimi_vl_moonvit import MoonViTConfig
from sglang.test.ci.ci_register import register_cpu_ci
f... | 63 | 2,661 |
sglang | test/registered/unit/configs/test_embedding_model_spec.py | .py | import unittest
from types import SimpleNamespace
from sglang.srt.configs.embedding_model_spec import (
AttentionPattern,
BCGEligibility,
BCGPrefillPolicy,
EmbeddingExecution,
EmbeddingTask,
PoolingStrategy,
embedding_support_matrix,
resolve_embedding_model_spec,
resolved_embedding_... | 123 | 4,680 |
sglang | test/registered/unit/configs/test_multimodal_piecewise_cuda_graph.py | .py | """Regression tests for multimodal piecewise CUDA graph opt-ins."""
import unittest
from types import SimpleNamespace
from unittest.mock import patch
from sglang.srt.configs.embedding_model_spec import resolve_embedding_model_spec
from sglang.srt.configs.model_config import (
is_multimodal_piecewise_cuda_graph_su... | 206 | 7,823 |
sglang | test/registered/unit/compilation/test_torch_compile_decoration.py | .py | from types import SimpleNamespace
from unittest.mock import patch
import pytest
import torch
from sglang.test.ci.ci_register import register_cpu_ci
register_cpu_ci(est_time=3, suite="base-a-test-cpu")
from sglang.srt.compilation.compile import (
_infer_dynamic_arg_dims_from_annotations,
_mark_dynamic_forwar... | 79 | 2,366 |
sglang | test/registered/unit/plugins/test_load_plugins.py | .py | """
Unit tests for the plugin loading flow.
Covers: idempotency, apply_hooks invocation, exception resilience,
SGLANG_PLUGINS whitelist, SGLANG_PLATFORM exclusion logic,
and _current_plugin_source context var reset.
Run: python -m pytest test/registered/unit/plugins/test_load_plugins.py -v
"""
from unittest.mock im... | 188 | 6,348 |
sglang | test/registered/unit/plugins/test_hook_registry.py | .py | """
Unit tests for the hook registry system.
Covers: basic hooks (AROUND/BEFORE/AFTER/REPLACE), descriptor preservation
(classmethod/staticmethod), hook ordering, cross-target conflict detection,
patch propagation, and edge cases.
Run: python -m pytest test/registered/unit/plugins/test_hook_registry.py -v
"""
impor... | 449 | 13,345 |
sglang | test/registered/unit/lora/test_experimental_sgl_marlin_multi_prefill.py | .py | """CUDA parity for the multi-slot shared-outer Marlin prefill factorization: the
only numeric guard for the factored prefill schedule under CUDA-graph replay and
for the gated ``gate_up`` expand gate/up column split; no e2e test selects it."""
from __future__ import annotations
import pytest
import torch
from sglang... | 442 | 14,792 |
sglang | test/registered/unit/lora/test_mem_pool_ep_unit.py | .py | """Unit tests for LoRAMemoryPool's MoE expert-parallel (EP) handling.
Covers the global->local expert-id remapping and per-rank buffer sizing
introduced so that per-expert MoE LoRA buffers stay aligned with the
Triton MoE runner's local-id dispatch under `--ep > 1`.
The tests exercise the class behavior without stand... | 1,418 | 54,622 |
sglang | test/registered/unit/lora/test_lora_manager_tied_lm_head.py | .py | # Copyright 2023-2026 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 92 | 3,197 |
sglang | test/registered/unit/lora/test_lora_moe_inplace_unit.py | .py | """Regression test: LoRA MoE layers must never run their runner in-place.
The LoRA MoE runner cores write their final reduction into ``output =
hidden_states if inplace else torch.empty_like(hidden_states)``. Dual-stream
MoE forwards (e.g. ``DeepseekV2MoE.forward_normal_dual_stream``) read
``hidden_states`` for the sh... | 116 | 4,626 |
sglang | test/registered/unit/lora/test_inkling_linearized_lora_unit.py | .py | """CPU-only regression tests for Inkling's linearized shared-sink LoRA path:
in-place refresh of the derived decode operands on an adapter swap, and the
shared-sink factor layout from checkpoint to one moe-TP shard's operands."""
from __future__ import annotations
import importlib
import sys
import types
from types i... | 510 | 19,920 |
sglang | test/registered/unit/lora/test_experimental_sgl_marlin_policy.py | .py | """Guards the LoRA + non-trivial expert-placement startup rejection; reds when a
placement term leaves the or-chain, or when a `--lora-paths`-only launch stops
counting as LoRA, silently landing adapter deltas on remapped experts."""
import types
import pytest
from sglang.srt.lora.marlin_lora_temp.policy import (
... | 79 | 2,574 |
sglang | test/registered/unit/lora/test_lm_head_pruning.py | .py | # Copyright 2023-2026 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 88 | 3,575 |
sglang | test/registered/unit/lora/test_laguna_hidden_dim_unit.py | .py | """Unit tests for Laguna's per-layer LoRA hidden-dim resolution.
Laguna (`poolside/Laguna-XS.2`) sizes each layer's attention from
`num_attention_heads_per_layer[layer_idx]`, so `config.num_attention_heads` —
a single global value — is wrong for any layer whose head count differs. The
generic `get_default_hidden_dim` ... | 163 | 6,882 |
sglang | test/registered/unit/lora/test_experimental_sgl_marlin_shared_outer_reduce.py | .py | """Guards the fused shared-outer Marlin decode reduction against the three-launch
fallback it replaces; reds when down-B orientation, router weighting, the routing
scale, a ragged-tile mask, or capture-time value baking is wrong."""
from __future__ import annotations
import pytest
import torch
from sglang.test.ci.ci... | 309 | 9,012 |
sglang | test/registered/unit/lora/test_eviction_policy.py | .py | # Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 84 | 3,562 |
sglang | test/registered/unit/lora/test_experimental_sgl_marlin_runtime_unit.py | .py | """CPU-only runtime-flow tests for the experimental Marlin MoE-LoRA runner:
recording fakes make its kernel ordering, buffer ownership and expert-parallel
index localization observable without CUDA."""
from __future__ import annotations
import ast
import sys
import types
from pathlib import Path
from types import Sim... | 491 | 17,850 |
sglang | test/registered/unit/parser/test_conversation.py | .py | """Unit tests for srt/parser/conversation.py"""
import json
import os
import tempfile
import unittest
from sglang.srt.entrypoints.openai.protocol import (
ChatCompletionMessageContentAudioPart,
ChatCompletionMessageContentAudioURL,
ChatCompletionMessageContentImagePart,
ChatCompletionMessageContentIma... | 1,072 | 41,884 |
sglang | test/registered/unit/parser/test_reasoning_parser.py | .py | """Unit tests for srt/parser/reasoning_parser.py"""
import unittest
from sglang.srt.parser.reasoning_parser import (
Apertus2509Detector,
BaseReasoningFormatDetector,
CohereCommand4Detector,
DeepSeekR1Detector,
DeepSeekV4Detector,
Gemma4Detector,
Glm45Detector,
HunyuanDetector,
Ink... | 1,533 | 67,094 |
sglang | test/registered/unit/parser/test_reasoning_content_without_parser.py | .py | import unittest
from sglang.srt.parser.reasoning_parser import ReasoningParser
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
register_cpu_ci(est_time=7, suite="base-a-test-cpu")
register_cpu_ci(est_time=7, suite="base-c-test-cpu")
# Simulated model output th... | 48 | 1,732 |
sglang | test/registered/unit/parser/test_kimik3_reasoning_parser.py | .py | import sys
import pytest
from sglang.srt.function_call.kimik3_format import (
MESSAGE_CLOSE,
RESPONSE_CLOSE,
RESPONSE_OPEN,
THINK_CLOSE,
THINK_OPEN,
TOOLS_CLOSE,
TOOLS_OPEN,
)
from sglang.srt.parser.reasoning_parser import KimiK3Detector, ReasoningParser
from sglang.test.ci.ci_register imp... | 163 | 5,141 |
sglang | test/registered/unit/parser/test_harmony_parser.py | .py | """Unit tests for srt/parser/harmony_parser.py"""
import unittest
from sglang.srt.parser.harmony_parser import (
CanonicalStrategy,
HarmonyParser,
TextStrategy,
iter_tokens,
prefix_hold,
)
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
reg... | 693 | 28,060 |
sglang | test/registered/unit/parser/test_jinja_template_utils.py | .py | """Unit tests for srt/parser/jinja_template_utils.py"""
import unittest
from sglang.srt.parser.jinja_template_utils import (
detect_jinja_template_content_format,
process_content_for_template_format,
)
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
re... | 509 | 17,194 |
sglang | test/registered/unit/parser/test_inkling_renderer.py | .py | import unittest
from sglang.srt.entrypoints.openai.chat_encoding import encode_simple_chat
from sglang.srt.parser.inkling_renderer import render_inkling_messages
from sglang.srt.parser.inkling_tokenizer import (
CONTENT_IMAGE,
CONTENT_INVOKE_TOOL_JSON,
CONTENT_MODEL_END_SAMPLING,
CONTENT_TEXT,
CONT... | 371 | 13,461 |
sglang | test/registered/unit/parser/test_code_completion_parser.py | .py | """Unit tests for srt/parser/code_completion_parser.py"""
import unittest
from unittest.mock import patch
from sglang.srt.entrypoints.openai.protocol import CompletionRequest
from sglang.srt.parser.code_completion_parser import (
CompletionTemplate,
FimPosition,
completion_template_exists,
completion_... | 169 | 6,915 |
sglang | test/registered/unit/parser/test_template_manager.py | .py | import sys
import tempfile
import unittest
from types import ModuleType, SimpleNamespace
from unittest.mock import Mock, patch
from sglang.srt.parser.template_detection import (
REASONING_PARSER_RULES,
TOOL_CALL_PARSER_RULES,
ReasoningToggleConfig,
detect_reasoning_parser,
detect_reasoning_pattern,... | 956 | 39,414 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp4_mtp.py | .py | """MI35x DeepSeek-V4-Pro FP4 + MTP Test (8-GPU)
- Accuracy: GSM8K few-shot eval
- Acceptance: mtp acc length eval
Registry: nightly-amd-8-gpu-mi35x-deepseek-v4-pro-mtp suite
"""
import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.te... | 165 | 5,161 |
sglang | test/registered/amd/test_deepseek_r1_hicache_mi35x.py | .py | """MI35x DeepSeek-R1-0528 FP8 HiCache Nightly Test (8-GPU)
Regression guard: launches DeepSeek-R1-0528 (native FP8, MLA, aiter attention
backend) on MI35x with the full L1+L2+L3 HiCache hierarchy wired up
(``--enable-hierarchical-cache --hicache-storage-backend file``), then runs
GSM8K few-shot completion and asserts ... | 167 | 5,922 |
sglang | test/registered/amd/test_deepseek_v3_basic_kv_fp8.py | .py | import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from sglang.test.test_utils impo... | 87 | 2,596 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp4_tbo.py | .py | """MI35x DeepSeek-V4-Pro FP4 + non-EP DP two-batch-overlap (TBO) test (8-GPU)
End-to-end accuracy test for DeepSeek-V4-Pro (1.6T) FP4 with the non-EP DP
two-batch-overlap path on MI35x ROCm 7.2.
TBO here is the DP-attention TP-MoE variant (moe_a2a_backend='none'): it overlaps
one micro-batch's DP all_gatherv (pre-MoE... | 152 | 5,119 |
sglang | test/registered/amd/test_kimi_k25_mxfp4.py | .py | """Kimi-K2.5-MXFP4 aiter MLA backend test (8-GPU, FP8 KV cache)
PR-level test for Kimi-K2.5-MXFP4 with aiter unified attention backend
and fp8_e4m3 KV cache on MI35x.
"""
import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.c... | 118 | 3,631 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp4.py | .py | """MI35x DeepSeek-V4-Pro FP4 Test (8-GPU)
Combined accuracy + performance test for DeepSeek-V4-Pro (1.6T) FP4 on
MI35x ROCm 7.2.
- Accuracy: GSM8K few-shot eval
- Performance: bench_one_batch_server with input_len=8192, output_len=1024 (bs=1)
Both tests share a single launched server.
Registry: nightly-amd-8-gpu-mi3... | 211 | 6,891 |
sglang | test/registered/amd/test_deepseek_v4_flash_fp4.py | .py | """MI35x DeepSeek-V4-Flash FP4 Test (8-GPU)
Combined accuracy + performance test for DeepSeek-V4-Flash FP4 on MI35x ROCm 7.2.
- Accuracy: GSM8K few-shot eval
- Performance: bench_one_batch_server with input_len=8192, output_len=1024 (bs=1)
Both tests share a single launched server.
Registry: nightly-amd-8-gpu-mi35x-... | 209 | 6,816 |
sglang | test/registered/amd/test_moriep_small.py | .py | import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.server_args import ZMQ_TCP_PORT_DELTA
from sglang.srt.utils import kill_process_tree
from sglang.srt.utils.network import is_port_available
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k... | 580 | 16,941 |
sglang | test/registered/amd/test_kimi_k2_instruct.py | .py | import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from ... | 100 | 2,893 |
sglang | test/registered/amd/test_deepseek_v32_basic.py | .py | import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from sglang.test.test_utils impo... | 165 | 4,938 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp4_tbo_mtp.py | .py | """MI35x DeepSeek-V4-Pro FP4 + non-EP DP two-batch-overlap (TBO) + MTP test (8-GPU)
End-to-end accuracy test for DeepSeek-V4-Pro (1.6T) FP4 with the non-EP DP
two-batch-overlap path on MI35x ROCm 7.2.
Registry: nightly-amd-8-gpu-mi35x-deepseek-v4-pro-mtp suite
"""
import os
import unittest
from types import SimpleNa... | 150 | 4,668 |
sglang | test/registered/amd/test_qwen3_coder_next_8gpu.py | .py | """MI35x Qwen3-Coder-Next Functionality Test (8-GPU)
Tests Qwen3-Coder-Next model with basic configuration
on MI35x. Covers GSM8K accuracy and BS=1 decode speed.
Server args match run_qwen3-coder-next_spec.sh.
Registry: stage-c-test-large-8-gpu-amd-mi35x-qwen3-coder-next suite
"""
import unittest
from types import ... | 185 | 5,610 |
sglang | test/registered/amd/test_deepseek_r1_mxfp4_8gpu.py | .py | import unittest
from types import SimpleNamespace
import requests
from sglang.srt.environ import envs
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchA... | 183 | 5,717 |
sglang | test/registered/amd/test_deepseek_v4_flash_fp8.py | .py | """MI35x DeepSeek-V4-Flash FP8 Test (8-GPU)
Combined accuracy + performance test for DeepSeek-V4-Flash FP8 on MI35x ROCm 7.2.
- Accuracy: GSM8K few-shot eval
- Performance: bench_one_batch_server with input_len=8192, output_len=1024 (bs=1)
Both tests share a single launched server.
Registry: nightly-amd-8-gpu-mi35x-... | 209 | 6,821 |
sglang | test/registered/amd/test_deepseek_v4_flash_fp8_tbo.py | .py | """MI35x DeepSeek-V4-Flash FP8 + non-EP DP two-batch-overlap (TBO) test (8-GPU)
End-to-end accuracy test for DeepSeek-V4-Flash (285B) FP8 with the non-EP DP
two-batch-overlap path on MI35x ROCm 7.2.
TBO here is the DP-attention TP-MoE variant (moe_a2a_backend='none'): it overlaps
one micro-batch's DP all_gatherv (pre... | 164 | 5,840 |
sglang | test/registered/amd/test_deepseek_v3_basic.py | .py | import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from sglang.test.test_utils impo... | 85 | 2,557 |
sglang | test/registered/amd/test_zimage_turbo.py | .py | """AMD nightly test for Z-Image-Turbo diffusion model (text-to-image)."""
import io
import logging
import os
import pytest
from sglang.multimodal_gen.test.server.test_server_common import ( # noqa: F401
DiffusionServerBase,
diffusion_server,
)
from sglang.multimodal_gen.test.server.test_server_utils import ... | 157 | 4,834 |
sglang | test/registered/amd/test_deepseek_v3_mtp.py | .py | import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from sglang.tes... | 118 | 3,687 |
sglang | test/registered/amd/test_deepseek_v32_mtp.py | .py | import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from sglang.tes... | 219 | 6,690 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp4_dspark.py | .py | """MI35x DeepSeek-V4-Pro-DSpark unified_kv GSM8K accuracy test (8-GPU).
Runs the production AMD DSpark static configuration with the HIP dsv4 backend and
SGLANG_HACK_FLASHMLA_BACKEND=unified_kv_triton. The test uses the full GSM8K set
to catch regressions in unified-KV target-hidden injection, verify metadata, and
DSp... | 202 | 6,958 |
sglang | test/registered/amd/test_wan22_fp8_mla.py | .py | """AMD test for Wan2.2-T2V-A14B with FP8 MLA attention (1-GPU and 8-GPU)."""
from __future__ import annotations
import logging
import pytest
pytest.importorskip("sgl_kernel", reason="sgl_kernel is required for FP8 MLA tests")
from sglang.multimodal_gen.test.server.test_server_common import ( # noqa: F401
Diff... | 137 | 3,860 |
sglang | test/registered/amd/test_kimi_k25_mxfp4_bcg_mi35x.py | .py | """Kimi-K2.5-MXFP4 aiter breakable CUDA-graph (BCG) capture accuracy test
(MI35x, PR-CI)
Exercises the AMD breakable (BCG) CUDA-graph prefill capture path on a
deepseek-family (Kimi-K2.5) aiter model so the code added in this PR actually
runs in PR CI:
* runner_backend/breakable_cuda_graph_backend.py
the RO... | 180 | 5,957 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp8.py | .py | """MI35x DeepSeek-V4-Pro FP8 Test (8-GPU)
Combined accuracy + performance test for DeepSeek-V4-Pro (1.6T) FP8 on
MI35x ROCm 7.2.
- Accuracy: GSM8K few-shot eval
- Performance: bench_one_batch_server with input_len=8192, output_len=1024 (bs=1)
Both tests share a single launched server.
Registry: nightly-amd-8-gpu-mi3... | 211 | 6,896 |
sglang | test/registered/amd/test_deepseek_v4_pro_fp4_cp.py | .py | """MI35x DeepSeek-V4-Pro FP4 prefill context-parallel (CP) accuracy test (8-GPU).
Shares the launch conventions of test_deepseek_v4_pro_fp4.py (same 1.6T model,
same env, same long launch timeout) but enables prefill CP via
``--enable-prefill-cp --cp-strategy interleave`` over the unified_kv backend.
Registry: nightl... | 131 | 3,831 |
sglang | test/registered/amd/test_qwen3_instruct.py | .py | import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from ... | 93 | 2,637 |
sglang | test/registered/amd/test_deepseek_v3_mtp_kv_fp8.py | .py | import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from sglang.tes... | 117 | 3,608 |
sglang | test/registered/amd/test_fp8_per_channel_detection.py | .py | """Unit tests for _is_block_scale_fp8 per-channel vs block-scale fp8 detection.
Tests the helper that distinguishes block-scale fp8 (weight_scale [N, K/128],
compatible with fused gfx95 group-quant kernels) from per-channel fp8
(weight_scale [N, 1], must use the plain bf16 path).
These tests run on CPU and require no... | 76 | 2,896 |
sglang | test/registered/amd/test_qwen3_instruct_fp8.py | .py | import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from ... | 93 | 2,644 |
sglang | test/registered/amd/test_qwen3_instruct_mxfp4.py | .py | import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.send_one import BenchArgs, send_one_prompt
from ... | 97 | 2,702 |
sglang | test/registered/amd/test_dsa_skip_logits_clean.py | .py | """AMD/gfx950 test for the DSA indexer "skip redundant -inf pre-fill" change (#28757).
#28757 passes ``clean_logits=False`` to the HIP aiter ``fp8_mqa_logits`` call in
the DSA indexer, skipping the ``-inf`` pre-fill of the
``[tokens x seq_len_kv]`` MQA-logits buffer (which otherwise grows
quadratically with context). ... | 120 | 5,289 |
sglang | test/registered/amd/disaggregation/test_nixl_transfer_engine_e2e.py | .py | import os
import unittest
from types import SimpleNamespace
import requests
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.server_fixtures.disaggregation_fixture import (
PDDisaggregationServerBase,
)
from sglang.t... | 211 | 6,840 |
sglang | test/registered/amd/disaggregation/test_mori_transfer_engine_e2e.py | .py | import os
import unittest
import requests
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.server_fixtures.disaggregation_fixture import (
PDDisaggregationServerBase,
)
from sglang.test.test_utils import (
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
pop... | 183 | 5,809 |
sglang | test/registered/amd/disaggregation/test_disaggregation_pp.py | .py | import os
import time
import unittest
from types import SimpleNamespace
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval
from sglang.test.server_fixtures.disaggregation_fixture import (
PDDisaggregationServerBase,
)
from sglang.test.test_utils import (
DEFA... | 303 | 9,170 |
sglang | test/registered/amd/disaggregation/test_disaggregation_basic.py | .py | import json
import os
import unittest
from types import SimpleNamespace
import openai
import requests
from transformers import AutoTokenizer
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.server_fixtures.disaggregation... | 434 | 13,894 |
sglang | test/registered/amd/accuracy/mi35x/test_kimi_k25_aiter_mla_eval_mi35x.py | .py | """MI35x Kimi-K2.5 aiter MLA backend accuracy tests (4-GPU)
Tests moonshotai/Kimi-K2.5 with the aiter unified attention backend on MI35x,
covering both default and FP8 KV cache configurations.
The FP8 KV cache variant validates the fix for assertion failure
`q_scale.has_value() && kv_scale.has_value()` in aiter ASM M... | 208 | 7,181 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_r1_eval_mi35x.py | .py | """MI35x DeepSeek-R1 GSM8K Completion Evaluation Test (8-GPU)
Tests DeepSeek-R1-0528 with basic configuration using few-shot completion
benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-deepseek-r1 suite
"""
import ast
import os
import re
import time
import unittest
from dataclasses import dataclass
fro... | 249 | 8,079 |
sglang | test/registered/amd/accuracy/mi35x/test_qwen35_mxfp4_eval_mi35x.py | .py | """MI35x Qwen3.5-397B-A17B MXFP4 GSM8K accuracy + serving-perf test (nightly).
Covers the two AMD MXFP4 checkpoints, which differ ONLY in whether the shared
expert is quantized -- and therefore in whether the shared-expert fusion
``fuse_gate`` serving path (qwen2_moe.py ``_use_aiter`` branch + the fuse_gate
append ker... | 250 | 8,729 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_r1_mxfp4_tp4_mi35x.py | .py | """MI35x DeepSeek-R1-MXFP4 TP=4 GSM8K AITER MLA regression.
DeepSeek-R1 has 128 attention heads, so TP=4 gives 32 heads per rank. This
covers the AITER persistent MLA decode metadata path for the nhead=32 case.
Registry: nightly-amd-8-gpu-mi35x-deepseek-r1-mxfp4-tp4 suite
"""
import ast
import os
import re
import ti... | 171 | 5,113 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_r1_mxfp4_ar_fusion_eval_mi35x.py | .py | """MI35x DeepSeek-R1-MXFP4 GSM8K Completion Evaluation Test with AIter AllReduce Fusion (8-GPU)
Tests DeepSeek-R1-MXFP4 quantized model with --enable-aiter-allreduce-fusion
using few-shot completion benchmark on MI35x.
Registry: nightly-amd-8-gpu-mi35x-deepseek-r1-mxfp4-ar-fusion suite
"""
import ast
import os
impor... | 247 | 8,213 |
sglang | test/registered/amd/accuracy/mi35x/test_grok1_int4_eval_mi35x.py | .py | """MI35x GROK1-INT4 GSM8K Completion Evaluation Test (8-GPU)
Tests Grok-1 INT4 (W4A8KV8) model using few-shot completion benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-grok1-int4 suite
"""
import ast
import os
import re
import time
import unittest
import numpy as np
from sglang.srt.utils import kil... | 164 | 5,054 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_r1_mxfp4_eval_mi35x.py | .py | """MI35x DeepSeek-R1-MXFP4 GSM8K Completion Evaluation Test (8-GPU)
Tests DeepSeek-R1-MXFP4 quantized model with basic configuration
using few-shot completion benchmark on MI35x.
Registry: nightly-amd-8-gpu-mi35x-deepseek-r1-mxfp4 suite
"""
import ast
import os
import re
import time
import unittest
from dataclasses ... | 245 | 8,086 |
sglang | test/registered/amd/accuracy/mi35x/test_kimi_k25_mxfp4_eval_mi35x.py | .py | """MI35x Kimi-K2.5-MXFP4 aiter MLA backend accuracy tests (8-GPU)
Tests Kimi-K2.5-MXFP4 with the aiter unified attention backend on MI35x,
covering both default and FP8 KV cache configurations.
The FP8 KV cache variant validates the fix for assertion failure
`q_scale.has_value() && kv_scale.has_value()` in aiter ASM ... | 201 | 6,753 |
sglang | test/registered/amd/accuracy/mi35x/test_qwen35_eval_mi35x.py | .py | """MI35x Qwen 3.5 GSM8K lm-eval Evaluation Test (8-GPU)
Tests Qwen/Qwen3.5-397B-A17B (MoE, Hybrid Attention with Gated Delta Networks)
with lm-eval GSM8K benchmark on MI35x, matching the AMD Day 0 article.
Registry: nightly-amd-accuracy-8-gpu-mi35x-qwen35 suite
"""
import os
import unittest
from pathlib import Path
... | 108 | 3,478 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_r1_mxfp4_tp2_mi35x.py | .py | """MI35x DeepSeek-R1-MXFP4 TP=2 GSM8K AITER MLA regression.
DeepSeek-R1 has 128 attention heads, so TP=2 gives 64 heads per rank. This
covers the AITER persistent MLA decode metadata path that previously crashed
with GPU memory access faults.
Registry: nightly-amd-2-gpu-mi35x-deepseek-r1-mxfp4-tp2 suite
"""
import a... | 172 | 5,145 |
sglang | test/registered/amd/accuracy/mi35x/test_qwen3_moe_eval_mi35x.py | .py | """MI35x Qwen3 MoE (unquantized) GSM8K Completion Evaluation Test (8-GPU)
Tests unquantized (bf16) Qwen3 MoE (Qwen/Qwen3-30B-A3B) using a few-shot GSM8K
completion benchmark on MI35x with aiter enabled (SGLANG_USE_AITER=1).
Registry: nightly-amd-8-gpu-mi35x suite
"""
import ast
import os
import re
import time
import... | 231 | 7,590 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_v32_eval_mi35x.py | .py | """MI35x DeepSeek-V3.2 GSM8K Completion Evaluation Test (8-GPU)
Tests DeepSeek-V3.2 with basic configuration using few-shot completion
benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-deepseek-v32 suite
"""
import ast
import os
import re
import time
import unittest
from dataclasses import dataclass
fro... | 250 | 8,113 |
sglang | test/registered/amd/accuracy/mi35x/test_glm51_eval_mi35x.py | .py | """MI35x GLM-5.1 GSM8K Completion Evaluation Test (8-GPU)
Tests GLM-5.1-FP8 with DSA attention backend using few-shot
completion benchmark on MI35x.
Registry: nightly-amd-8-gpu-mi35x-glm51 suite
"""
import ast
import os
import re
import time
import unittest
from dataclasses import dataclass, field
from typing import... | 239 | 7,481 |
sglang | test/registered/amd/accuracy/mi35x/test_minimax_m25_tp4_eval_mi35x.py | .py | """MI35x MiniMax-M2.5 GSM8K Completion Evaluation Test (4-GPU, TP=4)
Tests MiniMax-M2.5 with TP=4 + EP=1 configuration using few-shot completion
benchmark on MI35x. This configuration uses unified attention with FP8 KV cache.
Registry: nightly-amd-4-gpu-mi35x-minimax-m25-tp4 suite
"""
import os
import re
import time... | 256 | 8,186 |
sglang | test/registered/amd/accuracy/mi35x/test_glm47_fp8_eval_mi35x.py | .py | """MI35x GLM-4.7-FP8 GSM8K Accuracy Evaluation Test (8-GPU)
Tests GLM-4.7-FP8 accuracy using GSM8K benchmark on MI35x.
Registry: nightly-amd-8-gpu-mi35x-glm47-fp8 suite
"""
import unittest
from sglang.test.accuracy_test_runner import AccuracyTestParams
from sglang.test.ci.ci_register import register_amd_ci
from sgl... | 54 | 1,448 |
sglang | test/registered/amd/accuracy/mi35x/test_glm51_hisparse_eval_mi35x.py | .py | """MI35x GLM-5.1 HiSparse GSM8K evaluation test (8-GPU)."""
import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_process_tree
from sglang.test.ci.ci_register import register_amd_ci
from sglang.test.run_eval import run_eval
from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
... | 91 | 2,603 |
sglang | test/registered/amd/accuracy/mi35x/test_glm5_eval_mi35x.py | .py | """MI35x GLM-5 GSM8K Completion Evaluation Test (8-GPU)
Tests GLM-5 with DSA attention backend using few-shot completion
benchmark on MI35x.
Registry: nightly-amd-8-gpu-mi35x-glm5 suite
"""
import ast
import os
import re
import time
import unittest
from dataclasses import dataclass, field
from typing import List, Op... | 249 | 7,909 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_v32_dp_eval_mi35x.py | .py | """MI35x DeepSeek-V3.2 DP GSM8K Accuracy Evaluation Test (8-GPU)
Tests DeepSeek-V3.2 with DP=8 + TP=8 + dp-attention using few-shot
completion benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-deepseek-v32-dp suite
"""
import unittest
from types import SimpleNamespace
from sglang.srt.utils import kill_... | 114 | 3,316 |
sglang | test/registered/amd/accuracy/mi35x/test_glm51_mxfp4_tp2_gsm8k_mi35x.py | .py | """MI355X GLM-5.1-MXFP4 TP=2 GSM8K accuracy gate.
This is a nightly AMD regression test for the GLM-5.1-MXFP4 TP=2
accuracy drop seen on MI355X/gfx950 when aiter selected a bad BF16 GEMM path.
Registry: nightly-amd-2-gpu-mi35x-glm51-mxfp4 suite
"""
import resource
import unittest
from types import SimpleNamespace
f... | 117 | 3,552 |
sglang | test/registered/amd/accuracy/mi35x/test_minimax_m3_tp4_eval_mi35x.py | .py | """MI35x MiniMax-M3 MXFP8 GSM8K Chat+Thinking Evaluation Test (4-GPU, TP=4)
Tests MiniMax-M3 (MXFP8 checkpoint) with TP=4 on MI35x. MI35x (gfx950 / CDNA4)
has hardware MX-scaled matmul, so the MXFP8 MoE weights are served natively;
you still pass `--quantization mxfp8`. Serves with the aiter attention backend,
fp8 (e4... | 282 | 10,506 |
sglang | test/registered/amd/accuracy/mi35x/test_grok2_eval_mi35x.py | .py | """MI35x GROK2 GSM8K Completion Evaluation Test (8-GPU)
Tests Grok-2 model using few-shot completion benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-grok2 suite
"""
import ast
import os
import re
import time
import unittest
import numpy as np
from sglang.srt.utils import kill_process_tree
from sglan... | 166 | 4,982 |
sglang | test/registered/amd/accuracy/mi35x/test_kimi_k2_eval_mi35x.py | .py | """MI35x Kimi-K2 GSM8K Completion Evaluation Test (8-GPU)
Tests moonshotai/Kimi-K2-Instruct-0905 with GSM8K few-shot benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-kimi-k2 suite
"""
import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process... | 106 | 3,272 |
sglang | test/registered/amd/accuracy/mi35x/test_kimi_k25_eval_mi35x.py | .py | """MI35x Kimi-K2.5 GSM8K Completion Evaluation Test (8-GPU)
Tests moonshotai/Kimi-K2.5 with GSM8K few-shot benchmark on MI35x.
Registry: nightly-amd-accuracy-8-gpu-mi35x-kimi-k25 suite
"""
import os
import unittest
from types import SimpleNamespace
import requests
from sglang.srt.utils import kill_process_tree
fro... | 107 | 3,296 |
sglang | test/registered/amd/accuracy/mi35x/test_glm5_mxfp4_eval_mi35x.py | .py | """MI35x GLM-5-MXFP4 GSM8K Completion Evaluation Test (8-GPU)
Tests the AMD Quark MXFP4-quantized GLM-5 model using few-shot
completion benchmark on MI35x.
Model: amd/GLM-5-MXFP4 (MOE-only MXFP4 quantization of zai-org/GLM-5)
Reference: https://huggingface.co/amd/GLM-5-MXFP4
Registry: nightly-amd-8-gpu-mi35x-glm5-mx... | 252 | 8,130 |
sglang | test/registered/amd/accuracy/mi35x/test_deepseek_r1_mxfp4_kv_fp8_eval_mi35x.py | .py | """MI35x DeepSeek-R1-MXFP4 GSM8K Completion Evaluation Test with KV Cache FP8 (8-GPU)
Tests DeepSeek-R1-MXFP4 quantized model with --kv-cache-dtype fp8_e4m3
using few-shot completion benchmark on MI35x.
Registry: nightly-amd-8-gpu-mi35x-deepseek-r1-mxfp4-kv-fp8 suite
"""
import ast
import os
import re
import time
im... | 248 | 8,163 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.