AI Slop Code RIsk Monitor

state-spaces/mamba

Mamba SSM architecture

21.8 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for state-spaces/mamba, a Python project with 18,898 GitHub stars. SynthScan examined 30,340 lines of code across 85 source files, recording 400 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 21.8 (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.

21.8
Adjusted Signal
21.8
Raw Pattern Score
100%
Time Factor
2026-07-22
Last Push
18.9K
Stars
Python
Language
30.3K
Lines of Code
85
Files
400
Pattern Hits
2026-10-12
Scan Date
0.09
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 25.3/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 15.2/100 · LOW

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

Agent Over-Engineering Ratio 55.6/100 · HIGH

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

PR Review Velocity Impact 67.9/100 · HIGH

Which changes need focused human review? 400 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 0HIGH 8MEDIUM 125LOW 267

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 400 distinct pattern matches across 16 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.

Decorative Section Separators120 hits · 344 pts
SeverityFileLineSnippetContext
MEDIUMtests/ops/triton/test_mamba3_siso.py343# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py345# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py484# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py486# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py554# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py556# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py668# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py670# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py840# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py842# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py902# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py904# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py944# ==================================================================COMMENT
MEDIUMtests/ops/triton/test_mamba3_siso.py946# ==================================================================COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py1727# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py1729# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py2032# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py2034# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py2046# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py2048# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py2152# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/tilelang/test_mamba3_mimo.py2154# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/modules/test_mamba3_varlen.py21# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/modules/test_mamba3_varlen.py23# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/modules/test_mamba3_varlen.py55# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/modules/test_mamba3_varlen.py57# ---------------------------------------------------------------------------COMMENT
MEDIUMmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py845 # =========================================================================COMMENT
MEDIUMmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py847 # =========================================================================COMMENT
MEDIUMmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py879 # =========================================================================COMMENT
MEDIUMmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py881 # =========================================================================COMMENT
MEDIUMmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py915 # =========================================================================COMMENT
MEDIUMmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py917 # =========================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/angle_dt.py11# -----------------------------------------------------------------------------COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/angle_dt.py13# -----------------------------------------------------------------------------COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/angle_dt.py219# -----------------------------------------------------------------------------COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/angle_dt.py221# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1409# ============================================================================COMMENT
MEDIUM⚡mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1411# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py56# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py60# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py131# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py135# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py220# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py224# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py354# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py358# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py440# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py442# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py516# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py518# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py725# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py732# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1005# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1008# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1700# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1702# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1844# ============================================================================COMMENT
MEDIUMmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1846# ============================================================================COMMENT
MEDIUM⚡mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py396 # ============================================================COMMENT
MEDIUM⚡mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py399 # ============================================================COMMENT
60 more matches not shown…
Unused Imports102 hits · 100 pts
SeverityFileLineSnippetContext
LOWtests/test_generation.py8CODE
LOWtests/test_generation.py10CODE
LOWtests/ops/test_selective_scan.py3CODE
LOWtests/ops/test_selective_scan.py6CODE
LOWtests/ops/test_selective_scan.py9CODE
LOWtests/ops/cute/test_mamba3_mimo_step.py15CODE
LOWtests/ops/cute/test_mamba3_mimo_step.py18CODE
LOWtests/ops/triton/test_ssd.py1CODE
LOWtests/ops/triton/test_ssd.py8CODE
LOWtests/ops/triton/test_ssd.py10CODE
LOWtests/ops/triton/test_ssd.py13CODE
LOWtests/ops/triton/test_ssd.py13CODE
LOWtests/ops/triton/test_ssd.py15CODE
LOWtests/ops/triton/test_ssd.py15CODE
LOWtests/ops/triton/test_ssd.py16CODE
LOWtests/ops/triton/test_ssd.py16CODE
LOWtests/ops/triton/test_ssd.py16CODE
LOWtests/ops/triton/test_ssd.py16CODE
LOWtests/ops/triton/test_ssd.py17CODE
LOWtests/ops/triton/test_ssd.py17CODE
LOWtests/ops/triton/test_mamba3_siso.py15CODE
LOWtests/ops/triton/test_layernorm_gated.py1CODE
LOWtests/ops/triton/test_layernorm_gated.py8CODE
LOWtests/ops/triton/test_selective_state_update.py3CODE
LOWtests/ops/triton/test_selective_state_update.py6CODE
LOWtests/ops/triton/test_selective_state_update.py9CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py28CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py29CODE
LOWbenchmarks/benchmark_generation_mamba_simple.py5CODE
LOWbenchmarks/benchmark_generation_mamba_simple.py8CODE
LOWbenchmarks/benchmark_generation_mamba_simple.py10CODE
LOWmamba_ssm/__init__.py3CODE
LOWmamba_ssm/__init__.py3CODE
LOWmamba_ssm/__init__.py4CODE
LOWmamba_ssm/__init__.py5CODE
LOWmamba_ssm/__init__.py6CODE
LOWmamba_ssm/__init__.py7CODE
LOWmamba_ssm/distributed/distributed_utils.py1CODE
LOWmamba_ssm/utils/generation.py3CODE
LOWmamba_ssm/utils/generation.py4CODE
LOWmamba_ssm/utils/generation.py6CODE
LOWmamba_ssm/utils/generation.py7CODE
LOWmamba_ssm/utils/generation.py7CODE
LOWmamba_ssm/utils/generation.py10CODE
LOWmamba_ssm/utils/generation.py11CODE
LOWmamba_ssm/utils/generation.py11CODE
LOWmamba_ssm/utils/generation.py13CODE
LOWmamba_ssm/utils/generation.py13CODE
LOWmamba_ssm/utils/generation.py13CODE
LOWmamba_ssm/utils/torch.py2CODE
LOWmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py6CODE
LOWmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py16CODE
LOWmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py16CODE
LOWmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py16CODE
LOWmamba_ssm/ops/triton/selective_state_update.py6CODE
LOWmamba_ssm/ops/triton/ssd_state_passing.py6CODE
LOWmamba_ssm/ops/triton/ssd_state_passing.py13CODE
LOWmamba_ssm/ops/triton/ssd_combined.py6CODE
LOWmamba_ssm/ops/triton/ssd_combined.py13CODE
LOWmamba_ssm/ops/triton/ssd_combined.py33CODE
42 more matches not shown…
Hyper-Verbose Identifiers75 hits · 69 pts
SeverityFileLineSnippetContext
LOWsetup.py62def get_cuda_bare_metal_version(cuda_dir):CODE
LOW⚡tests/test_determinism.py194def test_combined_kernel_reproducible(case: str, d_has_hdim: bool, headdim: int, dstate: int):CODE
LOW⚡tests/test_determinism.py202def test_kernel_close_to_default(case: str, headdim: int, dstate: int):CODE
LOW⚡tests/test_determinism.py210def test_combined_kernel_close_to_default(case: str, d_has_hdim: bool, headdim: int, dstate: int):CODE
LOW⚡tests/test_determinism.py215def test_default_mode_is_not_reproducible():CODE
LOWtests/test_generation.py115def test_generation_varlen_with_padding():CODE
LOWtests/ops/cute/test_mamba3_mimo_step.py55def _require_cuda_and_kernel_deps() -> None:CODE
LOWtests/ops/triton/test_selective_state_update.py22def test_selective_state_update(dim, dstate, has_z, itype):CODE
LOWtests/ops/triton/test_selective_state_update.py66def test_selective_state_update_with_heads(dim, dstate, ngroups, has_z, tie_hdim, itype):CODE
LOWtests/ops/triton/test_selective_state_update.py112def test_selective_state_update_with_batch_indices(dim, dstate, has_z, itype):CODE
LOWtests/ops/triton/test_selective_state_update.py161def test_selective_state_update_with_heads_with_batch_indices(dim, dstate, ngroups, has_z, tie_hdim, itype):CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py71def _require_cuda_and_kernel_deps() -> None:CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py628 def apply_rotary_emb_rotate_half(tensor: Tensor, cos: Tensor, sin: Tensor) -> Tensor:CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py1596def test_mamba_mimo_smoke_forward_backward(mods: SimpleNamespace) -> None:CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py1640def test_mamba_mimo_smoke_forward_backward_varlen(mods: SimpleNamespace) -> None:CODE
LOWmamba_ssm/distributed/distributed_utils.py120def allreduce_sequence_parallel_grad(model: torch.nn.Module, process_group: ProcessGroup):CODE
LOW⚡mamba_ssm/utils/generation.py37def modify_logits_for_min_p_filtering(logits, min_p):CODE
LOW⚡mamba_ssm/utils/generation.py45def modify_logits_for_top_k_filtering(logits, top_k):CODE
LOW⚡mamba_ssm/utils/generation.py53def modify_logits_for_top_p_filtering(logits, top_p):CODE
LOWmamba_ssm/utils/generation.py69def modify_logit_for_repetition_penalty(logits, prev_output_tokens, repetition_penalty=1.0):CODE
LOWmamba_ssm/utils/determinism.py44def _filter_configs_by_block_sizes(configs):CODE
LOWmamba_ssm/ops/selective_scan_interface.py26def _check_selective_scan_cuda():CODE
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py195def _chunk_scan_fwd_kernel_wip(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py349def _chunk_scan_bwd_dz_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py449def _chunk_scan_bwd_dstates_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py530def _chunk_scan_bwd_dc_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py641def _chunk_scan_bwd_dx_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py774def _chunk_scan_bwd_dcb_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_state.py286def _chunk_state_bwd_dx_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_state.py398def _chunk_state_bwd_db_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_chunk_state.py640def _chunk_state_varlen_kernel(CODE
LOWmamba_ssm/ops/triton/selective_state_update.py24def _selective_scan_update_kernel(CODE
LOWmamba_ssm/ops/triton/selective_state_update.py224def selective_state_update_ref(state, x, dt, A, B, C, D=None, z=None, dt_bias=None, dt_softplus=False):CODE
LOWmamba_ssm/ops/triton/ssd_state_passing.py30def _state_passing_fwd_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_state_passing.py102def _state_passing_bwd_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_combined.py93def _chunk_scan_chunk_state_bwd_dx_kernel(CODE
LOWmamba_ssm/ops/triton/ssd_combined.py262def _chunk_scan_chunk_state_bwd_dx(x, dt, dA_cumsum, B, CB, dout, dstates, D=None, seq_idx=None, dx=None):CODE
LOWmamba_ssm/ops/triton/ssd_combined.py343def _mamba_chunk_scan_combined_fwd(x, dt, A, B, C, chunk_size, D=None, z=None, dt_bias=None, initial_states=None, seq_idCODE
LOWmamba_ssm/ops/triton/ssd_combined.py397def _mamba_chunk_scan_combined_bwd(dout, x, dt, A, B, C, out, chunk_size, D=None, z=None,CODE
LOWmamba_ssm/ops/triton/ssd_combined.py628def mamba_chunk_scan_combined(x, dt, A, B, C, chunk_size, D=None, z=None, dt_bias=None, initial_states=None, seq_idx=NonCODE
LOWmamba_ssm/ops/triton/ssd_combined.py687def ssd_chunk_scan_combined_ref(x, dt, A, B, C, chunk_size, D=None, z=None, dt_bias=None, dt_softplus=False):CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py16def rotary_qk_inference_kernel(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py151def apply_rotary_qk_inference_fwd(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py239def apply_rotary_qk_inference_reference(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py327def test_correctness_qk_inference():CODE
LOW⚡mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1413def test_bwd_ddt_fused_correctness():CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py72def bwd_dadt_cumsum_fused_kernel(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py369def dacs_segsum_kernel_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py610def compute_dacs_segsum_triton_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py691def compute_dacs_segsum_triton(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py852def compute_dacs_segsum_ref_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py907def bwd_dadt_fused_varlen_ref(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py959def compute_dtrap_ddt_varlen_ref(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1020def bwd_dadt_cumsum_fused_kernel_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1089def bwd_segsum_dadt_kernel_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1160def bwd_dtrap_ddt_kernel_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1255def _build_varlen_chunk_mapping(cu_seqlens: torch.Tensor, chunk_size: int):CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1311def bwd_dadt_fused_triton_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1367def bwd_dtrap_ddt_triton_varlen(CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py1458def test_dtrap_ddt_correctness():CODE
15 more matches not shown…
AI Structural Patterns39 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/ops/tilelang/test_mamba3_mimo.py131CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py200CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py487CODE
LOWmamba_ssm/utils/generation.py121CODE
LOWmamba_ssm/models/mixer_seq_simple.py30CODE
LOWmamba_ssm/models/mixer_seq_simple.py125CODE
LOWmamba_ssm/ops/selective_scan_interface.py386CODE
LOWmamba_ssm/ops/selective_scan_interface.py200CODE
LOWmamba_ssm/ops/triton/ssd_combined.py343CODE
LOWmamba_ssm/ops/triton/ssd_combined.py397CODE
LOWmamba_ssm/ops/triton/ssd_combined.py628CODE
LOWmamba_ssm/ops/triton/ssd_combined.py684CODE
LOWmamba_ssm/ops/triton/ssd_combined.py725CODE
LOWmamba_ssm/ops/triton/ssd_combined.py779CODE
LOWmamba_ssm/ops/triton/ssd_combined.py983CODE
LOWmamba_ssm/ops/triton/ssd_combined.py1006CODE
LOWmamba_ssm/ops/triton/ssd_combined.py599CODE
LOWmamba_ssm/ops/triton/ssd_combined.py824CODE
LOWmamba_ssm/ops/triton/layer_norm.py22CODE
LOWmamba_ssm/ops/triton/layer_norm.py77CODE
LOWmamba_ssm/ops/triton/layer_norm.py291CODE
LOWmamba_ssm/ops/triton/layer_norm.py589CODE
LOWmamba_ssm/ops/triton/layer_norm.py888CODE
LOWmamba_ssm/ops/triton/layer_norm.py922CODE
LOWmamba_ssm/ops/triton/layer_norm.py730CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py38CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py59CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py48CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py1343CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py65CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py693CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py1388CODE
LOWmamba_ssm/modules/mamba_simple.py32CODE
LOWmamba_ssm/modules/mamba2.py38CODE
LOWmamba_ssm/modules/mamba3.py44CODE
LOWmamba_ssm/modules/mamba3.py278CODE
LOWmamba_ssm/modules/mamba2_simple.py25CODE
LOWmamba_ssm/modules/mha.py47CODE
LOWmamba_ssm/modules/mha.py294CODE
Deep Nesting24 hits · 24 pts
SeverityFileLineSnippetContext
LOWsetup.py279CODE
LOWtests/test_determinism.py85CODE
LOWtests/ops/tilelang/test_mamba3_mimo.py487CODE
LOWmamba_ssm/utils/generation.py83CODE
LOWmamba_ssm/models/mixer_seq_simple.py92CODE
LOWmamba_ssm/ops/cute/mamba3/mamba3_step_fn.py227CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py327CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py38CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py467CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py72CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py59CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py585CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py132CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py48CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py665CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py1343CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py84CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py701CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py65CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py693CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py1388CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py119CODE
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py746CODE
LOWmamba_ssm/modules/mha.py201CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py29except Exception:CODE
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py79except Exception:CODE
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py165except Exception:CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_fwd.py0custom allocator for tma descriptor global memory allocation.STRING
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_step.py0custom allocator for tma descriptor global memory allocation.STRING
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py0custom allocator for tma descriptor global memory allocation.STRING
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py308Mamba-3 attention with Triton kernels and automatic differentiation. This is the main entry point for Mamba-3 forwaSTRING
HIGHmamba_ssm/ops/triton/mamba3/mamba3_siso_fwd.py477 Mamba-3 forward pass wrapper. Args: Q: Query tensor (batch, seqlen, nheads_qk, headdimSTRING
Over-Commented Block9 hits · 9 pts
SeverityFileLineSnippetContext
LOWcsrc/selective_scan/static_switch.h1// Inspired by https://github.com/NVIDIA/DALI/blob/main/include/dali/core/static_switch.hCOMMENT
LOWtests/ops/test_selective_scan.py241 # assert torch.allclose(A.grad, A_ref.grad, rtol=rtolw, atol=atolw * 5)COMMENT
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py261 # cb = tl.load(cb_ptrs, mask=(offs_m[:, None] < chunk_size) & (offs_m[None, :] < chunk_size), other=0.0).to(tl.floatCOMMENT
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py761 # triton.Config({'BLOCK_SIZE_M': 32}, num_stages=3, num_warps=4),COMMENT
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py1061 # dout = tl.load(dout_ptrs, mask=(offs_m[:, None] < chunk_size_limit) & (offs_k[None, :] < hdim), other=0.0)COMMENT
LOWmamba_ssm/ops/triton/ssd_chunk_scan.py1141 dA_cs_m = tl.load(dA_cumsum_ptr + offs_m * stride_dA_cs_csize, mask=offs_m < chunk_size, other=0.0).to(tl.float32)COMMENT
LOWmamba_ssm/ops/triton/ssd_combined.py481 dB, ddA_next = _chunk_state_bwd_db(x, dt, dA_cumsum, dstates, seq_idx=seq_idx, B=B, ngroups=ngroups)COMMENT
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py241 T.copy(T.view(k_frag, shape=[fused_chunk_size, N]), k_shared)COMMENT
LOWmamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py341 T.copy(T.view(k_frag, shape=[fused_chunk_size, N]), k_shared)COMMENT
Verbosity Indicators5 hits · 9 pts
SeverityFileLineSnippetContext
LOW⚡mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py191 # Step 1: Compute dZ and scale grad_out if Z gating is presentCOMMENT
LOW⚡mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py200 # Step 2: Compute main gradients (dQ_mid, dK_mid, dV, dADT, dQK_dot, dD, dInput_SSM_State)COMMENT
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py218 # Step 3: Compute gradients through rotary embeddings and biasesCOMMENT
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py235 # Step 4: Compute dDT, dTrap, and input state gradientsCOMMENT
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py247 # Step 5: Compute gradients through angle_dt cumsumCOMMENT
Structural Annotation Overuse5 hits · 9 pts
SeverityFileLineSnippetContext
LOW⚡mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py191 # Step 1: Compute dZ and scale grad_out if Z gating is presentCOMMENT
LOW⚡mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py200 # Step 2: Compute main gradients (dQ_mid, dK_mid, dV, dADT, dQK_dot, dD, dInput_SSM_State)COMMENT
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py218 # Step 3: Compute gradients through rotary embeddings and biasesCOMMENT
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py235 # Step 4: Compute dDT, dTrap, and input state gradientsCOMMENT
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py247 # Step 5: Compute gradients through angle_dt cumsumCOMMENT
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMmamba_ssm/distributed/tensor_parallel.py217 # Create a mask of valid vocab ids (1 means it needs to be masked).COMMENT
MEDIUMmamba_ssm/models/mixer_seq_simple.py52 # Create a copy of the config to modifyCOMMENT
Dead Code3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMmamba_ssm/utils/hf.py20CODE
MEDIUMmamba_ssm/utils/hf.py22CODE
MEDIUMmamba_ssm/utils/hf.py23CODE
Excessive Try-Catch Wrapping4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsetup.py80 except Exception as e:CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py29except Exception:CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py79 except Exception:CODE
LOWmamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py165 except Exception:CODE
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWmamba_ssm/ops/selective_scan_interface.py82 # Here we just pass in None and dz will be allocated in the C++ code.COMMENT
LOWmamba_ssm/ops/triton/ssd_combined.py583 # Here we just pass in None and dz will be allocated in the C++ code.COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_determinism.py9def _set_deterministic(enabled: bool) -> None:CODE
LOWtests/test_determinism.py15def _set_seeds(seed: int) -> None:CODE