Repository Analysis

fla-org/flash-linear-attention

🚀 Efficient implementations for emerging model architectures

17.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of fla-org/flash-linear-attention, a Python project with 5,653 GitHub stars. SynthScan v2.0 examined 196,151 lines of code across 732 source files, recording 2452 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 17.3 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).

17.3
Adjusted Score
17.3
Raw Score
100%
Time Factor
2026-08-28
Last Push
5.7K
Stars
Python
Language
196.2K
Lines of Code
732
Files
2.5K
Pattern Hits
2026-08-29
Scan Date
0.11
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 14HIGH 66MEDIUM 247LOW 2125

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 2452 distinct pattern matches across 20 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 Identifiers781 hits · 807 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py16def test_assert_close_accepts_close_tensors_and_rejects_mismatch():CODE
LOWtests/test_utils.py26def test_tensor_cache_uses_identity_until_disabled(monkeypatch):CODE
LOWtests/test_utils.py49def test_input_guard_makes_tensors_contiguous_except_skipped():CODE
LOWtests/test_utils.py78def test_deprecate_kwarg_renames_old_keyword_and_warns():CODE
LOWtests/test_utils.py92def test_deprecate_kwarg_can_raise_when_both_names_are_set():CODE
LOWtests/test_utils.py101def test_public_utils_are_reexported():CODE
LOWtests/test_split_package_release.py112def test_split_wheels_match_release_contract(tmp_path: Path) -> None:CODE
LOWtests/test_split_package_release.py150def test_core_then_extension_install_sequence_without_runtime_deps(tmp_path: Path) -> None:CODE
LOWtests/test_split_package_release.py203def test_core_only_import_with_repo_root_on_path(tmp_path: Path) -> None:STRING
LOWtests/test_split_package_release.py247def test_split_namespace_across_sys_path_entries_without_runtime_deps(tmp_path: Path) -> None:STRING
LOWtests/test_split_package_release.py273def test_full_split_import_contract_when_runtime_dependencies_available(tmp_path: Path) -> None:STRING
LOWtests/test_public_api.py13def test_top_level_exports_layers_and_non_config_models():CODE
LOWtests/layers/test_attn_varlen_pack_layout.py37def test_attention_varlen_accepts_batched_layout_with_cu_seqlens(B: int, T: int, H: int, D: int):CODE
LOWtests/layers/test_attn_varlen_pack_layout.py126def test_layer_prefers_explicit_cu_seqlens_over_attention_mask(layer_cls: type, layer_kwargs: dict) -> None:CODE
LOWtests/layers/test_gated_deltanet.py18def test_gated_deltanet_eval_with_grad_uses_chunk(mode: str):CODE
LOWtests/layers/test_gated_deltanet.py52def test_gated_deltanet_fused_qkv_conv_matches_fallback(B: int, T: int, D: int, dtype: torch.dtype):CODE
LOWtests/layers/test_layer_cache_layer_idx.py182def test_cache_requires_layer_idx(builder, hidden_states):CODE
LOWtests/layers/test_layer_cache_layer_idx.py218def test_layers_without_cache_still_work_with_layer_idx_none(builder, hidden_states):CODE
LOWtests/layers/test_parallax_cache.py17def test_empty_sliding_window_cache_prefill(dtype: torch.dtype):CODE
LOWtests/utils/test_ascend_ub_manager.py53 def test_normalize_tiling_dims_int_and_tuple(self):CODE
LOWtests/utils/test_ascend_ub_manager.py59 def test_default_strategy_empty_inputs(self):CODE
LOWtests/utils/test_ascend_ub_manager.py67 def test_default_strategy_invalid_tiling_dim(self):CODE
LOWtests/utils/test_ascend_ub_manager.py77 def test_default_strategy_power_of_two_block(self, ub_capacity_bits):CODE
LOWtests/utils/test_ascend_ub_manager.py93 def test_explicit_capacity_properties(self):CODE
LOWtests/utils/test_ascend_ub_manager.py103 def test_invalid_env_var_falls_back(self, monkeypatch):CODE
LOWtests/utils/test_ascend_ub_manager.py112 def test_npu_unavailable_fallback(self, monkeypatch):CODE
LOWtests/utils/test_ascend_ub_manager.py121 def test_get_ub_manager_singleton(self, monkeypatch):CODE
LOWtests/utils/test_ascend_ub_manager.py130 def test_returns_none_for_invalid_inputs(self, monkeypatch):CODE
LOWtests/utils/test_ascend_ub_manager.py194 def test_compute_ub_block_size_respects_bounds(self):CODE
LOWtests/utils/test_ascend_ub_manager.py203 def test_compute_ub_block_size_uses_desired_override(self):CODE
LOWtests/utils/test_ascend_ub_manager.py212 def test_compute_vocab_block_size_respects_grid_limit(self):CODE
LOWtests/utils/test_ascend_ub_manager.py224 def test_compute_elementwise_block_size(self):CODE
LOWtests/utils/test_ascend_ub_manager.py230 def test_compute_activation_block_size_forward_and_backward(self):CODE
LOWtests/utils/test_ascend_ub_manager.py239 def test_compute_row_tile_block_size_row_and_col(self):CODE
LOWtests/utils/test_ascend_ub_manager.py257 def test_compute_grid_limited_tile_size(self):CODE
LOWtests/utils/test_ascend_ub_manager.py264 def test_max_grid_axis_chunks(self):CODE
LOWtests/utils/test_ascend_ub_manager.py269 def test_iter_axis_launch_chunks_covers_axis(self):CODE
LOWtests/utils/test_ascend_ub_manager.py279 def test_iter_axis_launch_chunks_single_chunk(self):CODE
LOWtests/utils/test_ascend_ub_manager.py285 def test_returns_bool_without_crashing(self):CODE
LOWtests/utils/test_ascend_ub_manager.py295 def test_is_npu_available_on_device(self):CODE
LOWtests/utils/test_ascend_ub_manager.py299 def test_ub_manager_detects_soc_ub_size(self):CODE
LOWtests/utils/test_ascend_ub_manager.py311 def test_ub_manager_detects_npu_model(self):CODE
LOWtests/utils/test_ascend_ub_manager.py317 def test_get_ub_manager_singleton_uses_detected_capacity(self):CODE
LOWtests/utils/test_ascend_ub_manager.py327 def test_env_var_overrides_soc_detection(self, monkeypatch):CODE
LOWtests/utils/test_ascend_ub_manager.py333 def test_compute_default_tiling_strategy_with_real_ub(self):CODE
LOWtests/utils/test_ascend_ub_manager.py352 def test_compute_ub_block_size_with_real_ub(self):CODE
LOWtests/utils/test_ascend_ub_manager.py356 def test_compute_activation_block_size_with_real_ub(self):CODE
LOWtests/utils/test_ascend_ub_manager.py364 def test_real_ub_exceeds_fallback_capacity(self):CODE
LOWtests/utils/test_ascend_ub_manager.py41def reset_ub_manager_singleton():CODE
LOWtests/utils/test_ascend_ub_manager.py167 def test_non_tiling_dims_padded_to_power_of_two(self, monkeypatch):CODE
LOWtests/utils/test_ascend_ub_manager.py180 def test_invalid_tiling_dim_raises(self, monkeypatch):CODE
LOWtests/models/test_modeling_yoco.py22def _create_yoco_config_kwargs(CODE
LOWtests/models/test_hybrid_attention.py180def test_normalize_invalid_structure(attn, match):CODE
LOWtests/models/test_hybrid_attention.py186def test_normalize_invalid_num_heads(value):CODE
LOWtests/models/test_hybrid_attention.py192def test_normalize_invalid_num_kv_heads(value):CODE
LOWtests/models/test_hybrid_attention.py201def test_normalize_invalid_qkv_bias(value):CODE
LOWtests/models/test_hybrid_attention.py207def test_normalize_invalid_window_size(value):CODE
LOWtests/models/test_hybrid_attention.py216def test_normalize_invalid_rope_theta(value):CODE
LOWtests/models/test_hybrid_attention.py221def test_list_error_identifies_specification_index_and_value():CODE
LOWtests/models/test_hybrid_attention.py362def test_config_assignment_rejects_invalid_plan():CODE
721 more matches not shown…
Decorative Section Separators231 hits · 729 pts
SeverityFileLineSnippetContext
MEDIUMtests/conftest.py29# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/conftest.py31# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/models/test_modeling_deltaformer.py22# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltaformer.py24# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltaformer.py61# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltaformer.py63# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_log_linear_mamba2.py17# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_log_linear_mamba2.py19# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_yoco.py86# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_yoco.py88# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_yoco.py137# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_yoco.py139# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_wall_transformer.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_wall_transformer.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_wall_transformer.py54# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_wall_transformer.py56# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_gated_deltanet.py21# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_gated_deltanet.py23# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_gated_deltanet.py46# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_gated_deltanet.py48# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_gated_deltanet.py69# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_gated_deltanet.py71# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_path_attn.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_path_attn.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_path_attn.py53# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_path_attn.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_lightnet.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_lightnet.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_lightnet.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_lightnet.py57# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gsa.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gsa.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gsa.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gsa.py57# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_hgrn.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_hgrn.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_hgrn.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_hgrn.py57# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_mom.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_mom.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_mom.py56# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_mom.py58# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_kda.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_kda.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_kda.py39# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_precond_kda.py41# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_kda.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_kda.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_kda.py54# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_kda.py56# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltanet.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltanet.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltanet.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_deltanet.py57# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_forgetting_transformer.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_forgetting_transformer.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_forgetting_transformer.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_forgetting_transformer.py57# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gated_deltaproduct.py19# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gated_deltaproduct.py21# ===================================================================================COMMENT
171 more matches not shown…
Unused Imports602 hits · 504 pts
SeverityFileLineSnippetContext
LOWevals/harness.py8CODE
LOWevals/harness.py10CODE
LOWtests/layers/test_attn_varlen_pack_layout.py30CODE
LOWtests/models/test_modeling_yoco.py16CODE
LOW…s/skills/fla-ascend-performance/scripts/profile_npu.py35CODE
LOW…ills/fla-ascend-performance/scripts/analyze_profile.py17CODE
LOWlegacy/training/run.py14CODE
LOWlegacy/training/preprocess.py8CODE
LOWlegacy/training/flame/parser.py8CODE
LOWlegacy/training/flame/data.py8CODE
LOWutils/convert_from_llama.py37CODE
LOWutils/convert_from_rwkv7.py17CODE
LOWutils/convert_from_rwkv6.py35CODE
LOWbenchmarks/visualize.py27CODE
LOWbenchmarks/benchmark_generation.py15CODE
LOWbenchmarks/ops/run.py136CODE
LOWbenchmarks/ops/registry.py14CODE
LOWbenchmarks/ops/verify.py52CODE
LOWbenchmarks/modules/runner.py10CODE
LOWscripts/utils/__init__.py8CODE
LOWscripts/utils/__init__.py9CODE
LOWscripts/utils/__init__.py9CODE
LOWfla/layers/precond_kda.py8CODE
LOWfla/layers/hgrn.py10CODE
LOWfla/layers/raven.py11CODE
LOWfla/layers/precond_gated_deltanet.py8CODE
LOWfla/layers/hgrn2.py10CODE
LOWfla/layers/deltaformer.py8CODE
LOWfla/layers/mom.py8CODE
LOWfla/layers/delta_net.py8CODE
LOWfla/layers/mamba.py8CODE
LOWfla/layers/kda.py8CODE
LOWfla/layers/bitattn.py8CODE
LOWfla/layers/mamba2.py8CODE
LOWfla/layers/rwkv7.py8CODE
LOWfla/layers/yoco.py8CODE
LOWfla/layers/gsa.py8CODE
LOWfla/layers/parallax.py11CODE
LOWfla/layers/mamba3.py8CODE
LOWfla/layers/rwkv6.py10CODE
LOWfla/layers/__init__.py8CODE
LOWfla/layers/__init__.py9CODE
LOWfla/layers/__init__.py10CODE
LOWfla/layers/__init__.py11CODE
LOWfla/layers/__init__.py12CODE
LOWfla/layers/__init__.py13CODE
LOWfla/layers/__init__.py14CODE
LOWfla/layers/__init__.py15CODE
LOWfla/layers/__init__.py16CODE
LOWfla/layers/__init__.py17CODE
LOWfla/layers/__init__.py18CODE
LOWfla/layers/__init__.py19CODE
LOWfla/layers/__init__.py20CODE
LOWfla/layers/__init__.py21CODE
LOWfla/layers/__init__.py22CODE
LOWfla/layers/__init__.py23CODE
LOWfla/layers/__init__.py24CODE
LOWfla/layers/__init__.py25CODE
LOWfla/layers/__init__.py26CODE
LOWfla/layers/__init__.py27CODE
542 more matches not shown…
AI Structural Patterns271 hits · 269 pts
SeverityFileLineSnippetContext
LOWtests/models/test_modeling_mamba2.py142CODE
LOW…s/skills/fla-ascend-performance/scripts/profile_npu.py74CODE
LOWlegacy/training/preprocess.py69CODE
LOWbenchmarks/benchmark_training_throughput.py88CODE
LOWbenchmarks/cp/test_gdn_with_cp.py257CODE
LOWbenchmarks/cp/test_gdn_with_cp.py269CODE
LOWbenchmarks/cp/test_gdn_with_cp.py351CODE
LOWbenchmarks/cp/test_gdn_with_cp.py503CODE
LOWfla/layers/precond_kda.py86CODE
LOWfla/layers/hgrn.py31CODE
LOWfla/layers/raven.py44CODE
LOWfla/layers/precond_gated_deltanet.py98CODE
LOWfla/layers/hgrn2.py33CODE
LOWfla/layers/deltaformer.py63CODE
LOWfla/layers/mom.py294CODE
LOWfla/layers/delta_net.py77CODE
LOWfla/layers/mamba.py54CODE
LOWfla/layers/kda.py83CODE
LOWfla/layers/bitattn.py40CODE
LOWfla/layers/mamba2.py113CODE
LOWfla/layers/rwkv7.py34CODE
LOWfla/layers/yoco.py93CODE
LOWfla/layers/yoco.py236CODE
LOWfla/layers/yoco.py326CODE
LOWfla/layers/gsa.py32CODE
LOWfla/layers/parallax.py64CODE
LOWfla/layers/mamba3.py64CODE
LOWfla/layers/rwkv6.py32CODE
LOWfla/layers/wall_attn.py69CODE
LOWfla/layers/rebased.py25CODE
LOWfla/layers/path_attn.py31CODE
LOWfla/layers/simple_gla.py68CODE
LOWfla/layers/gla.py75CODE
LOWfla/layers/comba.py82CODE
LOWfla/layers/log_linear_mamba2.py43CODE
LOWfla/layers/log_linear_mamba2.py269CODE
LOWfla/layers/log_linear_mamba2.py130CODE
LOWfla/layers/log_linear_mamba2.py280CODE
LOWfla/layers/rodimus.py64CODE
LOWfla/layers/rodimus.py242CODE
LOWfla/layers/forgetting_attn.py32CODE
LOWfla/layers/gated_deltaproduct.py35CODE
LOWfla/layers/moba.py92CODE
LOWfla/layers/lightnet.py32CODE
LOWfla/layers/linear_attn.py28CODE
LOWfla/layers/mesa_net.py59CODE
LOWfla/layers/mla.py55CODE
LOWfla/layers/multiscale_retention.py70CODE
LOWfla/layers/nsa.py30CODE
LOWfla/layers/attn.py39CODE
LOWfla/layers/gated_deltanet.py88CODE
LOWfla/layers/abc.py28CODE
LOWfla/layers/gdn2.py88CODE
LOWfla/models/utils.py227CODE
LOWfla/models/utils.py398CODE
LOWfla/models/kda/configuration_kda.py17CODE
LOWfla/models/kda/modeling_kda.py288CODE
LOWfla/models/kda/modeling_kda.py406CODE
LOWfla/models/abc/modeling_abc.py262CODE
LOWfla/models/abc/modeling_abc.py377CODE
211 more matches not shown…
Deep Nesting182 hits · 182 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py38CODE
LOWtests/models/test_modeling_utils.py54CODE
LOWtests/ops/test_dplr_tilelang.py205CODE
LOWtests/ops/utils/test_csr.py47CODE
LOWtests/context_parallel/test_cp_dplr.py75CODE
LOWtests/context_parallel/test_cp_kda.py103CODE
LOWtests/context_parallel/test_cp_gdn.py100CODE
LOWlegacy/training/flame/data.py186CODE
LOWbenchmarks/benchmark_training_throughput.py88CODE
LOWbenchmarks/visualize.py150CODE
LOWbenchmarks/ops/run.py277CODE
LOWbenchmarks/ops/registry.py214CODE
LOWbenchmarks/modules/runner.py41CODE
LOWbenchmarks/modules/benchmark_cross_entropy.py37CODE
LOWbenchmarks/modules/benchmark_conv.py36CODE
LOWbenchmarks/modules/benchmark_layernorm.py51CODE
LOWbenchmarks/modules/benchmark_activations.py68CODE
LOWscripts/find_dependent_tests.py39CODE
LOWscripts/find_dependent_tests.py81CODE
LOWscripts/find_dependent_tests.py102CODE
LOWscripts/find_dependent_tests.py204CODE
LOWscripts/run_benchmark_compare.py79CODE
LOWscripts/run_benchmark_compare.py209CODE
LOWscripts/run_benchmark_compare.py310CODE
LOWscripts/utils/autotune_export.py241CODE
LOWscripts/utils/autotune_export.py192CODE
LOWfla/layers/delta_net.py170CODE
LOWfla/layers/mamba2.py275CODE
LOWfla/layers/rwkv6.py213CODE
LOWfla/layers/log_linear_mamba2.py43CODE
LOWfla/layers/log_linear_mamba2.py130CODE
LOWfla/layers/log_linear_mamba2.py439CODE
LOWfla/layers/linear_attn.py28CODE
LOWfla/layers/multiscale_retention.py171CODE
LOWfla/utils/ascend_ub_manager.py75CODE
LOWfla/models/utils.py42CODE
LOWfla/models/utils.py227CODE
LOWfla/models/utils.py467CODE
LOWfla/models/utils.py497CODE
LOWfla/models/kda/modeling_kda.py198CODE
LOWfla/models/kda/modeling_kda.py406CODE
LOWfla/models/abc/modeling_abc.py188CODE
LOWfla/models/abc/modeling_abc.py377CODE
LOWfla/models/delta_net/modeling_delta_net.py188CODE
LOWfla/models/delta_net/modeling_delta_net.py377CODE
LOW…dels/gated_deltaproduct/modeling_gated_deltaproduct.py187CODE
LOW…dels/gated_deltaproduct/modeling_gated_deltaproduct.py379CODE
LOWfla/models/gsa/modeling_gsa.py191CODE
LOWfla/models/gsa/modeling_gsa.py381CODE
LOWfla/models/moba/modeling_moba.py172CODE
LOWfla/models/moba/modeling_moba.py344CODE
LOW…models/log_linear_mamba2/modeling_log_linear_mamba2.py162CODE
LOW…models/log_linear_mamba2/modeling_log_linear_mamba2.py434CODE
LOWfla/models/deltaformer/modeling_deltaformer.py333CODE
LOWfla/models/hgrn/modeling_hgrn.py184CODE
LOWfla/models/hgrn/modeling_hgrn.py381CODE
LOWfla/models/transformer/modeling_transformer.py379CODE
LOWfla/models/yoco/modeling_yoco.py333CODE
LOWfla/models/yoco/modeling_yoco.py663CODE
LOWfla/models/mamba/modeling_mamba.py110CODE
122 more matches not shown…
Hallucination Indicators14 hits · 180 pts
SeverityFileLineSnippetContext
CRITICALutils/convert_from_llama.py170 model.model.norm.weight.data.copy_(llama.model.norm.weight)CODE
CRITICALutils/convert_from_llama.py174 model.model.norm.bias.data.copy_(llama.model.norm.bias)CODE
CRITICALutils/convert_from_rwkv6.py65 model.model.embeddings.weight.data.copy_(rwkv6.rwkv.embeddings.weight)CODE
CRITICALutils/convert_from_rwkv6.py114 model.model.layers[i].attn.r_proj.linear.weight.data.copy_(rwkv6.rwkv.blocks[i].attention.receptance.weight)CODE
CRITICALutils/convert_from_rwkv6.py131 model.model.layers[i].attn.k_proj.linear.weight.data.copy_(rwkv6.rwkv.blocks[i].attention.key.weight)CODE
CRITICALutils/convert_from_rwkv6.py135 model.model.layers[i].attn.v_proj.linear.weight.data.copy_(rwkv6.rwkv.blocks[i].attention.value.weight)CODE
CRITICALutils/convert_from_rwkv6.py139 model.model.layers[i].attn.g_proj.linear.weight.data.copy_(rwkv6.rwkv.blocks[i].attention.gate.weight)CODE
CRITICALutils/convert_from_rwkv6.py172 model.model.layers[i].ffn.key.linear.weight.data.copy_(rwkv6.rwkv.blocks[i].feed_forward.key.weight)CODE
CRITICALutils/convert_from_rwkv6.py186 model.model.layers[i].ffn.receptance.linear.weight.data.copy_(rwkv6.rwkv.blocks[i].feed_forward.receptance.weighCODE
CRITICALutils/convert_from_rwkv6.py196 model.model.norm.weight.data.copy_(rwkv6.rwkv.ln_out.weight)CODE
CRITICALutils/convert_from_rwkv6.py200 model.model.norm.bias.data.copy_(rwkv6.rwkv.ln_out.bias)CODE
CRITICALfla/utils/_device.py84 return triton.runtime.driver.active.utils.get_device_properties(tensor_idx)['multiprocessor_count']CODE
CRITICALfla/utils/_device.py89 props = triton.runtime.driver.active.utils.get_device_properties(tensor_idx)CODE
CRITICALfla/utils/_device.py188 triton.runtime.driver.active.utils.get_device_properties(i)['max_shared_mem']CODE
Cross-File Repetition36 hits · 180 pts
SeverityFileLineSnippetContext
HIGHtests/models/test_modeling_log_linear_mamba2.py0test the forward and backward pass of the mamba3 model by manually instantiating the configuration and the model.STRING
HIGHtests/models/test_modeling_mamba2.py0test the forward and backward pass of the mamba3 model by manually instantiating the configuration and the model.STRING
HIGHtests/models/test_modeling_mamba3.py0test the forward and backward pass of the mamba3 model by manually instantiating the configuration and the model.STRING
HIGHtests/context_parallel/test_cp_conv.py0initialize distributed environment for a single process.STRING
HIGHtests/context_parallel/test_cp_token_shift.py0initialize distributed environment for a single process.STRING
HIGHtests/context_parallel/test_cp_dplr.py0initialize distributed environment for a single process.STRING
HIGHtests/context_parallel/test_cp_kda.py0initialize distributed environment for a single process.STRING
HIGHtests/context_parallel/test_cp_gdn.py0initialize distributed environment for a single process.STRING
HIGHtests/context_parallel/test_cp_conv.py0worker function for cp gdn test. runs in a spawned process with the given rank.STRING
HIGHtests/context_parallel/test_cp_dplr.py0worker function for cp gdn test. runs in a spawned process with the given rank.STRING
HIGHtests/context_parallel/test_cp_kda.py0worker function for cp gdn test. runs in a spawned process with the given rank.STRING
HIGHtests/context_parallel/test_cp_gdn.py0worker function for cp gdn test. runs in a spawned process with the given rank.STRING
HIGHtests/context_parallel/test_cp_conv.py0run cp test using torch.multiprocessing.spawn. this allows running the test directly with pytest.STRING
HIGHtests/context_parallel/test_cp_dplr.py0run cp test using torch.multiprocessing.spawn. this allows running the test directly with pytest.STRING
HIGHtests/context_parallel/test_cp_kda.py0run cp test using torch.multiprocessing.spawn. this allows running the test directly with pytest.STRING
HIGHtests/context_parallel/test_cp_gdn.py0run cp test using torch.multiprocessing.spawn. this allows running the test directly with pytest.STRING
HIGHtests/context_parallel/test_cp_token_shift.py0cp2: sequence boundaries aligned with rank boundaries.STRING
HIGHtests/context_parallel/test_cp_dplr.py0cp2: sequence boundaries aligned with rank boundaries.STRING
HIGHtests/context_parallel/test_cp_kda.py0cp2: sequence boundaries aligned with rank boundaries.STRING
HIGHtests/context_parallel/test_cp_gdn.py0cp2: sequence boundaries aligned with rank boundaries.STRING
HIGHtests/context_parallel/test_cp_dplr.py0cp4: complex sequence distribution, first sequence spans 3 ranks.STRING
HIGHtests/context_parallel/test_cp_kda.py0cp4: complex sequence distribution, first sequence spans 3 ranks.STRING
HIGHtests/context_parallel/test_cp_gdn.py0cp4: complex sequence distribution, first sequence spans 3 ranks.STRING
HIGHfla/layers/mamba.py0compute ∆, a, b, c, and d the state space parameters and compute the `contextualized_states`. a, d are input independentSTRING
HIGHfla/layers/mamba2.py0compute ∆, a, b, c, and d the state space parameters and compute the `contextualized_states`. a, d are input independentSTRING
HIGHfla/layers/log_linear_mamba2.py0compute ∆, a, b, c, and d the state space parameters and compute the `contextualized_states`. a, d are input independentSTRING
HIGH…models/log_linear_mamba2/modeling_log_linear_mamba2.py0an abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.STRING
HIGHfla/models/mamba/modeling_mamba.py0an abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.STRING
HIGHfla/models/mamba2/modeling_mamba2.py0an abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.STRING
HIGHfla/models/samba/modeling_samba.py0an abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.STRING
HIGHfla/ops/retention/chunk.py0args: q (torch.tensor): queries of shape `[b, t, h, k]`. k (torch.tensor): keys of shape `[b, t, h, k]`. v (torch.tensorSTRING
HIGHfla/ops/retention/fused_chunk.py0args: q (torch.tensor): queries of shape `[b, t, h, k]`. k (torch.tensor): keys of shape `[b, t, h, k]`. v (torch.tensorSTRING
HIGHfla/ops/generalized_delta_rule/iplr/chunk.py0args: q (torch.tensor): queries of shape `[b, t, h, k]`. k (torch.tensor): keys of shape `[b, t, h, k]`. v (torch.tensorSTRING
HIGHfla/ops/linear_attn/chunk.py0args: q (torch.tensor): queries of shape `[b, t, h, k]`. k (torch.tensor): keys of shape `[b, t, h, k]`. v (torch.tensorSTRING
HIGHfla/ops/linear_attn/fused_chunk.py0args: q (torch.tensor): queries of shape `[b, t, h, k]`. k (torch.tensor): keys of shape `[b, t, h, k]`. v (torch.tensorSTRING
HIGHfla/ops/linear_attn/fused_recurrent.py0args: q (torch.tensor): queries of shape `[b, t, h, k]`. k (torch.tensor): keys of shape `[b, t, h, k]`. v (torch.tensorSTRING
Docstring Block Structure29 hits · 145 pts
SeverityFileLineSnippetContext
HIGHlegacy/training/preprocess.py29 Tokenize the input text and split into chunks of specified context length. Args: examples: STRING
HIGHfla/utils/_decorators.py195 Decorator to notify users about deprecated keyword arguments, replacing them with a new name if specified. ThiSTRING
HIGHfla/utils/ascend_ub_manager.py286 Compute tiling strategy using the default strategy function. This function directly calls the default strategySTRING
HIGHfla/ops/kda/chunk.py201 Args: q (torch.Tensor): queries of shape ``[B, T, H, K]``. k (torch.Tensor): STRING
HIGHfla/ops/kda/fused_recurrent.py359 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/delta_rule/chunk.py240 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/delta_rule/fused_recurrent.py454 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gated_delta_rule/chunk.py416 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gated_delta_rule/fused_recurrent.py330 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gsa/chunk.py1141 Args: q (torch.Tensor): queries of shape `[B, T, HQ, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gsa/fused_recurrent.py445 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/moba/parallel.py305Flash-attn based MoBA implementation. MoBA (Mixture of Block Attention, https://arxiv.org/abs/2502.13189) makes STRING
HIGHfla/ops/hgrn/fused_recurrent.py269 Args: x (torch.Tensor): inputs of shape `[B, T, D]. g (torch.Tensor): ForgeSTRING
HIGHfla/ops/gated_delta_product/chunk.py273 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/precond_kda/chunk.py594 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/precond_kda/fused_recurrent.py442 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/precond_gated_delta_rule/chunk.py431 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/precond_gated_delta_rule/fused_recurrent.py369 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/simple_gla/chunk.py252 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/simple_gla/fused_chunk.py24 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/simple_gla/fused_recurrent.py29 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gla/chunk.py1439 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gla/fused_recurrent.py29 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/mesa_net/chunk.py322 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` k (torch.Tensor): kSTRING
HIGHfla/ops/gdn2/chunk.py216 Chunkwise forward for Gated DeltaNet 2 (GDN-2). The matrix-state recurrence on ``S in R^{K x V}`` is STRING
HIGHfla/ops/comba/chunk.py308 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/comba/fused_recurrent.py238 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/rwkv6/chunk.py1284 Args: r (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/rwkv6/fused_recurrent.py588 Args: r (torch.Tensor): reception of shape `[B, T, H, K]`. Alias: q, query in lineaSTRING
Modern Structural Boilerplate122 hits · 121 pts
SeverityFileLineSnippetContext
LOWbenchmarks/ops/run.py165logger = logging.getLogger(__name__)CODE
LOWbenchmarks/ops/registry.py24logger = logging.getLogger(__name__)CODE
LOWscripts/utils/__init__.py11__all__ = [CODE
LOWscripts/utils/autotune_export.py137 def update_default_config(self) -> None:CODE
LOWfla/layers/__init__.py48__all__ = [CODE
LOWfla/utils/_device.py22logger = logging.getLogger(__name__)CODE
LOWfla/utils/_testing.py15logger = logging.getLogger(__name__)CODE
LOWfla/utils/_compat.py24logger = logging.getLogger(__name__)CODE
LOWfla/models/__init__.py58__all__ = [CODE
LOWfla/models/kda/__init__.py17__all__ = ['KDAConfig', 'KDAForCausalLM', 'KDAModel']CODE
LOWfla/models/abc/__init__.py18__all__ = ['ABCConfig', 'ABCForCausalLM', 'ABCModel']CODE
LOWfla/models/delta_net/__init__.py17__all__ = ['DeltaNetConfig', 'DeltaNetForCausalLM', 'DeltaNetModel']CODE
LOWfla/models/gated_deltaproduct/__init__.py17__all__ = [CODE
LOWfla/models/gsa/__init__.py18__all__ = ['GSAConfig', 'GSAForCausalLM', 'GSAModel']CODE
LOWfla/models/moba/__init__.py18__all__ = ['MoBAConfig', 'MoBAForCausalLM', 'MoBAModel']CODE
LOWfla/models/log_linear_mamba2/__init__.py18__all__ = ['LogLinearMamba2Config', 'LogLinearMamba2ForCausalLM', 'LogLinearMamba2Model']CODE
LOWfla/models/deltaformer/__init__.py17__all__ = ['DeltaFormerConfig', 'DeltaFormerForCausalLM', 'DeltaFormerModel']CODE
LOWfla/models/hgrn/__init__.py18__all__ = ['HGRNConfig', 'HGRNForCausalLM', 'HGRNModel']CODE
LOWfla/models/transformer/__init__.py18__all__ = ['TransformerConfig', 'TransformerForCausalLM', 'TransformerModel']CODE
LOWfla/models/yoco/__init__.py17__all__ = ['YOCOConfig', 'YOCOForCausalLM', 'YOCOModel']CODE
LOWfla/models/mamba/__init__.py18__all__ = ['MambaConfig', 'MambaForCausalLM', 'MambaModel']CODE
LOWfla/models/precond_kda/__init__.py17__all__ = ['PrecondKDAConfig', 'PrecondKDAForCausalLM', 'PrecondKDAModel']CODE
LOWfla/models/nsa/__init__.py18__all__ = ['NSAConfig', 'NSAForCausalLM', 'NSAModel']CODE
LOWfla/models/lightnet/__init__.py18__all__ = ['LightNetConfig', 'LightNetForCausalLM', 'LightNetModel']CODE
LOWfla/models/path_attn/__init__.py18__all__ = ['PaTHAttentionConfig', 'PaTHAttentionForCausalLM', 'PaTHAttentionModel']CODE
LOWfla/models/parallax/__init__.py24__all__ = ['ParallaxConfig', 'ParallaxForCausalLM', 'ParallaxModel']CODE
LOWfla/models/gla/__init__.py18__all__ = ['GLAConfig', 'GLAForCausalLM', 'GLAModel']CODE
LOWfla/models/mla/__init__.py18__all__ = ['MLAConfig', 'MLAForCausalLM', 'MLAModel']CODE
LOWfla/models/raven/__init__.py18__all__ = ['RavenConfig', 'RavenForCausalLM', 'RavenModel']CODE
LOWfla/models/mamba2/__init__.py18__all__ = ['Mamba2Config', 'Mamba2ForCausalLM', 'Mamba2Model']CODE
LOWfla/models/mamba3/__init__.py18__all__ = ['Mamba3Config', 'Mamba3ForCausalLM', 'Mamba3Model']CODE
LOWfla/models/samba/__init__.py18__all__ = ['SambaConfig', 'SambaForCausalLM', 'SambaModel']CODE
LOWfla/models/mesa_net/__init__.py17__all__ = ['MesaNetConfig', 'MesaNetForCausalLM', 'MesaNetModel']CODE
LOWfla/models/linear_attn/__init__.py17__all__ = ['LinearAttentionConfig', 'LinearAttentionForCausalLM', 'LinearAttentionModel']CODE
LOWfla/models/wall_transformer/__init__.py23__all__ = ['WallTransformerConfig', 'WallTransformerForCausalLM', 'WallTransformerModel']CODE
LOWfla/models/retnet/__init__.py18__all__ = ['RetNetConfig', 'RetNetForCausalLM', 'RetNetModel']CODE
LOWfla/models/gated_deltanet/__init__.py17__all__ = ['GatedDeltaNetConfig', 'GatedDeltaNetForCausalLM', 'GatedDeltaNetModel']CODE
LOWfla/models/forgetting_transformer/__init__.py21__all__ = ['ForgettingTransformerConfig', 'ForgettingTransformerForCausalLM', 'ForgettingTransformerModel']CODE
LOWfla/models/hgrn2/__init__.py18__all__ = ['HGRN2Config', 'HGRN2ForCausalLM', 'HGRN2Model']CODE
LOWfla/models/rodimus/__init__.py18__all__ = ['RodimusConfig', 'RodimusForCausalLM', 'RodimusModel']CODE
LOWfla/models/comba/__init__.py17__all__ = ['CombaConfig', 'CombaForCausalLM', 'CombaModel']CODE
LOWfla/models/rwkv7/__init__.py18__all__ = ['RWKV7Config', 'RWKV7ForCausalLM', 'RWKV7Model']CODE
LOWfla/models/bitnet/__init__.py18__all__ = ['BitNetConfig', 'BitNetForCausalLM', 'BitNetModel']CODE
LOWfla/models/mom/__init__.py17__all__ = ['MomConfig', 'MomForCausalLM', 'MomModel']CODE
LOWfla/models/precond_gated_deltanet/__init__.py20__all__ = ['PrecondGatedDeltaNetConfig', 'PrecondGatedDeltaNetForCausalLM', 'PrecondGatedDeltaNetModel']CODE
LOWfla/models/rwkv6/__init__.py18__all__ = ['RWKV6Config', 'RWKV6ForCausalLM', 'RWKV6Model']CODE
LOWfla/ops/__init__.py41__all__ = [CODE
LOWfla/ops/kda/__init__.py11__all__ = [CODE
LOWfla/ops/kda/backends/__init__.py21__all__ = ['dispatch', 'kda_registry']CODE
LOWfla/ops/abc/__init__.py10__all__ = [CODE
LOWfla/ops/delta_rule/__init__.py12__all__ = [CODE
LOWfla/ops/gated_delta_rule/__init__.py12__all__ = [CODE
LOWfla/ops/gated_delta_rule/backends/__init__.py20__all__ = ['dispatch', 'gdr_registry']CODE
LOWfla/ops/gsa/__init__.py11__all__ = [CODE
LOWfla/ops/titans/__init__.py10__all__ = [CODE
LOWfla/ops/moba/__init__.py10__all__ = ['parallel_moba']CODE
LOWfla/ops/wall_attn/__init__.py14__all__ = [CODE
LOWfla/ops/retention/__init__.py13__all__ = [CODE
LOWfla/ops/deltaformer/__init__.py11__all__ = [CODE
LOWfla/ops/deltaformer/naive.py152__all__ = [CODE
62 more matches not shown…
Verbosity Indicators47 hits · 73 pts
SeverityFileLineSnippetContext
LOWtests/context_parallel/test_cp_conv.py116 # Step 1: Prepare Global DataCOMMENT
LOWtests/context_parallel/test_cp_conv.py134 # Step 2: Reference RunCOMMENT
LOWtests/context_parallel/test_cp_conv.py158 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_conv.py190 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py94 # Step 1: Prepare Global DataCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py104 # Step 2: Reference RunCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py114 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py141 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_dplr.py107 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to all)COMMENT
LOWtests/context_parallel/test_cp_dplr.py147 # Step 2: Reference Run using dplr_recurrence (ground truth)COMMENT
LOWtests/context_parallel/test_cp_dplr.py224 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_dplr.py283 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_kda.py138 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to other ranks)COMMENT
LOWtests/context_parallel/test_cp_kda.py208 # Step 2: Reference Run using naive_recurrent_kda (ground truth)COMMENT
LOWtests/context_parallel/test_cp_kda.py306 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_kda.py352 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_gdn.py130 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to all)COMMENT
LOWtests/context_parallel/test_cp_gdn.py163 # Step 2: Reference Run (single GPU, varlen, no CP)COMMENT
LOWtests/context_parallel/test_cp_gdn.py193 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_gdn.py229 # Step 4: Result Aggregation and VerificationCOMMENT
LOWscripts/run_benchmark_compare.py371 # Step 1: HEADCOMMENT
LOWscripts/run_benchmark_compare.py394 # Step 2: BASECOMMENT
LOWscripts/run_benchmark_compare.py409 # Step 3: Restore original refCOMMENT
LOWscripts/run_benchmark_compare.py413 # Step 4: Print comparisonCOMMENT
LOWfla/ops/kda/chunk_intra.py823 # Step 1: Run token_parallel first to compute diagonal blocks into Akkd (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py824 # Step 1: compute diagonal blocks into Akk_diag (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py861 # Step 2: Fused inter + solve_tril (works for both fixed-len and varlen)COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py120 # Step 1: compute all 10 lower-triangular [BC, BC] blocks of K @ K^TCOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py172 # Step 2: apply gate and beta scalingCOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py215 # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py254 # Step 4: block merge -> full (I + A)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py294 # Step 5: store full (I + A)^{-1} to output ACOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py382 # Step 1: fused kkt + solve_trilSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py401 # Step 1: mathematically equivalent unfused kkt + solve_trilSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py418 # Step 2: recompute_w_uSTRING
LOWfla/ops/precond_kda/chunk_intra.py547 # Step 1: Compute diagonal blocks into Akk_diag (fp32)COMMENT
LOWfla/ops/precond_kda/chunk_intra.py585 # Step 2: Fused inter + solve_trilCOMMENT
LOWfla/ops/precond_kda/chunk_intra.py608 # Step 3: WY representationCOMMENT
LOWfla/ops/precond_kda/chunk.py73 # Step 1: ATK preconditioning with symmetric fast squashCOMMENT
LOWfla/ops/precond_kda/chunk.py88 # Step 2: KDA intra-chunk computation (asymmetric)COMMENT
LOWfla/ops/precond_kda/chunk.py105 # Step 3: Hidden state update (uses kg which is k_precond gated)COMMENT
LOWfla/ops/precond_kda/chunk.py118 # Step 4: Output computationCOMMENT
LOWfla/ops/precond_kda/chunk.py187 # Step 1: Recompute WY representation (asymmetric)COMMENT
LOWfla/ops/precond_kda/chunk.py202 # Step 2: Recompute hidden state (uses kg = gated k_precond)COMMENT
LOWfla/ops/precond_kda/chunk.py232 # Step 3: dAqk and local dv (matching KDA's chunk_kda_bwd_dAv)COMMENT
LOWfla/ops/precond_kda/chunk.py245 # Step 4: Backward through hidden stateCOMMENT
LOWfla/ops/precond_kda/chunk.py282 # Step 7: Asymmetric intra backwardCOMMENT
Structural Annotation Overuse47 hits · 73 pts
SeverityFileLineSnippetContext
LOWtests/context_parallel/test_cp_conv.py116 # Step 1: Prepare Global DataCOMMENT
LOWtests/context_parallel/test_cp_conv.py134 # Step 2: Reference RunCOMMENT
LOWtests/context_parallel/test_cp_conv.py158 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_conv.py190 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py94 # Step 1: Prepare Global DataCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py104 # Step 2: Reference RunCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py114 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_token_shift.py141 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_dplr.py107 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to all)COMMENT
LOWtests/context_parallel/test_cp_dplr.py147 # Step 2: Reference Run using dplr_recurrence (ground truth)COMMENT
LOWtests/context_parallel/test_cp_dplr.py224 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_dplr.py283 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_kda.py138 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to other ranks)COMMENT
LOWtests/context_parallel/test_cp_kda.py208 # Step 2: Reference Run using naive_recurrent_kda (ground truth)COMMENT
LOWtests/context_parallel/test_cp_kda.py306 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_kda.py352 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_gdn.py130 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to all)COMMENT
LOWtests/context_parallel/test_cp_gdn.py163 # Step 2: Reference Run (single GPU, varlen, no CP)COMMENT
LOWtests/context_parallel/test_cp_gdn.py193 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_gdn.py229 # Step 4: Result Aggregation and VerificationCOMMENT
LOWscripts/run_benchmark_compare.py371 # Step 1: HEADCOMMENT
LOWscripts/run_benchmark_compare.py394 # Step 2: BASECOMMENT
LOWscripts/run_benchmark_compare.py409 # Step 3: Restore original refCOMMENT
LOWscripts/run_benchmark_compare.py413 # Step 4: Print comparisonCOMMENT
LOWfla/ops/kda/chunk_intra.py823 # Step 1: Run token_parallel first to compute diagonal blocks into Akkd (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py824 # Step 1: compute diagonal blocks into Akk_diag (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py861 # Step 2: Fused inter + solve_tril (works for both fixed-len and varlen)COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py120 # Step 1: compute all 10 lower-triangular [BC, BC] blocks of K @ K^TCOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py172 # Step 2: apply gate and beta scalingCOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py215 # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py254 # Step 4: block merge -> full (I + A)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py294 # Step 5: store full (I + A)^{-1} to output ACOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py382 # Step 1: fused kkt + solve_trilSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py401 # Step 1: mathematically equivalent unfused kkt + solve_trilSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py418 # Step 2: recompute_w_uSTRING
LOWfla/ops/precond_kda/chunk_intra.py547 # Step 1: Compute diagonal blocks into Akk_diag (fp32)COMMENT
LOWfla/ops/precond_kda/chunk_intra.py585 # Step 2: Fused inter + solve_trilCOMMENT
LOWfla/ops/precond_kda/chunk_intra.py608 # Step 3: WY representationCOMMENT
LOWfla/ops/precond_kda/chunk.py73 # Step 1: ATK preconditioning with symmetric fast squashCOMMENT
LOWfla/ops/precond_kda/chunk.py88 # Step 2: KDA intra-chunk computation (asymmetric)COMMENT
LOWfla/ops/precond_kda/chunk.py105 # Step 3: Hidden state update (uses kg which is k_precond gated)COMMENT
LOWfla/ops/precond_kda/chunk.py118 # Step 4: Output computationCOMMENT
LOWfla/ops/precond_kda/chunk.py187 # Step 1: Recompute WY representation (asymmetric)COMMENT
LOWfla/ops/precond_kda/chunk.py202 # Step 2: Recompute hidden state (uses kg = gated k_precond)COMMENT
LOWfla/ops/precond_kda/chunk.py232 # Step 3: dAqk and local dv (matching KDA's chunk_kda_bwd_dAv)COMMENT
LOWfla/ops/precond_kda/chunk.py245 # Step 4: Backward through hidden stateCOMMENT
LOWfla/ops/precond_kda/chunk.py282 # Step 7: Asymmetric intra backwardCOMMENT
Excessive Try-Catch Wrapping35 hits · 41 pts
SeverityFileLineSnippetContext
LOWtests/context_parallel/test_cp_conv.py223 except Exception as e:CODE
LOWtests/context_parallel/test_cp_token_shift.py167 except Exception as e:CODE
LOWtests/context_parallel/test_cp_dplr.py348 except Exception as e:CODE
LOWtests/context_parallel/test_cp_kda.py410 except Exception as e:CODE
LOWtests/context_parallel/test_cp_gdn.py281 except Exception as e:CODE
LOWbenchmarks/benchmark_training_throughput.py48 except Exception:CODE
MEDIUMbenchmarks/benchmark_training_throughput.py36def _git_describe() -> str:CODE
LOWbenchmarks/ops/run.py216 except Exception:CODE
LOWbenchmarks/ops/run.py234 except Exception:CODE
LOWbenchmarks/ops/run.py361 except Exception as e:CODE
LOWbenchmarks/ops/run.py376 except Exception as e:CODE
LOWbenchmarks/ops/run.py398 except Exception as e:CODE
LOWbenchmarks/ops/run.py606 except Exception as e:CODE
LOWbenchmarks/ops/run.py649 except Exception as e:CODE
LOWbenchmarks/ops/run.py763 except Exception as e:CODE
LOWbenchmarks/cp/test_gdn_with_cp.py57except Exception:CODE
LOWscripts/utils/autotune_export.py62 except Exception as e:CODE
MEDIUMscripts/utils/autotune_export.py63 print(f"Error processing {autotune_file}: {e}")CODE
LOWscripts/utils/autotune_export.py107 except Exception:CODE
LOWscripts/utils/autotune_export.py206 except Exception:CODE
LOWscripts/utils/autotune_export.py303 except Exception as e:CODE
MEDIUMscripts/utils/autotune_export.py304 print(f"Error saving {output_file}: {e}")CODE
LOWfla/utils/_device.py85 except Exception:CODE
LOWfla/utils/_device.py91 except Exception:CODE
LOWfla/utils/_device.py112 except Exception:CODE
LOWfla/utils/_device.py191 except Exception:CODE
LOWfla/utils/_device.py216 except Exception:CODE
MEDIUMfla/utils/_device.py109def get_available_device() -> str:CODE
MEDIUMfla/utils/_device.py185def get_all_max_shared_mem():CODE
LOWfla/utils/ascend_ub_manager.py39 except Exception:CODE
LOWfla/utils/ascend_ub_manager.py208 except Exception:CODE
LOWfla/utils/ascend_ub_manager.py256 except Exception as e:CODE
LOW…eralized_delta_rule/dplr/backends/tilelang/__init__.py226 except Exception as exc:CODE
LOWfla/ops/backends/__init__.py87 except Exception as e:CODE
LOWfla/ops/utils/cache.py259 except Exception as e:CODE
Over-Commented Block27 hits · 27 pts
SeverityFileLineSnippetContext
LOWtests/ops/test_gdn2.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWtests/modules/test_layernorm.py221 assert_close(' dw', ref_dw, tri_dw, 1e-3)COMMENT
LOWutils/convert_from_llama.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWutils/convert_from_rwkv6.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOW.github/workflows/oj.yml1name: ojCOMMENT
LOWfla/layers/gdn2.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/models/mamba/modeling_mamba.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/models/mamba/configuration_mamba.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/models/mamba2/configuration_mamba2.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/models/mamba2/modeling_mamba2.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/models/mamba2/modeling_mamba2.py221 # Reinitialize selected weights subject to the OpenAI GPT-2 Paper Scheme:COMMENT
LOWfla/ops/titans/naive.py81 # Calculate n_{i,j}COMMENT
LOWfla/ops/titans/naive.py101 # f[..., t] += (beta[..., t] / beta[..., i]) * m[..., i]COMMENT
LOWfla/ops/titans/log_impl.py41 # f[..., t] += torch.exp(log_beta[..., t] - log_beta[..., i] + log_m[..., i])COMMENT
LOWfla/ops/moba/__init__.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/hgrn/chunk.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/atk/__init__.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/utils/constant.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/gdn2/chunk_intra_token_parallel.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/gdn2/chunk_intra.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/gdn2/naive.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/ops/gdn2/wy_fast.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/modules/fused_linear_cross_entropy.py201 b_p = (exp(b_capped - b_lse) - eps) * logit_scaleCOMMENT
LOWfla/modules/layernorm.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/modules/grpo.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/modules/layernorm_gated.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
LOWfla/modules/fused_bitlinear.py1# Copyright (c) 2023-2026, Songlin Yang, Yu Zhang, Zhiyuan LiCOMMENT
Self-Referential Comments6 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMtests/modules/test_conv.py733 # Create a larger tensor and take a non-contiguous sliceCOMMENT
MEDIUMfla/ops/kda/gate.py8# This file is modified and supported by the Moonshot AI TeamCOMMENT
MEDIUMfla/ops/titans/naive.py30 # Create a matrix filled with 1s for cumulative productCOMMENT
MEDIUMfla/ops/titans/naive.py37 # Create an expanded version of thetaCOMMENT
MEDIUMfla/ops/titans/naive.py39 # Create a mask to keep only the upper triangular part (excluding the diagonal)COMMENT
MEDIUMfla/modules/grpo.py404 # Create a completion mask. It checks which positions are valid based on logits_to_keepCOMMENT
Redundant / Tautological Comments11 hits · 16 pts
SeverityFileLineSnippetContext
LOWevals/ppl.py227 # Print resultsCOMMENT
LOWtests/conftest.py53 # Check if this frame is from a test fileCOMMENT
LOWlegacy/training/flame/data.py210 # Check if padding is necessary.COMMENT
LOWbenchmarks/cp/benchmark_kda_cp8_vs_cp2tp.py420 # Print resultsCOMMENT
LOWscripts/find_dependent_tests.py241 # Check if any import matches both:COMMENT
LOWscripts/find_dependent_tests.py292 # Check if test imports any affected symbol from affected moduleCOMMENT
LOWfla/utils/_device.py34 # Check if triton-windows is installedCOMMENT
LOWfla/models/rwkv7/modeling_rwkv7.py340 # Check if the layer contains the old 'x_x' parameterCOMMENT
LOWfla/ops/utils/cache.py80 # Check if GPU name is overridden via environment variableCOMMENT
LOWfla/ops/utils/cache.py82 # Check if GPU name is overridden via environment variableCOMMENT
LOWfla/ops/utils/cache.py106 # Check if custom config dir is set via environment variableCOMMENT
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMfla/layers/moba.py208 # defines a seamless switch from block-sparse to full attention for theCOMMENT
MEDIUMfla/ops/cp/context.py78 # 2. Operate on CPU to avoid D2H sync and leverage vectorization (int64/long)COMMENT
LOWfla/modules/layernorm.py1440 # us to simply just use from_localCOMMENT
LOWfla/modules/feature_map.py183 # currently we simply use linear layers without any non-linear activationsSTRING
LOWfla/modules/conv/cuda/ops.py118 # Here we just pass in None and dx will be allocated in the C++ code.COMMENT
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/ops/test_gdn_kernels.py789 # compensated by the orchestration's reverse cumsum (see chunk_gated_delta_rule_bwd),COMMENT
MEDIUMfla/ops/gdn2/chunk_fwd.py8# Forward orchestration for GDN-2 chunkwise training.COMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHfla/ops/attnres/backends/triton_ascend/fused.py125 The ``BN>1 && BD < D`` D-loop is untested (A2 never reaches it; bwdSTRING
Overly Generic Function Names2 hits · 1 pts
SeverityFileLineSnippetContext
LOWfla/utils/_decorators.py236 def my_function(do_reduce_labels):STRING
LOWfla/utils/_decorators.py246 def my_function(max_size):STRING
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMfla/ops/abc/naive.py82 This is just for demonstration purposes, with no numerical stabilities guaranteed.STRING