AI Slop Code RIsk Monitor

NVIDIA/Megatron-LM

Ongoing research training transformer models at scale

14.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for NVIDIA/Megatron-LM, a Python project with 18,111 GitHub stars. SynthScan examined 1,235,355 lines of code across 3396 source files, recording 13966 pattern matches distributed across 26 syntactic categories. The legacy adjusted pattern signal is 14.8 (Moderate pattern signal); it is not an authorship estimate.

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

14.8
Adjusted Signal
14.8
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
18.1K
Stars
Python
Language
1.2M
Lines of Code
3.4K
Files
14.0K
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 35.2/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 6.1/100 · LOW

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

Agent Over-Engineering Ratio 44.4/100 · MEDIUM

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

PR Review Velocity Impact 53.0/100 · HIGH

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 32HIGH 300MEDIUM 1436LOW 12198

Directory Score Breakdown

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

Pattern Findings

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

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

Hyper-Verbose Identifiers9006 hits · 8358 pts
SeverityFileLineSnippetContext
LOWpretrain_vlm.py248def train_valid_test_datasets_provider(train_val_test_num_samples):CODE
LOWpretrain_vlm.py289def _preprocess_data_for_llava(data):CODE
LOWpretrain_vlm.py487def llava_position_embedding_ranks(pp_ranks):CODE
LOWtrain_rl.py339def train_valid_test_datasets_provider(train_val_test_num_samples):CODE
LOWpretrain_gpt.py208def _build_cached_logits_loss_func(CODE
LOWpretrain_gpt.py420def core_gpt_dataset_config_from_args(args: Any) -> GPTDatasetConfig:CODE
LOWpretrain_gpt.py491def train_valid_test_datasets_provider(train_val_test_num_samples, vp_stage=None):CODE
LOWmodel_provider.py66def count_parameters_in_layer(model, layer_name):CODE
LOWpretrain_hybrid.py231def _build_cached_logits_loss_func(CODE
LOWpretrain_hybrid.py383def core_gpt_dataset_config_from_args(args: Any) -> GPTDatasetConfig:CODE
LOWpretrain_hybrid.py430def train_valid_test_datasets_provider(train_val_test_num_samples, vp_stage=None):CODE
LOWgpt_builders.py114def _get_transformer_layer_spec(use_te, config):CODE
LOWtasks/finetune_utils.py54def _cross_entropy_forward_step(batch, model):CODE
LOWtasks/finetune_utils.py96def _build_infinite_size_dataloader(dataloader):CODE
LOWtasks/finetune_utils.py107def _build_train_valid_dataloaders(train_dataset, valid_dataset,CODE
LOWtasks/data_utils.py35def build_tokens_types_paddings_from_text(text_a, text_b,CODE
LOWtasks/data_utils.py49def build_tokens_types_paddings_from_ids(text_a_ids, text_b_ids, max_seq_length,CODE
LOWtasks/eval_utils.py65def calculate_correct_answers(name, model, dataloader,CODE
LOWtasks/eval_utils.py111 def correct_answers_forward_step(batch, model):CODE
LOWtools/run_vlm_text_generation.py163def generate_and_write_samples(model):CODE
LOWtools/prepare_cache.py54def _normalize_prepare_cache_args(args: Any) -> None:CODE
LOWtools/prepare_cache.py65def _validate_prepare_cache_args(args: Any) -> None:CODE
LOWtools/prepare_cache.py82def _disable_cache_load_only_flags(args: Any) -> Dict[str, bool]:CODE
LOWtools/prepare_cache.py102def _print_effective_configuration(CODE
LOWtools/prepare_cache.py120def core_gpt_dataset_config_from_args(args: Any) -> GPTDatasetConfig:CODE
LOWtools/check_process_group_usage.py150def _binding_seen_by_nested_scopes(events):CODE
LOWtools/check_golden_values.py80def compares_deterministically(model_config_text: str) -> bool:CODE
LOWtools/check_golden_values.py92def find_legacy_precision_metrics(golden_values: Any) -> list[str]:CODE
LOWtools/run_inference_performance_test.py48def add_inference_benchmarking_args(parser):CODE
LOWtools/check_kernel_determinism_coverage.py76def strip_comments_and_strings(text: str) -> str:CODE
LOWtools/build_sequences_per_dataset.py60def build_sequences_per_dataset(args):CODE
LOWtools/run_dynamic_text_generation_server.py69def add_text_generation_server_args(parser: argparse.ArgumentParser):CODE
LOWtools/run_dynamic_text_generation_server.py144def parse_args_and_detect_vlm(CODE
LOWtools/run_dynamic_text_generation_server.py194def _build_engine_for_vlm_or_gpt(is_vlm: bool) -> DynamicInferenceEngine:CODE
LOWtools/run_dynamic_text_generation_server.py304async def run_text_generation_server(CODE
LOW⚡tools/checkpoint/weighted_merge.py1190def _metadata_same_layout_is_extra_state_key(fqn: str) -> bool:CODE
LOW⚡tools/checkpoint/weighted_merge.py1200def _metadata_same_layout_is_common_state_key(fqn: str) -> bool:CODE
LOW⚡tools/checkpoint/weighted_merge.py1206def _metadata_same_layout_validate_common_state_storage(CODE
LOW⚡tools/checkpoint/weighted_merge.py1237def _metadata_same_layout_path(fqn: str) -> tuple[str | int, ...]:CODE
LOW⚡tools/checkpoint/weighted_merge.py1241def _metadata_same_layout_tensor_dtype(CODE
LOW⚡tools/checkpoint/weighted_merge.py1250def _metadata_same_layout_tensor_layout(CODE
LOWtools/checkpoint/weighted_merge.py411def _schedule_minus_sqrt_decay(x: float) -> float:CODE
LOWtools/checkpoint/weighted_merge.py444def _schedule_to_merge_coefficients(CODE
LOWtools/checkpoint/weighted_merge.py533def _warn_manual_weight_policy(weights: Iterable[float], *, normalize: bool) -> None:CODE
LOWtools/checkpoint/weighted_merge.py555def _discover_checkpoint_iterations(checkpoint_root: str | Path) -> list[int]:CODE
LOWtools/checkpoint/weighted_merge.py572def _filter_checkpoints_by_interval(CODE
LOWtools/checkpoint/weighted_merge.py593def _select_checkpoints_in_window(CODE
LOWtools/checkpoint/weighted_merge.py626def _checkpoint_paths_for_iterations(CODE
LOWtools/checkpoint/weighted_merge.py633def _validate_min_checkpoints(num_checkpoints: int, min_checkpoints: int | None) -> None:CODE
LOWtools/checkpoint/weighted_merge.py646def _read_latest_checkpointed_iteration(path: Path) -> int | str:CODE
LOWtools/checkpoint/weighted_merge.py703def _write_latest_checkpointed_iteration(checkpoint_dir: str | Path, iteration: int) -> None:CODE
LOWtools/checkpoint/weighted_merge.py785def _directory_size_for_accounting(path: str | Path, byte_accounting: str) -> int:CODE
LOWtools/checkpoint/weighted_merge.py800def _distributed_memory_peaks(host_peak_bytes: int) -> tuple[int, int, int, int]:CODE
LOWtools/checkpoint/weighted_merge.py847def _merge_state_dict_containers(target: Any, source: Any) -> Any:CODE
LOWtools/checkpoint/weighted_merge.py921def _direct_dcp_save_uses_no_dist() -> bool:CODE
LOWtools/checkpoint/weighted_merge.py942def _checkpoint_iteration_from_dir(checkpoint_dir: Path) -> int | None:CODE
LOWtools/checkpoint/weighted_merge.py1000def _prepare_temporary_output_dir(output_dir: Path) -> Path:CODE
LOWtools/checkpoint/weighted_merge.py1018def _require_publishable_checkpoint_dir(checkpoint_dir: Path) -> None:CODE
LOWtools/checkpoint/weighted_merge.py1047def _best_effort_fsync_checkpoint_metadata(checkpoint_dir: Path) -> None:CODE
LOWtools/checkpoint/weighted_merge.py1055def _publish_temporary_output_dir(temporary_dir: Path, output_dir: Path) -> None:CODE
8946 more matches not shown…
Decorative Section Separators1200 hits · 4216 pts
SeverityFileLineSnippetContext
MEDIUM⚡tools/checkpoint/gpt_hybrid_conversion.py400# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tools/checkpoint/gpt_hybrid_conversion.py402# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py132# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py134# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py225# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py227# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py486# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py488# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py530# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py532# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py627# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py629# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py698# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py700# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py722# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/checkpoint/gpt_hybrid_conversion.py724# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tools/checkpoint/saver_llava.py225 #-----------COMMENT
MEDIUMtools/checkpoint/saver_llava.py186 #-----------COMMENT
MEDIUMtools/checkpoint/saver_base.py378 #-----------COMMENT
MEDIUMtools/checkpoint/saver_base.py421 # --------------COMMENT
MEDIUMtools/checkpoint/saver_base.py433 # ------------------COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py360 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py362 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py386 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py388 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py410 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py412 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py433 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py435 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py474 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py476 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py496 # ================================================================COMMENT
MEDIUM⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py498 # ================================================================COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh24# ── Parse KEY=VALUE positional args ───────────────────────────────────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh77# ── Read model_config.yaml ────────────────────────────────────────────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh119# ── Build model args (substituting ${CHECKPOINT_LOAD_PATH}) ───────────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh143# ── Make image-bundled extras (mamba-ssm) visible to the cog venv ─────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh183# ── Launch the inference server in the background ─────────────────────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh263# ── Wait for server readiness ─────────────────────────────────────────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh283# ── Benchmark sweep ───────────────────────────────────────────────────────────COMMENT
MEDIUM…ts/performance_tests/shell_test_utils/run_perf_test.sh303# ── Baseline comparison or recording ──────────────────────────────────────────COMMENT
MEDIUMtests/unit_tests/test_fp8_param.py693 # ------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_fp8_param.py695 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit_tests/test_hyper_comm_grid.py314 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit_tests/test_hyper_comm_grid.py316 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit_tests/test_hyper_comm_grid.py440 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit_tests/test_hyper_comm_grid.py442 # ------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_optimizer_param_scheduler.py302# ── get_canonical_lr_for_logging tests ──────────────────────────────────────COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py72# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py74# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py1302# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py1304# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py1749# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py1751# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py1988# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py1990# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py2159# ===========================================================================COMMENT
MEDIUM⚡tests/unit_tests/test_emerging_optimizers.py2161# ===========================================================================COMMENT
MEDIUMtests/unit_tests/test_emerging_optimizers.py498# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit_tests/test_emerging_optimizers.py500# ---------------------------------------------------------------------------COMMENT
1140 more matches not shown…
Unused Imports1103 hits · 1026 pts
SeverityFileLineSnippetContext
LOWtrain_rl.py4CODE
LOWmamba_builders.py14CODE
LOWmamba_builders.py15CODE
LOWpretrain_gpt.py24CODE
LOWpretrain_gpt.py73CODE
LOWpretrain_hybrid.py24CODE
LOWpretrain_hybrid.py73CODE
LOWgpt_builders.py20CODE
LOWtools/merge_datasets.py3CODE
LOWtools/preprocess_data_nmt.py6CODE
LOWtools/run_inference_performance_test.py34CODE
LOWtools/run_inference_performance_test.py38CODE
LOWtools/run_inference_performance_test.py40CODE
LOWtools/check_kernel_determinism_coverage.py22CODE
LOWtools/run_text_generation_server.py6CODE
LOWtools/linter.py11CODE
LOWtools/preprocess_mmdata.py12CODE
LOWtools/checkpoint/weighted_merge.py15CODE
LOWtools/checkpoint/saver_core.py3CODE
LOWtools/checkpoint/saver_core.py5CODE
LOWtools/checkpoint/saver_core.py7CODE
LOWtools/checkpoint/saver_core.py8CODE
LOWtools/checkpoint/remap_gpt_dsa_to_mamba.py38CODE
LOWtools/checkpoint/remap_gpt_dsa_to_mamba.py39CODE
LOWtools/checkpoint/remap_gpt_dsa_to_mamba.py108CODE
LOWtools/checkpoint/gpt_hybrid_conversion.py122CODE
LOWtools/checkpoint/dist_checkpoint_io.py20CODE
LOWtools/checkpoint/dist_checkpoint_io.py31CODE
LOWtools/checkpoint/utils.py3CODE
LOWtools/checkpoint/hybrid_conversion.py10CODE
LOWtools/checkpoint/loader_mixtral_hf.py3CODE
LOWtools/checkpoint/loader_mixtral_hf.py168CODE
LOWtools/checkpoint/saver_llava.py2CODE
LOWtools/checkpoint/saver_llava.py4CODE
LOWtools/checkpoint/saver_llava.py173CODE
LOWtools/checkpoint/saver_llava.py173CODE
LOWtools/checkpoint/checkpoint_inspector.py38CODE
LOWtools/checkpoint/loader_core.py3CODE
LOWtools/checkpoint/loader_core.py4CODE
LOWtools/checkpoint/loader_core.py5CODE
LOWtools/checkpoint/loader_core.py6CODE
LOWtools/checkpoint/loader_core.py7CODE
LOWtools/checkpoint/saver_base.py2CODE
LOWtools/checkpoint/loader_llava.py3CODE
LOWtools/checkpoint/loader_llava.py7CODE
LOWtools/bert_embedding/embed.py3CODE
LOWtools/bert_embedding/embed.py8CODE
LOWtools/bert_embedding/embed.py15CODE
LOWtools/bert_embedding/embed.py16CODE
LOWtools/bert_embedding/embed.py19CODE
LOWtools/bert_embedding/embed.py21CODE
LOWtools/bert_embedding/embed.py21CODE
LOWtools/bert_embedding/__init__.py3CODE
LOWtools/bert_embedding/__init__.py3CODE
LOW…formance_tests/shell_test_utils/compare_to_baseline.py23CODE
LOWtests/unit_tests/test_fp8_param.py3CODE
LOWtests/unit_tests/test_fp8_param.py33CODE
LOWtests/unit_tests/test_fp8_param.py49CODE
LOWtests/unit_tests/test_inference.py3CODE
LOWtests/unit_tests/test_basic.py2CODE
1043 more matches not shown…
Cross-File Repetition133 hits · 665 pts
SeverityFileLineSnippetContext
HIGHtrain_rl.py0forward training step. args: data_iterator : input data iterator model (hybridmodel): the gpt modelSTRING
HIGHpretrain_hybrid.py0forward training step. args: data_iterator : input data iterator model (hybridmodel): the gpt modelSTRING
HIGHmegatron/elastification/pretrain_hybrid_flex.py0forward training step. args: data_iterator : input data iterator model (hybridmodel): the gpt modelSTRING
HIGHpretrain_gpt.py0loss function. args: loss_mask (torch.tensor): used to mask out some portions of the loss output_tensor (torch.tensor): STRING
HIGHpretrain_hybrid.py0loss function. args: loss_mask (torch.tensor): used to mask out some portions of the loss output_tensor (torch.tensor): STRING
HIGHmegatron/elastification/pretrain_hybrid_flex.py0loss function. args: loss_mask (torch.tensor): used to mask out some portions of the loss output_tensor (torch.tensor): STRING
HIGHpretrain_gpt.py0build the train test and validation datasets. args: train_val_test_num_samples : a list containing the number of samplesSTRING
HIGHpretrain_hybrid.py0build the train test and validation datasets. args: train_val_test_num_samples : a list containing the number of samplesSTRING
HIGHexamples/post_training/modelopt/finetune.py0build the train test and validation datasets. args: train_val_test_num_samples : a list containing the number of samplesSTRING
HIGHexamples/t5/pretrain_t5.py0build the train test and validation datasets. args: train_val_test_num_samples : a list containing the number of samplesSTRING
HIGHmegatron/elastification/pretrain_hybrid_flex.py0build the train test and validation datasets. args: train_val_test_num_samples : a list containing the number of samplesSTRING
HIGHtools/run_text_generation_server.py0utility to get the relevant backend for running inference this function will automatically chose the trtllmbackend when STRING
HIGHexamples/inference/advanced/gpt_static_inference.py0utility to get the relevant backend for running inference this function will automatically chose the trtllmbackend when STRING
HIGH…amples/inference/advanced/simple_t5_batch_inference.py0utility to get the relevant backend for running inference this function will automatically chose the trtllmbackend when STRING
HIGHtools/checkpoint/saver_hf_llava.py0required top-level function that creates the saver and calls its .save().STRING
HIGHtools/checkpoint/saver_core.py0required top-level function that creates the saver and calls its .save().STRING
HIGHtools/checkpoint/saver_llava.py0required top-level function that creates the saver and calls its .save().STRING
HIGHtools/checkpoint/loader_base.py0orchestrates loading a megatron checkpoint and sending model parameters over a given multiprocessing queue. args: args: STRING
HIGHtools/checkpoint/loader_core.py0orchestrates loading a megatron checkpoint and sending model parameters over a given multiprocessing queue. args: args: STRING
HIGHtools/checkpoint/loader_llava.py0orchestrates loading a megatron checkpoint and sending model parameters over a given multiprocessing queue. args: args: STRING
HIGHtools/checkpoint/loader_base.py0parse megatron arguments by forcibly overwriting sys.argv. populates self.margs and self.checkpoint_args.STRING
HIGHtools/checkpoint/saver_base.py0parse megatron arguments by forcibly overwriting sys.argv. populates self.margs and self.checkpoint_args.STRING
HIGHtools/checkpoint/loader_llava.py0parse megatron arguments by forcibly overwriting sys.argv. populates self.margs and self.checkpoint_args.STRING
HIGHtools/checkpoint/loader_base.py0construct a sys.argv list for megatron's argument parser. this centralizes the hack of overwriting sys.argv.STRING
HIGHtools/checkpoint/loader_core.py0construct a sys.argv list for megatron's argument parser. this centralizes the hack of overwriting sys.argv.STRING
HIGHtools/checkpoint/saver_base.py0construct a sys.argv list for megatron's argument parser. this centralizes the hack of overwriting sys.argv.STRING
HIGHtools/checkpoint/loader_llava.py0construct a sys.argv list for megatron's argument parser. this centralizes the hack of overwriting sys.argv.STRING
HIGHtests/unit_tests/test_hyper_comm_grid.py0set up distributed environment for the entire test class.STRING
HIGH…it_tests/pipeline_parallel/test_bridge_communicator.py0set up distributed environment for the entire test class.STRING
HIGH…sts/pipeline_parallel/test_multimodule_communicator.py0set up distributed environment for the entire test class.STRING
HIGHtests/unit_tests/distributed/mfsdp_v2/test_overlap.py0model with direct parameters and multiple child fsdpmodules.STRING
HIGH…ts/unit_tests/distributed/mfsdp_v2/test_fully_shard.py0model with direct parameters and multiple child fsdpmodules.STRING
HIGHtests/unit_tests/distributed/mfsdp_v2/test_context.py0model with direct parameters and multiple child fsdpmodules.STRING
HIGHtests/unit_tests/distributed/mfsdp_v2/test_memory.py0model with direct parameters and multiple child fsdpmodules.STRING
HIGHtests/unit_tests/distributed/mfsdp_v2/test_overlap.py0run through every child layer with a root-owned bias.STRING
HIGH…ts/unit_tests/distributed/mfsdp_v2/test_fully_shard.py0run through every child layer with a root-owned bias.STRING
HIGHtests/unit_tests/distributed/mfsdp_v2/test_context.py0run through every child layer with a root-owned bias.STRING
HIGHtests/unit_tests/distributed/mfsdp_v2/test_memory.py0run through every child layer with a root-owned bias.STRING
HIGH…sts/unit_tests/distributed/mfsdp_v2/test_cuda_graph.py0run through every child layer with a root-owned bias.STRING
HIGH…it_tests/pipeline_parallel/test_bridge_communicator.py0destroy all tracked grids and bridge communicator pgs.STRING
HIGH…_tests/pipeline_parallel/test_multimodule_schedules.py0destroy all tracked grids and bridge communicator pgs.STRING
HIGHtests/unit_tests/models/mimo/test_mimo_1f1b_schedule.py0destroy all tracked grids and bridge communicator pgs.STRING
HIGHtests/unit_tests/models/mimo/test_mimo_1f1b_schedule.py0return a transformerconfig for the vision projection mlp.STRING
HIGHexamples/mimo/configs/llava_vlm.py0return a transformerconfig for the vision projection mlp.STRING
HIGHexamples/mimo/configs/llava_avlm.py0return a transformerconfig for the vision projection mlp.STRING
HIGH…unit_tests/dist_checkpointing/models/test_gpt_model.py0test model loading with different vocab size (caused by tp padding).STRING
HIGH…nit_tests/dist_checkpointing/models/test_bert_model.py0test model loading with different vocab size (caused by tp padding).STRING
HIGHtests/unit_tests/dist_checkpointing/models/common.py0test model loading with different vocab size (caused by tp padding).STRING
HIGH…ultimodal/evaluation/evaluate_video_phys_game_bench.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_realworldqa.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_ai2d.py0merge input files to a format compatible with the evaluator.STRING
HIGH…es/multimodal/evaluation/evaluate_video_motionbench.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_spdocvqa.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_textvqa.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_chartqa.py0merge input files to a format compatible with the evaluator.STRING
HIGH…amples/multimodal/evaluation/evaluate_video_mvbench.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_mathvista.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_vqav2.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_ocrbench.py0merge input files to a format compatible with the evaluator.STRING
HIGHexamples/multimodal/evaluation/evaluate_infovqa.py0merge input files to a format compatible with the evaluator.STRING
73 more matches not shown…
Deep Nesting761 hits · 620 pts
SeverityFileLineSnippetContext
LOWpretrain_gpt.py301CODE
LOWpretrain_gpt.py491CODE
LOWgpt_builders.py25CODE
LOWtasks/finetune_utils.py148CODE
LOWtasks/eval_utils.py65CODE
LOW.gitlab/scripts/check_imports.py66CODE
LOW.gitlab/scripts/check_imports.py123CODE
LOWtools/preprocess_data.py310CODE
LOWtools/run_vlm_text_generation.py90CODE
LOWtools/check_process_group_usage.py265CODE
LOWtools/run_dynamic_text_generation_server.py304CODE
LOWtools/checkpoint/weighted_merge.py1271CODE
LOWtools/checkpoint/weighted_merge.py1532CODE
LOWtools/checkpoint/saver_hf_llava.py69CODE
LOWtools/checkpoint/loader_base.py258CODE
LOWtools/checkpoint/gpt_hybrid_conversion.py631CODE
LOWtools/checkpoint/gpt_hybrid_conversion.py726CODE
LOWtools/checkpoint/dist_checkpoint_io.py129CODE
LOWtools/checkpoint/hybrid_conversion.py59CODE
LOWtools/checkpoint/hybrid_conversion.py114CODE
LOWtools/checkpoint/hybrid_conversion.py170CODE
LOWtools/checkpoint/hybrid_conversion.py222CODE
LOWtools/checkpoint/saver_llava.py183CODE
LOWtools/checkpoint/checkpoint_inspector.py80CODE
LOWtools/checkpoint/checkpoint_inspector.py341CODE
LOWtools/checkpoint/checkpoint_inspector.py1311CODE
LOWtools/checkpoint/saver_base.py366CODE
LOWtools/checkpoint/loader_llava.py161CODE
LOW…s/common_pile_dataset/create_common_pile_ci_dataset.py63CODE
LOW…s/common_pile_dataset/create_common_pile_ci_dataset.py109CODE
LOWtools/moe_routing/analyze_routing_predictability.py54CODE
LOWtools/moe_routing/analyze_routing_concentration.py70CODE
LOW…formance_tests/shell_test_utils/compare_to_baseline.py37CODE
LOW…formance_tests/shell_test_utils/compare_to_baseline.py75CODE
LOW…shell_test_utils/determinism/print_nsys_leaderboard.py85CODE
LOWtests/unit_tests/test_fp8_param.py240CODE
LOWtests/unit_tests/test_optimizer.py956CODE
LOWtests/unit_tests/test_utils.py385CODE
LOWtests/unit_tests/test_imports.py63CODE
LOWtests/unit_tests/test_tensor_metrics.py1099CODE
LOWtests/unit_tests/test_layer_wise_optimizer.py321CODE
LOWtests/unit_tests/test_layer_wise_optimizer.py874CODE
LOWtests/unit_tests/test_sequence_packing.py177CODE
LOWtests/unit_tests/test_sequence_packing.py348CODE
LOWtests/unit_tests/testmon_cache.py257CODE
LOWtests/unit_tests/ssm/test_gdp_dynamic_inference.py1105CODE
LOWtests/unit_tests/ssm/test_wide_shortcut_parallel.py183CODE
LOWtests/unit_tests/ssm/test_wide_shortcut_parallel.py264CODE
LOWtests/unit_tests/ssm/test_wide_shortcut_parallel.py352CODE
LOWtests/unit_tests/ssm/ops/mamba2/test_ssd_bmm.py68CODE
LOW…/unit_tests/tokenizers/test_explicit_assistant_loss.py74CODE
LOWtests/unit_tests/tokenizers/test_tokenizer.py297CODE
LOWtests/unit_tests/fusions/test_gated_norm.py103CODE
LOWtests/unit_tests/fusions/test_gated_norm.py187CODE
LOW…t_tests/tools/checkpoint/test_gpt_hybrid_conversion.py461CODE
LOWtests/unit_tests/extension/test_kitchen_sdpa.py67CODE
LOWtests/unit_tests/determinism/utils.py119CODE
LOW…sts/unit_tests/determinism/kernels/test_moe_kernels.py336CODE
LOWtests/unit_tests/determinism/kernels/harness.py73CODE
LOWtests/unit_tests/determinism/kernels/harness.py131CODE
701 more matches not shown…
Empty Error Handlers90 hits · 450 pts
SeverityFileLineSnippetContext
HIGHtrain_rl.py287except:CODE
HIGHtools/run_inference_performance_test.py109except NotImplementedError as e:CODE
HIGHtools/run_text_generation_server.py191except ValueError as ve:CODE
HIGHtools/checkpoint/weighted_merge.py763except FileNotFoundError:CODE
HIGHtools/checkpoint/weighted_merge.py750except FileNotFoundError:CODE
HIGHtools/checkpoint/dist_checkpoint_io.py213except Exception:CODE
HIGHtools/checkpoint/saver_base.py195except ImportError:CODE
HIGHtools/checkpoint/loader_llava.py298except:CODE
HIGHtools/checkpoint/loader_llava.py303except:CODE
HIGH…shell_test_utils/determinism/print_nsys_leaderboard.py40except ValueError:CODE
HIGH…ted/mfsdp_v1/test_mcore_fully_sharded_data_parallel.py1148except Exception:CODE
HIGHtests/unit_tests/transformer/test_utils.py397except (TypeError, ValueError):CODE
HIGHtests/unit_tests/training/config/test_yaml_utils.py78except ValueError:CODE
HIGHtests/unit_tests/models/mimo/test_mimo_model.py163except Exception:CODE
HIGHtests/unit_tests/models/mimo/test_mimo_model.py179except Exception:CODE
HIGHtests/unit_tests/models/mimo/test_mimo_model.py933except Exception:CODE
HIGHtests/unit_tests/models/mimo/test_mimo_model.py947except Exception:CODE
HIGH…/inference/test_data_parallel_inference_coordinator.py352except (asyncio.TimeoutError, Exception):CODE
HIGH…/inference/test_data_parallel_inference_coordinator.py373except (asyncio.TimeoutError, asyncio.CancelledError, Exception):CODE
HIGH…s/unit_tests/inference/test_common_inference_params.py45except ValueError:CODE
HIGHtests/unit_tests/data/test_builder.py178except AssertionError:CODE
HIGHtests/test_utils/python_scripts/swap_pr_labels.py262except Exception:CODE
HIGHtests/test_utils/python_scripts/swap_pr_labels.py271except Exception:CODE
HIGH…l_tests/python_test_utils/compute_golden_statistics.py581except (ValueError, TypeError):CODE
HIGHexamples/mimo/model_providers/llava_vlm.py78except (ModuleNotFoundError, AssertionError):CODE
HIGHexamples/mimo/model_providers/llava_vlm.py145except (ModuleNotFoundError, AssertionError):CODE
HIGHexamples/mimo/model_providers/llava_avlm.py77except (ModuleNotFoundError, AssertionError):CODE
HIGHexamples/mimo/model_providers/llava_avlm.py173except (ModuleNotFoundError, AssertionError):CODE
HIGHscripts/check_api_backwards_compatibility.py218except Exception:CODE
HIGH.github/scripts/dco_gate.py145except GateError:CODE
HIGHmegatron/core/package_info.py29except (_subprocess.CalledProcessError, OSError):CODE
HIGHmegatron/core/parallel_state.py2594except Exception: # finalize must never block teardownCODE
HIGHmegatron/core/fp4_utils.py24except (ImportError, ModuleNotFoundError):CODE
HIGHmegatron/core/fp8_utils.py29except (ImportError, ModuleNotFoundError):CODE
HIGHmegatron/core/msc_utils.py105except RuntimeError:CODE
HIGH…n/core/tokenizers/text/libraries/tiktoken_tokenizer.py12except ImportError:CODE
HIGHmegatron/core/fusions/fused_mhc_kernels.py70except ImportError:CODE
HIGHmegatron/core/fusions/fused_mhc_kernels.py83except ImportError:CODE
HIGHmegatron/core/fusions/fused_mhc_kernels.py68except ImportError:CODE
HIGHmegatron/core/distributed/__init__.py5except ImportError:CODE
HIGH…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py219except RuntimeError:CODE
HIGHmegatron/core/transformer/cuda_graphs.py242except ImportError:CODE
HIGHmegatron/core/transformer/cuda_graphs.py2124except StopIteration:CODE
HIGHmegatron/core/transformer/attention.py82except ImportError as e:CODE
HIGH…e/transformer/custom_layers/batch_invariant_kernels.py1760except ImportError:CODE
HIGH…e/transformer/custom_layers/batch_invariant_kernels.py1937except ImportError:CODE
HIGH…e/transformer/custom_layers/batch_invariant_kernels.py1952except (ImportError, AttributeError):CODE
HIGH…e/transformer/custom_layers/batch_invariant_kernels.py1777except ImportError:CODE
HIGH…e/transformer/custom_layers/batch_invariant_kernels.py1787except ImportError:CODE
HIGHmegatron/core/datasets/object_storage_utils.py11except ModuleNotFoundError:CODE
HIGHmegatron/core/datasets/megatron_dataset.py90except (AttributeError, NotImplementedError):CODE
HIGHmegatron/core/datasets/megatron_dataset.py94except (AttributeError, NotImplementedError):CODE
HIGHmegatron/core/datasets/indexed_dataset.py27except ModuleNotFoundError:CODE
HIGHmegatron/core/extensions/transformer_engine.py3871except ImportError:CODE
HIGH…ron/core/resharding/copy_services/nixl_copy_service.py275except Exception:CODE
HIGHmegatron/core/resharding/nvshmem_copy_service/compat.py27except ImportError:CODE
HIGHmegatron/core/tuning/table.py57except metadata.PackageNotFoundError:CODE
HIGHmegatron/core/inference/apis/_llm_base.py322except Exception:CODE
HIGH…re/inference/disaggregation/inference_state_handoff.py1097except Exception:CODE
HIGH…ore/inference/disaggregation/transfer_backends/nixl.py644except Exception:CODE
30 more matches not shown…
Hallucination Indicators32 hits · 435 pts
SeverityFileLineSnippetContext
CRITICAL⚡tools/checkpoint/loader_mixtral_hf.py69 model.embedding.word_embeddings.weight.data.copy_(CODE
CRITICAL⚡tools/checkpoint/loader_mixtral_hf.py74 model.decoder.final_layernorm.weight.data.copy_(hf_model.model.norm.weight)CODE
CRITICALtools/checkpoint/loader_mixtral_hf.py103 layer.mlp.router.weight.data.copy_(hf_layer.block_sparse_moe.gate.weight)CODE
CRITICALtools/checkpoint/loader_mixtral_hf.py127 layer.self_attention.linear_qkv.layer_norm_weight.data.copy_(hf_layer.input_layernorm.weight)CODE
CRITICAL⚡tools/checkpoint/saver_llava.py199 model.vision_model.conv1.weight.data.copy_(vit_embeddings_msg["conv1 weight"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py201 model.vision_model.conv1.bias.data.copy_(vit_embeddings_msg["conv1 bias"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py202 model.vision_model.position_embeddings.weight.data.copy_(vit_embeddings_msg["position embeddings"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py208 model.vision_model.embedder.weight.data.copy_(embedder_weight[tp_rank])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py210 model.vision_model.embedder.bias.data.copy_(embedder_bias[tp_rank])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py214 model.vision_model.ln_pre.weight.data.copy_(vit_embeddings_msg["ln pre weight"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py215 model.vision_model.ln_pre.bias.data.copy_(vit_embeddings_msg["ln pre bias"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py218 model.vision_model.ln_post.weight.data.copy_(vit_embeddings_msg["ln post weight"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py219 model.vision_model.ln_post.bias.data.copy_(vit_embeddings_msg["ln post bias"])CODE
CRITICAL⚡tools/checkpoint/saver_llava.py343 model.vision_projection.encoder.linear_fc1.weight.data.copy_(CODE
CRITICAL⚡tools/checkpoint/saver_llava.py345 model.vision_projection.encoder.linear_fc2.weight.data.copy_(CODE
CRITICAL⚡tools/checkpoint/saver_llava.py348 model.vision_projection.encoder.linear_fc1.layer_norm_weight.data.copy_(CODE
CRITICAL⚡tools/checkpoint/saver_llava.py351 model.vision_projection.encoder.linear_fc1.layer_norm_bias.data.copy_(CODE
CRITICAL⚡tools/checkpoint/saver_llava.py354 model.vision_projection.encoder.linear_fc1.bias.data.copy_(CODE
CRITICAL⚡tools/checkpoint/saver_llava.py356 model.vision_projection.encoder.linear_fc2.bias.data.copy_(vision_projection_l1_bias)CODE
CRITICAL⚡tests/unit_tests/transformer/moe/test_routers.py779 assert self.sequential_mlp.router.weight.grad.abs().sum() == 0CODE
CRITICAL⚡tests/unit_tests/transformer/moe/test_routers.py785 assert self.sequential_mlp.router.weight.grad.abs().sum() > 0CODE
CRITICAL⚡tests/unit_tests/transformer/moe/test_routers.py790 self.sequential_mlp.router.weight.grad.fill_(0)CODE
CRITICAL⚡tests/unit_tests/transformer/moe/test_routers.py793 assert self.sequential_mlp.router.weight.grad.abs().sum() > 0CODE
CRITICAL⚡tests/unit_tests/models/test_gpt_model.py156 assert self.gpt_model.embedding.word_embeddings.weight.std().cpu().item() == approx(CODE
CRITICAL⚡tests/unit_tests/models/test_gpt_model.py159 assert self.gpt_model.embedding.word_embeddings.weight.mean().cpu().item() == approx(CODE
CRITICAL…ests/inference/engines/request_lifecycle_test_utils.py253 for module in env.engine.controller.inference_wrapped_model.model.modules():CODE
CRITICAL…ests/inference/engines/request_lifecycle_test_utils.py274 for module in env.engine.controller.inference_wrapped_model.model.modules():CODE
CRITICALmegatron/core/parallel_state.py2678 and torch.distributed.distributed_c10d._world.pg_map.get(_DATA_PARALLEL_GROUP_GLOO, None)CODE
CRITICALmegatron/core/parallel_state.py2687 and torch.distributed.distributed_c10d._world.pg_map.get(CODE
CRITICALmegatron/core/parallel_state.py2741 and torch.distributed.distributed_c10d._world.pg_map.get(CODE
CRITICALmegatron/core/parallel_state.py2755 and torch.distributed.distributed_c10d._world.pg_map.get(CODE
CRITICALmegatron/core/transformer/attention.py2094 self.linear_qkv.weight.main_param.data.copy_(CODE
Self-Referential Comments140 hits · 410 pts
SeverityFileLineSnippetContext
MEDIUMgpt_builders.py42 # Define the decoder block specCOMMENT
MEDIUMgpt_builders.py54 # Define the decoder layer specCOMMENT
MEDIUMgpt_builders.py67 # Define the decoder block specCOMMENT
MEDIUM.gitlab/stages/05.publish.yml149 # Define the full refspec for the branchCOMMENT
MEDIUMtools/preprocess_data_fast.py54 # Create an IndexedDatasetBuilderCOMMENT
MEDIUMtools/run_inference_performance_test.py112 # Create a list of valid token IDsCOMMENT
MEDIUMtools/common_pile_dataset/setup_common_pile_dataset.sh87# Create a virtual environment to avoid system package conflictsCOMMENT
MEDIUMtools/common_pile_dataset/setup_common_pile_dataset.sh122# Create the output directoryCOMMENT
MEDIUMtests/unit_tests/test_optimizer.py1172 # Create a new state_dict with all params set to 3.COMMENT
MEDIUMtests/unit_tests/test_optimizer.py1384 # Create a simple model for testingCOMMENT
MEDIUMtests/unit_tests/test_optimizer.py1466 # Create a simple modelCOMMENT
MEDIUM⚡tests/unit_tests/test_utils.py528 # Create a straggler_detector with enabled set to false.COMMENT
MEDIUMtests/unit_tests/test_hyper_comm_grid.py633 # Create a process groupCOMMENT
MEDIUMtests/unit_tests/test_hyper_comm_grid.py636 # Create a tensor for communication testCOMMENT
MEDIUMtests/unit_tests/test_hyper_comm_grid.py737 # Create a unique tensor based on rankCOMMENT
MEDIUMtests/unit_tests/test_emerging_optimizers.py439 # Create a simple linear model for testingCOMMENT
MEDIUMtests/unit_tests/test_emerging_optimizers.py1101 # Create a model with QKV-like parameterCOMMENT
MEDIUMtests/unit_tests/test_training.py303 # Create a mock state_dict with gradients (use deterministic values for reproducibility).COMMENT
MEDIUMtests/unit_tests/ssm/ops/mamba2/test_ssm_kernel.py84 # Create the Mixer instance directlyCOMMENT
MEDIUMtests/unit_tests/fusions/test_torch_softmax.py197 # Create a padding maskCOMMENT
MEDIUM…/unit_tests/post_training/test_modelopt_module_spec.py278 # Define the expected signatureCOMMENT
MEDIUM…/unit_tests/post_training/test_modelopt_module_spec.py317 # Define the expected signatureCOMMENT
MEDIUM…tests/distributed/test_torch_fully_sharded_parallel.py78 # Create a dummy model and configs.COMMENT
MEDIUM…tests/distributed/test_torch_fully_sharded_parallel.py85 # Create the sharded model.COMMENT
MEDIUM⚡…tests/distributed/test_torch_fully_sharded_parallel.py106 # Create a dummy model and configs.COMMENT
MEDIUM⚡…tests/distributed/test_torch_fully_sharded_parallel.py112 # Create a custom process group (using the default world for testing)COMMENT
MEDIUM⚡…tests/distributed/test_torch_fully_sharded_parallel.py115 # Create the sharded model with explicit process groupCOMMENT
MEDIUM…ests/distributed/mfsdp_v1/test_mfsdp_uneven_dtensor.py600 # Create a manual uneven sharding along dim 1 with possible zero-length local on some ranksCOMMENT
MEDIUM…tests/transformer/test_transformer_block_custom_pgs.py266 # Create a transformer block with default process groupsCOMMENT
MEDIUM…tests/transformer/test_transformer_block_custom_pgs.py292 # Create a transformer block with custom process groupsCOMMENT
MEDIUM…tests/transformer/test_transformer_block_custom_pgs.py744 # Create a single transformer blockCOMMENT
MEDIUMtests/unit_tests/transformer/test_cuda_graphs.py1048 # Create the CUDA graphs - this is where the is_last_layer logic is testedCOMMENT
MEDIUMtests/unit_tests/transformer/test_cuda_graphs.py1299 # Create a mapping of sample_keys to indicesCOMMENT
MEDIUM⚡tests/unit_tests/transformer/test_transformer_block.py701 # Create a new build_layers method that uses interleaved attentionCOMMENT
MEDIUM…ts/unit_tests/transformer/moe/test_token_dispatcher.py298 # Create the answer.COMMENT
MEDIUMtests/unit_tests/transformer/moe/test_shared_experts.py435 # Create a dummy input tensor.COMMENT
MEDIUMtests/unit_tests/transformer/moe/test_aux_loss.py267 # Create a new config with updated parametersCOMMENT
MEDIUMtests/unit_tests/transformer/moe/test_aux_loss.py270 # Create the router with the updated configCOMMENT
MEDIUM⚡…s/unit_tests/training/config/test_instantiate_utils.py334 # Create a mock that raises an error when used with functools.partialCOMMENT
MEDIUMtests/unit_tests/training/config/test_yaml_utils.py215 # Create a mock torch dtypeCOMMENT
MEDIUMtests/unit_tests/training/config/test_yaml_utils.py262 # Create a mock GenerationConfigCOMMENT
MEDIUMtests/unit_tests/utils/test_experimental_log_once.py28 # Define a fresh function with the decorator so it has its own closure state.COMMENT
MEDIUMtests/unit_tests/models/test_gpt_model.py318 # Define the expected signatureCOMMENT
MEDIUMtests/unit_tests/models/test_fastconformer_model.py45 # Create a parameter with the target dtype so ``next(self.parameters()).dtype``COMMENT
MEDIUM…s/unit_tests/models/mimo/test_mimo_audio_submodules.py212 # Create a time arrayCOMMENT
MEDIUM…s/unit_tests/models/mimo/test_mimo_audio_submodules.py215 # Create a simple sine wave at 440 Hz (A4)COMMENT
MEDIUM…nit_tests/models/mimo/test_mimo_embedding_alignment.py22 # Create a minimal MimoModelConfigCOMMENT
MEDIUM…nit_tests/models/mimo/test_mimo_embedding_alignment.py73 # Create a simple batchCOMMENT
MEDIUM…nit_tests/models/mimo/test_mimo_embedding_alignment.py343 # Create a test case with 2 batches:COMMENT
MEDIUM…nit_tests/models/mimo/test_mimo_embedding_alignment.py379 # Create the unflattened embeddings that would come from a vision encoderCOMMENT
MEDIUMtests/unit_tests/models/mimo/test_mimo_submodules.py92 # Create the main module specCOMMENT
MEDIUMtests/unit_tests/models/mimo/test_mimo_submodules.py351 # Create a data batch without imagesCOMMENT
MEDIUM…tests/dist_checkpointing/test_save_tokenizer_assets.py69 # Create a fake tokenizer model fileCOMMENT
MEDIUM…tests/dist_checkpointing/test_save_tokenizer_assets.py263 # Create a fake tokenizer model fileCOMMENT
MEDIUM…tests/dist_checkpointing/test_save_tokenizer_assets.py329 # Create a fake tokenizer fileCOMMENT
MEDIUMtests/unit_tests/dist_checkpointing/test_fp8.py33 # Create a quantizer for FP8 conversionCOMMENT
MEDIUM…s/unit_tests/dist_checkpointing/test_fully_parallel.py597 # Create a mock that will do what it's supposed to do,COMMENT
MEDIUM…/unit_tests/inference/contexts/test_dynamic_context.py602 # Initialize all variablesCOMMENT
MEDIUM…/unit_tests/inference/contexts/test_dynamic_context.py1599 # Create an active_requests_mask where requests 0, 2, and 4 are finished (0),COMMENT
MEDIUM…/unit_tests/inference/contexts/test_dynamic_context.py1689 # Create an active_requests_mask where all requests are finishedCOMMENT
80 more matches not shown…
Excessive Try-Catch Wrapping301 hits · 348 pts
SeverityFileLineSnippetContext
LOWtasks/finetune_utils.py62 except Exception:CODE
LOWtasks/eval_utils.py114 except Exception:CODE
MEDIUMtasks/eval_utils.py111def correct_answers_forward_step(batch, model):CODE
LOW.gitlab/scripts/check_imports.py117 except Exception:CODE
LOW⚡tools/check_copyright.py22 except Exception as e:CODE
MEDIUM⚡tools/check_copyright.py23 print(f"Error reading {file_path}: {e}")CODE
MEDIUMtools/text_generation_cli.py21 print(f"Error {response.status_code}: {response.json()['message']}")CODE
MEDIUMtools/checkpoint/weighted_merge.py927def _git_revision() -> str | None:CODE
LOWtools/checkpoint/weighted_merge.py745 except Exception:CODE
LOWtools/checkpoint/weighted_merge.py760 except Exception:CODE
LOWtools/checkpoint/weighted_merge.py914 except Exception as exc:CODE
LOWtools/checkpoint/weighted_merge.py936 except Exception:CODE
LOWtools/checkpoint/saver_hf_llava.py400 except Exception as e:CODE
LOWtools/checkpoint/loader_base.py78 except Exception as e:CODE
MEDIUMtools/checkpoint/loader_base.py79 print(f"Error validating Megatron arguments: {e}")CODE
LOWtools/checkpoint/saver_core.py70 except Exception as e:CODE
LOWtools/checkpoint/gpt_hybrid_conversion.py384 except Exception:CODE
LOWtools/checkpoint/dist_checkpoint_io.py213 except Exception:CODE
LOWtools/checkpoint/hybrid_conversion.py322 except Exception:CODE
LOWtools/checkpoint/loader_mixtral_hf.py344 except Exception:CODE
MEDIUMtools/checkpoint/loader_mixtral_hf.py341def load_checkpoint(queue, args):CODE
LOWtools/checkpoint/saver_llava.py404 except Exception as e:CODE
LOWtools/checkpoint/loader_core.py90 except Exception as e:CODE
LOWtools/checkpoint/loader_llava.py360 except Exception as e:CODE
LOWtools/bert_embedding/embed.py217 except Exception:CODE
LOWtools/bert_embedding/embed.py223 except Exception:CODE
LOWtests/unit_tests/conftest.py108 except Exception:CODE
LOWtests/unit_tests/conftest.py156 except Exception as e:CODE
LOWtests/unit_tests/test_hyper_comm_grid.py529 except Exception as e:CODE
LOWtests/unit_tests/test_api_backwards_compat_setup.py106 except Exception as e:CODE
LOWtests/unit_tests/test_api_backwards_compat_setup.py134 except Exception as e:STRING
LOWtests/unit_tests/test_imports.py58 except Exception:CODE
LOWtests/unit_tests/test_imports.py77 except Exception:CODE
LOWtests/unit_tests/test_utilities.py304 except Exception:CODE
LOWtests/unit_tests/ssm/test_gated_delta_net.py1492 except Exception:CODE
LOW⚡tests/unit_tests/tokenizers/test_tokenizer.py1107except Exception:CODE
LOWtests/unit_tests/tokenizers/test_tokenizer.py22except Exception:CODE
LOWtests/unit_tests/tokenizers/test_tokenizer.py159 except Exception:CODE
LOWtests/unit_tests/tokenizers/test_tokenizer.py185 except Exception:CODE
LOWtests/unit_tests/tokenizers/test_tokenizer.py326 except Exception:CODE
LOW…istributed/mfsdp_v1/test_mfsdp_fused_mla_checkpoint.py353 except Exception:CODE
LOW…ted/mfsdp_v1/test_mcore_fully_sharded_data_parallel.py1148 except Exception:CODE
LOW…t_tests/distributed/mfsdp_v1/test_mfsdp_fully_shard.py174 except Exception as e:CODE
LOW…distributed/mfsdp_v1/test_mfsdp_nonuniform_sharding.py73 except Exception as e:CODE
LOW…sformer/moe/test_moe_single_grouped_weight_numerics.py591 except Exception:CODE
LOW…sformer/moe/test_moe_single_grouped_weight_numerics.py624 except Exception:CODE
LOW…sformer/moe/test_moe_single_grouped_weight_numerics.py651 except Exception:CODE
LOW…sformer/moe/test_moe_single_grouped_weight_numerics.py698 except Exception:CODE
MEDIUM…sformer/moe/test_moe_single_grouped_weight_numerics.py110def teardown_method(self, method):CODE
LOWtests/unit_tests/transformer/moe/test_aux_loss.py38except Exception: # pragma: no cover - defensiveCODE
LOWtests/unit_tests/transformer/moe/test_routers.py55except Exception: # pragma: no cover - defensiveCODE
LOWtests/unit_tests/models/test_hybrid_moe_model.py483 except Exception:CODE
LOW…s/unit_tests/models/mimo/test_mimo_audio_submodules.py123 except Exception as e:CODE
LOW…s/unit_tests/models/mimo/test_mimo_audio_submodules.py197 except Exception as e:CODE
LOWtests/unit_tests/models/mimo/test_mimo_submodules.py55 except Exception as e:CODE
LOWtests/unit_tests/models/mimo/test_mimo_submodules.py105 except Exception as e:CODE
LOWtests/unit_tests/models/mimo/test_mimo_submodules.py229 except Exception as e:CODE
LOWtests/unit_tests/models/mimo/test_mimo_submodules.py284 except Exception as e:CODE
MEDIUMtests/unit_tests/models/mimo/test_mimo_model.py160def setup_method(self, method):CODE
MEDIUMtests/unit_tests/models/mimo/test_mimo_model.py176def teardown_method(self, method):CODE
241 more matches not shown…
Docstring Block Structure57 hits · 285 pts
SeverityFileLineSnippetContext
HIGHtools/checkpoint/remap_gpt_dsa_to_mamba.py46Return the HybridModel state-dict key corresponding to *key* from GPTModel. Args: key: A key from the GPTMoSTRING
HIGH…ted/mfsdp_v1/test_mcore_fully_sharded_data_parallel.py756 Run a small deterministic training loop using a mocked hybrid Mamba+MoE model and optimizer. This helpeSTRING
HIGHtests/test_utils/python_scripts/launch_jet_workload.py66Block until a downstream JET pipeline reaches a terminal status. jetclient's own ``pipeline.wait`` polls the GitLabSTRING
HIGHexamples/multimodal/data_loading/image_processing.py1780 Create an image tiling strategy based on the provided arguments. This function encapsulates the logic for creaSTRING
HIGHmegatron/core/process_groups_config.py826Get process group collection for a specific module. Args: module_name: Name of the module. STRING
HIGHmegatron/core/hyper_comm_grid.py209Create a process group based on a list of dimension names Note: The unique key used to store the process group STRING
HIGHmegatron/core/utils.py124Validates the request to the experimental function. Args: func (Callable): Callee max_lSTRING
HIGHmegatron/core/utils.py190Validates the request to the experimental function. Args: func (Callable): Callee max_lSTRING
HIGHmegatron/core/utils.py222Pass-through to callee attribute if experimental flag is enabled. Args: super (supeSTRING
HIGHmegatron/core/timers.py385Returns the output string with logged timer values according to configured options. Args: names (LiSTRING
HIGHmegatron/core/ssm/causal_conv1d.py111Apply causal Conv1d to a contiguous context-parallel shard. Args: x: Input tensor of shape ``[B, T, D]``. TSTRING
HIGH…ore/tokenizers/text/libraries/huggingface_tokenizer.py238 Adds a dictionary of special tokens (eos, pad, cls...). If special tokens are NOT in the vocabulary, thSTRING
HIGHmegatron/core/fusions/fused_bias_swiglu.py464Implementation of biased SwiGLU that handles different input shapes. This function reshapes the input if necessary,STRING
HIGHmegatron/core/fusions/fused_bias_geglu.py154Implementation of biased GEGLU that handles different input shapes. This function reshapes the input if necessary, STRING
HIGHmegatron/core/optimizer/optimizer.py628Pair each current param_group with its saved counterpart by identifier tuple. Construction order isn't part of STRING
HIGH…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py4954 Release the specified parameter bucket, freeing its associated buffer storage. This function marks or STRING
HIGH…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py5378 Creates a distributed tensor (DTensor) from a local tensor with support for Megatron-FSDP and Tensor Parallel sSTRING
HIGH…e/distributed/fsdp/src/megatron_fsdp/uneven_dtensor.py140 Validates the chunk metadata of an uneven DTensor to ensure correctness and boundary coverage. Notes: - `gSTRING
HIGH…e/distributed/fsdp/src/megatron_fsdp/uneven_dtensor.py257 Gather a DTensor with potentially uneven sharding across ranks into a full tensor. This function handles DTensSTRING
HIGH…core/distributed/fsdp/src/megatron_fsdp/fully_shard.py501 Fully shard the optimizer for Megatron-FSDP. This is an in-place operation on the optimizer instance, which modSTRING
HIGHmegatron/core/transformer/fsdp_dtensor_checkpoint.py945Report model weights that an ``fsdp_dtensor`` load cannot supply. Torch DCP loads with ``allow_partial_load=True`` STRING
HIGHmegatron/core/transformer/moe/moe_utils.py991Compute the normalized score distribution over all experts. Args: logits: Router logits with experts in theSTRING
HIGH…tron/core/datasets/blended_megatron_dataset_builder.py510Build the DistributedDataset Return None if and only if the underlying dataset class is not built on the currenSTRING
HIGHmegatron/core/datasets/object_storage_utils.py136Ascertain whether the object at the given S3 path exists in S3 Args: client (S3Client): The S3 client STRING
HIGHmegatron/core/datasets/indexed_dataset.py95Get the size of the dtype/code in bytes Args: key (Union[int, Type[numpy.number]]): The dtype or coSTRING
HIGHmegatron/core/datasets/indexed_dataset.py791Return from the dataset Args: idx (Union[int, numpy.integer, slice]): The index or index slice intoSTRING
HIGH…ron/core/pipeline_parallel/multimodule_communicator.py586Compute the total number of pipeline stages across a multi-module chain. Interprets ``topology`` as a directed STRING
HIGHmegatron/core/models/hybrid/hybrid_layer_allocation.py139Count layers by type across the full hybrid pattern (main + MTP). Parses the pattern to extract main and MTP componSTRING
HIGHmegatron/core/models/hybrid/hybrid_layer_allocation.py178Parse a unified hybrid pattern string into main and MTP components. The pattern uses "/" as a separator between theSTRING
HIGHmegatron/core/models/hybrid/hybrid_layer_allocation.py281Validate and convert a single pipeline segment pattern to layer configs. This is used after the main pattern has beSTRING
HIGHmegatron/core/models/hybrid/hybrid_layer_allocation.py318Select and validate the pipeline segment for the given PP rank and VP stage. When the main pattern contains '|' pipSTRING
HIGHmegatron/core/models/hybrid/shortcut_block.py64Group physical layers into their registered shortcut-block hierarchy. Grouping updates the layer names through the STRING
HIGHmegatron/core/models/hybrid/layers/utils.py69Create a layer-specific config from a normalized stack-level config. Args: config: Normalized stack-level cSTRING
HIGHmegatron/core/models/hybrid/layers/utils.py90Return the canonical symbol for a layer config. Args: layer_config: Layer config whose hybrid symbol shouldSTRING
HIGH…tron/core/dist_checkpointing/gpt_checkpoint_interop.py101Derive hybrid->GPT layer index maps from a hybrid layer pattern. Args: hybrid_layer_pattern: the run's unifSTRING
HIGHmegatron/core/dist_checkpointing/validation.py288Raises or logs an error in case missing or unexpected keys are non-empty. Args: missing_keys (Set[str]): miSTRING
HIGHmegatron/core/dist_checkpointing/validation.py366Validate if the ShardedTensors and ShardedObjects from multiple processes define correct sharding. Local ShardedTenSTRING
HIGH…ng/nvshmem_copy_service/memory/tensor_pointer_utils.py19 Extract the data pointer from a tensor. Args: tensor: Can be torch.Tensor, CuPy array, or STRING
HIGHmegatron/core/inference/inference_request.py886Populate generated text by decoding the complete generated token stream. Args: tokenizer: TokenizerSTRING
HIGHmegatron/core/inference/headers.py102Resolve an integer wire value to its category header member. Args: value (int): The integer header value reSTRING
HIGHmegatron/core/inference/shards_spec.py101Parse + validate the ``--inference-shards`` string. Args: spec_str: Raw CLI value, e.g. ``"tp=2,dp=1+tp=1,dSTRING
HIGHmegatron/core/inference/quantization/utils.py65Resolve the canonical MXFP8 storage required by a grouped-MoE backend. Args: inference_grouped_gemm_backendSTRING
HIGHmegatron/core/inference/moe/__init__.py23Convert a config value to a grouped-GEMM backend. Args: value: Backend name or an already-convertedSTRING
HIGHmegatron/core/export/trtllm/trtllm_layers.py85Helper function to rename model layer names to TRTLLM Layer names We go through each layer (keys) in the model STRING
HIGHmegatron/training/arguments.py197Validate model config arguments from heterogeneous config. This function takes model arguments and validates them bSTRING
HIGHmegatron/training/callbacks.py312Return list of callbacks registered for an event. Args: event_name: Name of the event. RetSTRING
HIGHmegatron/training/tensor_metrics/definitions.py71Compute one additive sum-of-squares contribution per input tensor. Tensors the fused multi-tensor L2 kernel accSTRING
HIGHmegatron/training/tensor_metrics/core.py182Return the relation for an axis. Args: axis: Abstract rank axis identifier. Returns: STRING
HIGHmegatron/training/tensor_metrics/core.py214Return a copy with one axis assigned a new placement. Args: axis: Existing abstract rank axis identSTRING
HIGHmegatron/training/tensor_metrics/core.py491Convert selected tensors to a potential batch of mergeable contributions. Args: values: Selected obSTRING
HIGHmegatron/training/tensor_metrics/core.py516Combine per-tensor contributions for one result. Args: values: Prepared tensors corresponding to `cSTRING
HIGHmegatron/training/tensor_metrics/core.py598Advance one completed logical-reduction stage. Args: values: Completed branch reductions in requestSTRING
HIGHmegatron/training/tensor_metrics/core.py724Prepare and run a metric to completion for observed tensors. Args: metric: Metric implementation toSTRING
HIGHmegatron/training/tensor_metrics/core.py789Complete metric steps that may have been started earlier. Together with `prepare`, this separation lets short-lSTRING
HIGHmegatron/training/config/instantiate_utils.py128Instantiate an object or callable from a config object. This function takes a configuration object (dictionary, lisSTRING
HIGHmegatron/training/config/instantiate_utils.py232Recursively instantiates a node within a configuration structure. This function handles the instantiation of indiviSTRING
HIGHmegatron/training/utils/checkpoint_utils.py130Read the run configuration from a YAML file (rank 0 only). Reads the file on rank 0 and broadcasts the result to otSTRING
Modern Structural Boilerplate279 hits · 284 pts
SeverityFileLineSnippetContext
LOWtools/check_golden_values.py34logger = logging.getLogger(__name__)CODE
LOWtools/check_kernel_determinism_coverage.py35logger = logging.getLogger(__name__)CODE
LOWtools/trigger_internal_ci.py48logger = logging.getLogger(__name__)CODE
LOW…t_tests/distributed/mfsdp_v1/test_mfsdp_fully_shard.py39logger = logging.getLogger(__name__)CODE
LOW…distributed/mfsdp_v1/test_mfsdp_nonuniform_sharding.py29logger = logging.getLogger(__name__)CODE
LOW…/unit_tests/distributed/mfsdp_v2/test_mcore_adapter.py42logger = logging.getLogger(__name__)CODE
LOW…ts/unit_tests/distributed/mfsdp_v2/test_fully_shard.py35logger = logging.getLogger(__name__)CODE
LOWtests/unit_tests/distributed/mfsdp_v2/test_memory.py27logger = logging.getLogger(__name__)CODE
LOW…sts/unit_tests/distributed/mfsdp_v2/test_annotation.py70def _setup_nvtx_recording(monkeypatch: pytest.MonkeyPatch, events: list[NvtxEvent]) -> None:CODE
LOW…sts/unit_tests/distributed/mfsdp_v2/test_cuda_graph.py20logger = logging.getLogger(__name__)CODE
LOWtests/unit_tests/models/mimo/test_mimo_1f1b_schedule.py56logger = logging.getLogger(__name__)CODE
LOWtests/unit_tests/resharding/test_model_swap.py253 def set_hidden_states(self, hidden_states: torch.Tensor) -> None:CODE
LOWtests/test_utils/python_scripts/recipe_parser.py13logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/check_status_of_main.py18logger = logging.getLogger(__name__)CODE
LOW⚡tests/test_utils/python_scripts/launch_jet_workload.py29logger = logging.getLogger(__name__)CODE
LOW⚡tests/test_utils/python_scripts/launch_jet_workload.py32logger = logging.getLogger(__name__)CODE
LOW…/test_utils/python_scripts/launch_nemo_run_workload.py17logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/notify.py37logger = logging.getLogger(__name__)CODE
LOW…st_utils/python_scripts/download_unit_tests_dataset.py18logger = logging.getLogger(__name__)CODE
LOW…/test_utils/python_scripts/compare_golden_values_kl.py67logger = logging.getLogger(__name__)CODE
LOW…test_utils/python_scripts/download_coverage_results.py15logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/auto_reminder_github.py23logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/wait_for_resources.py19logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/dashboard.py15logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/approve_merge_gate.py27logger = logging.getLogger(__name__)CODE
LOWtests/test_utils/python_scripts/swap_pr_labels.py19logger = logging.getLogger(__name__)CODE
LOW…ts/test_utils/python_scripts/download_golden_values.py19logger = logging.getLogger(__name__)CODE
LOW…l_tests/python_test_utils/compute_golden_statistics.py43logger = logging.getLogger(__name__)CODE
LOW…t_utils/test_pretraining_resume_checkpoint_pipeline.py11logger = logging.getLogger(__name__)CODE
LOW…s/python_test_utils/test_inference_regular_pipeline.py14logger = logging.getLogger(__name__)CODE
LOW…python_test_utils/test_pretraining_regular_pipeline.py11logger = logging.getLogger(__name__)CODE
LOWtests/functional_tests/python_test_utils/common.py21logger = logging.getLogger(__name__)CODE
LOW…nal_tests/python_test_utils/test_grpo_training_loop.py11logger = logging.getLogger(__name__)CODE
LOW…n_test_utils/get_test_results_from_tensorboard_logs.py13logger = logging.getLogger(__name__)CODE
LOWexamples/mimo/pretrain_mimo.py53def _set_stock_parallel_args(args: argparse.Namespace) -> None:CODE
LOWexamples/mimo/training/encoder_prefetch.py21logger = logging.getLogger(__name__)CODE
LOWexamples/mimo/training/distributed.py15__all__ = ["initialize_distributed", "print_rank_0", "shutdown_distributed"]CODE
LOWscripts/check_api_backwards_compatibility.py26logger = logging.getLogger(__name__)CODE
LOW.github/scripts/re_review_reminder.py42logger = logging.getLogger(__name__)CODE
LOWmegatron/post_training/model_builder.py98logger = logging.getLogger(__name__)CODE
LOWmegatron/post_training/checkpointing.py32logger = logging.getLogger(__name__)CODE
LOW⚡megatron/core/fault_injector.py31__all__ = ["FaultInjectorConfig", "setup_fault_injection", "maybe_raise_workload_exception"]CODE
LOW⚡megatron/core/fault_injector.py42logger = logging.getLogger(__name__)CODE
LOWmegatron/core/parallel_state.py18logger = logging.getLogger(__name__)CODE
LOWmegatron/core/full_cuda_graph.py16logger = logging.getLogger(__name__)CODE
LOWmegatron/core/__init__.py30__all__ = [CODE
LOWmegatron/core/_rank_utils.py81def set_default_log_ranks(ranks: Iterable[int]) -> None:CODE
LOWmegatron/core/msc_utils.py6logger = logging.getLogger(__name__)CODE
LOWmegatron/core/msc_utils.py111__all__ = ['MultiStorageClientFeature', 'maybe_msc']CODE
LOWmegatron/core/optimizer_param_scheduler.py16logger = logging.getLogger(__name__)CODE
LOWmegatron/core/nccl_allocator.py15logger = logging.getLogger(__name__)CODE
LOWmegatron/core/utils.py57logger = logging.getLogger(__name__)CODE
LOWmegatron/core/config_logger.py126__all__ = ['has_config_logger_enabled', 'log_config_to_disk']CODE
LOWmegatron/core/num_microbatches_calculator.py9logger = logging.getLogger(__name__)CODE
LOWmegatron/core/timers.py32logger = logging.getLogger(__name__)CODE
LOWmegatron/core/rerun_state_machine.py32logger = logging.getLogger(__name__)CODE
LOWmegatron/core/rerun_state_machine.py243 def set_mode(self, mode: RerunMode) -> None:CODE
LOWmegatron/core/rerun_state_machine.py1393def _set_rerun_state_machine(rerun_state_machine) -> None:CODE
LOWmegatron/core/ssm/mamba_mixer.py111logger = logging.getLogger(__name__)CODE
LOWmegatron/core/ssm/gated_delta_product.py126logger = logging.getLogger(__name__)CODE
219 more matches not shown…
Over-Commented Block247 hits · 220 pts
SeverityFileLineSnippetContext
LOWpretrain_hybrid.py501 # The agent sets NVRX_LAUNCH_TIME on EVERY cohort, cycle 0 included, so this override must beCOMMENT
LOWpretrain_hybrid.py521 (_NVRX_CYCLE not in ('', '0') and _NVRX_CYCLE.isdigit()) or _NVRX_CYCLE_START is not NoneCOMMENT
LOWtasks/finetune_utils.py121 # shuffling so we can just use a simple infinite loop.COMMENT
LOW.gitlab/scripts/check_imports.py1# Copyright (c) 2025, NVIDIA CORPORATION.COMMENT
LOWtools/bisect.sh1#!/usr/bin/env bashCOMMENT
LOWtools/trigger_internal_ci.py1#!/usr/bin/env python3COMMENT
LOWtools/checkpoint/convert.py1# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWtools/checkpoint/convert.py21# full model weights, nothing split.COMMENT
LOWtools/checkpoint/convert.py41# consumed_train_samplesCOMMENT
LOWtools/checkpoint/convert.py61# "mlp l0 bias"COMMENT
LOWtools/checkpoint/gpt_hybrid_conversion.py221 else:COMMENT
LOWtools/checkpoint/gpt_hybrid_conversion.py241#COMMENT
LOWtools/checkpoint/checkpoint_inspector.py1221COMMENT
LOWtools/common_pile_dataset/setup_common_pile_dataset.sh1#!/bin/bashCOMMENT
LOWdocker/common/install_nccl.sh1# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.COMMENT
LOW…t_cases/gpt/gpt_583m_perf_gb200_4gpu/model_config.yaml1# Inference perf test: 583M mcore-mistral checkpoint, TP=1 PP=1 DP=4 (4 GPUs).COMMENT
LOW…_cases/gpt/gpt_583m_perf_async_sched/model_config.yaml1# Inference perf test: 583M mcore-mistral checkpoint, TP=1 PP=1 DP=8 (8 GPUs),COMMENT
LOW…gpt_583m_perf_async_sched_gb200_4gpu/model_config.yaml1# Inference perf test: 583M mcore-mistral checkpoint, TP=1 PP=1 DP=4 (4 GPUs),COMMENT
LOW…rid/hybrid_nanov3_3b_perf_gb200_4gpu/model_config.yaml1# Inference perf test: nanov3 3B hybrid MoE checkpoint, TP=1 PP=1 EP=4 (4 GPUs).COMMENT
LOW…ts/performance_tests/shell_test_utils/run_perf_test.sh1#!/usr/bin/env bashCOMMENT
LOW…ts/performance_tests/shell_test_utils/run_perf_test.sh141)COMMENT
LOWtests/unit_tests/test_imports.py1# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWtests/unit_tests/testmon_mandatory_tests.yaml1# Unit tests that must always run when a source directory changes, regardless ofCOMMENT
LOWtests/unit_tests/ssm/test_gdp_dynamic_inference.py501COMMENT
LOWtests/unit_tests/ssm/test_gdp_dynamic_inference.py841 assert torch.equal(graph_conv, ref_conv)COMMENT
LOWtests/unit_tests/tokenizers/test_text_parsers.py141COMMENT
LOWtests/unit_tests/tokenizers/test_text_parsers.py241 json.loads(raw, parse_constant=_bare)COMMENT
LOW…s/checkpoint/test_gpt_hybrid_conversion_parallelism.py41COMMENT
LOWtests/unit_tests/determinism/configs.py121 # mamba-attn-mlp covers Mamba + attention + MLP paths. pure-mamba isCOMMENT
LOWtests/unit_tests/determinism/configs.py181 "TP": "tensor_model_parallel_size",COMMENT
LOW…sts/distributed/test_grad_sync_with_expert_parallel.py341 with_context_parallel=True, partial_data_parallel=TrueCOMMENT
LOWtests/unit_tests/distributed/mfsdp_v2/conftest.py61 # communicator resources from accumulating across tests.COMMENT
LOWtests/unit_tests/distributed/mfsdp_v2/test_overlap.py101COMMENT
LOW…unit_tests/transformer/test_fsdp_dtensor_checkpoint.py1# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWtests/unit_tests/transformer/test_mhc_block_manager.py401# ============================================================================COMMENT
LOW…s/unit_tests/elastification/test_hybrid_flex_router.py81 tensor_model_parallel_size=1, pipeline_model_parallel_size=1COMMENT
LOWtests/unit_tests/training/test_freeze_all_layers.py101 assert chunk.router.frozen_expert_bias is TrueCOMMENT
LOW…s/unit_tests/dist_checkpointing/test_fully_parallel.py521 'a': [(0, 0)], # saved by rank 0 obviouslyCOMMENT
LOW…unit_tests/generalized_tensor_parallel/test_gtp_dcp.py1141# Gated-delta-product (GDP) in_proj: gather+split under GTP_rematCOMMENT
LOW…/unit_tests/inference/test_mtp_cuda_graph_inference.py1261# through `_run_test`, which seeds `random.seed(...)` so every EP rank builds an IDENTICALCOMMENT
LOW…ests/inference/contexts/test_dynamic_prefix_caching.py1381 #COMMENT
LOW…nit_tests/inference/engines/test_gdp_cuda_graph_e2e.py101 # Batch-invariant CUDA-graph buckets align their token counts to theCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py961 num_speculative_tokens: int = 0COMMENT
LOW…es/test_dynamic_engine_parallel_and_chunked_prefill.py281 num_expected = request.sampling_params.num_tokens_to_generateCOMMENT
LOW…es/test_dynamic_engine_parallel_and_chunked_prefill.py641COMMENT
LOW…es/test_dynamic_engine_parallel_and_chunked_prefill.py1241 # not supported"), but transformer_config validation actually PERMITS the combination --COMMENT
LOW…es/test_dynamic_engine_parallel_and_chunked_prefill.py1741 # Generated tokens are too blunt on their own: a zero-filled carryCOMMENT
LOWtests/test_utils/python_scripts/recipe_parser.py21# cadence remains the trigger axis.COMMENT
LOWtests/test_utils/python_scripts/test_oncall_manager.py1# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWtests/test_utils/recipes/h100/moe.yaml121 # Weekly tests: Run both DEV and LTS unless something is flaky #COMMENT
LOWtests/test_utils/recipes/h100/moe.yaml261 # Super important mr, mr-github tests that run for both DEV and LTS per mr, mr-github #COMMENT
LOW…cipes/h100/gpt-dynamic-inference-with-coordinator.yaml101 # Throughput coverage for this 583M dynamic-batching DP=8 config now lives atCOMMENT
LOWtests/test_utils/recipes/h100/gpt.yaml461 - environment: [dev]COMMENT
LOWtests/test_utils/recipes/gb200/moe.yaml101 scope: [nightly]COMMENT
LOWtests/test_utils/recipes/gb200/moe.yaml201 - environment: [dev]COMMENT
LOW…unctional_tests/test_cases/common/moe_perf/__main__.py401COMMENT
LOW…unctional_tests/test_cases/common/moe_perf/__main__.py421 # test_moe_layer_performance(case, debug_mode=True)COMMENT
LOW…epseek_proxy_mfsdp_v2_ep2_ep_overlap/model_config.yaml1# DeepSeek-style proxy: 8 layers — 3 dense, rest MoE with expert parallelism 2.COMMENT
LOW…eepseek_proxy_mfsdp_v2_ep2_hfsdp_mb2/model_config.yaml1# DeepSeek-style proxy: 8 layers - 3 dense, rest MoE with expert parallelism 2.COMMENT
LOW…_pp1_ep4_16B_mtp_sp_block_cudagraphs/model_config.yaml1# Inference functional test: MTP + sequence parallelism + block-scope CUDA graphs.COMMENT
187 more matches not shown…
Redundant / Tautological Comments129 hits · 196 pts
SeverityFileLineSnippetContext
LOWtrain_rl.py63 # Check if fp8_model_init supports preserve_high_precision_init_valCOMMENT
LOW⚡tools/check_copyright.py20 # Check if the expected header is at the start of the fileCOMMENT
LOWtools/common_pile_dataset/setup_common_pile_dataset.sh50# Check if create_common_pile_ci_dataset.py was scp'd alongside this scriptCOMMENT
LOWdocker/common/install_source_wheels.sh25# Check if required arguments are providedCOMMENT
LOWtests/unit_tests/test_optimizer.py50 # Check if FP8 block scaling is available.COMMENT
LOW⚡tests/unit_tests/test_utils.py531 # Check if configuration was success.COMMENT
LOW⚡tests/unit_tests/test_utils.py534 # Check if the instance is in disabled state.COMMENT
LOW⚡tests/unit_tests/test_utils.py538 # Check if all ranks have straggler detector enabled.COMMENT
LOWtests/unit_tests/conftest.py143 # Check if data directory exists and has contentCOMMENT
LOWtests/unit_tests/fusions/test_torch_softmax.py145 # Check if output is a valid probability distributionCOMMENT
LOWtests/unit_tests/transformer/test_cuda_graphs.py843 # Check if cuda graph is correctly setting is first/last layerCOMMENT
LOWtests/unit_tests/transformer/test_attention.py419 # Check if output and bias have the correct shapeCOMMENT
LOWtests/unit_tests/transformer/test_attention.py601 # Check if the output is closeCOMMENT
LOW…/unit_tests/transformer/test_multi_latent_attention.py1608 # Check if the output is the sameCOMMENT
LOW…it_tests/transformer/moe/test_moe_layer_discrepancy.py69 # Check if parameters are the sameCOMMENT
LOW…it_tests/transformer/moe/test_moe_layer_discrepancy.py75 # Check if input is the same across all ranksCOMMENT
LOW…it_tests/transformer/moe/test_moe_layer_discrepancy.py150 # Check if output is the same across all ranksCOMMENT
LOW…it_tests/transformer/moe/test_moe_layer_discrepancy.py216 # Check if output is the same across all ranksCOMMENT
LOWtests/unit_tests/transformer/moe/test_moe_layer.py164 # Check if the moe layer is interleaved correctlyCOMMENT
LOWtests/unit_tests/models/test_llava_model.py990 # Check if output shape is as expectedCOMMENT
LOW…_tests/dist_checkpointing/test_layer_wise_optimizer.py144 # Check if optimizer is ChainedOptimizer (expected for standard setup)COMMENT
LOW…/unit_tests/inference/contexts/test_dynamic_context.py1582 # Assign blocks to the requests (one block per request)COMMENT
LOW…/unit_tests/inference/contexts/test_dynamic_context.py1658 # Assign blocks to the requests:COMMENT
LOW…ts/test_utils/python_scripts/download_golden_values.py288 # Check if we should skip based on only_failing flagCOMMENT
LOW…nal_tests/test_cases/common/ckpt_converter/__main__.py898 # Print results.COMMENT
LOW…unctional_tests/shell_test_utils/run_batch_ci_tests.sh173 # Check if file is empty (job still running or not started)COMMENT
LOWtests/functional_tests/shell_test_utils/run_ci_test.sh16# Set umask to 0002 to allow group read/write permissionsCOMMENT
LOWtests/functional_tests/shell_test_utils/run_ci_test.sh276 ## Loop over the list of model configs in the params file and run each one in sequence, collectingCOMMENT
LOWdocs/conf.py43# Check if we should skip autodoc generationCOMMENT
LOWexamples/post_training/modelopt/finetune.py369 # Check if this is OpenAI chat data?COMMENT
LOWexamples/mimo/utils/logging.py40 # Print output projectionsCOMMENT
LOWexamples/gptoss/02_train.sh55# Check if checkpoint path existsCOMMENT
LOWexamples/gptoss/02_train.sh62# Check if tensorboard logs path existsCOMMENT
LOWexamples/multimodal/dataset_helpers.py142 # Check if all samples fit in the knapsack capacity.COMMENT
LOWexamples/multimodal/data_loading/knapsacks.py34 # Check if all samples fit in the knapsack capacity.COMMENT
LOWexamples/multimodal/data_loading/knapsacks.py118 # Check if any sample exceeds max_capacityCOMMENT
LOWexamples/multimodal/data_loading/image_processing.py1388 # Check if we need to degrade (only if degradation is enabled)COMMENT
LOW…amples/multimodal/data_loading/cookers/conversation.py437 # Check if all media files are retrievedCOMMENT
LOW…amples/multimodal/data_loading/cookers/conversation.py501 # Check if all media files are retrievedCOMMENT
LOWexamples/inference/utils.py253 # Check if we have any prompts (from command line or JSONL)COMMENT
LOWexamples/inference/advanced/gpt_dynamic_inference.py274 # Check if all requests are finished.COMMENT
LOWexamples/rl/environments/countdown/countdown.py34 # Check if all numbers in equation are availableCOMMENT
LOWscripts/check_api_backwards_compatibility.py240 # Check if this breakage kind should be ignored globally (not a signature change)COMMENT
LOWscripts/check_api_backwards_compatibility.py253 # Check if this is a breakage kind we ignore for __init__ methodsCOMMENT
LOWscripts/check_api_backwards_compatibility.py263 # Check if it's a child of a filtered objectCOMMENT
LOWscripts/check_api_backwards_compatibility.py350 # Print resultsCOMMENT
LOW.github/actions/check-nvidia-sso-membership/action.yml73 # Check if SSO file is availableCOMMENT
LOW.github/actions/check-nvidia-sso-membership/action.yml82 # Check if username exists as a key in the JSON objectCOMMENT
LOWmegatron/post_training/model_builder.py354 # Set num_layers to 0 for base model in offline modeCOMMENT
LOWmegatron/core/parallel_state.py988 # Set NCCL_COLLNET_ENABLE to 1 to enable SHARP for the dp group.COMMENT
LOWmegatron/core/parallel_state.py1540 # Set NCCL_COLLNET_ENABLE to 1 to enable SHARP for the dp_replica group.COMMENT
LOWmegatron/core/parallel_state.py1569 # Set NCCL_COLLNET_ENABLE to 0 to restrict SHARP application to the dp_replica group.COMMENT
LOWmegatron/core/fp4_utils.py18# Check if Transformer Engine is installedCOMMENT
LOWmegatron/core/fp4_utils.py29# Check if Transformer Engine has class for fp4 tensors.COMMENT
LOWmegatron/core/fp8_utils.py23# Check if Transformer Engine is installedCOMMENT
LOWmegatron/core/fp8_utils.py41# Check if Transformer Engine has class for fp8 tensors.COMMENT
LOWmegatron/core/fp8_utils.py56# Check if Transformer Engine has MXFP8Tensor classCOMMENT
LOWmegatron/core/fp8_utils.py889 # Check if fp8_model_init supports setting recipeCOMMENT
LOWmegatron/core/fp8_utils.py894 # Check if fp8_model_init supports preserve_high_precision_init_valCOMMENT
LOWmegatron/core/utils.py3276 # Check if any deprecated key is present in kwargsCOMMENT
69 more matches not shown…
Structural Annotation Overuse96 hits · 174 pts
SeverityFileLineSnippetContext
LOW⚡tools/checkpoint/saver_hf_llava.py17 # Step 1: Reshape back to (num_head, 3*head_dim, -1)COMMENT
LOW⚡tools/checkpoint/saver_hf_llava.py20 # Step 2: Slice along the head_dim dimension to get q, k, vCOMMENT
LOW⚡tools/checkpoint/saver_hf_llava.py25 # Step 3: Reshape each back to (num_head * head_dim, -1)COMMENT
LOWtools/common_pile_dataset/README.md113### Step 1: Vocabulary FilesCOMMENT
LOWtools/common_pile_dataset/README.md119### Step 2: Download Raw TextCOMMENT
LOWtools/common_pile_dataset/README.md132### Step 3: GPT PreprocessingCOMMENT
LOWtools/common_pile_dataset/README.md137### Step 4: BERT PreprocessingCOMMENT
LOWtools/common_pile_dataset/README.md150### Step 5: T5 PreprocessingCOMMENT
LOWtools/common_pile_dataset/README.md155### Step 6: VerificationCOMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py361 # Step 1: Get vocabulary filesCOMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py387 # Step 2: Get raw text dataCOMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py411 # Step 3: Preprocess for GPT (GPT2BPETokenizer)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py434 # Step 4: Preprocess for BERT (BertWordPieceLowerCase + split-sentences)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py475 # Step 5: Preprocess for T5 (BertWordPieceCase)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py497 # Step 6: Clean up and verifyCOMMENT
LOW⚡…/unit_tests/transformer/test_multi_latent_attention.py2305 # Step 1: MXFP8 GEMM. Same as TE Linear's forward under fp8_autocast.COMMENT
LOW⚡…/unit_tests/transformer/test_multi_latent_attention.py2331 # Step 3: Quantize. Same quantizer + format as _QuantizeKVForFusedAttn uses for K/V.COMMENT
LOW…/unit_tests/transformer/test_multi_latent_attention.py2318 # Step 2: RoPE. fused_apply_mla_rope_for_q expects (S, B, NH, Q_HEAD_DIM) whenCOMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2625 # Step 1: Forward pass for all 3 requestsCOMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2634 # Step 2: Forward pass where req 10 finishes, req 11 continues. Req 999 is NOT scheduled.COMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2723 # Step 1: All 3 requests are active, process forward passCOMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2732 # Step 2: Both decode requests finish, chunked prefill NOT scheduled this step.COMMENT
LOW…/unit_tests/inference/contexts/test_dynamic_context.py2656 # Step 3: Add the next chunk. It should sit exactly at the boundary (index 1) and inherit the state.COMMENT
LOW…nference/contexts/test_dynamic_context_mtp_kv_cache.py1377 # Step 1: the batch is one over the cap, so the spare holder is force-paused.COMMENT
LOW…nference/contexts/test_dynamic_context_mtp_kv_cache.py1388 # Step 2: retire one filler so the paused row fits back in the active window.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4434 # Step 1: schedule and launch the first prefill chunk as the async primer.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4438 # Step 2: resolve the first chunk and launch the second chunk.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4505 # Step 5: resolve that batch and launch the next decode/prefill batch.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4513 # Step 6: resolve request 1's final decode and launch request 2's finalCOMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4655 # Step 1: A's full prompt plus B's first token fill the 256-token budget.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4662 # Step 2: B's final one-token chunk.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4668 # Step 3: resolve B's prefill output.COMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4456 # Step 3: resolve request 1's second chunk and launch the batch containingCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4479 # Step 4: resolve that mixed batch and launch request 1's decode withCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4537 # Step 7: resolve request 2's final prefill and launch request 3's finalCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4549 # Step 8: resolve request 3's final prefill output.COMMENT
LOW⚡…l_tests/python_test_utils/compute_golden_statistics.py11 # Step 1: Run batch tests (from megatron-rl directory):STRING
LOW⚡…l_tests/python_test_utils/compute_golden_statistics.py15 # Step 2: Wait for jobs to complete, then compute statistics:STRING
LOW⚡docs/developer/submit.md15## Step 1: Mark PR as "Ready for Review"COMMENT
LOW⚡docs/developer/submit.md24## Step 2: Final Review (`megatron/core` only)COMMENT
LOW⚡docs/developer/submit.md32## Step 3: ApprovedCOMMENT
LOW⚡docs/developer/submit.md37## Step 4: MergeCOMMENT
LOWdocs/user-guide/data-loading.md39### Step 1: Consolidate dataset filesCOMMENT
LOWdocs/user-guide/data-loading.md53### Step 2: Pre-build the dataset cacheCOMMENT
LOWdocs/user-guide/data-loading.md77### Step 3: Optionally pre-build per-dataset metadataCOMMENT
LOWdocs/user-guide/data-loading.md87### Step 4: Launch training with optimized data loadingCOMMENT
LOWexamples/gptoss/README.md3## Step 0: Install DependenciesCOMMENT
LOWexamples/gptoss/README.md57## Step 1: Convert HuggingFace to Megatron (Optional - skip if you already have a Megatron checkpoint)COMMENT
LOWexamples/gptoss/README.md65## Step 2: Train from ScratchCOMMENT
LOWexamples/gptoss/README.md147## Step 3: Convert Megatron to HuggingFaceCOMMENT
LOW⚡examples/multimodal/data_loading/image_processing.py1109 # Step 2: Check if total tokens is within budgetCOMMENT
LOW⚡examples/multimodal/data_loading/image_processing.py1116 # Step 3: We're over budget, need to scale downCOMMENT
LOWexamples/multimodal/data_loading/image_processing.py1098 # Step 1: Process each media with current token budgetCOMMENT
LOW⚡.github/pull_request_template.md34#### Step 1: Mark PR as "Ready for Review"COMMENT
LOW⚡.github/pull_request_template.md43#### Step 2: Final ReviewCOMMENT
LOW⚡.github/pull_request_template.md49#### Step 3: ApprovedCOMMENT
LOW⚡.github/scripts/oncall_manager.py135 # Step 1: Add new oncall first (include current members to avoid removing anyone yet)COMMENT
LOW⚡.github/scripts/oncall_manager.py142 # Step 2: Now set the usergroup to contain only the new oncallCOMMENT
LOW⚡…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1935 # Step 3: Split parameter groups to meet communication segmentation requirements.COMMENT
LOW⚡…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1989 # Step 4: Generate the groups of collective buckets, where each group aggregatesCOMMENT
36 more matches not shown…
AI Structural Patterns200 hits · 166 pts
SeverityFileLineSnippetContext
LOWtools/checkpoint/weighted_merge.py1621CODE
LOWtools/bert_embedding/huggingface.py51CODE
LOWtests/unit_tests/test_layer_wise_optimizer.py210CODE
LOW…s/checkpoint/test_gpt_hybrid_conversion_parallelism.py71CODE
LOWtests/unit_tests/distributed/mfsdp_v1/utils.py39CODE
LOW…/unit_tests/transformer/test_multi_token_prediction.py908CODE
LOW…er/experimental_attention_variant/test_absorbed_mla.py83CODE
LOW…mental_attention_variant/test_dsv4_hybrid_attention.py58CODE
LOW…mental_attention_variant/test_attention_variant_csa.py565CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py1092CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py1239CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py1594CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py2582CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py2672CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py2759CODE
LOW…perimental_attention_variant/test_dsa_native_parity.py2910CODE
LOW…ts/unit_tests/transformer/moe/test_token_dispatcher.py79CODE
LOWtests/unit_tests/transformer/moe/test_paged_stashing.py169CODE
LOW…nit_tests/transformer/moe/test_moe_recompute_memory.py28CODE
LOW…s/elastification/test_inject_flextron_forward_logic.py33CODE
LOW…it_tests/pipeline_parallel/test_bridge_communicator.py164CODE
LOWtests/unit_tests/models/mimo/test_mimo_1f1b_schedule.py524CODE
LOWtests/unit_tests/models/mimo/test_mimo_1f1b_schedule.py801CODE
LOWtests/unit_tests/dist_checkpointing/utils.py250CODE
LOWtests/unit_tests/dist_checkpointing/utils.py422CODE
LOWtests/unit_tests/resharding/test_planner.py34CODE
LOW…s/inference/test_dynamic_prefix_caching_coordinator.py211CODE
LOWtests/unit_tests/inference/test_wandb_logging.py52CODE
LOWtests/unit_tests/inference/coordinator_test_utils.py19CODE
LOW…ests/inference/contexts/test_dynamic_prefix_caching.py76CODE
LOW…eration_controllers/test_text_generation_controller.py74CODE
LOW…eration_controllers/test_text_generation_controller.py3897CODE
LOW…generation_controllers/test_mtp_kv_cache_controller.py42CODE
LOW…generation_controllers/test_mtp_kv_cache_controller.py1121CODE
LOW…ts/inference/engines/test_hybrid_prefix_caching_e2e.py235CODE
LOW…sts/unit_tests/inference/engines/test_static_engine.py34CODE
LOW…sts/unit_tests/inference/engines/test_static_engine.py324CODE
LOWtests/unit_tests/data/test_bin_reader.py99CODE
LOWtests/test_utils/python_scripts/recipe_parser.py365CODE
LOW…/academic_paper_scripts/detxoify_lm/perspective_api.py88CODE
LOWexamples/post_training/modelopt/utils.py76CODE
LOWexamples/post_training/modelopt/utils.py154CODE
LOWexamples/mimo/training/builder.py125CODE
LOWexamples/mimo/data/mock.py165CODE
LOWexamples/mimo/data/mock.py41CODE
LOWexamples/multimodal/model.py30CODE
LOWexamples/multimodal/mimo_checkpoint_model.py139CODE
LOWexamples/multimodal/image_processing.py152CODE
LOW…ples/multimodal/model_converter/vision_model_tester.py77CODE
LOWexamples/multimodal/data_loading/image_processing.py661CODE
LOWmegatron/core/parallel_state.py622CODE
LOWmegatron/core/ssm/mamba_mixer.py175CODE
LOWmegatron/core/ssm/gated_delta_product.py212CODE
LOWmegatron/core/ssm/mamba_layer.py185CODE
LOWmegatron/core/ssm/mamba_context_parallel.py330CODE
LOWmegatron/core/ssm/mamba_context_parallel.py357CODE
LOWmegatron/core/ssm/gated_delta_net/common.py113CODE
LOWmegatron/core/ssm/ops/gdp/chunk_h.py234CODE
LOWmegatron/core/ssm/ops/gdp/chunk.py39CODE
LOWmegatron/core/ssm/ops/gdp/fused_recurrent.py187CODE
140 more matches not shown…
Verbosity Indicators71 hits · 132 pts
SeverityFileLineSnippetContext
LOW⚡tools/checkpoint/saver_hf_llava.py17 # Step 1: Reshape back to (num_head, 3*head_dim, -1)COMMENT
LOW⚡tools/checkpoint/saver_hf_llava.py20 # Step 2: Slice along the head_dim dimension to get q, k, vCOMMENT
LOW⚡tools/checkpoint/saver_hf_llava.py25 # Step 3: Reshape each back to (num_head * head_dim, -1)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py361 # Step 1: Get vocabulary filesCOMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py387 # Step 2: Get raw text dataCOMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py411 # Step 3: Preprocess for GPT (GPT2BPETokenizer)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py434 # Step 4: Preprocess for BERT (BertWordPieceLowerCase + split-sentences)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py475 # Step 5: Preprocess for T5 (BertWordPieceCase)COMMENT
LOW⚡…s/common_pile_dataset/create_common_pile_ci_dataset.py497 # Step 6: Clean up and verifyCOMMENT
LOW⚡…/unit_tests/transformer/test_multi_latent_attention.py2305 # Step 1: MXFP8 GEMM. Same as TE Linear's forward under fp8_autocast.COMMENT
LOW⚡…/unit_tests/transformer/test_multi_latent_attention.py2331 # Step 3: Quantize. Same quantizer + format as _QuantizeKVForFusedAttn uses for K/V.COMMENT
LOW…/unit_tests/transformer/test_multi_latent_attention.py2318 # Step 2: RoPE. fused_apply_mla_rope_for_q expects (S, B, NH, Q_HEAD_DIM) whenCOMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2625 # Step 1: Forward pass for all 3 requestsCOMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2634 # Step 2: Forward pass where req 10 finishes, req 11 continues. Req 999 is NOT scheduled.COMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2723 # Step 1: All 3 requests are active, process forward passCOMMENT
LOW⚡…/unit_tests/inference/contexts/test_dynamic_context.py2732 # Step 2: Both decode requests finish, chunked prefill NOT scheduled this step.COMMENT
LOW…/unit_tests/inference/contexts/test_dynamic_context.py2656 # Step 3: Add the next chunk. It should sit exactly at the boundary (index 1) and inherit the state.COMMENT
LOW…nference/contexts/test_dynamic_context_mtp_kv_cache.py1377 # Step 1: the batch is one over the cap, so the spare holder is force-paused.COMMENT
LOW…nference/contexts/test_dynamic_context_mtp_kv_cache.py1388 # Step 2: retire one filler so the paused row fits back in the active window.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4434 # Step 1: schedule and launch the first prefill chunk as the async primer.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4438 # Step 2: resolve the first chunk and launch the second chunk.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4505 # Step 5: resolve that batch and launch the next decode/prefill batch.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4513 # Step 6: resolve request 1's final decode and launch request 2's finalCOMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4655 # Step 1: A's full prompt plus B's first token fill the 256-token budget.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4662 # Step 2: B's final one-token chunk.COMMENT
LOW⚡…ts/unit_tests/inference/engines/test_dynamic_engine.py4668 # Step 3: resolve B's prefill output.COMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4456 # Step 3: resolve request 1's second chunk and launch the batch containingCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4479 # Step 4: resolve that mixed batch and launch request 1's decode withCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4537 # Step 7: resolve request 2's final prefill and launch request 3's finalCOMMENT
LOW…ts/unit_tests/inference/engines/test_dynamic_engine.py4549 # Step 8: resolve request 3's final prefill output.COMMENT
LOW⚡…l_tests/python_test_utils/compute_golden_statistics.py11 # Step 1: Run batch tests (from megatron-rl directory):STRING
LOW⚡…l_tests/python_test_utils/compute_golden_statistics.py15 # Step 2: Wait for jobs to complete, then compute statistics:STRING
LOW⚡examples/multimodal/data_loading/image_processing.py1109 # Step 2: Check if total tokens is within budgetCOMMENT
LOW⚡examples/multimodal/data_loading/image_processing.py1116 # Step 3: We're over budget, need to scale downCOMMENT
LOWexamples/multimodal/data_loading/image_processing.py1098 # Step 1: Process each media with current token budgetCOMMENT
LOW⚡.github/scripts/oncall_manager.py135 # Step 1: Add new oncall first (include current members to avoid removing anyone yet)COMMENT
LOW⚡.github/scripts/oncall_manager.py142 # Step 2: Now set the usergroup to contain only the new oncallCOMMENT
LOW⚡…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1935 # Step 3: Split parameter groups to meet communication segmentation requirements.COMMENT
LOW⚡…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1989 # Step 4: Generate the groups of collective buckets, where each group aggregatesCOMMENT
LOW…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1815 # Step 0: Register new FSDP unit modules.COMMENT
LOW…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1848 # Step 1: Group the parameters according to their execution order and attributes.COMMENT
LOW…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1886 # Step 2: Bucket the parameters based on the guide bucket size.COMMENT
LOW…e/transformer/custom_layers/batch_invariant_kernels.py312 # Step 1: Find maximum value in the row for numerical stabilityCOMMENT
LOW…e/transformer/custom_layers/batch_invariant_kernels.py324 # Step 2: Compute sum of exp(x - max_val)COMMENT
LOW…e/transformer/custom_layers/batch_invariant_kernels.py340 # Step 3: Compute final log_softmax values: x - max_val - log_sum_expCOMMENT
LOW⚡megatron/core/datasets/data_schedule.py558 # Step 1: Fetch batches and gather global sequence lengthsCOMMENT
LOW⚡megatron/core/datasets/data_schedule.py563 # Step 2: Check required sample keysCOMMENT
LOW⚡megatron/core/datasets/data_schedule.py569 # Step 3: Schedule samples into groupsCOMMENT
LOW⚡megatron/core/datasets/data_schedule.py606 # Step 5: Build packed microbatchesCOMMENT
LOW⚡megatron/core/datasets/data_schedule.py609 # Step 6: Calculate FLOPs infoCOMMENT
LOWmegatron/core/datasets/data_schedule.py582 # Step 4: Reroute samples to DCP ranksCOMMENT
LOWmegatron/core/datasets/data_schedule.py622 # Step 7: Broadcast to PP group (for middle PP stages)COMMENT
LOWmegatron/core/datasets/data_schedule.py638 # Step 8: Broadcast to TP group (for non-TP-0 ranks)COMMENT
LOWmegatron/core/datasets/data_schedule.py652 # Step 9: create data_iterator and handle VPP if enabledCOMMENT
LOW…n/core/dist_checkpointing/strategies/fully_parallel.py267 # Step 3: load part of the checkpoint.COMMENT
LOW…n/core/dist_checkpointing/strategies/fully_parallel.py321 # Step 4: exchange data between ranksCOMMENT
LOW⚡…gatron/core/resharding/nvshmem_copy_service/service.py252 # Step 1: Segment tasks (break large tasks into chunks)COMMENT
LOW⚡…gatron/core/resharding/nvshmem_copy_service/service.py262 # Step 2: Pack tasks into workload groupsCOMMENT
LOW⚡…gatron/core/resharding/nvshmem_copy_service/service.py269 # Step 3: Schedule workloads to iterationsCOMMENT
LOW⚡…gatron/core/resharding/nvshmem_copy_service/service.py278 # Step 4: Prepare iteration schedulesCOMMENT
11 more matches not shown…
AI Slop Vocabulary47 hits · 111 pts
SeverityFileLineSnippetContext
LOWtasks/finetune_utils.py121 # shuffling so we can just use a simple infinite loop.COMMENT
MEDIUMtests/unit_tests/test_inference.py108 # we are replicating what lm-eval-harness::TemplateLM::_encode_pair doesCOMMENT
MEDIUMtests/unit_tests/test_model_configs.py13# does not set an explicit METRICS list. Sourced from the functional-test harnessCOMMENT
MEDIUM…s/checkpoint/test_gpt_hybrid_conversion_parallelism.py45# harness launched pytest. When that default PG is multi-rank (e.g. Megatron'sCOMMENT
MEDIUM…/unit_tests/optimizer/test_layer_sharded_e2e_parity.py30# Plain bf16 run: the harness defaults to FP8, which is orthogonal here. ``fp8=None`` turnsCOMMENT
MEDIUM…/unit_tests/optimizer/test_layer_sharded_e2e_parity.py31# it off; the harness's positional ``recipe`` must then not be "mxfp8", because validate_argsCOMMENT
MEDIUM…sts/unit_tests/determinism/kernels/test_ssm_kernels.py161 # layout the Mamba mixer dispatches; the harness must hand them over unchanged.COMMENT
MEDIUM…ests/determinism/correctness/test_transformer_layer.py210 # stress harness relies on the connection count the launcherCOMMENT
LOW…t_tests/distributed/mfsdp_v1/test_mfsdp_fully_shard.py353 # DP: Only relevant when using HSDP, where we need the flattened DP group for data parallelism. (Otherwise, just pasCOMMENT
LOW…t_tests/distributed/mfsdp_v1/test_mfsdp_fully_shard.py355 # DP-Shard-CP: Only required if using CP. Otherwise, just pass dp_shard to FSDP.COMMENT
MEDIUMtests/unit_tests/transformer/test_utils.py427 """Test a comprehensive scenario with multiple configurations."""STRING
MEDIUM⚡tests/unit_tests/training/models/test_base.py223 """from_dict() reconstructs configs from serialized dicts, handles nested dataclasses, and is robust to unknown keysSTRING
LOW…s/unit_tests/dist_checkpointing/models/test_mlp_glu.py129 # Load happens in-place, so we can just use the same tensorsCOMMENT
MEDIUM…neralized_tensor_parallel/test_gtp_fp8_param_gather.py373 # Pure BF16 GTP reference: fp8=None overrides the harness default (recipe inert).COMMENT
MEDIUM…tests/generalized_tensor_parallel/test_gtp_muon_dcp.py257 # aliasing. The shared harness builds its own mock args, so wrap init_basic_mock_args toCOMMENT
MEDIUMtests/unit_tests/inference/test_endpoints_common.py119# --- HTTP harness, shared with the other endpoint test modules --------------------------------COMMENT
MEDIUM…/unit_tests/inference/contexts/test_dynamic_context.py3121 # 6. Verify seamless append (no legacy offset math needed)COMMENT
MEDIUM…s/inference/engines/test_dynamic_engine_async_sched.py434# Only list a pair when the harness below observes its production call/stateCOMMENT
MEDIUM…s/inference/engines/test_dynamic_engine_async_sched.py608 # final candidate; the harness still requires exact async-repeat top-N.COMMENT
MEDIUM…es/test_dynamic_engine_parallel_and_chunked_prefill.py1242 # it just imposes requirements the harness never set. For EP (not expert TP) they are:COMMENT
MEDIUM…cipes/h100/gpt-dynamic-inference-with-coordinator.yaml103 # skills/run-performance-tests/SKILL.md for the harness it runs under.COMMENT
MEDIUM…inference_server_smoke_tp1_pp1_dp8_583m/serve_smoke.py43 # the JET harness expects at ``logs/*/*/attempt_0/*/std*.log``) while stillCOMMENT
LOW…sts/functional_tests/shell_test_utils/_run_training.sh105 # If value is "true", just use the keyCOMMENT
LOWexamples/multimodal/dataset_helpers.py275 ), # TODO: handle class toekn length correctly(not just use 1)CODE
LOWexamples/multimodal/data_loading/task_encoder.py481 # Some videos are too short or low-fps, just use the whole video, like sthv2, smit, llava-hound (2fps)COMMENT
LOWexamples/multimodal/data_loading/image_processing.py1133 # If there was not scaling down, we're stuck just use min_num_patches per media, elseCOMMENT
LOWmegatron/core/optimizer_param_scheduler.py235 # If the learning rate is constant, just return the initial value.COMMENT
LOWmegatron/core/timers.py476 # polutes the runs list, so we just add each as a scalarCOMMENT
MEDIUMmegatron/core/ssm/triton_cache_manager.py69 # use temp dir to be robust against program interruptionsCOMMENT
LOW…ore/tokenizers/text/parsers/qwen3_coder_tool_parser.py167# These map to vLLM types but we just use dictionaries for nowCOMMENT
LOW⚡megatron/core/tensor_parallel/random.py202 # already graphable, just return it.COMMENT
LOW⚡megatron/core/tensor_parallel/random.py208 # already non-graphable, just return it.COMMENT
LOWmegatron/core/tensor_parallel/random.py121 # if not using cuda graphs, just use the builtin pytorch functionCOMMENT
MEDIUM⚡…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1999 # Set aggregate buckets by FSDP units, i.e. buckets pertaining to the sameCOMMENT
MEDIUM…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py2632 # to leverage NCCL UBR for high-precision gradient reduction withCOMMENT
MEDIUM…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py3632 # for a seamless user experience and coverage for ZeRO-1 and ZeRO-2?COMMENT
MEDIUM…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py5091 # TODO(@cspades): Clean up this logic in conjunction withCOMMENT
LOW…atron/core/distributed/fsdp/src/megatron_fsdp/utils.py237 # if not using cuda graphs, just use the builtin pytorch functionCOMMENT
LOWmegatron/core/transformer/transformer_config.py3388 # so just set both if either is specified.COMMENT
LOWmegatron/core/transformer/transformer_layer.py1534 # elements in bias_chunks are the same for all chunks, so we can just use the first oneCOMMENT
MEDIUMmegatron/core/transformer/mlp.py212 # Weight resharding across TP sizes will have aforementioned problems.COMMENT
MEDIUMmegatron/core/datasets/indexed_dataset.py6# Essentially re-written in entiretyCOMMENT
MEDIUM…e/models/common/embeddings/language_model_embedding.py149 # the original tensor from being garbage collected. Clone to facilitate GC.COMMENT
LOWmegatron/core/models/bert/bert_model.py204 # For local layer spec we just use b1ssCOMMENT
LOWmegatron/core/extensions/transformer_engine.py1185 # TODO should we ditch normalization config and just use spec to choose LayerNorm vs RMSNorm?COMMENT
MEDIUM…nce/data_parallel_inference_coordinator/coordinator.py582 # Todo [Siddharth]: Make this more robust to handle invalid messages.COMMENT
MEDIUMmegatron/training/checkpointing.py1832# in the serialized payload is a robust, unpickle-free signal that theCOMMENT
Cross-Language Confusion19 hits · 68 pts
SeverityFileLineSnippetContext
HIGH…core/transformer/heterogeneous/heterogeneous_config.py177 "n_heads_in_group": null,STRING
HIGH…er/experimental_attention_variant/dsa_cudnn_kernels.py1666 """KL(target || predict) over selected top-K entries.STRING
HIGH…er/experimental_attention_variant/dsa_cudnn_kernels.py1718 """KL(target || predict) over the **full** KV axis, averaged over ``(B, S_q)``.STRING
HIGH⚡…mer/experimental_attention_variant/dsa_indexer_loss.py25 """Return elementwise ``KL(target || predict)`` contributions."""STRING
HIGH⚡…mer/experimental_attention_variant/dsa_indexer_loss.py35 """Return ``KL(target || predict)`` reduced over the key dimension."""STRING
HIGH⚡…mer/experimental_attention_variant/dsa_indexer_loss.py43 """Return ``KL(target || predict)`` reduced over every dimension."""STRING
HIGH…_attention_variant/csa_utils/fused_sparse_attention.py774 """KL(target || predict) reduced over ``(B, S_q)`` and scaled by loss_coeff.STRING
HIGH…_attention_variant/csa_utils/fused_sparse_attention.py875 """KL(target || predict) over the **full** KV axis, averaged over ``(B, S_q)``.STRING
HIGH…mer/experimental_attention_variant/ops/tilelang_dsa.py383 """Compute KL(target || index) sum for one [s_chunk, topk] chunk."""STRING
HIGH…e/pipeline_parallel/fine_grained_activation_offload.py590 self.push(chunk)CODE
HIGH…e/pipeline_parallel/fine_grained_activation_offload.py798 self.push(cur_chunk)CODE
HIGHmegatron/core/allocator/vmm_symm_allocator.py88 if (result == CUDA_SUCCESS && supported) {CODE
HIGHmegatron/core/allocator/vmm_symm_allocator.py134 if (create_result != CUDA_SUCCESS && fabric_added) {CODE
HIGH⚡megatron/core/inference/inference_request.py489 Each block hash is computed as SHA-256(parent_digest || block_bytes), whereSTRING
HIGHmegatron/core/inference/unified_memory.py113 if (device != prev_device && device >= 0) cudaSetDevice(device);CODE
HIGHmegatron/core/inference/unified_memory.py149 if (device != prev_device && prev_device >= 0) cudaSetDevice(prev_device);CODE
HIGHmegatron/core/inference/moe/activations.py259 [M, ffn_hidden] BF16 (rows >= n_rows undefined).STRING
HIGHmegatron/core/inference/moe/vllm_fused_moe.py668 `input` are undefined).STRING
HIGHmegatron/training/arguments.py3551 "n_heads_in_group": null,STRING
Fake / Example Data29 hits · 31 pts
SeverityFileLineSnippetContext
LOWtools/run_dynamic_text_generation_server.py168 _defaults += ["--language-model-type", "placeholder"]CODE
LOW⚡tests/unit_tests/transformer/test_full_cuda_graph.py151 dummy_data = torch.ones(1, 4)CODE
LOW⚡tests/unit_tests/transformer/test_full_cuda_graph.py156 return model(dummy_data), loss_funcCODE
LOW⚡tests/unit_tests/pipeline_parallel/test_schedules.py593 dummy_data = torch.ones(1, 4)CODE
LOW⚡tests/unit_tests/pipeline_parallel/test_schedules.py598 return model(dummy_data), loss_funcCODE
LOW…sts/unit_tests/dist_checkpointing/test_safe_globals.py31 dummy_obj = Namespace(dummy_value=0)CODE
LOW…s/inference/test_dynamic_text_generation_server_cli.py24 ["--language-model-type", "placeholder", "--tokenizer-prompt-format", "mistral"],CODE
LOW⚡tests/unit_tests/rl/test_rl_utils.py1962 # Adapter stamps pass through; bare empties are inferred to 'placeholder'.COMMENT
LOW⚡tests/unit_tests/rl/test_rl_utils.py1964 ["ok", "ok", "placeholder"],CODE
LOW⚡tests/unit_tests/rl/test_rl_utils.py1965 ["masked", "placeholder", "placeholder"],CODE
LOWtests/unit_tests/rl/test_rl_utils.py1726 group.append("placeholder")CODE
LOWtests/unit_tests/rl/test_rl_utils.py1727 rollout_statuses.append(["placeholder", "placeholder"])CODE
LOWtests/unit_tests/rl/test_rl_utils.py1883 rollout_statuses=[["placeholder", "placeholder"]],CODE
LOWtests/unit_tests/rl/test_rl_utils.py1919 problem_id="placeholder",CODE
LOWexamples/multimodal/text_generation_mistral_clip.sh7INPUT_IMAGE_PATH="placeholder"CODE
LOWexamples/multimodal/text_generation_mistral_clip.sh8GROUNDTRUTH_PATH="placeholder"CODE
LOW…imodal/nvlm/run_text_generation_yi_34b_internvit_6b.sh7INPUT_IMAGE_PATH="placeholder"CODE
LOW…imodal/nvlm/run_text_generation_yi_34b_internvit_6b.sh8GROUNDTRUTH_PATH="placeholder"CODE
LOW…ultimodal/nvlm/run_text_generation_qwen25_7b_siglip.sh8INPUT_IMAGE_PATH="placeholder"CODE
LOW…ultimodal/nvlm/run_text_generation_qwen25_7b_siglip.sh9GROUNDTRUTH_PATH="placeholder"CODE
LOW…al/nvlm/run_text_generation_qwen20_72b_internvit_6b.sh8INPUT_IMAGE_PATH="placeholder"CODE
LOW…al/nvlm/run_text_generation_qwen20_72b_internvit_6b.sh9GROUNDTRUTH_PATH="placeholder"CODE
LOW…/nvlm/run_text_generation_qwen25_7b_internvit_video.sh8INPUT_IMAGE_PATH="placeholder"CODE
LOW…/nvlm/run_text_generation_qwen25_7b_internvit_video.sh9GROUNDTRUTH_PATH="placeholder"CODE
LOW…al/llama_3p1_nemotron_nano_vl_8b_v1/text_generation.sh7INPUT_IMAGE_PATH="placeholder"CODE
LOW…al/llama_3p1_nemotron_nano_vl_8b_v1/text_generation.sh8GROUNDTRUTH_PATH="placeholder"CODE
LOWmegatron/rl/rl_utils.py1481 rollout_status = 'placeholder'CODE
LOWmegatron/rl/types/rollout.py12KNOWN_ROLLOUT_STATUSES = ('ok', 'placeholder', 'masked', 'graded')CODE
LOWmegatron/rl/agent/rollout_pipeline.py510 return rollout.is_placeholder and rollout.rollout_status in ('ok', 'placeholder')CODE
Modern AI Meta-Vocabulary8 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMtests/functional_tests/shell_test_utils/run_ci_test.sh369 # orchestration's resumable retrigger.COMMENT
MEDIUM⚡megatron/core/ssm/ssm_inference.py188 # Shared orchestration.COMMENT
MEDIUM…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py1901 # We may share the embedding model weight and the final output layer,COMMENT
MEDIUMmegatron/core/inference/apis/async_llm.py239 # SIGINT or out-of-band orchestration).COMMENT
MEDIUMmegatron/core/inference/apis/llm.py232 # SIGINT or out-of-band orchestration).COMMENT
MEDIUM…t_generation_controllers/text_generation_controller.py3453 # Pick the context window that we need to pass through the network.COMMENT
MEDIUMmegatron/rl/rl_utils.py1413 # A turn must never exceed the model's context window.COMMENT
MEDIUMmegatron/rl/inference/megatron.py114 # detokenizing prompt tokens, especially expensive for long prompts in agentic RL.COMMENT
Dead Code5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtools/checkpoint/loader_llava.py52CODE
MEDIUM…nce_tp1_pp1_583m_cuda_graphs_validation/cuda_graphs.py183CODE
MEDIUM…nce_tp1_pp1_583m_cuda_graphs_validation/cuda_graphs.py184CODE
MEDIUM…nce_tp1_pp1_583m_cuda_graphs_validation/cuda_graphs.py185CODE
MEDIUM…nce_tp1_pp1_583m_cuda_graphs_validation/cuda_graphs.py186CODE
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtools/bisect.sh5# Usage:COMMENT
LOWtools/common_pile_dataset/setup_common_pile_dataset.sh9# Usage:COMMENT
LOW…unctional_tests/shell_test_utils/run_batch_ci_tests.sh5# Usage:COMMENT
LOW…nference/advanced/run_prefix_cache_lru_resume_repro.sh12# Usage:COMMENT
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGH.github/workflows/claude-copy-to-main.yml203 echo "🤖 **This PR was auto-generated by Claude** via the Claude copy workflow."CODE
TODO Padding3 hits · 3 pts
SeverityFileLineSnippetContext
LOW…/inference/test_data_parallel_inference_coordinator.py245 self.ep_consensus_interval = 1 # TODO: add tests for interval > 1 (e.g. verify pausing is delayed by at most N CODE
LOW…ibuted/fsdp/src/megatron_fsdp/param_and_grad_buffer.py5443 # TODO: Add validation checks for the legality of DTensor.COMMENT
LOWmegatron/core/transformer/multi_token_prediction.py2063 # TODO: implement block-based recompute for MTPCOMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMmegatron/core/process_groups_config.py818 """Check if this rank has a language model.STRING
MEDIUMmegatron/core/process_groups_config.py821 True if this rank has a language model, False otherwise.STRING
Overly Generic Function Names3 hits · 2 pts
SeverityFileLineSnippetContext
LOW…s/unit_tests/training/config/test_instantiate_utils.py52def test_function(arg1=None, arg2=None, **kwargs):CODE
LOWtests/unit_tests/training/config/test_yaml_utils.py45def test_function():CODE
LOWmegatron/core/utils.py2972 def my_function():STRING