AI Slop Code RIsk Monitor

lightseekorg/tokenspeed

TokenSpeed is a speed-of-light LLM inference engine.

19.1 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for lightseekorg/tokenspeed, a Python project with 2,211 GitHub stars. SynthScan examined 957,777 lines of code across 2349 source files, recording 14463 pattern matches distributed across 23 syntactic categories. The legacy adjusted pattern signal is 19.1 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.1
Adjusted Signal
19.1
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
2.2K
Stars
Python
Language
957.8K
Lines of Code
2.3K
Files
14.5K
Pattern Hits
2026-10-12
Scan Date
0.13
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 42.0/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 10434 finding(s).

Hallucinated Dependency & Supply Chain Risk 10.9/100 · LOW

Are imports declared and package/API names verified? 1964 finding(s).

Agent Over-Engineering Ratio 50.0/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 9933 finding(s).

PR Review Velocity Impact 61.8/100 · HIGH

Which changes need focused human review? 14463 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 6HIGH 294MEDIUM 1219LOW 12944

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 14463 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers7665 hits · 7463 pts
SeverityFileLineSnippetContext
LOWtokenspeed-kernel-npu/test/test_layernorm.py53def test_add_rmsnorm_updates_residual(dtype: torch.dtype) -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py83def test_mha_extend_with_paged_cache() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py123def test_mha_decode_with_paged_cache() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py149def test_mha_decode_npugraph_updates_sequence_lengths() -> None:CODE
LOWtest/test_utils.py377def write_github_step_summary(content):CODE
LOWtest/test_host_cache_storage.py65def test_block_offsets_follow_group_packing_without_overlap():CODE
LOWtest/test_host_cache_storage.py77def test_null_and_out_of_range_blocks_are_rejected(group_index, block_id):CODE
LOWtest/test_host_cache_storage.py85def test_host_fields_are_packed_without_padding():CODE
LOWtest/test_l3_mooncake_master.py145 def test_wait_tcp_requires_timeout(self) -> None:CODE
LOWtest/test_l3_mooncake_master.py151 def test_host_requires_nbytes_and_page(self) -> None:CODE
LOWtest/runners.py560 def batch_forward_generation_raw(CODE
LOWtest/runners.py594def check_close_model_outputs(CODE
LOWtest/test_l2_layerwise_load.py44def test_layerwise_load_waits_for_the_selected_event_set(monkeypatch):CODE
LOWtest/test_l2_layerwise_load.py69def test_layerwise_load_waits_for_bound_flags(monkeypatch):CODE
LOW⚡test/test_cache_transfer_layout.py59def test_cache_field_layer_id_parses_layer_owned_field():CODE
LOW⚡test/test_cache_transfer_layout.py67def test_cache_field_layer_id_rejects_invalid_field(field_id):CODE
LOW⚡test/test_cache_transfer_layout.py72def test_layout_rejects_duplicate_group_ids():CODE
LOW⚡test/test_cache_transfer_layout.py88def test_layout_rejects_duplicate_field_ids_across_groups():CODE
LOW⚡test/test_cache_transfer_layout.py98def test_layout_rejects_payload_larger_than_device_stride():CODE
LOW⚡test/test_cache_transfer_layout.py103def test_layout_rejects_unknown_consumer_field():CODE
LOW⚡test/test_cache_transfer_layout.py110def test_layout_requires_a_positive_num_lcm_blocks():CODE
LOWtest/test_cache_transfer_layout.py122def test_lcm_layout_is_derived_from_planned_field_offsets():CODE
LOWtest/test_cache_transfer_layout.py169def test_lcm_layout_uses_scheduler_group_order():CODE
LOWtest/test_cache_transfer_layout.py224def test_merged_plan_views_filter_and_remap_fields_before_combining():CODE
LOWtest/test_cache_transfer_layout.py309def test_target_and_draft_layouts_must_share_one_arena():CODE
LOWtest/test_cache_transfer_layout.py330def test_aliased_target_and_draft_layout_is_transferred_once():CODE
LOWtest/test_cache_transfer_layout.py342def test_merged_owner_keeps_aliased_field_on_target():CODE
LOWtest/test_cache_transfer_layout.py361def test_invalid_target_draft_field_overlap_is_rejected(draft_fields, error):CODE
LOWtest/test_cache_transfer_layout.py370def test_draft_layout_must_use_target_block_geometry():CODE
LOW⚡test/test_l3_kvstore.py1935 def test_namespace_clear_uses_anchored_escaped_regex(self):CODE
LOW⚡test/test_l3_kvstore.py1945 def test_namespace_clear_without_remove_by_regex_is_failure(self):CODE
LOW⚡test/test_l3_kvstore.py1950 def test_namespace_clear_failure_is_not_reported_as_success(self):CODE
LOW⚡test/test_l3_kvstore.py1956 def test_segment_is_divided_across_tp_and_pp_ranks(self):CODE
LOWtest/test_l3_kvstore.py80 def test_fake_host_requires_buffer_size(self):CODE
LOWtest/test_l3_kvstore.py86 def test_object_key_includes_group_offset_and_rank(self):CODE
LOWtest/test_l3_kvstore.py102 def test_attention_build_exports_resolved_backend_names(self):CODE
LOWtest/test_l3_kvstore.py191 def test_weight_version_factory_preserves_resolved_backend_identity(self):CODE
LOWtest/test_l3_kvstore.py233 def test_prefix_is_stable_and_separates_incompatible_cache_objects(self):CODE
LOWtest/test_l3_kvstore.py348 def test_checkpoint_id_prefers_loaded_commit_over_moving_branch(self):CODE
LOWtest/test_l3_kvstore.py389 def test_checkpoint_id_uses_snapshot_directory_commit(self):CODE
LOWtest/test_l3_kvstore.py408 def test_checkpoint_id_does_not_trust_hub_snapshots_without_refs(self):CODE
LOWtest/test_l3_kvstore.py427 def test_checkpoint_id_does_not_trust_snapshots_dir_outside_hf_hub_cache(self):CODE
LOWtest/test_l3_kvstore.py456 def test_checkpoint_id_fingerprints_local_weight_bytes(self):CODE
LOWtest/test_l3_kvstore.py492 def test_checkpoint_id_does_not_trust_hex_basename_outside_hf_snapshots(self):CODE
LOWtest/test_l3_kvstore.py521 def test_checkpoint_id_ignores_inherited_commit_on_local_dir(self):CODE
LOWtest/test_l3_kvstore.py545 def test_checkpoint_id_fingerprints_local_hf_quant_config(self):CODE
LOWtest/test_l3_kvstore.py574 def test_checkpoint_id_fingerprints_local_config_code(self):CODE
LOWtest/test_l3_kvstore.py603 def test_checkpoint_id_fingerprints_imported_custom_code_subdirectories(self):CODE
LOWtest/test_l3_kvstore.py639 def test_checkpoint_id_fingerprints_symlinked_custom_code_packages(self):CODE
LOWtest/test_l3_kvstore.py699 def test_checkpoint_id_uses_selected_load_format_weight_files(self):CODE
LOWtest/test_l3_kvstore.py740 def test_checkpoint_id_ignores_unselected_weight_files(self):CODE
LOWtest/test_l3_kvstore.py778 def test_checkpoint_id_fingerprints_sharded_state_weight_files(self):CODE
LOWtest/test_l3_kvstore.py803 def test_checkpoint_id_fingerprints_sharded_state_pattern_files(self):CODE
LOWtest/test_l3_kvstore.py864 def test_checkpoint_id_fingerprints_npcache_numpy_files(self):CODE
LOWtest/test_l3_kvstore.py896 def test_checkpoint_id_fingerprints_mistral_shard_index(self):CODE
LOWtest/test_l3_kvstore.py934 def test_checkpoint_id_rejects_unsupported_load_format(self):CODE
LOWtest/test_l3_kvstore.py946 def test_ext_def_file_parses_loader_yaml_forms(self):CODE
LOWtest/test_l3_kvstore.py982 def test_checkpoint_id_hashes_extensible_yaml_and_extension_code(self):CODE
LOWtest/test_l3_kvstore.py1038 def test_checkpoint_id_hashes_extension_code_for_quoted_key_and_flow_yaml(self):CODE
LOWtest/test_l3_kvstore.py1084 def test_checkpoint_id_fingerprints_extensible_local_weights_and_yaml(self):CODE
7605 more matches not shown…
Decorative Section Separators1153 hits · 3936 pts
SeverityFileLineSnippetContext
MEDIUM⚡test/runtime/test_dspark_proposal.py87# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py89# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py216# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py218# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py292# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py294# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py290# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py292# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py338# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py342# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py611# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py613# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py644# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py646# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py735# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py737# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py782# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py784# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py677# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py679# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py882# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py884# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_l3_storage_hits.py271# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_l3_storage_hits.py273# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_qwen4_exp.py1908# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_qwen4_exp.py1910# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py326# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py328# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py444# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py446# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py492# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py494# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py1040# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py1042# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_retraction_image_executor.py89# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_retraction_image_executor.py91# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_drafter_accept_indexing.py690# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_drafter_accept_indexing.py694# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_expert_location.py426# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_expert_location.py429# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py72# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py74# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py1133# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py1135# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py1314# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py1316# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py298# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py300# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py946# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py948# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1013# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1015# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1095# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1097# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_input_logprobs.py73# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_input_logprobs.py75# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_input_logprobs.py342# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_input_logprobs.py344# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_input_logprobs.py783# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_input_logprobs.py785# --------------------------------------------------------------------------COMMENT
1093 more matches not shown…
Over-Commented Block1893 hits · 1840 pts
SeverityFileLineSnippetContext
LOWtokenspeed-kernel-npu/test/test_rotary_embedding.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_layernorm.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mha.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/__init__.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…rnel-npu/python/tokenspeed_kernel_npu/ops/layernorm.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/__init__.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…u/python/tokenspeed_kernel_npu/ops/rotary_embedding.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/test_host_cache_storage.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/test_l3_mooncake_master.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runners.py1# SPDX-License-Identifier: MIT AND Apache-2.0COMMENT
LOWtest/test_l2_layerwise_load.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/test_cache_transfer_layout.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/test_l3_kvstore.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ci/eval/kimi-k3-mxfp4-tp8ep1-evalscope-aime26-amd.yaml1api_version: ci.tokenspeed.io/v1COMMENT
LOW…kimi-k3-mxfp4-tp8ep1-evalscope-random-4k-1k-mi35x.yaml1api_version: ci.tokenspeed.io/v1COMMENT
LOW…kimi-k3-mxfp4-tp8ep1-evalscope-random-4k-1k-mi35x.yaml121# Values are [Latency (tps/user), Throughput (tps/gpu)]; gate fails any conc whose actual falls below ref * perf_threshoCOMMENT
LOWtest/runtime/test_unified_decode_path.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_cutedsl_mla_dcp_metadata.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_device_handle.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_cudagraph_probe_ladder.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_multimodal_warmup.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_kimi_k3_comm_arming.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_kda_state_eviction.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_executor_capture_step.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_l3_storage_hits.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_gpu_memory_summary.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_moe_ispp_padding.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_dummy_weights.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_unit_kv_scales.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_moe_global_padded_tp_loader.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_forward_routing.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_sharded_state_loader.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_input_pad_tail_tape.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_batch_log.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_cu_extend_seq_lens_cpu_metadata.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_qwen4_exp_cache_without_gdn.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_qwen4_exp.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_logging.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_tree_attention_cascade.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_generation_output_processor.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_kda_state_eviction_spec.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_kvp_cache_contract.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_deepseek_v4_slot_mappings.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_retraction_image_executor.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_runtime_states.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_flashmla_dcp.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_expert_location.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_cupti_warmup_vendor_guard.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_multimodal_encoded_offload.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_jit_compile_check.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_tree_spec.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_gluon_petit_backend.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_input_logprobs.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_deepseek_v41_inputs.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_qwen4_exp_ple_backend.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_cudagraph_support_resolution.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_executor_rebind.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_linear_method_construction.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
1833 more matches not shown…
Unused Imports1894 hits · 1817 pts
SeverityFileLineSnippetContext
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py25CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py26CODE
LOW…rnel-npu/python/tokenspeed_kernel_npu/ops/layernorm.py23CODE
LOW…u/python/tokenspeed_kernel_npu/ops/rotary_embedding.py23CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py23CODE
LOWtest/test_host_cache_storage.py21CODE
LOWtest/test_l3_mooncake_master.py28CODE
LOWtest/test_l3_mooncake_master.py169CODE
LOWtest/test_l2_layerwise_load.py21CODE
LOWtest/test_cache_transfer_layout.py21CODE
LOWtest/test_l3_kvstore.py21CODE
LOWtest/ci/deepswe/test_kimi_code.py3CODE
LOWtest/ci/deepswe/kimi_code_environment.py3CODE
LOWtest/ci/deepswe/kimi_code_pier_agent.py3CODE
LOWtest/ci/deepswe/summarize.py4CODE
LOWtest/runtime/test_unified_decode_path.py36CODE
LOWtest/runtime/test_dspark_proposal.py11CODE
LOWtest/runtime/test_kimi_k3_eagle3.py3CODE
LOWtest/runtime/test_block_tables_bridge.py1CODE
LOWtest/runtime/test_device_handle.py40CODE
LOWtest/runtime/test_inkling_reference_parity.py23CODE
LOWtest/runtime/test_host_executor.py3CODE
LOWtest/runtime/test_glm53_flash_cache_spec.py3CODE
LOWtest/runtime/test_cudagraph_probe_ladder.py23CODE
LOWtest/runtime/test_kimi_mxfp4_dense_linear.py3CODE
LOWtest/runtime/test_multimodal_warmup.py21CODE
LOWtest/runtime/test_kimi_k3_comm_arming.py23CODE
LOWtest/runtime/test_kda_state_eviction.py30CODE
LOWtest/runtime/test_executor_capture_step.py27CODE
LOWtest/runtime/test_l3_storage_hits.py29CODE
LOWtest/runtime/test_gpu_memory_summary.py23CODE
LOWtest/runtime/test_trtllm_spec_seqlen_clamp.py27CODE
LOWtest/runtime/test_moe_ispp_padding.py21CODE
LOWtest/runtime/conftest.py3CODE
LOWtest/runtime/test_dummy_weights.py24CODE
LOWtest/runtime/test_cache_memory_plan.py1CODE
LOWtest/runtime/test_moe_global_padded_tp_loader.py21CODE
LOWtest/runtime/test_forward_routing.py27CODE
LOWtest/runtime/test_input_pad_tail_tape.py29CODE
LOWtest/runtime/test_batch_log.py23CODE
LOWtest/runtime/test_fp8_linear_blockscale_flashinfer.py3CODE
LOWtest/runtime/test_cu_extend_seq_lens_cpu_metadata.py31CODE
LOWtest/runtime/test_qwen4_exp.py21CODE
LOWtest/runtime/test_fp8_linear_mxfp8.py3CODE
LOWtest/runtime/cache_pool_test_utils.py1CODE
LOWtest/runtime/test_generation_output_processor.py21CODE
LOWtest/runtime/test_glm53_flash_config.py3CODE
LOWtest/runtime/test_kda_state_eviction_spec.py28CODE
LOWtest/runtime/test_scheduler_config_guard.py3CODE
LOWtest/runtime/test_deepseek_v4_slot_mappings.py28CODE
LOWtest/runtime/test_retraction_image_executor.py33CODE
LOWtest/runtime/test_kimi_k3_cache_pool.py1CODE
LOWtest/runtime/test_unified_kv_slab_pool.py3CODE
LOWtest/runtime/test_unified_kv_slab_pool.py469CODE
LOWtest/runtime/test_unified_kv_slab_pool.py471CODE
LOWtest/runtime/test_expert_location.py23CODE
LOWtest/runtime/test_cache_group_router.py8CODE
LOWtest/runtime/test_cupti_warmup_vendor_guard.py41CODE
LOWtest/runtime/test_trtllm_mla_block_decode.py1CODE
LOWtest/runtime/test_multimodal_encoded_offload.py22CODE
1834 more matches not shown…
Cross-File Repetition101 hits · 505 pts
SeverityFileLineSnippetContext
HIGH…tic_benchmark/minimax_m3/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…gentic_benchmark/kimi_k3/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…gentic_benchmark/inkling/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…chmark/deepseek_v4_flash/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…st/agentic_benchmark/kimi_k2.5/vllm/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…ntic_benchmark/kimi_k2.5/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…/agentic_benchmark/kimi_k2.5/sglang/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…/agentic_benchmark/kimi_k2.5/trtllm/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…agentic_benchmark/glm5.2/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGHtest/agentic_benchmark/glm5.2/trtllm/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…tic_benchmark/minimax_m3/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…gentic_benchmark/kimi_k3/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…gentic_benchmark/inkling/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…chmark/deepseek_v4_flash/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…st/agentic_benchmark/kimi_k2.5/vllm/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…ntic_benchmark/kimi_k2.5/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…/agentic_benchmark/kimi_k2.5/sglang/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…/agentic_benchmark/kimi_k2.5/trtllm/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…agentic_benchmark/glm5.2/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGHtest/agentic_benchmark/glm5.2/trtllm/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…time/layers/attention/backends/paged/tokenspeed_mla.py0per-bs decode metadata views over the persistent buffers. one builder for capture and refresh; cached per bs — pointer-sSTRING
HIGH…/runtime/layers/attention/backends/paged/trtllm_mla.py0per-bs decode metadata views over the persistent buffers. one builder for capture and refresh; cached per bs — pointer-sSTRING
HIGH…enspeed/runtime/layers/attention/backends/paged/mla.py0per-bs decode metadata views over the persistent buffers. one builder for capture and refresh; cached per bs — pointer-sSTRING
HIGH…st/nvidia/ops/moe/test_mxfp4_situ_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…st/nvidia/ops/moe/test_nvfp4_situ_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…st/nvidia/ops/moe/test_bf16_relu2_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…t/nvidia/ops/moe/test_nvfp4_relu2_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…d-kernel/test/nvidia/thirdparty/bench_mnnvl_vs_nccl.py0true when the world spans hosts. cross-node cuda-ipc workspace creation fails and poisons the cuda context ('invalid resSTRING
HIGH…ernel/test/nvidia/thirdparty/test_trtllm_mnnvl_comm.py0true when the world spans hosts. cross-node cuda-ipc workspace creation fails and poisons the cuda context ('invalid resSTRING
HIGH…el/test/nvidia/thirdparty/test_trtllm_mnnvl_twoshot.py0true when the world spans hosts. cross-node cuda-ipc workspace creation fails and poisons the cuda context ('invalid resSTRING
HIGH…python/tokenspeed_kernel/ops/attention/kda/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/mha/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/qsa/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/msa/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…ython/tokenspeed_kernel/ops/attention/rmha/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/dsa/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/mla/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…ython/tokenspeed_kernel/ops/attention/dsv4/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/gdn/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…thon/tokenspeed_kernel/ops/attention/kpool/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…l/ops/attention/rmha/_cute_dsl/flash_fwd_sm100_bias.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/fmha.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0the device split_kv kernel implementation of the multi-head latent attention. this kernel coordinates multiple specializSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0the device split_kv kernel implementation of the multi-head latent attention. this kernel coordinates multiple specializSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0the device split_kv kernel implementation of the multi-head latent attention. this kernel coordinates multiple specializSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0get the current k_index, k_tile_count, and local split_kv value for the mla kernel. :param split_kv: split_kv value :typSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0get the current k_index, k_tile_count, and local split_kv value for the mla kernel. :param split_kv: split_kv value :typSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0get the current k_index, k_tile_count, and local split_kv value for the mla kernel. :param split_kv: split_kv value :typSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0compute one k-tile of mma for q*k^t. updates the tiled mma qk and pipeline states. :param qk_params: the qk parameters :STRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0compute one k-tile of mma for q*k^t. updates the tiled mma qk and pipeline states. :param qk_params: the qk parameters :STRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0compute one k-tile of mma for q*k^t. updates the tiled mma qk and pipeline states. :param qk_params: the qk parameters :STRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0compute one k-tile of mma for p*v. updates the tiled mma pv and pipeline states. :param common_params: the common parameSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0compute one k-tile of mma for p*v. updates the tiled mma pv and pipeline states. :param common_params: the common parameSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0compute one k-tile of mma for p*v. updates the tiled mma pv and pipeline states. :param common_params: the common parameSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0compute warp to compute the result of softmax, rescale, and epilogue. updates the related pipeline states. :param commonSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0compute warp to compute the result of softmax, rescale, and epilogue. updates the related pipeline states. :param commonSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0compute warp to compute the result of softmax, rescale, and epilogue. updates the related pipeline states. :param commonSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0compute warp to compute the result of softmax, rescale, and epilogue. updates the related pipeline states. :param commonSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0compute warp to compute the result of softmax, rescale, and epilogue. updates the related pipeline states. :param commonSTRING
41 more matches not shown…
Modern Structural Boilerplate495 hits · 502 pts
SeverityFileLineSnippetContext
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py41__all__ = ["libdevice", "proton", "tl", "triton"]CODE
LOW…rnel-npu/python/tokenspeed_kernel_npu/ops/layernorm.py79__all__ = ["qk_rmsnorm", "rmsnorm"]CODE
LOW…u/python/tokenspeed_kernel_npu/ops/rotary_embedding.py54__all__ = ["apply_rope"]CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py201__all__ = [CODE
LOWtest/runtime/cache_pool_test_utils.py111 def set_kv_buffer(self, layer, loc, cache_k, cache_v) -> None:CODE
LOWtest/runtime/test_event_loop_pause_hooks.py57 def set_finish_with_abort(self, message: str, notify_client: bool = False) -> None:CODE
LOWtest/runtime/test_epd_prefill_hooks.py51 def set_finish_with_abort(self, message: str) -> None:CODE
LOWtest/runtime/test_logits_processor.py199def _set_fabric(monkeypatch, supported: bool) -> None:CODE
LOWtest/runtime/distributed/test_comm_ops.py49 def _set_fabric(monkeypatch, supported: bool) -> None:CODE
LOWtest/ci_system/ci_utils.py20logger = logging.getLogger(__name__)CODE
LOWtest/ci_system/ci_register.py23__all__ = [CODE
LOWpython/tokenspeed/runtime/pd/kv_events.py43logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/pd/cache_protocol.py646__all__ = [CODE
LOWpython/tokenspeed/runtime/pd/mooncake/pack.py41logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1293__all__ = ["MooncakeKVManagerPrefill", "MooncakeKVSender"]CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py25logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/encode_executor.py39logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/prefill_admission.py58logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/prefill_hooks.py38logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/hyperconnection.py308__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/rotary_embedding.py36logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/parameter.py35__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/qwen4_exp_ple.py1079__all__ = [CODE
LOW…speed/runtime/layers/attention/mm_encoder_attention.py55logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/attention/registry.py81logger = logging.getLogger(__name__)CODE
LOW…on/tokenspeed/runtime/layers/attention/qsa/__init__.py34__all__ = [CODE
LOW…okenspeed/runtime/layers/attention/qsa/verify_state.py218__all__ = ["QSAVerifyState"]CODE
LOW…hon/tokenspeed/runtime/layers/attention/qsa/indexer.py525__all__ = ["QSAIndexer"]CODE
LOW⚡…n/tokenspeed/runtime/layers/attention/backends/base.py473 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…n/tokenspeed/runtime/layers/attention/backends/base.py133 def set_cache_pool(self, cache_pool: CachePool) -> None:CODE
LOW⚡…/runtime/layers/attention/backends/specific/inkling.py717 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…/runtime/layers/attention/backends/specific/inkling.py81logger = logging.getLogger(__name__)CODE
LOW⚡…time/layers/attention/backends/specific/qsa_indexer.py324 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW⚡…untime/layers/attention/backends/specific/qwen4_exp.py257 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…untime/layers/attention/backends/specific/qwen4_exp.py285__all__ = ["Qwen4ExpBackend", "qwen4_exp_backend"]CODE
LOW…enspeed/runtime/layers/attention/backends/paged/msa.py65logger = logging.getLogger(__name__)CODE
LOW⚡…enspeed/runtime/layers/attention/backends/paged/msa.py500 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…runtime/layers/attention/backends/paged/tree_verify.py36__all__ = ["TreeCascadeRows", "TreeDraftInputs", "TreeVerifyInputs"]CODE
LOW…runtime/layers/attention/backends/paged/tree_verify.py84 def set_frontier(self, bs: int, frontier: torch.Tensor) -> None:CODE
LOW…enspeed/runtime/layers/attention/backends/paged/dsa.py345 def set_request_slots(self, req_pool_indices: torch.Tensor) -> None:CODE
LOW…enspeed/runtime/layers/attention/backends/paged/dsa.py532 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…time/layers/attention/backends/paged/tokenspeed_mla.py88logger = logging.getLogger(__name__)CODE
LOW⚡…peed/runtime/layers/attention/backends/paged/router.py872 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW⚡…nspeed/runtime/layers/attention/backends/paged/base.py405 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…nspeed/runtime/layers/attention/backends/paged/base.py444 def set_request_slots(self, req_pool_indices: torch.Tensor) -> None:CODE
LOW…speed/runtime/layers/attention/backends/state/mamba.py97logger = logging.getLogger(__name__)CODE
LOW…speed/runtime/layers/attention/backends/state/mamba.py505 def set_kv_pool(self, kv_pool: CachePool) -> None:CODE
LOW⚡…eed/runtime/layers/attention/backends/hybrid/linear.py107 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…enspeed/runtime/layers/attention/kv_cache/qwen4_exp.py66__all__ = [CODE
LOW…untime/layers/attention/kv_cache/hybrid_deepseek_v4.py616 def set_kv_buffer(self, *args, **kwargs) -> None:CODE
LOW…/layers/attention/kv_cache/recipes/scheduler_bridge.py197__all__ = [CODE
LOW…peed/runtime/layers/attention/kv_cache/recipes/spec.py663__all__ = [CODE
LOW…/runtime/layers/attention/kv_cache/recipes/transfer.py228__all__ = [CODE
LOW…runtime/layers/attention/kv_cache/recipes/qwen4_exp.py314__all__ = ["Qwen4ExpRecipe"]CODE
LOWpython/tokenspeed/runtime/layers/dense/__init__.py29__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/dense/nvfp4.py36logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/dense/mxfp4.py151__all__ = [CODE
LOW…kenspeed/runtime/layers/quantization/modelopt_mixed.py64logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/quantization/fp8.py37logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/quantization/nvfp4.py30logger = logging.getLogger(__name__)CODE
435 more matches not shown…
Deep Nesting465 hits · 415 pts
SeverityFileLineSnippetContext
LOWtest/test_utils.py102CODE
LOWtest/test_utils.py199CODE
LOWtest/test_utils.py299CODE
LOW…t/long_context_benchmark/tokenspeed/collect_outputs.py39CODE
LOWtest/runtime/test_unified_decode_path.py563CODE
LOWtest/runtime/test_weight_loader_prefetch.py198CODE
LOWtest/runtime/test_weight_loader_prefetch.py299CODE
LOWtest/runtime/test_instanttensor_loader.py130CODE
LOWtest/runtime/test_cudagraph_probe_ladder.py313CODE
LOWtest/runtime/test_deepseek_v4_config.py6985CODE
LOWtest/runtime/test_kda_state_eviction.py199CODE
LOWtest/runtime/test_cli_config_compat.py415CODE
LOWtest/runtime/test_tree_attention_cascade.py110CODE
LOWtest/runtime/cache_pool_test_utils.py361CODE
LOWtest/runtime/test_kda_state_eviction_spec.py251CODE
LOWtest/runtime/test_flashmla_dcp.py59CODE
LOWtest/runtime/test_drafter_accept_indexing.py593CODE
LOWtest/runtime/test_expert_location.py92CODE
LOWtest/runtime/test_inkling_real_checkpoint_load.py60CODE
LOWtest/runtime/test_tree_spec.py93CODE
LOWtest/runtime/test_tree_spec.py138CODE
LOWtest/runtime/test_tree_spec.py180CODE
LOWtest/runtime/test_kimi_k3_dspark_model.py321CODE
LOWtest/runtime/test_dp_rank_pinning.py164CODE
LOWtest/runtime/test_kimi_k3_config.py834CODE
LOWtest/runtime/test_gdn_state_paging.py397CODE
LOWtest/runtime/test_gdn_state_paging.py566CODE
LOWtest/runtime/test_gdn_state_paging.py1134CODE
LOWtest/runtime/test_gdn_state_paging.py1812CODE
LOWtest/runtime/test_deepseek_v41_model.py209CODE
LOWtest/runtime/test_deepseek_v41_model.py405CODE
LOWtest/runtime/test_deepseek_v41_model.py2381CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py121CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py183CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py240CODE
LOWtest/runtime/test_inkling_load_weights.py84CODE
LOWtest/runtime/test_slot_state.py690CODE
LOWtest/runtime/test_dflash2.py336CODE
LOWtest/runtime/run_deepseek_v41_eval.py54CODE
LOWtest/runtime/run_deepseek_v41_eval.py130CODE
LOWtest/runtime/test_pp_mapping.py266CODE
LOWtest/runtime/test_kimi_k3_attn_res.py741CODE
LOWtest/runtime/test_dispatch_autotune.py50CODE
LOWtest/runtime/test_retraction_restore_driver.py158CODE
LOWtest/runtime/test_prefill_graph.py97CODE
LOWtest/runtime/test_prefill_graph.py226CODE
LOWtest/runtime/test_paged_attention_prologue.py524CODE
LOWtest/runtime/test_qsa_backend.py365CODE
LOWtest/runtime/test_control_server.py180CODE
LOWtest/runtime/test_logits_processor.py1073CODE
LOWtest/runtime/test_draft_tree.py39CODE
LOWtest/runtime/test_deepseek_v41_engram.py154CODE
LOWtest/runtime/distributed/test_snapshot_op_ownership.py193CODE
LOW…ntime/distributed/validate_kimi_k3_shared_expert_tp.py50CODE
LOWtest/runtime/distributed/test_kimi_k3_projection_tp.py79CODE
LOWtest/runtime/distributed/test_kimi_k3_projection_tp.py203CODE
LOWtest/runtime/distributed/test_comm_ops.py521CODE
LOWtest/runtime/models/test_moe_routing_config.py17CODE
LOWtest/runtime/models/test_kimi_k3_eagle3_e2e.py55CODE
LOWtest/ci_system/slurm_submit.py876CODE
405 more matches not shown…
Empty Error Handlers78 hits · 390 pts
SeverityFileLineSnippetContext
HIGHtest/test_utils.py127except requests.RequestException:CODE
HIGH…t/long_context_benchmark/tokenspeed/collect_outputs.py63except (TypeError, ValueError):CODE
HIGH…t/long_context_benchmark/tokenspeed/collect_outputs.py53except (TypeError, ValueError):CODE
HIGHtest/runtime/run_deepseek_v41_eval.py223except (URLError, TimeoutError):CODE
HIGHtest/runtime/run_deepseek_v41_eval.py327except psutil.NoSuchProcess:CODE
HIGHtest/runtime/run_deepseek_v41_eval.py333except psutil.NoSuchProcess:CODE
HIGHtest/runtime/distributed/test_deepseek_v41_pd_1p1d.py90except Exception:CODE
HIGHtest/runtime/distributed/test_qwen35_epd_1e1p2d.py142except Exception:CODE
HIGHtest/runtime/distributed/test_qwen35_epd_1e1p2d.py77except Exception:CODE
HIGHtest/runtime/distributed/test_qwen35_pd_1p1d.py77except Exception:CODE
HIGHtest/runtime/models/test_kimi_models.py103except Exception:CODE
HIGHtest/runtime/models/test_qwen35_vlm_e2e.py116except Exception:CODE
HIGHtest/runtime/models/test_qwen35_vlm_e2e.py191except subprocess.TimeoutExpired:CODE
HIGHtest/runtime/models/test_kimi_k3_eagle3_e2e.py50except requests.RequestException:CODE
HIGHtest/runtime/models/test_llama_models.py97except Exception:CODE
HIGHtest/runtime/models/test_gpt_oss.py82except Exception:CODE
HIGHtest/ci_system/process_group_manager.py87except (ProcessLookupError, PermissionError):CODE
HIGHtest/ci_system/pipeline.py1703except subprocess.TimeoutExpired:CODE
HIGHtest/ci_system/pipeline.py1656except (URLError, ConnectionError, TimeoutError):CODE
HIGHtest/cli/test_serve_smg_unit.py1100except SystemExit:CODE
HIGHtest/cli/test_serve_smg_integration.py55except (urllib.error.URLError, ConnectionError, TimeoutError):CODE
HIGHpython/tokenspeed/_logging.py109except Exception:CODE
HIGHpython/tokenspeed/runtime/pd/mooncake/prefill.py1048except (IndexError, UnicodeError, ValueError):CODE
HIGHpython/tokenspeed/runtime/epd/prefill_admission.py111except Exception: # noqa: BLE001 -- best-effort; worst case the MR leaksCODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1483except BaseException:CODE
HIGH…tokenspeed/runtime/utils/torch_memory_saver_adapter.py28except ImportError:CODE
HIGHpython/tokenspeed/runtime/utils/custom_ops.py49except (AttributeError, RuntimeError):CODE
HIGHpython/tokenspeed/runtime/utils/startup_timing.py56except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/common.py1189except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py76except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py84except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py107except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py114except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py121except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/process.py66except psutil.NoSuchProcess:CODE
HIGHpython/tokenspeed/runtime/utils/process.py77except psutil.NoSuchProcess:CODE
HIGHpython/tokenspeed/runtime/models/dflash.py565except TypeError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v4_next.py97except ValueError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41_engram.py441except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41_engram.py445except ValueError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41_engram.py405except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/multimodal/shm_transport.py273except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/multimodal/shm_transport.py270except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/execution/drafter/__init__.py127except ValueError:CODE
HIGHpython/tokenspeed/runtime/engine/async_llm.py506except StopAsyncIteration:CODE
HIGHpython/tokenspeed/cli/serve_smg.py814except ImportError:CODE
HIGHpython/tokenspeed/cli/serve_smg.py837except ImportError:CODE
HIGHpython/tokenspeed/cli/serve_smg.py680except NotImplementedError:CODE
HIGHpython/tokenspeed/cli/serve_smg.py798except Exception: # noqa: BLE001CODE
HIGHtokenspeed-kernel/test/test_kimi_prefill_ops.py94except Exception:CODE
HIGHtokenspeed-kernel/python/setup.py197except AttributeError:CODE
HIGHtokenspeed-kernel/python/setup.py184except OSError:CODE
HIGHtokenspeed-kernel/python/setup.py572except Exception:CODE
HIGHtokenspeed-kernel/python/setup.py702except ImportError:CODE
HIGHtokenspeed-kernel/python/setup.py723except ImportError:CODE
HIGHtokenspeed-kernel/python/tokenspeed_kernel/platform.py55except Exception:CODE
HIGHtokenspeed-kernel/python/tokenspeed_kernel/platform.py659except Exception:CODE
HIGHtokenspeed-kernel/python/tokenspeed_kernel/_triton.py148except ValueError:CODE
HIGH…kenspeed-kernel/python/tokenspeed_kernel/ops/tuning.py361except FileNotFoundError:CODE
HIGH…thon/tokenspeed_kernel/ops/attention/dsa/flashinfer.py57except ImportError:CODE
18 more matches not shown…
Cross-Language Confusion61 hits · 322 pts
SeverityFileLineSnippetContext
HIGHtest/ci/deepswe/kimi_code_pier_agent.py125 "/logs/agent/kimi-code.log 2>/dev/null || true' EXIT; "CODE
HIGHtest/runtime/test_host_executor.py1708 executor._completions.push(CODE
HIGHtest/runtime/test_host_executor.py1760 executor._completions.push(CODE
HIGHtest/runtime/test_host_executor.py1831 executor._completions.push(CODE
HIGHtest/runtime/test_inkling_mtp_conv_state.py204 over [committed history || accepted chunk prefix]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py349 """Per-request reference: causal conv over [prefix || x]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py361 the chunk): rows of [prefix || x[:upto]]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py380 conv over [ring history || x_t]; the kernel persists the token's ownSTRING
HIGH⚡test/runtime/test_unit_kv_scales.py137 '{"kv_cache": {"scaling_factor": {"0": {"0": null}}}}',CODE
HIGH⚡test/runtime/test_unit_kv_scales.py139 '{"kv_cache": null}',CODE
HIGH⚡test/runtime/test_cli_config_compat.py377 ["--model", "test/model", "--hf-overrides", '{"rope_scaling": null}']CODE
HIGH⚡test/runtime/test_cli_config_compat.py379 self.assertEqual(args.hf_overrides, '{"rope_scaling": null}')CODE
HIGH⚡test/runtime/test_retraction_image_executor.py1029 queue.push(first, "first")CODE
HIGH⚡test/runtime/test_retraction_image_executor.py1030 queue.push(second, "second")CODE
HIGH⚡test/runtime/test_retraction_image_executor.py1035 queue.push(Mock(), "stale")CODE
HIGH⚡test/runtime/test_draft_page_table_scrub.py103 # Rows 1..3 are padding: their pages are null, so slots are 0.COMMENT
HIGHtest/runtime/test_gdn_state_paging.py1571 # Page 0 is null; pages 1..N fill as the sequence grows.COMMENT
HIGHtest/runtime/test_kimi_k3_kda.py216 conv/recurrent component slabs indexed by page id (page 0 = null)."""STRING
HIGHtest/runtime/distributed/test_decode_tp_layouts.py558 ``fused_qkv_a_proj_with_mqa`` takes ``[embeds || hidden]``)."""STRING
HIGHtest/ci_system/test_dispatch_workflows.py457 "${{ inputs.commit || inputs.pr || 'main' }}"CODE
HIGHtest/ci_system/test_dispatch_workflows.py1060 " && 30 || inputs.timeout_minutes }}"CODE
HIGHtest/ci_system/test_dispatch_workflows.py1182 "${{ (inputs.pr || inputs.commit) && '1' || '0' }}"CODE
HIGHtest/ci_system/slurm_submit.py511nvidia_smi="$(command -v nvidia-smi 2>/dev/null || true)"CODE
HIGH⚡test/ci_system/slurm_submit.py636 if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; thenCODE
HIGH⚡test/ci_system/slurm_submit.py637 kill -TERM "$pid" 2>/dev/null || trueCODE
HIGH⚡test/ci_system/slurm_submit.py640 [ -z "$client_step_pid" ] || wait "$client_step_pid" 2>/dev/null || trueCODE
HIGH⚡test/ci_system/slurm_submit.py641 [ -z "$server_step_pid" ] || wait "$server_step_pid" 2>/dev/null || trueCODE
HIGHtest/ci_system/slurm_submit.py674 kill -0 "$client_step_pid" 2>/dev/null; doCODE
HIGHtest/ci_system/slurm_submit.py679if ! kill -0 "$server_step_pid" 2>/dev/null; thenCODE
HIGHtest/ci_system/test_package_cache.py53 'configure_package_cache >/dev/null; printf "%s|%s|%s" "${PIP_CACHE_DIR}" "${CI_WHEEL_CACHE_DIR}" "${CI_CCACHE_DCODE
HIGHtest/ci_system/test_package_cache.py76 'configure_package_cache >/dev/null; printf "%s|%s|%s" "${PIP_CACHE_DIR}" "${CI_WHEEL_CACHE_DIR}" "${CI_CCACHE_DCODE
HIGHtest/ci_system/test_package_cache.py121 "configure_nvcc_cache >/dev/null; "CODE
HIGHtest/ci_system/test_package_cache.py172 "configure_nvcc_cache >/dev/null 2>/dev/null; "CODE
HIGH⚡test/ci_system/pipeline.py684 "sudo apt-get update -q && sudo apt-get install -y lsof; "CODE
HIGH⚡test/ci_system/pipeline.py686 f"pids=$(lsof -tiTCP:{port} -sTCP:LISTEN 2>/dev/null || true); "CODE
HIGH⚡test/ci_system/pipeline.py689 "kill -TERM $pids 2>/dev/null || true; "CODE
HIGH⚡test/ci_system/pipeline.py691 f"pids=$(lsof -tiTCP:{port} -sTCP:LISTEN 2>/dev/null || true); "CODE
HIGH⚡test/ci_system/pipeline.py692 'if [ -n "$pids" ]; then kill -KILL $pids 2>/dev/null || true; fi; 'CODE
HIGHtest/ci_system/pipeline.py642 f'pkill -{signal_name} -f "{pattern}" 2>/dev/null || true',CODE
HIGHtest/ci_system/test_worker_cleanup.py14if kill -0 "$worker" 2>/dev/null; thenCODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1131 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1199 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1302 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1447 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/utils/server_args.py3424 help="Specify tp size for MoE part, default equals nprocs-per-node, if non dp_attn && combine_dense mode, thCODE
HIGH⚡python/tokenspeed/runtime/models/llama_eagle3.py75 the [embed || hidden] concat) and ``forward`` (= qkv_proj + o_projSTRING
HIGHpython/tokenspeed/runtime/models/deepseek_v3.py2665 concatenated [embeds || hidden_states] as input.STRING
HIGHpython/tokenspeed/runtime/execution/drafter/mtp.py169 prefix). Deeper depths are rolls of [window || drafts], built by theSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/mtp.py197 rows the stash. Over [stash || fresh] both cases are one gather atSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/eagle.py290 ``[prefill_part || decode_part]`` under MIXED, full prefill chunksSTRING
HIGH…n/tokenspeed/runtime/entrypoints/sglang_compat_http.py258 "weight_version": str | null}``. The ``flush_cache`` wire default mirrorsSTRING
HIGH…peed-kernel/test/nvidia/ops/moe/test_multicast_view.py72 """The deleter must be null, not a no-op callback.STRING
HIGH…python/tokenspeed_kernel/ops/attention/kda/cute_dsl.py143 # full-tile loads. Conv output padding is undefined, so scrub all scanCOMMENT
HIGH…l/python/tokenspeed_kernel/ops/attention/gdn/triton.py205 float32 legacy decode path; output for that batch entry is undefined).STRING
HIGH…thon/tokenspeed_kernel/ops/attention/dsv41/cute_dsl.py202 null, past ``visible``, or on an unmapped page.STRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py2558 :param c_sf_ptr: Pointer to scale factor tensor for C (can be null)STRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py2562 :param norm_const_ptr: Pointer to normalization constant for SFC generation (can be null)STRING
HIGH…peed_kernel/thirdparty/cute_dsl/mega_moe/flag_batch.py24 flag_addr: Int64 # per-lane counter-slot address (0 == null)CODE
HIGH⚡…lib/moe/rocm/ops/mega_moe/token_shuffle_direct_push.py96 tokens = MakeBufferResource(null, 0)CODE
HIGH⚡…lib/moe/rocm/ops/mega_moe/token_shuffle_direct_push.py97 ids = MakeBufferResource(null, 0)CODE
1 more matches not shown…
Excessive Try-Catch Wrapping238 hits · 280 pts
SeverityFileLineSnippetContext
LOWtest/test_utils.py191 except Exception as e:CODE
MEDIUMtest/test_utils.py192 print(f"Error killing process after launch failure: {e}")CODE
LOWtest/runtime/test_inkling_load_weights.py554 except Exception as e: # pragma: no cover - environment specificCODE
MEDIUMtest/runtime/test_zmq_msgpack.py757def _engine():CODE
LOWtest/runtime/test_zmq_msgpack.py772 except Exception as exc: # surface into the test threadCODE
LOWtest/runtime/test_zmq_msgpack.py856 except Exception as exc:CODE
LOWtest/runtime/test_control_server.py107 except Exception:CODE
LOWtest/runtime/distributed/test_deepseek_v41_pd_1p1d.py90 except Exception:CODE
LOWtest/runtime/distributed/test_qwen35_epd_1e1p2d.py77 except Exception:CODE
LOWtest/runtime/distributed/test_qwen35_epd_1e1p2d.py142 except Exception:CODE
LOWtest/runtime/distributed/test_dp_sampling_swap.py41 except Exception:CODE
MEDIUMtest/runtime/distributed/test_dp_sampling_swap.py23def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
LOW…runtime/distributed/test_batch_invariant_all_reduce.py45 except Exception:CODE
MEDIUM…runtime/distributed/test_batch_invariant_all_reduce.py42def worker_fn(rank, world_size, port, attn_tp, error_dict):CODE
LOW…t/runtime/distributed/test_vocab_parallel_topk_nccl.py201 except Exception:CODE
MEDIUM…t/runtime/distributed/test_vocab_parallel_topk_nccl.py183def _worker(rank, world_size, port, test_fn, error_dict):CODE
MEDIUMtest/runtime/distributed/test_dp_sampling_comm.py29def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
MEDIUMtest/runtime/distributed/test_dp_sampling_comm.py66def _onesided_available_for_test(group) -> bool:CODE
LOW⚡test/runtime/distributed/test_dp_sampling_comm.py69 except Exception:CODE
LOWtest/runtime/distributed/test_dp_sampling_comm.py47 except Exception:CODE
LOW⚡test/runtime/distributed/test_comm_manager.py81 except Exception as e:CODE
LOWtest/runtime/distributed/test_comm_manager.py310 except Exception:CODE
MEDIUMtest/runtime/distributed/test_comm_manager.py76def worker_fn(CODE
MEDIUMtest/runtime/distributed/test_comm_manager.py307def _qcp_worker(rank, port, error_dict):CODE
LOWtest/runtime/distributed/test_qcp_prompt_logprobs.py60 except Exception: # pragma: no cover - reported to the parentCODE
LOWtest/runtime/distributed/test_qwen35_pd_1p1d.py77 except Exception:CODE
LOWtest/runtime/distributed/test_qcp_history_gather.py133 except Exception: # pragma: no cover - reported to the parentCODE
LOWtest/runtime/distributed/test_qcp_history_gather.py413 except Exception: # pragma: no cover - reported to the parentCODE
MEDIUMtest/runtime/distributed/test_comm_ops.py337def worker_fn(rank, world_size, port, test_fn, error_dict):CODE
LOW⚡test/runtime/distributed/test_comm_ops.py340 except Exception:CODE
LOWtest/runtime/sampling/test_flashinfer_verify_dp.py67 except Exception:CODE
MEDIUMtest/runtime/sampling/test_flashinfer_verify_dp.py49def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
LOWtest/runtime/sampling/test_dp_sampling_logits_verify.py80 except Exception:CODE
MEDIUMtest/runtime/sampling/test_dp_sampling_logits_verify.py62def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
LOWtest/runtime/models/test_kimi_models.py103 except Exception:CODE
LOWtest/runtime/models/test_qwen35_vlm_e2e.py116 except Exception:CODE
LOWtest/runtime/models/test_qwen35_vlm_e2e.py127 except Exception as exc: # noqa: BLE001CODE
MEDIUMtest/runtime/models/test_qwen35_vlm_e2e.py124def setUpClass(cls):CODE
LOWtest/runtime/models/test_llama_models.py97 except Exception:CODE
LOWtest/runtime/models/test_gpt_oss.py82 except Exception:CODE
LOWtest/ci_system/pipeline.py2048 except Exception as exc:CODE
LOWtest/ci_system/pipeline.py2078 except Exception as exc:CODE
LOWtest/ci_system/kernel_benchmark_ci.py1108 except Exception as exc: # noqa: BLE001 - failures must become CI artifactsCODE
LOW…entic_benchmark/kimi_k3/tokenspeed_disagg/pd_client.py113 except Exception as e:CODE
LOWpython/tokenspeed/_logging.py77 except Exception:CODE
LOWpython/tokenspeed/_logging.py109 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/kv_events.py313 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/kv_events.py334 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/pack.py172 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/receiver.py86 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/receiver.py105 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py909 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1021 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1117 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1143 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1177 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1285 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/decode.py148 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/decode.py190 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py73 except Exception:CODE
178 more matches not shown…
Docstring Block Structure53 hits · 265 pts
SeverityFileLineSnippetContext
HIGHpython/tokenspeed/runtime/layers/logits_processor.py762Logprob of each named prompt row's next token, position-chunked. The rows (``logits_metadata.input_logprob_rowsSTRING
HIGH…n/tokenspeed/runtime/layers/attention/dcp/placement.py100Count, on the host, how many history rows of each request every rank owns. The query-context-parallel history gatheSTRING
HIGH…untime/layers/attention/backends/specific/qwen4_exp.py79Build the consumers whose fields belong to this cache view. Args: config: This side's attention conSTRING
HIGH…speed/runtime/layers/attention/backends/state/mamba.py240Host prefix sum of the scheduler's extend lengths, as an int64 tensor. The contents must equal ``query_start_loc`` STRING
HIGH…speed/runtime/layers/attention/backends/state/utils.py27Return the physical state-row stride in int32 words for batched copies. Args: tensor: State rows with a nonSTRING
HIGH…ed/runtime/layers/attention/kv_cache/virtual_blocks.py48Translate scheduler blocks to owned local pages, keeping the owner mask. Args: virtual_blocks: Scheduler blSTRING
HIGH…n/tokenspeed/runtime/layers/attention/kv_cache/base.py65Map each recurrent layer to the state-family group holding its fields. The memory plan is the single record of whicSTRING
HIGH…n/tokenspeed/runtime/layers/attention/kv_cache/base.py117Map each attention layer to the history-family group holding its KV. The counterpart of :func:`derive_state_groups_STRING
HIGH…/tokenspeed/runtime/layers/attention/kv_cache/arena.py214Return one planned field's view into the arena. The view is shaped the way the field is addressed. A field whosSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/plan.py64Return the plan-facing name of the dtype the arena views bytes as. Args: dtype: A ``torch.dtype`` or an alrSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/plan.py99Return the byte width of one element of a plan dtype name. Args: dtype_name: A name produced by :func:`cachSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/plan.py713Pack declared cache groups into one capacity-independent LCM block. The second stage of the pipeline: ``group`` saySTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/spec.py316Normalize either window spelling to one entry per layer. Args: sliding_window_tokens: A scalar window to brSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/spec.py498Walk the layers once, building each group whole. A cache group has two halves -- the scheduler-facing spec and the STRING
HIGH…ime/layers/attention/kv_cache/recipes/cache_runtime.py39Validate that ``value`` is a positive, non-boolean integer. Args: name: Field name used in the error messagSTRING
HIGHpython/tokenspeed/runtime/cache/transfer/lanes.py104The static field geometry one executor's transfers share. One row per field in consumer (layer) order, each naming STRING
HIGHpython/tokenspeed/runtime/distributed/pp_stage.py46All stages' [start, end) layer windows. The single source of the stage-split arithmetic: the model build, the KV STRING
HIGHpython/tokenspeed/runtime/distributed/pp_stage.py101Map stage execution windows to the target cache-layer namespace. Stage windows partition execution blocks (decoder STRING
HIGHpython/tokenspeed/runtime/distributed/comm_manager.py191Per-rank rows of the head group for one leg of the head-TP exchange. Head TP shards the head projections over ranksSTRING
HIGH…enspeed/runtime/distributed/comm_backend/self_check.py112Verify the in-switch all-reduce on every group the route sends to it. Args: backend: The communication backSTRING
HIGHpython/tokenspeed/runtime/utils/spec_block_geometry.py87Derive the launch widths a checkpoint block size implies. Args: algorithm: ``"DSPARK"`` or ``"DFLASH"`` (DFSTRING
HIGHpython/tokenspeed/runtime/utils/launcher.py67Return the first hostname of a Slurm-compressed hostlist. Args: hostlist: A hostlist such as ``cn10``, ``cnSTRING
HIGHpython/tokenspeed/runtime/utils/launcher.py244Derive the multi-node topology from the launcher environment. Args: env: Environment mapping to read; defauSTRING
HIGHpython/tokenspeed/runtime/execution/device.py880Apply one in-place RL weight-sync request, ordered against forwards. Type-dispatched on the request — join the STRING
HIGHpython/tokenspeed/runtime/execution/model_executor.py222Return the stage's DSpark context producer, or None when nothing is produced. A DSpark draft reads target taps thatSTRING
HIGH…thon/tokenspeed/runtime/execution/accept_simulation.py40Validate the simulated tokens per verify step. Args: value: Raw ``TOKENSPEED_SPEC_SIMULATED_ACCEPT_LEN``; eSTRING
HIGHpython/tokenspeed/runtime/execution/query_shard.py61How many of the sorted batch-global ``rows`` fall in each rank's shard. The one row split of a query shard: the samSTRING
HIGHpython/tokenspeed/runtime/execution/query_shard.py240How many of ``rows`` fall in each rank's shard. The split a collective over those rows needs (the prompt-logproSTRING
HIGHpython/tokenspeed/runtime/execution/query_shard.py269Per-rank row counts of the rows a collective moves. A model that reports a collective sizing (``report_collectiSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/dflash.py72Resolve (verify_width, draft_block_size) for a block drafter. Args: cfg: The draft model's config. STRING
HIGHpython/tokenspeed/runtime/engine/logprobs.py48Resolve an SGLang ``logprob_start_len`` against a prompt of ``input_len``. SGLang semantics: ``-1`` (or omitted) meSTRING
HIGHpython/tokenspeed/runtime/engine/scheduler_utils.py290Floor ``max_scheduled_tokens`` to the state-snapshot grain, if any. Recurrent-state groups (family=State, the C++ `STRING
HIGHpython/tokenspeed/runtime/engine/scheduler_utils.py959Bridge the per-group block tables to GPU int32 tensors: absolute page indices, null hole = 0 preserved, ragged-row pSTRING
HIGHpython/tokenspeed/runtime/engine/zmq_wire.py120Map a tokenspeed/torch dtype onto SMG's wire dtype enum string. Args: dtype: A torch dtype or its string foSTRING
HIGHpython/tokenspeed/cli/trace_merge.py247Merge a Proton chrome trace into a VizTracer report. Shifts every Proton event by the difference between the two fiSTRING
HIGHpython/tokenspeed/cli/trace_merge.py283Merge and align Proton/VizTracer trace pairs from several TP ranks. Every input pair is first aligned using its ownSTRING
HIGH…ernel/python/tokenspeed_kernel/benchmark/validation.py92Return the output validator registered under ``name``. Args: name: Validator name from an output validationSTRING
HIGH…peed_kernel/ops/attention/rmha/_cute_dsl/score_mods.py54Build a memoized FA4 score_mod adding a learned relative-position bias. The returned closure adds ``rel_logits[globSTRING
HIGH…python/tokenspeed_kernel/ops/attention/dsa/cute_dsl.py95Length-aware per-row top-k over a dense indexer-logits matrix. Args: logits: 2-D row-major contiguous CUDA STRING
HIGH…python/tokenspeed_kernel/ops/attention/dsa/__init__.py293Select, without running it, the ``dsa_prefill_topk`` leaf for index keys handed as rows in workspace-row order of ``STRING
HIGH…l/python/tokenspeed_kernel/ops/attention/gdn/triton.py1022Replay all GDN layers and write their final accepted states. This portable Triton implementation is shared by everySTRING
HIGH…n/tokenspeed_kernel/ops/attention/gdn/_triton/chunk.py145 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, KSTRING
HIGH…rnel/python/tokenspeed_kernel/ops/sampling/cute_dsl.py1006Build the cross-rank argmax state, requiring NVLS multicast. Args: group: The process group the argmax reduSTRING
HIGH…/tokenspeed_kernel/ops/sampling/triton/dspark_block.py239Score this rank's vocabulary shard for one block step. Args: base_logits: ``[rows, block, local_vocab]`` FPSTRING
HIGH…/tokenspeed_kernel/ops/sampling/triton/dspark_block.py352Write the winners of the gathered ``candidates`` into ``output[:, step]``. Args: candidates: ``[tp, rows, nSTRING
HIGH…hon/tokenspeed_kernel/ops/sampling/triton/spec_path.py73Walk the lattice one locally best edge at a time. Args: candidate_ids: ``[batch, num_steps, top_k]`` candidSTRING
HIGH…el/python/tokenspeed_kernel/ops/conv/triton/grouped.py91Convolve packed blocks with per-row, per-group dynamic coefficients. Args: x: Input rows ``[T, C]`` packed STRING
HIGH…-kernel/python/tokenspeed_kernel/ops/kvcache/triton.py724Build batched verify-commit row ids for :func:`copy_state_rows`. Sinks the ``arange``/``clamp``/``where`` chain thaSTRING
HIGH…-kernel/python/tokenspeed_kernel/ops/kvcache/triton.py1323Normalize, rotate and scatter every layer's latent KV in one launch. Each ``[kv_lora_rank + rope_dim]`` row is RMSNSTRING
HIGH…speed-kernel/python/tokenspeed_kernel/ops/copy/cuda.py38Copy a 2D device rectangle asynchronously. Args: dst: Destination device pointer. dst_pitch: DestinSTRING
HIGH…python/tokenspeed_kernel/ops/metadata/ngram_history.py226Seed the per-slot prefixes and write every input row's history. Args: tokens: ``[batch, context + 1]`` int6STRING
HIGH…on/tokenspeed_kernel/ops/metadata/accepted_frontier.py159Add each request's accepted tokens to its cache length and history. Args: req_pool_indices: ``[batch]`` intSTRING
HIGH…speed_kernel_amd/ops/gfx950/moe/mxfp4/decode_common.py94Return the compact e8m0 scale tile for a CDNA4 scaled-upcast result. ``gl.amd.cdna4.scaled_upcast`` takes a scale tSTRING
AI Structural Patterns203 hits · 187 pts
SeverityFileLineSnippetContext
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py101CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py151CODE
LOWtest/runners.py361CODE
LOWtest/runtime/conftest.py34CODE
LOWtest/runtime/test_drafter_accept_indexing.py84CODE
LOWtest/runtime/test_dp_sampling_routing_metadata.py49CODE
LOWtest/runtime/cache_pd_test_utils.py84CODE
LOWtest/runtime/layers/test_mla_verify_metadata.py20CODE
LOWtest/ci_system/pipeline.py1786CODE
LOWtest/ci_system/test_kernel_benchmark_comment.py109CODE
LOWpython/tokenspeed/runtime/layers/linear.py375CODE
LOWpython/tokenspeed/runtime/layers/linear.py556CODE
LOWpython/tokenspeed/runtime/layers/linear.py807CODE
LOWpython/tokenspeed/runtime/layers/linear.py1160CODE
LOW…/tokenspeed/runtime/layers/vocab_parallel_embedding.py253CODE
LOW…/tokenspeed/runtime/layers/vocab_parallel_embedding.py663CODE
LOW…speed/runtime/layers/attention/mm_encoder_attention.py352CODE
LOW…speed/runtime/layers/attention/linear/causal_conv1d.py1052CODE
LOWpython/tokenspeed/runtime/layers/moe/expert.py69CODE
LOWpython/tokenspeed/runtime/layers/moe/latent.py232CODE
LOWpython/tokenspeed/runtime/layers/moe/latent.py523CODE
LOWpython/tokenspeed/runtime/layers/moe/loader.py563CODE
LOWpython/tokenspeed/runtime/layers/moe/loader.py338CODE
LOWpython/tokenspeed/runtime/layers/moe/topk.py492CODE
LOWpython/tokenspeed/runtime/distributed/mapping.py600CODE
LOWpython/tokenspeed/runtime/models/glm5.py260CODE
LOWpython/tokenspeed/runtime/models/kimi_k3.py368CODE
LOWpython/tokenspeed/runtime/models/kimi_k3.py2244CODE
LOWpython/tokenspeed/runtime/models/gpt_oss.py116CODE
LOWpython/tokenspeed/runtime/models/qwen3.py106CODE
LOWpython/tokenspeed/runtime/models/deepseek_v3.py563CODE
LOWpython/tokenspeed/runtime/models/moonvit.py293CODE
LOWpython/tokenspeed/runtime/models/moonvit.py501CODE
LOWpython/tokenspeed/runtime/models/moonvit.py598CODE
LOWpython/tokenspeed/runtime/execution/forward_step.py195CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py156CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py393CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py460CODE
LOWpython/tokenspeed/runtime/configs/model_config.py467CODE
LOW…thon/tokenspeed/runtime/configs/qwen3_vision_config.py28CODE
LOW…on/tokenspeed/runtime/configs/kimi_k3_dspark_config.py53CODE
LOW…tokenspeed/runtime/configs/qwen3_5_text_base_config.py191CODE
LOWpython/tokenspeed/runtime/configs/qwen3_asr_config.py50CODE
LOWpython/tokenspeed/runtime/configs/qwen2_config.py57CODE
LOWpython/tokenspeed/runtime/configs/kimi_k3_config.py60CODE
LOWpython/tokenspeed/runtime/configs/kimi_k3_config.py140CODE
LOWpython/tokenspeed/runtime/configs/qwen3_moe_config.py31CODE
LOWpython/tokenspeed/runtime/configs/qwen4_exp_config.py52CODE
LOWpython/tokenspeed/runtime/configs/qwen4_exp_config.py156CODE
LOWpython/tokenspeed/runtime/configs/qwen3_config.py173CODE
LOWpython/tokenspeed/runtime/configs/kimi_k25_config.py60CODE
LOWpython/tokenspeed/runtime/configs/glm53_flash_config.py41CODE
LOWpython/tokenspeed/runtime/configs/glm53_flash_config.py92CODE
LOWpython/tokenspeed/runtime/configs/glm53_flash_config.py341CODE
LOWpython/tokenspeed/runtime/configs/minimax_m3_config.py62CODE
LOWpython/tokenspeed/runtime/configs/minimax_m3_config.py165CODE
LOWpython/tokenspeed/runtime/entrypoints/engine.py155CODE
LOWpython/tokenspeed/runtime/entrypoints/engine.py206CODE
LOWpython/tokenspeed/runtime/entrypoints/engine_base.py42CODE
LOWpython/tokenspeed/runtime/engine/request.py50CODE
143 more matches not shown…
Verbosity Indicators58 hits · 86 pts
SeverityFileLineSnippetContext
LOWtest/runtime/test_draft_advance_seqlens.py350# Step 0: the drafter publishes the accepted frontier (vc + N -> vc + a); theCOMMENT
LOW⚡test/ci_system/install_deps.sh124# Step 1: Determine CUDA index and FlashInfer architectureCOMMENT
LOW⚡test/ci_system/install_deps.sh152# Step 2: Upgrade base toolsCOMMENT
LOW⚡test/ci_system/install_deps.sh164# Step 3: Sync FlashInfer JIT cache on Blackwell runnersCOMMENT
LOW⚡test/ci_system/install_deps.sh170# Step 4: Install tokenspeed-kernelCOMMENT
LOW⚡test/ci_system/install_deps.sh196# Step 5: Install TokenSpeed Scheduler (C++)COMMENT
LOW⚡test/ci_system/install_deps.sh210# Step 6: Install TokenSpeedCOMMENT
LOW⚡test/ci_system/install_deps.sh220# Step 7: Optionally override tokenspeed-mla with in-tree sourceCOMMENT
LOW⚡test/ci_system/install_deps.sh234# Step 8: Pin critical kernel deps to exact versionsCOMMENT
LOW⚡test/ci_system/install_deps.sh304# Step 9: Fix Triton ptxas (CUDA 13+ only)COMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py165 # Step 1: pack groups to nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py176 # Step 2: construct redundant experts within nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py185 # Step 3: pack physical_experts to GPUsCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py436 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py477 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py534 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py552 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py619 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py645 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py698 # Step 7: Write final O to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py597 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py736 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py805 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py831 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py953 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py990 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py1048 # Step 7: Write final O to gmem (fake→real via SMEM)COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1564 # Step 0: load tmemCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1618 # Step 1: perform swiglu on the first part, interleave with the second's 32x32 tmem transpose.COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1650 # Step 2: QuantCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1661 # Step 3: TMASTGCOMMENT
LOW⚡…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py1988 # Step 1: coarse-grain spin on ``fc1_done_counter[slot]``COMMENT
LOW…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py2083 # Step 3: K-loop with 2x cute.copy per tile (B +COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py277 # Step 1: Load chunk → smem (convert to ordered)COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py836 # Step 3: Collect output indices and valuesCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1215 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1220 # Step 2: Multi-round radix selectCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py491 # Step 1: Inclusive prefix sum directly on the histogramCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py510 # Step 2: Find threshold bucketCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1367 # Step 3: Collect outputCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py284 # Step 3: Collect output indices and values (cluster variant)COMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py491 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py496 # Step 2: Multi-round radix selectCOMMENT
LOW…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py548 # Step 3: Collect output (cluster barriers)COMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py87 # Step 1: Warp-level prefix sum using shuffleCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py90 # Step 2: Store warp prefix sumsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py95 # Step 3: Prefix sum across warpsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py106 # Step 4: Add warp-level prefixCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py110 # Step 5: Get total sum if need_total_sum is TrueCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2231 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2263 # Step 2: shuffle w1 to the MFMA-tile layout the kernel expects.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2397 # Step 3: materialise scalar / None args as device tensors so theCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2479 # Step 4: launch the GEMM. One CTA per (M-tile, N-tile); the per-CTACOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1758 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1777 # Step 2: shuffle w2 to MFMA-tile layout if the caller didn't.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1789 # Step 3: flatten the (token, slot) axes so each row is one routedCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1927 # Step 5: GEMM. Writes either to `partials` (reduce mode) or directlyCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1972 # Step 6: reduce. Sum partials[token, :, n] over the topk dimCOMMENT
Structural Annotation Overuse58 hits · 85 pts
SeverityFileLineSnippetContext
LOWtest/runtime/test_draft_advance_seqlens.py350# Step 0: the drafter publishes the accepted frontier (vc + N -> vc + a); theCOMMENT
LOW⚡test/ci_system/install_deps.sh124# Step 1: Determine CUDA index and FlashInfer architectureCOMMENT
LOW⚡test/ci_system/install_deps.sh152# Step 2: Upgrade base toolsCOMMENT
LOW⚡test/ci_system/install_deps.sh164# Step 3: Sync FlashInfer JIT cache on Blackwell runnersCOMMENT
LOW⚡test/ci_system/install_deps.sh170# Step 4: Install tokenspeed-kernelCOMMENT
LOW⚡test/ci_system/install_deps.sh196# Step 5: Install TokenSpeed Scheduler (C++)COMMENT
LOW⚡test/ci_system/install_deps.sh210# Step 6: Install TokenSpeedCOMMENT
LOW⚡test/ci_system/install_deps.sh220# Step 7: Optionally override tokenspeed-mla with in-tree sourceCOMMENT
LOW⚡test/ci_system/install_deps.sh234# Step 8: Pin critical kernel deps to exact versionsCOMMENT
LOW⚡test/ci_system/install_deps.sh304# Step 9: Fix Triton ptxas (CUDA 13+ only)COMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py165 # Step 1: pack groups to nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py176 # Step 2: construct redundant experts within nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py185 # Step 3: pack physical_experts to GPUsCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py436 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py477 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py534 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py552 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py619 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py645 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py698 # Step 7: Write final O to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py597 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py736 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py805 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py831 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py953 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py990 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py1048 # Step 7: Write final O to gmem (fake→real via SMEM)COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1564 # Step 0: load tmemCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1618 # Step 1: perform swiglu on the first part, interleave with the second's 32x32 tmem transpose.COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1650 # Step 2: QuantCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1661 # Step 3: TMASTGCOMMENT
LOW⚡…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py1988 # Step 1: coarse-grain spin on ``fc1_done_counter[slot]``COMMENT
LOW…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py2083 # Step 3: K-loop with 2x cute.copy per tile (B +COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py277 # Step 1: Load chunk → smem (convert to ordered)COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py836 # Step 3: Collect output indices and valuesCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1215 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1220 # Step 2: Multi-round radix selectCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py491 # Step 1: Inclusive prefix sum directly on the histogramCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py510 # Step 2: Find threshold bucketCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1367 # Step 3: Collect outputCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py284 # Step 3: Collect output indices and values (cluster variant)COMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py491 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py496 # Step 2: Multi-round radix selectCOMMENT
LOW…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py548 # Step 3: Collect output (cluster barriers)COMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py87 # Step 1: Warp-level prefix sum using shuffleCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py90 # Step 2: Store warp prefix sumsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py95 # Step 3: Prefix sum across warpsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py106 # Step 4: Add warp-level prefixCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py110 # Step 5: Get total sum if need_total_sum is TrueCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2231 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2263 # Step 2: shuffle w1 to the MFMA-tile layout the kernel expects.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2397 # Step 3: materialise scalar / None args as device tensors so theCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2479 # Step 4: launch the GEMM. One CTA per (M-tile, N-tile); the per-CTACOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1758 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1777 # Step 2: shuffle w2 to MFMA-tile layout if the caller didn't.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1789 # Step 3: flatten the (token, slot) axes so each row is one routedCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1927 # Step 5: GEMM. Writes either to `partials` (reduce mode) or directlyCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1972 # Step 6: reduce. Sum partials[token, :, n] over the topk dimCOMMENT
Hallucination Indicators6 hits · 70 pts
SeverityFileLineSnippetContext
CRITICALtest/runtime/test_dspark_proposal.py348 drafter.markov_head.markov_w2.weight.data.zero_()CODE
CRITICALtest/runtime/test_dspark_proposal.py378 drafter.markov_head.markov_w1.weight.data.normal_(0.0, 3.0)CODE
CRITICALtest/runtime/test_dspark_proposal.py379 drafter.markov_head.markov_w2.weight.data.normal_(0.0, 3.0)CODE
CRITICAL⚡test/runtime/test_qwen4_exp.py3242 device.lookup.ngram_embedding.weight.data.copy_(payload)CODE
CRITICAL⚡test/runtime/test_qwen4_exp.py3243 host.lookup.ngram_embedding.weight.data.copy_(payload.cpu())CODE
CRITICAL…n/tokenspeed_kernel/ops/attention/gdn/_triton/utils.py147 triton.runtime.driver.active.utils.get_device_properties(i)[CODE
AI Slop Vocabulary13 hits · 39 pts
SeverityFileLineSnippetContext
MEDIUMtest/runtime/test_kda_state_eviction_spec.py124 # harness, with the complete unmodified scheduler tables supplied here.COMMENT
MEDIUM⚡test/runtime/test_detokenizer_parity.py73# Shared harnessCOMMENT
MEDIUMtest/runtime/test_inkling_activation_parity.py336 # (bind_cache_groups); this harness plans a plain pool and hand-bindsCOMMENT
MEDIUMtest/runtime/test_cache_pd_shutdown.py54 # The harness plans no device work and no batch; trace anything thatCOMMENT
LOW…speed/runtime/layers/attention/linear/causal_conv1d.py181 # first chunk and does not have prior-token, so just set to 0COMMENT
MEDIUMtokenspeed-kernel/test/test_benchmark_gemm_generator.py172 # The harness routes quant="none" through prepare_mm to the dense generator,COMMENT
MEDIUMtokenspeed-kernel/python/tokenspeed_kernel/selection.py856 # comprehensive warmup should pass explicit op signatures.COMMENT
MEDIUM…l/ops/attention/rmha/_cute_dsl/flash_fwd_sm100_bias.py1560 # CLC buffers placed here to utilize padding before sO's 1024-byte alignment.COMMENT
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py998 _EpilogueTokenTileSize = 64 # Fundamentally the epi_tile_nCODE
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py999 _EpilogueFc1IntermediateGateUpTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1000 _EpilogueFc1IntermediateDownTileSize = 64 # Fundamentally epi_tile_m // 2CODE
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1001 _EpilogueFc2HiddenTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py8450 # H and Q are contiguous in the harness's (B,Q,H,D) allocation.COMMENT
Self-Referential Comments11 hits · 25 pts
SeverityFileLineSnippetContext
MEDIUM…/tokenspeed/runtime/engine/data_parallel_controller.py330 # Create a thread for each workerCOMMENT
MEDIUM…nel/python/tokenspeed_kernel/ops/communication/nccl.py22# This file is a pure Python wrapper for the NCCL library.COMMENT
MEDIUM…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py44# This file is copied and modified from cutlass example https://github.com/NVIDIA/cutlass/blob/main/examples/python/CuTeCOMMENT
MEDIUM…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py124 """This class implements batched matrix multiplication (C = (SFA * A) * (SFB * B)) with support for fp8 (e4m3fn,STRING
MEDIUM…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py115 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for various data typesSTRING
MEDIUM…python/tokenspeed_kernel/thirdparty/cute_dsl/argmax.py18# This file contains code derived from the Quack library:COMMENT
MEDIUM…speed_kernel/thirdparty/cute_dsl/mega_moe/moe_utils.py189 # Create a new cute.Pointer with generic address space, preserving alignmentCOMMENT
MEDIUM…speed_kernel/thirdparty/cute_dsl/mega_moe/moe_utils.py217 # Create a new cute.Pointer with gmem address space, preserving alignmentCOMMENT
MEDIUM…on/tokenspeed_kernel/thirdparty/cute_dsl/topk/utils.py48# This file is copied and modified from cutlass https://github.com/NVIDIA/cutlass/blob/main/python/CuTeDSL/cutlass/cute/COMMENT
MEDIUM…on/tokenspeed_kernel/thirdparty/cute_dsl/topk/utils.py177 # Create a numpy arraySTRING
MEDIUMtokenspeed-mla/python/tokenspeed_mla/utils.py243 # Create a numpy arraySTRING
Redundant / Tautological Comments7 hits · 10 pts
SeverityFileLineSnippetContext
LOWtest/runners.py328 # Check if the text is empty or only whitespace.COMMENT
LOWtest/runners.py536 # Check if the text is empty or only whitespace.COMMENT
LOWtest/ci_system/ci_utils.py225 # Check if we should retryCOMMENT
LOWpython/tokenspeed/runtime/engine/async_llm.py394 # Check if this was an abort/error created by schedulerCOMMENT
LOW…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py442 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py490 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…arty/cute_dsl/topk/top_k/filtered_top_k_varlen_util.py1236 # Check if the number of valid indices matchesCOMMENT
Modern AI Meta-Vocabulary4 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md32- [2026/08] [Qwen3.8 Flash Next](https://developer.nvidia.com/blog/experiment-with-qwen3-8-flash-next-176b-model-on-nvidCODE
MEDIUMREADME.md38- [2026/05] 🚀 TokenSpeed hits 580 TPS on Qwen3.5-397B-A17B for agentic workloads. [[PyTorch blog](https://pytorch.org/blCODE
MEDIUMtest/cli/test_serve_smg_integration.py90 # test exercises orchestration/teardown, not tokenizer loading.COMMENT
MEDIUMpython/tokenspeed/runtime/models/kimi_k3_nextn.py422 # NextN scaffolding around the decoder layer.COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…thon/tokenspeed/runtime/utils/hf_transformers_utils.py940 # Special handling for stop token <|eom_id|> generated by llama 3 tool use.COMMENT
Fake / Example Data3 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/runtime/test_event_loop_in_flight.py181 output_tokens="placeholder",CODE
LOWtest/runtime/test_event_loop_in_flight.py182 output_lengths="placeholder",CODE
LOWpython/tokenspeed/runtime/execution/prefill_graph.py1369 """Smallest captured request capacity, including native dummy-token room.STRING
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/runners.py319 # make sure to disable compileCOMMENT
LOW…/python/tokenspeed_kernel/ops/communication/deep_ep.py687 # Please make sure to change DeepEP code in internode_ll.cu dispatch / combine as below first and then reinstallSTRING
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWtest/ci_system/pipeline.py1786def execute_task(CODE