Repository Analysis

lightseekorg/tokenspeed

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

19.8 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of lightseekorg/tokenspeed, a Python project with 1,836 GitHub stars. SynthScan v2.0 examined 488,894 lines of code across 1349 source files, recording 7460 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 19.8 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

19.8
Adjusted Score
19.8
Raw Score
100%
Time Factor
2026-08-09
Last Push
1.8K
Stars
Python
Language
488.9K
Lines of Code
1.3K
Files
7.5K
Pattern Hits
2026-08-09
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 4HIGH 59MEDIUM 813LOW 6584

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 7460 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers3455 hits · 3482 pts
SeverityFileLineSnippetContext
LOWtest/test_bench_timeout.py39def test_aiohttp_timeout_has_sock_subtimeouts():CODE
LOWtest/test_bench_timeout.py61def test_per_request_timeout_constant_is_positive():CODE
LOWtest/test_bench_timeout.py66async def test_await_with_per_request_timeout_returns_failed_output_on_hang(CODE
LOWtest/test_bench_timeout.py87async def test_await_with_per_request_timeout_passes_through_success(monkeypatch):CODE
LOWtest/test_bench_timeout.py105async def test_concurrent_stuck_request_does_not_block_gather(monkeypatch):CODE
LOWtest/test_utils.py377def write_github_step_summary(content):CODE
LOWtest/runners.py560 def batch_forward_generation_raw(CODE
LOWtest/runners.py594def check_close_model_outputs(CODE
LOWtest/runtime/test_dspark_proposal.py42def test_bias_matches_the_heads_own_step_bias() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py52def test_bias_slices_match_the_full_bias() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py118def _install_recording_argmax(drafter: DSpark, lm_head_weight: torch.Tensor) -> list:CODE
LOWtest/runtime/test_dspark_proposal.py231 def update_mamba_state_after_mtp_verify(self, accept_lengths, model):CODE
LOWtest/runtime/test_dspark_proposal.py239def test_kda_commit_fires_for_a_dspark_drafter() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py253def test_kda_commit_is_skipped_without_a_drafter() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py261def test_kda_commit_is_skipped_on_a_stateless_backend() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py269def test_kda_commit_is_skipped_outside_decode() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py65def test_out_of_range_previous_tokens_do_not_index_past_the_embedding() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py81def test_clamping_maps_to_the_boundary_rows() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py88def test_bias_is_zero_beyond_the_markov_vocabulary() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py102def test_bias_straddling_the_vocab_edge_is_partly_real_partly_zero() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py137def test_anchor_is_copied_and_drafts_fill_the_rest_of_the_block() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py157def test_each_step_reads_the_hidden_one_position_back() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py184def test_the_chain_conditions_on_the_previous_proposal() -> None:CODE
LOWtest/runtime/test_dspark_proposal.py212def test_proposals_are_valid_token_ids() -> None:CODE
LOWtest/runtime/test_kimi_k3_eagle3.py24def _post_layer_attnres_reference(CODE
LOWtest/runtime/test_kimi_k3_eagle3.py31def test_capture_tensor_matches_post_layer_attnres_reference():CODE
LOWtest/runtime/test_weight_loader_prefetch.py49 def test_prefetch_enabled_by_default(self):CODE
LOWtest/runtime/test_weight_loader_prefetch.py56 def test_disable_flag_turns_prefetch_off(self):CODE
LOWtest/runtime/test_weight_loader_prefetch.py62 def test_load_config_defaults_enable_prefetch(self):CODE
LOWtest/runtime/test_weight_loader_prefetch.py77 def test_window_clamps_to_available_memory(self):CODE
LOWtest/runtime/test_weight_loader_prefetch.py89 def test_window_bounds_read_ahead_and_advances_on_consumption(self):CODE
LOWtest/runtime/test_weight_loader_prefetch.py125 def test_oversized_shard_still_prefetched_alone(self):CODE
LOWtest/runtime/test_weight_loader_prefetch.py146 def test_read_failure_unblocks_consumer(self):CODE
LOWtest/runtime/test_block_tables_bridge.py52 def test_two_groups_shape_and_null_hole_preserved(self):CODE
LOWtest/runtime/test_block_tables_bridge.py71 def test_array_export_is_consumed(self):CODE
LOWtest/runtime/test_block_tables_bridge.py76 def test_row_count_mismatch_raises(self):CODE
LOWtest/runtime/test_block_tables_bridge.py81 def test_empty_rows_group_on_live_batch_raises(self):CODE
LOWtest/runtime/test_block_tables_bridge.py88 def test_empty_rows_group_on_zero_req_op_dropped(self):CODE
LOWtest/runtime/test_block_tables_bridge.py94 def test_strict_contract_rejects_missing_extra_and_duplicate_normalized_ids(self):CODE
LOWtest/runtime/test_block_tables_bridge.py124 def test_strict_contract_rejects_malformed_and_out_of_range_tables(self):CODE
LOWtest/runtime/test_block_tables_bridge.py156 def test_default_backend_does_not_use_cache_groups(self):CODE
LOWtest/runtime/test_inkling_reference_parity.py204 def test_logprobs_match_reference(self):CODE
LOWtest/runtime/test_host_executor.py62 def test_bytes_per_host_page_matches_mirror(self):CODE
LOWtest/runtime/test_host_executor.py69 def test_num_host_pages_formula(self):CODE
LOWtest/runtime/test_host_executor.py136 def test_payload_shape_and_roundtrip(self):CODE
LOWtest/runtime/test_host_executor.py154 def test_pop_common_requires_all_ranks(self):CODE
LOWtest/runtime/test_host_executor.py260 def test_roundtrip_with_acks_and_fencing(self):CODE
LOWtest/runtime/test_host_executor.py392 def test_state_layer_event_mapping(self):CODE
LOWtest/runtime/test_host_executor.py433 def test_state_pool_roundtrip_with_fencing(self):CODE
LOWtest/runtime/test_host_executor.py473 def test_empty_op_acks_immediately(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py24 def test_wrapper_consumes_history_and_checkpoint_state(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py76 def test_checkpoint_stream_registration(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py105 def test_ring_holds_window_for_every_accept(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py146 def test_verify_padded_batch_writes_nothing_for_pad_rows(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py182 def test_channel_slice_ring_write(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py225 def test_restore_into_ring_rows(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py357 def test_publish_verify_boundaries(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py407 def test_publish_prefill_interior_boundaries(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py481 def test_publish_overwrites_rejected_round(self):CODE
LOWtest/runtime/test_inkling_mtp_conv_state.py606 def test_checkpoint_metadata_keeps_only_chunk_endpoint(self):CODE
3395 more matches not shown…
Decorative Section Separators762 hits · 2676 pts
SeverityFileLineSnippetContext
MEDIUMtest/runtime/test_dspark_proposal.py37# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_proposal.py39# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_proposal.py113# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_proposal.py115# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_proposal.py225# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_proposal.py227# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py72# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py74# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1133# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1135# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_detokenizer_parity.py1314# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/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
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py107# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py109# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py146# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py148# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py203# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py205# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py241# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_model.py243# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py35# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py37# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py121# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py123# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py144# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py146# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py207# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py209# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py254# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_dspark_config.py256# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_capture.py19# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_capture.py21# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_capture.py72# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_kimi_k3_dspark_capture.py74# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_sleep_wakeup_gpu.py98 # ====================================================================COMMENT
MEDIUMtest/runtime/test_sleep_wakeup_gpu.py101 # ====================================================================COMMENT
MEDIUMtest/runtime/test_sleep_wakeup_gpu.py183 # ====================================================================COMMENT
MEDIUMtest/runtime/test_sleep_wakeup_gpu.py186 # ====================================================================COMMENT
MEDIUMtest/runtime/test_sleep_wakeup_gpu.py214 # ====================================================================COMMENT
MEDIUMtest/runtime/test_sleep_wakeup_gpu.py221 # ====================================================================COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py278# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py280# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py364# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py366# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py428# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py430# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py510# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py512# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py777# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py779# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py80# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_inline_detokenizer_receiver.py82# ---------------------------------------------------------------------------COMMENT
702 more matches not shown…
Unused Imports1137 hits · 1082 pts
SeverityFileLineSnippetContext
LOWtest/test_bench_timeout.py29CODE
LOWtest/runtime/test_dspark_proposal.py11CODE
LOWtest/runtime/test_kimi_k3_eagle3.py3CODE
LOWtest/runtime/test_block_tables_bridge.py1CODE
LOWtest/runtime/test_inkling_reference_parity.py23CODE
LOWtest/runtime/test_host_executor.py10CODE
LOWtest/runtime/test_kimi_mxfp4_dense_linear.py3CODE
LOWtest/runtime/test_multimodal_warmup.py21CODE
LOWtest/runtime/test_retract_readmit.py32CODE
LOWtest/runtime/test_trtllm_spec_seqlen_clamp.py26CODE
LOWtest/runtime/conftest.py3CODE
LOWtest/runtime/test_cache_memory_plan.py1CODE
LOWtest/runtime/test_fp8_linear_blockscale_flashinfer.py3CODE
LOWtest/runtime/cache_pool_test_utils.py1CODE
LOWtest/runtime/test_generation_output_processor.py21CODE
LOWtest/runtime/test_scheduler_config_guard.py3CODE
LOWtest/runtime/test_kimi_k3_cache_pool.py1CODE
LOWtest/runtime/test_unified_kv_slab_pool.py3CODE
LOWtest/runtime/test_unified_kv_slab_pool.py466CODE
LOWtest/runtime/test_trtllm_mla_block_decode.py1CODE
LOWtest/runtime/test_trtllm_mla_block_decode.py6CODE
LOWtest/runtime/test_group_aware_mha.py1CODE
LOWtest/runtime/test_page_table_conversion.py1CODE
LOWtest/runtime/test_kimi_k3_dspark_model.py10CODE
LOWtest/runtime/test_dspark_config.py8CODE
LOWtest/runtime/test_max_new_tokens_context_cap.py26CODE
LOWtest/runtime/test_kimi_k3_dspark_capture.py3CODE
LOWtest/runtime/test_draft_page_table_scrub.py1CODE
LOWtest/runtime/test_host_mirror.py8CODE
LOWtest/runtime/test_sliding_cache_loc.py10CODE
LOWtest/runtime/test_gdn_state_paging.py10CODE
LOWtest/runtime/test_grammar_cache_timeout.py44CODE
LOWtest/runtime/test_multi_window_page_counts.py25CODE
LOWtest/runtime/test_multi_window_page_counts.py52CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py14CODE
LOWtest/runtime/test_group_specs_from_layer_types.py1CODE
LOWtest/runtime/test_inline_detokenizer_receiver.py46CODE
LOWtest/runtime/test_kimi_k3_mla.py17CODE
LOWtest/runtime/test_slab_capacity_prefix_hits.py223CODE
LOWtest/runtime/test_page_zeroing_contract.py9CODE
LOWtest/runtime/test_reasoning_structural_tag.py21CODE
LOWtest/runtime/test_cache_pool.py1CODE
LOWtest/runtime/test_flashmla_cache_groups.py29CODE
LOWtest/runtime/test_draft_advance_seqlens.py11CODE
LOWtest/runtime/test_kimi_k3_cache_spec.py1CODE
LOWtest/runtime/test_trtllm_cache_groups.py1CODE
LOWtest/runtime/test_dp_sampling_routing_metadata.py1CODE
LOWtest/runtime/test_prefill_graph.py11CODE
LOWtest/runtime/kda_paged_prefill_nan_demo.py17CODE
LOWtest/runtime/test_hybrid_mla_kv_nan_sanitize.py34CODE
LOWtest/runtime/test_mla_block_decode.py12CODE
LOWtest/runtime/test_mla_block_decode.py28CODE
LOWtest/runtime/test_kimi_k3_integration.py1CODE
LOWtest/runtime/test_zmq_msgpack.py29CODE
LOWtest/runtime/test_weight_version.py23CODE
LOWtest/runtime/test_hybrid_cudagraph_kwargs.py10CODE
LOWtest/runtime/test_mxfp8_kv_pool.py25CODE
LOWtest/runtime/test_mha_pool_spec_decode_groups.py3CODE
LOWtest/runtime/test_fp8_linear_mxfp8_flashinfer.py3CODE
LOWtest/runtime/test_modelopt_mixed_config.py3CODE
1077 more matches not shown…
Over-Commented Block956 hits · 932 pts
SeverityFileLineSnippetContext
LOWtest/test_bench_timeout.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runners.py1# SPDX-License-Identifier: MIT AND Apache-2.0COMMENT
LOW…/kimi-k3-dspark-mxfp4-tp8ep8-evalscope-aime26-amd.yaml81# problems at temperature 1.0) and cuts TPOT by 2.27x, consistent with theCOMMENT
LOW…-dspark-mxfp4-tp8ep8-evalscope-random-4k-1k-mi35x.yaml101#COMMENT
LOWtest/runtime/test_multimodal_warmup.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_retract_readmit.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_logging.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_generation_output_processor.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_model_executor_cache_state.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_launcher_topology.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_grammar_cache_timeout.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_multi_window_page_counts.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_sleep_wakeup_gpu.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_inline_detokenizer_receiver.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_reasoning_structural_tag.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_inline_detokenizer_e2e.py81# Two short ASCII prompts keep the generate budget small and keepCOMMENT
LOWtest/runtime/test_flashmla_cache_groups.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_hybrid_mla_kv_nan_sanitize.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_zmq_msgpack.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_weight_version.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_mxfp8_kv_pool.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_sleep_wakeup_v4_gpu.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_io_struct_codec.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_physical_context_len.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_deepseek_v4_attention_ops.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_deepseek_v4_mega_moe.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_pause_controller.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/test_deepseek_v4_mtp_prefix_cache.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/layers/test_situ_activation.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/layers/test_mla_decode_dcp.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/layers/test_gdn_qkv_split_fused.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/layers/test_gdn_flashinfer_fastpath.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/cache/test_embedding_cache.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/cache/test_mla_kv_buffer.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/distributed/test_qwen35_epd_1e1p2d.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/distributed/test_epd_transfer.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/distributed/test_pd_decode_dp_metadata.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…untime/distributed/test_draft_moe_capture_global_bs.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/distributed/test_epd_encode.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/sampling/test_flashinfer_verify_dp.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/sampling/test_dp_sampling_logits_verify.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/runtime/sampling/test_nan_guard.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/ci_system/serve_qwen35_122b_nvfp4_epd_1e1p2d.sh1#!/usr/bin/env bashCOMMENT
LOWtest/ci_system/install_deps.sh181 --extra-index-url https://download.pytorch.org/whl/cu${CUINDEX}COMMENT
LOWtest/cli/test_logprefix.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_smg_parser_availability.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_proc.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_cli_dispatch.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_trace_merge.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_serve_smg_unit.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_argsplit.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_serve_smg_integration.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_logo.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/test_serve_headless.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtest/cli/_fixtures/fake_engine.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWpython/pyproject.toml1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWpython/tokenspeed/_logging.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWpython/tokenspeed/version.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWpython/tokenspeed/env.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
896 more matches not shown…
Modern Structural Boilerplate304 hits · 305 pts
SeverityFileLineSnippetContext
LOWtest/ci_system/ci_utils.py20logger = logging.getLogger(__name__)CODE
LOWtest/ci_system/ci_register.py23__all__ = [CODE
LOWpython/tokenspeed/bench.py267def set_ulimit(target_soft_limit: int = 65535) -> None:CODE
LOWpython/tokenspeed/bench.py106logger = logging.getLogger(__name__)STRING
LOWpython/tokenspeed/runtime/pd/kv_events.py43logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1361__all__ = ["MooncakeKVManagerPrefill", "MooncakeKVSender"]CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py23logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/encode_executor.py39logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/prefill_admission.py57logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/rotary_embedding.py38logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/parameter.py35__all__ = [CODE
LOW…speed/runtime/layers/attention/mm_encoder_attention.py55logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/attention/registry.py56logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/attention/registry.py268def _set_cache_group_page_sizes(config: BaseAttnConfig, spec: CachePoolSpec) -> None:CODE
LOW…on/tokenspeed/runtime/layers/attention/backends/msa.py66logger = logging.getLogger(__name__)CODE
LOW…on/tokenspeed/runtime/layers/attention/backends/msa.py825 def set_cache_pool(self, cache_pool) -> None:CODE
LOW…untime/layers/attention/backends/hybrid_linear_attn.py69logger = logging.getLogger(__name__)CODE
LOW…untime/layers/attention/backends/hybrid_linear_attn.py356 def set_kv_pool(self, kv_pool) -> None:CODE
LOW…untime/layers/attention/backends/hybrid_linear_attn.py1823 def set_cache_pool(self, cache_pool) -> None:CODE
LOW…kenspeed/runtime/layers/attention/backends/__init__.py28logger = logging.getLogger(__name__)CODE
LOW…ed/runtime/layers/attention/backends/tokenspeed_mla.py66logger = logging.getLogger(__name__)CODE
LOW…nspeed/runtime/layers/attention/backends/trtllm_mla.py60logger = logging.getLogger(__name__)CODE
LOW…n/tokenspeed/runtime/layers/attention/backends/base.py96 def set_cache_pool(self, cache_pool: CachePool) -> None:CODE
LOW…untime/layers/attention/kv_cache/hybrid_deepseek_v4.py664 def set_kv_buffer(self, *args, **kwargs) -> None:CODE
LOW…peed/runtime/layers/attention/kv_cache/recipes/spec.py644__all__ = [CODE
LOW…s/attention/kv_cache/recipes/deepseek_v4_cache_spec.py503__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/dense/fp8.py38logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/dense/__init__.py26__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/dense/nvfp4.py30logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/dense/mxfp4.py150__all__ = [CODE
LOW…kenspeed/runtime/layers/quantization/modelopt_mixed.py45logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/quantization/fp8.py34logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/quantization/nvfp4.py30logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/quantization/utils.py319def update_tensor_inplace(old: torch.Tensor, new: torch.Tensor) -> None:CODE
LOW…/quantization/compressed_tensors/compressed_tensors.py62logger = logging.getLogger(__name__)CODE
LOW…/quantization/compressed_tensors/compressed_tensors.py64__all__ = ["CompressedTensorsLinearMethod"]CODE
LOW…rs/quantization/compressed_tensors/schemes/__init__.py29__all__ = [CODE
LOW…ompressed_tensors/schemes/compressed_tensors_scheme.py30__all__ = ["CompressedTensorsScheme"]CODE
LOW…compressed_tensors/schemes/compressed_tensors_wNa16.py53logger = logging.getLogger(__name__)CODE
LOW…compressed_tensors/schemes/compressed_tensors_wNa16.py55__all__ = ["CompressedTensorsWNA16"]CODE
LOWpython/tokenspeed/runtime/layers/moe/latent.py555__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/moe/__init__.py30__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/moe/utils.py31logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/moe/weights/fp8.py66__all__ = ["create_fp8_block_scale_inverses"]CODE
LOWpython/tokenspeed/runtime/layers/moe/weights/mxint4.py124__all__ = ["create_mxint4_weight_pair"]CODE
LOWpython/tokenspeed/runtime/layers/moe/weights/unquant.py82__all__ = ["create_dense_weight_pair"]CODE
LOWpython/tokenspeed/runtime/layers/moe/weights/loaders.py276__all__ = [CODE
LOW…thon/tokenspeed/runtime/layers/moe/weights/__init__.py92__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/moe/weights/nvfp4.py118__all__ = ["create_nvfp4_weight_pair"]CODE
LOWpython/tokenspeed/runtime/layers/moe/weights/mxfp4.py140__all__ = ["create_mxfp4_fp8_input_scales", "create_mxfp4_weight_pair"]CODE
LOWpython/tokenspeed/runtime/cache/transfer/__init__.py28__all__ = [CODE
LOWpython/tokenspeed/runtime/distributed/__init__.py26__all__ = ["CommManager", "Mapping"]CODE
LOW…okenspeed/runtime/distributed/comm_backend/__init__.py27__all__ = [CODE
LOW…thon/tokenspeed/runtime/sampling/dp_sampling_config.py28logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/utils/common.py75logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/utils/common.py212def set_random_seed(seed: int) -> None:CODE
LOWpython/tokenspeed/runtime/utils/network.py30logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/utils/process.py33logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/utils/nvtx.py62def set_nvtx_enabled(enabled: bool) -> None:CODE
LOWpython/tokenspeed/runtime/models/deepseek_v4_mtp.py59logger = logging.getLogger(__name__)CODE
244 more matches not shown…
Deep Nesting296 hits · 264 pts
SeverityFileLineSnippetContext
LOWtest/test_utils.py102CODE
LOWtest/test_utils.py199CODE
LOWtest/test_utils.py299CODE
LOWtest/runtime/test_inkling_real_checkpoint_load.py60CODE
LOWtest/runtime/test_kimi_k3_dspark_model.py298CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py78CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py132CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py187CODE
LOWtest/runtime/test_inkling_load_weights.py84CODE
LOWtest/runtime/test_control_server.py155CODE
LOWtest/runtime/models/test_moe_routing_config.py17CODE
LOWtest/runtime/models/test_kimi_k3_eagle3_e2e.py55CODE
LOWtest/runtime/models/test_mm25_perf.py276CODE
LOWtest/ci_system/pipeline.py120CODE
LOWtest/ci_system/pipeline.py743CODE
LOWtest/ci_system/pipeline.py775CODE
LOWtest/ci_system/pipeline.py1385CODE
LOWtest/ci_system/pipeline.py1539CODE
LOWtest/ci_system/ci_utils.py117CODE
LOWtest/cli/test_serve_smg_integration.py46CODE
LOWpython/tokenspeed/env.py240CODE
LOWpython/tokenspeed/bench.py329CODE
LOWpython/tokenspeed/bench.py457CODE
LOWpython/tokenspeed/bench.py699CODE
LOWpython/tokenspeed/bench.py1205CODE
LOWpython/tokenspeed/bench.py1239CODE
LOWpython/tokenspeed/bench.py131CODE
LOWpython/tokenspeed/runtime/pd/transfer_plan.py387CODE
LOWpython/tokenspeed/runtime/pd/decode_executor.py183CODE
LOWpython/tokenspeed/runtime/pd/prefill_executor.py368CODE
LOWpython/tokenspeed/runtime/pd/mooncake/sender.py161CODE
LOWpython/tokenspeed/runtime/pd/mooncake/receiver.py754CODE
LOWpython/tokenspeed/runtime/pd/mooncake/async_conn.py265CODE
LOWpython/tokenspeed/runtime/pd/mooncake/async_conn.py266CODE
LOWpython/tokenspeed/runtime/pd/mooncake/async_conn.py325CODE
LOWpython/tokenspeed/runtime/pd/mooncake/async_conn.py374CODE
LOWpython/tokenspeed/runtime/pd/mooncake/async_conn.py458CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py501CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py608CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py670CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py804CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py950CODE
LOWpython/tokenspeed/runtime/pd/mooncake/decode.py112CODE
LOWpython/tokenspeed/runtime/pd/mooncake/decode.py128CODE
LOWpython/tokenspeed/runtime/pd/base/bootstrap.py227CODE
LOW…hon/tokenspeed/runtime/grammar/base_grammar_backend.py140CODE
LOW…hon/tokenspeed/runtime/grammar/base_grammar_backend.py370CODE
LOW…tokenspeed/runtime/grammar/reasoning_structural_tag.py103CODE
LOWpython/tokenspeed/runtime/grammar/xgrammar_backend.py153CODE
LOWpython/tokenspeed/runtime/grammar/capturable_grammar.py524CODE
LOWpython/tokenspeed/runtime/grammar/capturable_grammar.py274CODE
LOWpython/tokenspeed/runtime/epd/encode_loop.py210CODE
LOWpython/tokenspeed/runtime/epd/prefill_admission.py533CODE
LOWpython/tokenspeed/runtime/epd/prefill_admission.py663CODE
LOWpython/tokenspeed/runtime/epd/mooncake/encode.py182CODE
LOWpython/tokenspeed/runtime/epd/mooncake/encode.py262CODE
LOWpython/tokenspeed/runtime/epd/mooncake/encode.py186CODE
LOWpython/tokenspeed/runtime/layers/logits_processor.py366CODE
LOWpython/tokenspeed/runtime/layers/logits_processor.py558CODE
LOWpython/tokenspeed/runtime/layers/layernorm.py155CODE
236 more matches not shown…
Excessive Try-Catch Wrapping199 hits · 238 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
MEDIUMtest/runtime/test_deepseek_v4_config.py1354def test_deepseek_v4_flashmla_wrapper_exposes_required_api(self):CODE
LOWtest/runtime/test_deepseek_v4_config.py1362 except Exception as exc: # noqa: BLE001 - optional kernel importCODE
LOWtest/runtime/test_multi_window_page_counts.py53except Exception:CODE
LOWtest/runtime/test_inkling_load_weights.py586 except Exception as e: # pragma: no cover - environment specificCODE
MEDIUMtest/runtime/test_zmq_msgpack.py573def _engine():CODE
LOWtest/runtime/test_zmq_msgpack.py586 except Exception as exc: # surface into the test threadCODE
LOWtest/runtime/test_control_server.py82 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
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
LOWtest/runtime/distributed/test_dp_sampling_comm.py69 except Exception:CODE
LOWtest/runtime/distributed/test_dp_sampling_comm.py47 except Exception:CODE
LOWtest/runtime/distributed/test_comm_manager.py70 except Exception as e:CODE
MEDIUMtest/runtime/distributed/test_comm_manager.py65def worker_fn(CODE
LOWtest/runtime/distributed/test_qwen35_pd_1p1d.py77 except Exception:CODE
MEDIUMtest/runtime/distributed/test_comm_ops.py124def worker_fn(rank, world_size, port, test_fn, error_dict):CODE
LOWtest/runtime/distributed/test_comm_ops.py127 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.py102 except Exception:CODE
LOWtest/runtime/models/test_qwen35_vlm_e2e.py115 except Exception:CODE
LOWtest/runtime/models/test_qwen35_vlm_e2e.py126 except Exception as exc: # noqa: BLE001CODE
MEDIUMtest/runtime/models/test_qwen35_vlm_e2e.py123def setUpClass(cls):CODE
LOWtest/runtime/models/test_llama_models.py96 except Exception:CODE
LOWtest/runtime/models/test_mm25_perf.py230 except Exception:CODE
LOWtest/runtime/models/test_gpt_oss.py81 except Exception:CODE
LOWtest/ci_system/pipeline.py1718 except Exception as exc:CODE
LOWtest/ci_system/pipeline.py1742 except Exception as exc:CODE
LOWpython/tokenspeed/_logging.py77 except Exception:CODE
LOWpython/tokenspeed/_logging.py109 except Exception:CODE
MEDIUMpython/tokenspeed/bench.py1317 print(f"Error {i}: {err.error}")CODE
LOWpython/tokenspeed/bench.py423 except Exception:CODE
LOWpython/tokenspeed/bench.py538 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/kv_events.py314 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/kv_events.py335 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/receiver.py105 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/receiver.py125 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/async_conn.py562 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py940 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1161 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1353 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/pd/mooncake/decode.py167 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py51 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py61 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py94 except Exception:CODE
LOWpython/tokenspeed/runtime/pd/base/mooncake_engine.py121 except Exception:CODE
MEDIUMpython/tokenspeed/runtime/pd/base/mooncake_engine.py48def register(self, ptr, length):CODE
MEDIUMpython/tokenspeed/runtime/pd/base/mooncake_engine.py58def deregister(self, ptr):CODE
LOWpython/tokenspeed/runtime/grammar/grammar_manager.py291 except Exception as exc:CODE
LOWpython/tokenspeed/runtime/grammar/capturable_grammar.py312 except Exception:CODE
LOWpython/tokenspeed/runtime/epd/encode_worker.py158 except Exception as e:CODE
LOWpython/tokenspeed/runtime/epd/encode_executor.py240 except Exception as e:CODE
LOWpython/tokenspeed/runtime/epd/prefill_admission.py109 except Exception: # noqa: BLE001 -- best-effort; worst case the MR leaksCODE
139 more matches not shown…
AI Structural Patterns157 hits · 138 pts
SeverityFileLineSnippetContext
LOWtest/runners.py361CODE
LOWtest/runtime/test_deepseek_v4_config.py192CODE
LOWtest/runtime/test_dp_sampling_routing_metadata.py48CODE
LOWpython/tokenspeed/bench.py812CODE
LOWpython/tokenspeed/runtime/pd/mooncake/prefill.py1237CODE
LOWpython/tokenspeed/runtime/layers/linear.py333CODE
LOWpython/tokenspeed/runtime/layers/linear.py506CODE
LOWpython/tokenspeed/runtime/layers/linear.py757CODE
LOWpython/tokenspeed/runtime/layers/linear.py1110CODE
LOW…/tokenspeed/runtime/layers/vocab_parallel_embedding.py230CODE
LOW…/tokenspeed/runtime/layers/vocab_parallel_embedding.py551CODE
LOWpython/tokenspeed/runtime/layers/utils.py111CODE
LOW…speed/runtime/layers/attention/mm_encoder_attention.py352CODE
LOW…ed/runtime/layers/attention/backends/tokenspeed_mla.py591CODE
LOW…speed/runtime/layers/attention/linear/causal_conv1d.py942CODE
LOW…on/tokenspeed/runtime/layers/attention/kv_cache/mha.py47CODE
LOWpython/tokenspeed/runtime/layers/moe/expert.py50CODE
LOWpython/tokenspeed/runtime/layers/moe/latent.py313CODE
LOWpython/tokenspeed/runtime/layers/moe/loader.py443CODE
LOWpython/tokenspeed/runtime/layers/moe/loader.py277CODE
LOWpython/tokenspeed/runtime/layers/moe/topk.py342CODE
LOWpython/tokenspeed/runtime/distributed/mapping.py317CODE
LOWpython/tokenspeed/runtime/models/deepseek_v4.py1443CODE
LOWpython/tokenspeed/runtime/models/deepseek_v4.py2756CODE
LOWpython/tokenspeed/runtime/models/minimax_m2.py557CODE
LOWpython/tokenspeed/runtime/models/glm5.py286CODE
LOWpython/tokenspeed/runtime/models/kimi_k3.py309CODE
LOWpython/tokenspeed/runtime/models/gpt_oss.py118CODE
LOWpython/tokenspeed/runtime/models/qwen3.py105CODE
LOWpython/tokenspeed/runtime/models/deepseek_v3.py480CODE
LOWpython/tokenspeed/runtime/models/moonvit.py293CODE
LOWpython/tokenspeed/runtime/models/moonvit.py502CODE
LOWpython/tokenspeed/runtime/models/moonvit.py600CODE
LOWpython/tokenspeed/runtime/execution/model_runner.py186CODE
LOWpython/tokenspeed/runtime/execution/model_executor.py955CODE
LOW…hon/tokenspeed/runtime/execution/cuda_graph_wrapper.py1160CODE
LOWpython/tokenspeed/runtime/execution/drafter/base.py46CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py184CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py419CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py486CODE
LOWpython/tokenspeed/runtime/configs/model_config.py315CODE
LOW…thon/tokenspeed/runtime/configs/qwen3_vision_config.py28CODE
LOW…on/tokenspeed/runtime/configs/kimi_k3_dspark_config.py51CODE
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.py64CODE
LOWpython/tokenspeed/runtime/configs/kimi_k3_config.py144CODE
LOWpython/tokenspeed/runtime/configs/qwen3_moe_config.py31CODE
LOWpython/tokenspeed/runtime/configs/minimax_m2_config.py54CODE
LOWpython/tokenspeed/runtime/configs/qwen3_config.py173CODE
LOWpython/tokenspeed/runtime/configs/kimi_k25_config.py60CODE
LOWpython/tokenspeed/runtime/configs/minimax_m3_config.py62CODE
LOWpython/tokenspeed/runtime/configs/minimax_m3_config.py165CODE
LOWpython/tokenspeed/runtime/entrypoints/engine.py147CODE
LOWpython/tokenspeed/runtime/entrypoints/engine.py207CODE
LOWpython/tokenspeed/runtime/entrypoints/engine_base.py42CODE
LOWpython/tokenspeed/runtime/engine/request.py50CODE
LOW…/tokenspeed/runtime/engine/scheduler_control_client.py325CODE
LOWtokenspeed-kernel/test/ops/test_attention_gdn.py424CODE
97 more matches not shown…
Cross-Language Confusion26 hits · 119 pts
SeverityFileLineSnippetContext
HIGHtest/runtime/test_inkling_mtp_conv_state.py108 over [committed history || accepted chunk prefix]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py278 """Per-request reference: causal conv over [prefix || x]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py290 the chunk): rows of [prefix || x[:upto]]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py309 conv over [ring history || x_t]; the kernel persists the token's ownSTRING
HIGHtest/runtime/test_cli_config_compat.py393 ["--model", "test/model", "--hf-overrides", '{"rope_scaling": null}']CODE
HIGHtest/runtime/test_cli_config_compat.py395 self.assertEqual(args.hf_overrides, '{"rope_scaling": null}')CODE
HIGHtest/runtime/test_gdn_state_paging.py510 # Page 0 is null; pages 1..N fill as the sequence grows.COMMENT
HIGHtest/runtime/test_kimi_k3_kda.py122 conv/recurrent component slabs indexed by page id (page 0 = null)."""STRING
HIGHtest/ci_system/slurm_submit.py349nvidia_smi="$(command -v nvidia-smi 2>/dev/null || true)"CODE
HIGHtest/ci_system/test_package_cache.py46 'configure_b200v2_package_cache >/dev/null; printf "%s|%s" "${PIP_CACHE_DIR}" "${CI_WHEEL_CACHE_DIR}"',CODE
HIGHtest/ci_system/pipeline.py499 "sudo apt-get update -q && sudo apt-get install -y lsof; "CODE
HIGHtest/ci_system/pipeline.py501 f"pids=$(lsof -tiTCP:{port} -sTCP:LISTEN 2>/dev/null || true); "CODE
HIGHtest/ci_system/pipeline.py504 "kill -TERM $pids 2>/dev/null || true; "CODE
HIGHtest/ci_system/pipeline.py506 f"pids=$(lsof -tiTCP:{port} -sTCP:LISTEN 2>/dev/null || true); "CODE
HIGHtest/ci_system/pipeline.py507 'if [ -n "$pids" ]; then kill -KILL $pids 2>/dev/null || true; fi; 'CODE
HIGHtest/ci_system/pipeline.py457 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/utils/server_args.py1929 help="Specify tp size for MoE part, default equals nprocs-per-node, if non dp_attn && combine_dense mode, thCODE
HIGHpython/tokenspeed/runtime/models/llama_eagle3.py76 the [embed || hidden] concat) and ``forward`` (= qkv_proj + o_projSTRING
HIGHpython/tokenspeed/runtime/models/deepseek_v3.py2227 concatenated [embeds || hidden_states] as input.STRING
HIGHpython/tokenspeed/runtime/execution/drafter/mtp.py221 """Roll a committed-tail stash: last ``lookback`` of [stash || fresh[:valid]].STRING
HIGHpython/tokenspeed/runtime/execution/drafter/mtp.py470 ``[prefill_part || decode_part]`` under MIXED, full prefill chunksSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/eagle.py225 ``[prefill_part || decode_part]`` under MIXED, full prefill chunksSTRING
HIGH…nspeed_kernel/ops/attention/triton/gated_delta_rule.py163 float32 legacy decode path; output for that batch entry is undefined).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
Cross-File Repetition20 hits · 100 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…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
HIGHpython/tokenspeed/runtime/models/qwen3_5_nextn.py0trim decode rows' cache_seqlens by ``spec_num_tokens - accept_lengths``.STRING
HIGHpython/tokenspeed/runtime/models/llama_eagle3.py0trim decode rows' cache_seqlens by ``spec_num_tokens - accept_lengths``.STRING
HIGHpython/tokenspeed/runtime/models/deepseek_v3.py0trim decode rows' cache_seqlens by ``spec_num_tokens - accept_lengths``.STRING
HIGH…kenspeed-kernel/test/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…speed-kernel/test/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…ed-kernel/test/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…ops/attention/cute_dsl/rel_mha/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
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGH…/tokenspeed_kernel_amd/ops/gfx950/attention/_common.py0pick num_kv_splits to balance occupancy against reduce overhead. the launch grid is (batch * num_kv_heads * num_groups) STRING
HIGH…tokenspeed_kernel_amd/ops/gfx1250/attention/_common.py0pick num_kv_splits to balance occupancy against reduce overhead. the launch grid is (batch * num_kv_heads * num_groups) STRING
HIGH…enspeed_kernel_amd/ops/gfx950/attention/rmha/decode.py0pick num_kv_splits to balance occupancy against reduce overhead. the launch grid is (batch * num_kv_heads * num_groups) STRING
Verbosity Indicators52 hits · 78 pts
SeverityFileLineSnippetContext
LOWtest/runtime/test_draft_advance_seqlens.py222# Step 0: `_apply_correction` trims the rejected tail (vc + N -> vc + a).COMMENT
LOWtest/ci_system/install_deps.sh94# Step 1: Determine CUDA index and FlashInfer architectureCOMMENT
LOWtest/ci_system/install_deps.sh122# Step 2: Upgrade base toolsCOMMENT
LOWtest/ci_system/install_deps.sh136# Step 3: Sync FlashInfer JIT cache on GB200/B200COMMENT
LOWtest/ci_system/install_deps.sh142# Step 4: Install tokenspeed-kernelCOMMENT
LOWtest/ci_system/install_deps.sh167# Step 5: Install TokenSpeed Scheduler (C++)COMMENT
LOWtest/ci_system/install_deps.sh174# Step 6: Install TokenSpeedCOMMENT
LOWtest/ci_system/install_deps.sh184# Step 7: Optionally override tokenspeed-mla with in-tree sourceCOMMENT
LOWtest/ci_system/install_deps.sh199# Step 8: Pin critical kernel deps to exact versionsCOMMENT
LOWtest/ci_system/install_deps.sh257# Step 9: Fix Triton ptxas (CUDA 13+ only)COMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py163 # Step 1: pack groups to nodesCOMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py174 # Step 2: construct redundant experts within nodesCOMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py183 # Step 3: pack physical_experts to GPUsCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py436 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py477 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py534 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py552 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py619 # Step 5: Store final LSE to gmemCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py645 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/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…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.py1497 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py1521 # Step 2: shuffle w1 to the MFMA-tile layout the kernel expects.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py1592 # Step 3: materialise scalar / None args as device tensors so theCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py1629 # 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.py1499 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1511 # Step 2: shuffle w2 to MFMA-tile layout if the caller didn't.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1523 # Step 3: flatten the (token, slot) axes so each row is one routedCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1666 # Step 5: GEMM. Writes either to `partials` (reduce mode) or directlyCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1722 # Step 6: reduce. Sum partials[token, :, n] over the topk dimCOMMENT
Structural Annotation Overuse51 hits · 76 pts
SeverityFileLineSnippetContext
LOWtest/ci_system/install_deps.sh94# Step 1: Determine CUDA index and FlashInfer architectureCOMMENT
LOWtest/ci_system/install_deps.sh122# Step 2: Upgrade base toolsCOMMENT
LOWtest/ci_system/install_deps.sh136# Step 3: Sync FlashInfer JIT cache on GB200/B200COMMENT
LOWtest/ci_system/install_deps.sh142# Step 4: Install tokenspeed-kernelCOMMENT
LOWtest/ci_system/install_deps.sh167# Step 5: Install TokenSpeed Scheduler (C++)COMMENT
LOWtest/ci_system/install_deps.sh174# Step 6: Install TokenSpeedCOMMENT
LOWtest/ci_system/install_deps.sh184# Step 7: Optionally override tokenspeed-mla with in-tree sourceCOMMENT
LOWtest/ci_system/install_deps.sh199# Step 8: Pin critical kernel deps to exact versionsCOMMENT
LOWtest/ci_system/install_deps.sh257# Step 9: Fix Triton ptxas (CUDA 13+ only)COMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py163 # Step 1: pack groups to nodesCOMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py174 # Step 2: construct redundant experts within nodesCOMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py183 # Step 3: pack physical_experts to GPUsCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py436 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py477 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py534 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py552 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py619 # Step 5: Store final LSE to gmemCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/flash_fwd_combine.py645 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW…el/ops/attention/cute_dsl/rel_mha/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…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.py1497 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py1521 # Step 2: shuffle w1 to the MFMA-tile layout the kernel expects.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py1592 # Step 3: materialise scalar / None args as device tensors so theCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py1629 # 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.py1499 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1511 # Step 2: shuffle w2 to MFMA-tile layout if the caller didn't.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1523 # Step 3: flatten the (token, slot) axes so each row is one routedCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1666 # Step 5: GEMM. Writes either to `partials` (reduce mode) or directlyCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1722 # Step 6: reduce. Sum partials[token, :, n] over the topk dimCOMMENT
Docstring Block Structure12 hits · 60 pts
SeverityFileLineSnippetContext
HIGH…ed/runtime/layers/attention/backends/cache_metadata.py197Return the unique full-history history-group table. Args: active_forward_op: The scheduler forward STRING
HIGH…ed/runtime/layers/attention/kv_cache/recipes/qwen35.py14Allow the structural K/V planes added by a Qwen MTP draft. Args: layer_types: Target-only attention labels,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/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/engine/scheduler_utils.py143Floor ``max_scheduled_tokens`` to the state-snapshot grain, if any. Recurrent-state groups (family=State, retentionSTRING
HIGHpython/tokenspeed/runtime/engine/scheduler_utils.py413Bridge the per-group block tables to GPU int32 tensors: absolute page indices, null hole = 0 preserved, ragged-row pSTRING
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…l/python/tokenspeed_kernel/ops/attention/score_mods.py54Build a memoized FA4 score_mod adding a learned relative-position bias. The returned closure adds ``rel_logits[globSTRING
HIGH…tokenspeed_kernel/ops/attention/triton/linear/chunk.py145 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, KSTRING
HIGH…n/tokenspeed_kernel/ops/attention/cute_dsl/dsa_topk.py95Length-aware per-row top-k over a dense indexer-logits matrix. Args: logits: 2-D row-major contiguous CUDA STRING
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICALtest/runtime/test_dspark_proposal.py169 drafter.markov_head.markov_w2.weight.data.zero_()CODE
CRITICALtest/runtime/test_dspark_proposal.py199 drafter.markov_head.markov_w1.weight.data.normal_(0.0, 3.0)CODE
CRITICALtest/runtime/test_dspark_proposal.py200 drafter.markov_head.markov_w2.weight.data.normal_(0.0, 3.0)CODE
CRITICAL…tokenspeed_kernel/ops/attention/triton/linear/utils.py146 triton.runtime.driver.active.utils.get_device_properties(i)[CODE
Self-Referential Comments8 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMpython/tokenspeed/runtime/layers/attention/registry.py394 # Create the full attention backend for standard MHA layers.COMMENT
MEDIUM…/tokenspeed/runtime/engine/data_parallel_controller.py261 # 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…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…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.py180 # Create a numpy arraySTRING
MEDIUMtokenspeed-mla/python/tokenspeed_mla/utils.py243 # Create a numpy arraySTRING
Modern AI Meta-Vocabulary7 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md27- [2026/05] 🚀 TokenSpeed hits 580 TPS on Qwen3.5-397B-A17B for agentic workloads. [[blog](https://pytorch.org/blog/up-toCODE
MEDIUMREADME.md40<img src="https://raw.githubusercontent.com/lightseekorg/tokenspeed/main/assets/perf/tokenspeed-kimi-k2.5-performance.pnCODE
MEDIUM…en3.5-397b-a17b-nvfp4-evalscope-agentic-b200-8gpu.yaml48 https://huggingface.co/datasets/lightseekorg/agentic-dataset/resolve/main/agentic_dataset.jsonCODE
MEDIUMtest/ci/perf/kimi-k2.5-nvfp4-evalscope-agentic.yaml53 https://huggingface.co/datasets/lightseekorg/agentic-dataset/resolve/main/agentic_dataset.jsonCODE
MEDIUM…ci/perf/qwen3.5-397b-a17b-nvfp4-evalscope-agentic.yaml49 https://huggingface.co/datasets/lightseekorg/agentic-dataset/resolve/main/agentic_dataset.jsonCODE
MEDIUMtest/cli/test_serve_smg_integration.py90 # test exercises orchestration/teardown, not tokenizer loading.COMMENT
MEDIUMpython/tokenspeed/runtime/models/kimi_k3_nextn.py397 # NextN scaffolding around the decoder layer.COMMENT
AI Slop Vocabulary4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMtest/runtime/test_detokenizer_parity.py73# Shared harnessCOMMENT
LOW…speed/runtime/layers/attention/linear/causal_conv1d.py171 # first chunk and does not have prior-token, so just set to 0COMMENT
MEDIUMtokenspeed-kernel/python/tokenspeed_kernel/selection.py756 # comprehensive warmup should pass explicit op signatures.COMMENT
MEDIUM…ops/attention/cute_dsl/rel_mha/flash_fwd_sm100_bias.py1574 # CLC buffers placed here to utilize padding before sO's 1024-byte alignment.COMMENT
Redundant / Tautological Comments6 hits · 9 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.py408 # Check if this was an abort/error created by schedulerCOMMENT
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
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…thon/tokenspeed/runtime/utils/hf_transformers_utils.py657 # Special handling for stop token <|eom_id|> generated by llama 3 tool use.COMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/runners.py319 # make sure to disable compileCOMMENT
LOW…/python/tokenspeed_kernel/ops/communication/deep_ep.py640 # 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.py1539def execute_task(CODE