Repository Analysis

fla-org/flash-linear-attention

🚀 Efficient implementations for emerging model architectures

17.6 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,337 GitHub stars. SynthScan v2.0 examined 164,321 lines of code across 655 source files, recording 2027 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 17.6 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.6
Adjusted Score
17.6
Raw Score
100%
Time Factor
2026-07-12
Last Push
5.3K
Stars
Python
Language
164.3K
Lines of Code
655
Files
2.0K
Pattern Hits
2026-07-14
Scan Date
0.12
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 64MEDIUM 223LOW 1726

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 2027 distinct pattern matches across 19 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.

Decorative Section Separators207 hits · 648 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_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_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
MEDIUMtests/models/test_modeling_gated_deltaproduct.py58# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_gated_deltaproduct.py60# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_retnet.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_retnet.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_retnet.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_retnet.py57# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_comba.py16# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_comba.py18# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_comba.py55# ===================================================================================COMMENT
MEDIUMtests/models/test_modeling_comba.py57# ===================================================================================COMMENT
147 more matches not shown…
Hyper-Verbose Identifiers561 hits · 579 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.py22def test_attention_varlen_accepts_batched_layout_with_cu_seqlens(B: int, T: int, H: int, D: int):CODE
LOWtests/layers/test_gated_deltanet.py28def 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/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_modeling_utils.py54def init_weights_with_asymmetric_pattern(module):CODE
LOWtests/models/test_modeling_mamba.py137def test_mamba_layer_vs_official_inference(B, T, d_model, d_state, expand, dtype, atol):CODE
LOWtests/models/test_modeling_mamba.py189def test_mamba_layer_vs_official_train(B, T, d_model, d_state, expand, dtype, atol):CODE
LOWtests/models/test_modeling_mamba.py223def test_mamba_layer_vs_official_eval(B, T, d_model, d_state, expand, dtype, atol):CODE
LOWtests/models/test_modeling_mamba.py258def test_mamba_layer_gradient_vs_official(B, T, d_model, d_state, expand, dtype, atol):CODE
LOWtests/models/test_modeling_base.py32def run_test_model_forward_backward(CODE
LOWtests/models/test_cache.py23def _assert_attn_state_tokens(attn_state, expected_tokens: torch.Tensor):CODE
LOWtests/models/test_cache.py59def test_cache_per_layer_seq_length(CODE
LOWtests/models/test_cache.py117def test_cache_incremental_update(CODE
LOWtests/models/test_cache.py153def test_cache_get_seq_length_nonexistent_layer():CODE
LOWtests/models/test_cache.py175def test_cache_window_size_does_not_undercount():CODE
501 more matches not shown…
Unused Imports550 hits · 460 pts
SeverityFileLineSnippetContext
LOWevals/harness.py8CODE
LOWevals/harness.py10CODE
LOWtests/layers/test_attn_varlen_pack_layout.py15CODE
LOWtests/models/test_modeling_yoco.py16CODE
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/benchmark_generation.py15CODE
LOWbenchmarks/ops/run.py128CODE
LOWbenchmarks/ops/registry.py14CODE
LOWbenchmarks/ops/verify.py52CODE
LOWscripts/utils/__init__.py8CODE
LOWscripts/utils/__init__.py9CODE
LOWscripts/utils/__init__.py9CODE
LOWfla/layers/hgrn.py10CODE
LOWfla/layers/raven.py11CODE
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
LOWfla/layers/__init__.py28CODE
LOWfla/layers/__init__.py29CODE
LOWfla/layers/__init__.py30CODE
LOWfla/layers/__init__.py31CODE
LOWfla/layers/__init__.py32CODE
LOWfla/layers/__init__.py33CODE
490 more matches not shown…
AI Structural Patterns239 hits · 239 pts
SeverityFileLineSnippetContext
LOWtests/models/test_modeling_mamba2.py142CODE
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/hgrn.py31CODE
LOWfla/layers/raven.py44CODE
LOWfla/layers/hgrn2.py33CODE
LOWfla/layers/deltaformer.py63CODE
LOWfla/layers/mom.py285CODE
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.py86CODE
LOWfla/layers/yoco.py228CODE
LOWfla/layers/yoco.py318CODE
LOWfla/layers/gsa.py32CODE
LOWfla/layers/parallax.py64CODE
LOWfla/layers/mamba3.py65CODE
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.py257CODE
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/kda/configuration_kda.py15CODE
LOWfla/models/kda/modeling_kda.py286CODE
LOWfla/models/kda/modeling_kda.py419CODE
LOWfla/models/abc/modeling_abc.py260CODE
LOWfla/models/abc/modeling_abc.py390CODE
LOWfla/models/abc/configuration_abc.py18CODE
LOWfla/models/delta_net/modeling_delta_net.py260CODE
LOWfla/models/delta_net/modeling_delta_net.py390CODE
LOWfla/models/delta_net/configuration_delta_net.py18CODE
LOW…dels/gated_deltaproduct/modeling_gated_deltaproduct.py262CODE
179 more matches not shown…
Cross-File Repetition39 hits · 195 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
HIGHfla/modules/backends/triton_ascend/l2norm.py0return power-of-2 block size for feature dim d under ub constraints.STRING
HIGHfla/modules/backends/triton_ascend/layernorm.py0return power-of-2 block size for feature dim d under ub constraints.STRING
HIGHfla/modules/backends/triton_ascend/fused_norm_gate.py0return power-of-2 block size for feature dim d under ub constraints.STRING
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 return triton.runtime.driver.active.utils.get_device_properties(tensor_idx)['num_vectorcore']CODE
CRITICALfla/utils/_device.py173 triton.runtime.driver.active.utils.get_device_properties(i)['max_shared_mem']CODE
Deep Nesting127 hits · 127 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py38CODE
LOWtests/models/test_modeling_utils.py54CODE
LOWtests/ops/utils/test_csr.py47CODE
LOWtests/context_parallel/test_cp_dplr.py74CODE
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/ops/run.py235CODE
LOWbenchmarks/ops/registry.py214CODE
LOWbenchmarks/modules/benchmark_cross_entropy.py37CODE
LOWbenchmarks/modules/benchmark_conv.py36CODE
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/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.py72CODE
LOWfla/models/utils.py42CODE
LOWfla/models/utils.py223CODE
LOWfla/models/utils.py455CODE
LOWfla/models/utils.py485CODE
LOWfla/models/kda/modeling_kda.py196CODE
LOWfla/models/kda/modeling_kda.py419CODE
LOWfla/models/abc/modeling_abc.py186CODE
LOWfla/models/abc/modeling_abc.py390CODE
LOWfla/models/delta_net/modeling_delta_net.py186CODE
LOWfla/models/delta_net/modeling_delta_net.py390CODE
LOW…dels/gated_deltaproduct/modeling_gated_deltaproduct.py185CODE
LOW…dels/gated_deltaproduct/modeling_gated_deltaproduct.py392CODE
LOWfla/models/gsa/modeling_gsa.py189CODE
LOWfla/models/gsa/modeling_gsa.py394CODE
LOWfla/models/moba/modeling_moba.py172CODE
LOWfla/models/moba/modeling_moba.py359CODE
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.py348CODE
LOWfla/models/hgrn/modeling_hgrn.py182CODE
LOWfla/models/hgrn/modeling_hgrn.py394CODE
LOWfla/models/transformer/modeling_transformer.py379CODE
LOWfla/models/yoco/modeling_yoco.py333CODE
LOWfla/models/yoco/modeling_yoco.py677CODE
LOWfla/models/mamba/modeling_mamba.py110CODE
LOWfla/models/mamba/modeling_mamba.py289CODE
LOWfla/models/nsa/modeling_nsa.py183CODE
LOWfla/models/nsa/modeling_nsa.py394CODE
LOWfla/models/lightnet/modeling_lightnet.py180CODE
LOWfla/models/lightnet/modeling_lightnet.py385CODE
67 more matches not shown…
Docstring Block Structure25 hits · 125 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.py283 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.py356 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.py450 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gated_delta_rule/chunk.py415 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gated_delta_rule/fused_recurrent.py328 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/gsa/chunk.py1098 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.py265 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/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.py1370 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.py236 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/rwkv6/chunk.py1247 Args: r (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHfla/ops/rwkv6/fused_recurrent.py573 Args: r (torch.Tensor): reception of shape `[B, T, H, K]`. Alias: q, query in lineaSTRING
Modern Structural Boilerplate108 hits · 107 pts
SeverityFileLineSnippetContext
LOWbenchmarks/ops/run.py155logger = 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__.py46__all__ = [CODE
LOWfla/utils/_device.py22logger = logging.getLogger(__name__)CODE
LOWfla/utils/_testing.py15logger = logging.getLogger(__name__)CODE
LOWfla/models/__init__.py48__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/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/rwkv6/__init__.py18__all__ = ['RWKV6Config', 'RWKV6ForCausalLM', 'RWKV6Model']CODE
LOWfla/ops/__init__.py39__all__ = [CODE
LOWfla/ops/kda/__init__.py11__all__ = [CODE
LOWfla/ops/kda/backends/__init__.py19__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
LOWfla/ops/deltaformer/parallel.py1000__all__ = [CODE
LOWfla/ops/hgrn/__init__.py11__all__ = [CODE
LOWfla/ops/generalized_delta_rule/__init__.py11__all__ = [CODE
48 more matches not shown…
Verbosity Indicators35 hits · 55 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.py104 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to all)COMMENT
LOWtests/context_parallel/test_cp_dplr.py144 # Step 2: Reference Run using dplr_recurrence (ground truth)COMMENT
LOWtests/context_parallel/test_cp_dplr.py221 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_dplr.py261 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_kda.py137 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to other ranks)COMMENT
LOWtests/context_parallel/test_cp_kda.py207 # Step 2: Reference Run using naive_recurrent_kda (ground truth)COMMENT
LOWtests/context_parallel/test_cp_kda.py305 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_kda.py349 # 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.py362 # Step 1: HEADCOMMENT
LOWscripts/run_benchmark_compare.py385 # Step 2: BASECOMMENT
LOWscripts/run_benchmark_compare.py400 # Step 3: Restore original refCOMMENT
LOWscripts/run_benchmark_compare.py404 # Step 4: Print comparisonCOMMENT
LOWfla/ops/kda/chunk_intra.py793 # Step 1: Run token_parallel first to compute diagonal blocks into Akkd (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py794 # Step 1: compute diagonal blocks into Akk_diag (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py831 # 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.py171 # Step 2: apply gate and beta scalingCOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py214 # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py253 # Step 4: block merge -> full (I + A)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py293 # Step 5: store full (I + A)^{-1} to output ACOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py367 # Step 1: fused kkt + solve_trilSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py386 # Step 1: mathematically equivalent unfused kkt + solve_tril for non-64 chunksSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py403 # Step 2: recompute_w_uSTRING
Structural Annotation Overuse35 hits · 55 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.py104 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to all)COMMENT
LOWtests/context_parallel/test_cp_dplr.py144 # Step 2: Reference Run using dplr_recurrence (ground truth)COMMENT
LOWtests/context_parallel/test_cp_dplr.py221 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_dplr.py261 # Step 4: Result Aggregation and VerificationCOMMENT
LOWtests/context_parallel/test_cp_kda.py137 # Step 1: Prepare Global Data (all generated on rank 0, broadcast to other ranks)COMMENT
LOWtests/context_parallel/test_cp_kda.py207 # Step 2: Reference Run using naive_recurrent_kda (ground truth)COMMENT
LOWtests/context_parallel/test_cp_kda.py305 # Step 3: Context Parallel RunCOMMENT
LOWtests/context_parallel/test_cp_kda.py349 # 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.py362 # Step 1: HEADCOMMENT
LOWscripts/run_benchmark_compare.py385 # Step 2: BASECOMMENT
LOWscripts/run_benchmark_compare.py400 # Step 3: Restore original refCOMMENT
LOWscripts/run_benchmark_compare.py404 # Step 4: Print comparisonCOMMENT
LOWfla/ops/kda/chunk_intra.py793 # Step 1: Run token_parallel first to compute diagonal blocks into Akkd (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py794 # Step 1: compute diagonal blocks into Akk_diag (fp32)COMMENT
LOWfla/ops/kda/chunk_intra.py831 # 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.py171 # Step 2: apply gate and beta scalingCOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py214 # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py253 # Step 4: block merge -> full (I + A)^{-1}COMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py293 # Step 5: store full (I + A)^{-1} to output ACOMMENT
LOWfla/ops/gated_delta_rule/chunk_fwd.py367 # Step 1: fused kkt + solve_trilSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py386 # Step 1: mathematically equivalent unfused kkt + solve_tril for non-64 chunksSTRING
LOWfla/ops/gated_delta_rule/chunk_fwd.py403 # Step 2: recompute_w_uSTRING
Excessive Try-Catch Wrapping33 hits · 40 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.py326 except Exception as e:CODE
LOWtests/context_parallel/test_cp_kda.py407 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.py183 except Exception:CODE
LOWbenchmarks/ops/run.py198 except Exception:CODE
LOWbenchmarks/ops/run.py318 except Exception as e:CODE
LOWbenchmarks/ops/run.py333 except Exception as e:CODE
LOWbenchmarks/ops/run.py355 except Exception as e:CODE
LOWbenchmarks/ops/run.py566 except Exception as e:CODE
LOWbenchmarks/ops/run.py671 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.py90 except Exception:CODE
LOWfla/utils/_device.py99 except Exception:CODE
LOWfla/utils/_device.py176 except Exception:CODE
LOWfla/utils/_device.py201 except Exception:CODE
MEDIUMfla/utils/_device.py96def get_available_device() -> str:CODE
MEDIUMfla/utils/_device.py170def get_all_max_shared_mem():CODE
LOWfla/utils/ascend_ub_manager.py36 except Exception:CODE
LOWfla/utils/ascend_ub_manager.py205 except Exception:CODE
LOWfla/utils/ascend_ub_manager.py253 except Exception as e: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/ops/test_gdn2.py21# * use_qk_l2norm_in_kernelCOMMENT
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/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.py338 # 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.py75 # 2. Operate on CPU to avoid D2H sync and leverage vectorization (int64/long)COMMENT
LOWfla/modules/layernorm.py1435 # 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.py692 # 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
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