Repository Analysis

THUDM/slime

slime is an LLM post-training framework for RL Scaling.

25.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of THUDM/slime, a Python project with 7,454 GitHub stars. SynthScan v2.0 examined 94,113 lines of code across 537 source files, recording 1432 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 25.2 places this repository in the Moderate AI signal band.

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

25.2
Adjusted Score
25.2
Raw Score
100%
Time Factor
2026-07-08
Last Push
7.5K
Stars
Python
Language
94.1K
Lines of Code
537
Files
1.4K
Pattern Hits
2026-07-14
Scan Date
0.21
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 0HIGH 111MEDIUM 215LOW 1106

Directory Score Breakdown

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

Pattern Findings

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

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers572 hits · 602 pts
SeverityFileLineSnippetContext
LOWtools/convert_torch_dist_to_hf_parallel.py60 def collect_from_storage_metadata(storage_item, base_path=""):CODE
LOWtools/convert_torch_dist_to_hf_bridge.py16def _patched_load_model_config(checkpoint_path):CODE
LOWtools/trace_timeline_viewer.py55def _make_dummy_pickle_global(module_name: str, name: str) -> type[_MissingPickleObject]:CODE
LOWtools/trace_timeline_viewer.py330 def nearest_closed_ancestor_end(span: dict[str, Any]) -> float | None:CODE
LOWtools/convert_hf_to_int4_direct.py76def round_to_quantized_type_dtype(CODE
LOWslime/backends/megatron_utils/checkpoint.py31 def _init_from_local_shards_and_global_metadata( # type: ignore[override]CODE
LOWslime/backends/megatron_utils/arguments.py20def _is_allgather_cp_dsa_model(hf_config):CODE
LOWslime/backends/megatron_utils/arguments.py28def _validate_allgather_cp_supported(args, hf_config=None):CODE
LOWslime/backends/megatron_utils/arguments.py147def _set_default_megatron_args(args):CODE
LOWslime/backends/megatron_utils/model.py44def _disable_tqdm_for_non_main_rank() -> bool:CODE
LOWslime/backends/megatron_utils/model.py52def _should_update_microbatch_pbar(model) -> bool:CODE
LOWslime/backends/megatron_utils/model.py64def _wrap_forward_step_with_microbatch_pbar(forward_step_func, pbar):CODE
LOWslime/backends/megatron_utils/model.py78def _with_rollout_top_p_token_keys(args: Namespace, keys: Sequence[str]) -> list[str]:CODE
LOWslime/backends/megatron_utils/model.py84def _iter_critic_output_layers(model: Sequence[DDP]):CODE
LOWslime/backends/megatron_utils/model.py95 def get_load_checkpoint_path_by_args(args, load_arg="load"):CODE
LOWslime/backends/megatron_utils/model.py125def _critic_output_layer_needs_reinit(args: Namespace, model: Sequence[DDP], role: str) -> bool:CODE
LOWslime/backends/megatron_utils/model.py172def _reinitialize_critic_output_layer(args: Namespace, model: Sequence[DDP]) -> None:CODE
LOWslime/backends/megatron_utils/model.py182def get_optimizer_param_scheduler(args: Namespace, optimizer: MegatronOptimizer) -> OptimizerParamScheduler:CODE
LOWslime/backends/megatron_utils/model.py242def _disable_distributed_optimizer_state_initialization(optimizer: MegatronOptimizer) -> None:CODE
LOWslime/backends/megatron_utils/model.py270def setup_model_and_optimizer(CODE
LOWslime/backends/megatron_utils/model.py699def should_disable_forward_pre_hook(args: Namespace) -> bool:CODE
LOWslime/backends/megatron_utils/model.py968def initialize_model_and_optimizer(CODE
LOWslime/backends/megatron_utils/loss.py40def get_rollout_top_p_logprob_kwargs(args: Namespace, batch: dict[str, Any]) -> dict[str, Any]:CODE
LOWslime/backends/megatron_utils/loss.py151def _allgather_cp_redistribute(CODE
LOWslime/backends/megatron_utils/loss.py470def get_log_probs_and_entropy(CODE
LOWslime/backends/megatron_utils/loss.py620def apply_opd_kl_to_advantages(CODE
LOWslime/backends/megatron_utils/loss.py661def compute_advantages_and_returns(args: Namespace, rollout_data: RolloutBatch) -> None:CODE
LOWslime/backends/megatron_utils/model_provider.py245def wrap_model_provider_with_freeze(original_provider, args):CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py45def save_hf_model_direct_to_path(CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py144def save_hf_model_bridge_to_path(args, output_dir: str | Path, model) -> None:CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py255def _finalize_distributed_shards(path: Path, local_state: dict[str, Any]) -> None:CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py352def _clear_existing_hf_weights(path: Path) -> None:CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py399def _raise_if_rank_zero_failed(context: str, error: str | None) -> None:CODE
LOWslime/backends/megatron_utils/cp_utils.py9def get_logits_and_tokens_offset_with_cp(CODE
LOWslime/backends/megatron_utils/cp_utils.py127def reduce_train_step_metrics(CODE
LOWslime/backends/megatron_utils/cp_utils.py171def rollout_log_metric_contribution(CODE
LOWslime/backends/megatron_utils/cp_utils.py197def gather_and_reduce_log_dict(CODE
LOWslime/backends/megatron_utils/cp_utils.py362def prepare_routed_experts_for_routing_replay(CODE
LOWslime/backends/megatron_utils/server/megatron_server.py49def _normalize_label_token_ids(label_token_ids: Any, expected_length: int) -> list[list[int]] | None:CODE
LOWslime/backends/megatron_utils/server/megatron_server.py99 def set_train_parallel_config(self, config: dict):CODE
LOWslime/backends/megatron_utils/server/megatron_server.py626def _run_warmup_via_private_http(sample_manager, args):CODE
LOWslime/backends/megatron_utils/server/megatron_server.py672def run_megatron_dp_models_loop_worker(dp_rank, pp_size, sample_manager, actor_models):CODE
LOWslime/backends/megatron_utils/server/megatron_server.py708def _build_update_from_disk_fn(actor_model):CODE
LOWslime/backends/megatron_utils/server/arguments.py34def add_megatron_server_arguments(parser):CODE
LOWslime/backends/megatron_utils/server/arguments.py87def configure_megatron_server_args(args):CODE
LOWslime/backends/megatron_utils/server/arguments.py104def validate_megatron_server_args(args):CODE
LOWslime/backends/megatron_utils/server/logprob_utils.py20def sample_from_vocab_parallel_logits_without_full_gather(CODE
LOWslime/backends/megatron_utils/server/logprob_utils.py157def get_label_token_log_probs_from_vocab_parallel_logits(CODE
LOWslime/backends/megatron_utils/server/logprob_utils.py267def _slice_response_rows_for_current_cp_rank(CODE
LOWslime/backends/megatron_utils/server/logprob_utils.py302def _merge_allgather_cp_tensors(CODE
LOWslime/backends/megatron_utils/server/logprob_utils.py351def _get_log_probs_and_optional_samples(CODE
LOW…egatron_utils/update_weight/update_weight_from_disk.py57 def disconnect_rollout_engines(self) -> None:CODE
LOW…atron_utils/update_weight/hf_weight_iterator_bridge.py13def _patch_bridge_expert_cache_to_cpu():CODE
LOW…atron_utils/update_weight/hf_weight_iterator_bridge.py83def _process_conversion_tasks(vanilla_conversion_tasks, new_weight_dict):CODE
LOW…atron_utils/update_weight/update_weight_from_tensor.py218def _send_to_colocated_engine(CODE
LOW…atron_utils/update_weight/update_weight_from_tensor.py291def _empty_flattened_tensor_data():CODE
LOWslime/backends/megatron_utils/update_weight/common.py144def _named_params_and_buffers_vanilla(model: Sequence[torch.nn.Module]) -> Iterator[tuple[str, torch.Tensor]]:CODE
LOWslime/backends/megatron_utils/update_weight/common.py160def _named_params_and_buffers_global(CODE
LOW…n_utils/update_weight/update_weight_from_disk_delta.py78 def disconnect_rollout_engines(self) -> None:CODE
LOW…_utils/update_weight/update_weight_from_distributed.py93 def disconnect_rollout_engines(self) -> None:CODE
512 more matches not shown…
Decorative Section Separators160 hits · 586 pts
SeverityFileLineSnippetContext
MEDIUMtools/analyze_profile.py189 # ─── Device Properties ──────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py197 # ─── CUDA/NCCL Info ─────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py207 # ─── Kernel Analysis ────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py320 # ─── Communication ──────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py329 # ─── CPU overhead ───────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py337# ─── Pretty print ──────────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py341 # ── Config ──────────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py23# ─── Color helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py65# ─── Data structures ───────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py235 # ─── GPU Utilization ────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py278 # ─── Per-stream analysis ────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py295 # ─── CUDA Graph analysis ───────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py352 # ── Timeline ────────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py363 # ── Kernel Breakdown ────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py382 # ── Top Kernels ─────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py390 # ── CUDA Graph ──────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py431 # ── CUDA Graph Location in Timeline ─────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py456 # ── GPU Idle Gaps ───────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py466 # ── Per-Stream ──────────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py484 # ── Communication ───────────────────────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py492 # ── Performance Bottleneck Summary ──────────────────────────────────COMMENT
MEDIUMtools/analyze_profile.py575 # ── Optimization Recommendations ────────────────────────────────────COMMENT
MEDIUMslime/utils/ppo_utils.py631 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py633 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py641 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py643 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py701 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py703 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py713 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py721 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py655 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py657 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py669 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/utils/ppo_utils.py681 # -------------------------------------------------------------------------COMMENT
MEDIUMslime/agent/trajectory.py23# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py25# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py41# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py43# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py111# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py113# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py136# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py138# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py264# ===========================================================================COMMENT
MEDIUMslime/agent/trajectory.py266# ===========================================================================COMMENT
MEDIUMtests/test_rm_gpqa.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_gpqa.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_gpqa.py88# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_gpqa.py90# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_sample.py30# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_sample.py32# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_sample.py175# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_sample.py177# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/_cp_dist_helpers.py140# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/_cp_dist_helpers.py158# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_math_dapo.py34# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_math_dapo.py37# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_math_dapo.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_math_dapo.py65# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_math_dapo.py82# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_rm_math_dapo.py84# ---------------------------------------------------------------------------COMMENT
100 more matches not shown…
Cross-Language Confusion100 hits · 438 pts
SeverityFileLineSnippetContext
HIGHtools/trace_timeline_viewer.py950 cursorTime: null,CODE
HIGHtools/trace_timeline_viewer.py951 hoveredItem: null,CODE
HIGHtools/trace_timeline_viewer.py952 selectedItem: null,CODE
HIGHtools/trace_timeline_viewer.py1156 const lane = rowExpanded(row) ? (item.lane || 0) : 0;CODE
HIGHtools/trace_timeline_viewer.py1165 let current = null;CODE
HIGHtools/trace_timeline_viewer.py1171 clusters.push(current);CODE
HIGHtools/trace_timeline_viewer.py1174 current.items.push(item);CODE
HIGHtools/trace_timeline_viewer.py1344 const row = rowIdx >= 0 ? state.rows[rowIdx] : null;CODE
HIGHtools/trace_timeline_viewer.py1345 if (row && rowExpanded(row)) {CODE
HIGHtools/trace_timeline_viewer.py1347 y: laneTop(layout, item.lane || 0, scrollTop) + 2,CODE
HIGHtools/trace_timeline_viewer.py1446 if (raw.start_attrs || raw.end_attrs) {CODE
HIGHtools/trace_timeline_viewer.py1455 if (!attrs) return null;CODE
HIGHtools/trace_timeline_viewer.py1459 if (v != null && v > 0) segs.push({ phase, duration: v });CODE
HIGHtools/trace_timeline_viewer.py1459 if (v != null && v > 0) segs.push({ phase, duration: v });CODE
HIGHtools/trace_timeline_viewer.py1501 const pdVirtualRole = attrs.timeline_pd_virtual_role || null;CODE
HIGHtools/trace_timeline_viewer.py1501 const pdVirtualRole = attrs.timeline_pd_virtual_role || null;CODE
HIGHtools/trace_timeline_viewer.py1503 if (!phases || (expanded && !pdVirtualRole)) return null;CODE
HIGHtools/trace_timeline_viewer.py1547 const colorKey = attrs.timeline_pd_parent_name || item.name;CODE
HIGHtools/trace_timeline_viewer.py1552 const pdVirtualRole = attrs.timeline_pd_virtual_role || null;CODE
HIGHtools/trace_timeline_viewer.py1552 const pdVirtualRole = attrs.timeline_pd_virtual_role || null;CODE
HIGHtools/trace_timeline_viewer.py1781 if (showText && labelWidthAvailable > 40) {CODE
HIGHtools/trace_timeline_viewer.py1786 if (a.prompt_tokens != null) pdParts.push(`P:${a.prompt_tokens}`);CODE
HIGHtools/trace_timeline_viewer.py1786 if (a.prompt_tokens != null) pdParts.push(`P:${a.prompt_tokens}`);CODE
HIGHtools/trace_timeline_viewer.py1787 if (a.completion_tokens != null) pdParts.push(`D:${a.completion_tokens}`);CODE
HIGHtools/trace_timeline_viewer.py1787 if (a.completion_tokens != null) pdParts.push(`D:${a.completion_tokens}`);CODE
HIGHtools/trace_timeline_viewer.py1788 if (a.cached_tokens != null && a.cached_tokens > 0) pdParts.push(`cache:${a.cached_tokens}`);CODE
HIGHtools/trace_timeline_viewer.py1788 if (a.cached_tokens != null && a.cached_tokens > 0) pdParts.push(`cache:${a.cached_tokens}`);CODE
HIGHtools/trace_timeline_viewer.py1789 if (a.pd_prefill_forward_duration != null) pdParts.push(`pf:${(a.pd_prefill_forward_duration*1000).toFixCODE
HIGHtools/trace_timeline_viewer.py1789 if (a.pd_prefill_forward_duration != null) pdParts.push(`pf:${(a.pd_prefill_forward_duration*1000).toFixCODE
HIGHtools/trace_timeline_viewer.py1790 if (a.pd_decode_forward_duration != null) pdParts.push(`df:${(a.pd_decode_forward_duration*1000).toFixedCODE
HIGHtools/trace_timeline_viewer.py1790 if (a.pd_decode_forward_duration != null) pdParts.push(`df:${(a.pd_decode_forward_duration*1000).toFixedCODE
HIGHtools/trace_timeline_viewer.py1791 if (a.pd_transfer_speed_gb_s != null) pdParts.push(`${a.pd_transfer_speed_gb_s.toFixed(1)}GB/s`);CODE
HIGHtools/trace_timeline_viewer.py1791 if (a.pd_transfer_speed_gb_s != null) pdParts.push(`${a.pd_transfer_speed_gb_s.toFixed(1)}GB/s`);CODE
HIGHtools/trace_timeline_viewer.py1857 lines.push(`${key}: ${value}`);CODE
HIGHtools/trace_timeline_viewer.py1862 lines.push(`events: ${item.attrs?.total ?? 0}`);CODE
HIGHtools/trace_timeline_viewer.py1864 lines.push(`${name}: ${count}`);CODE
HIGHtools/trace_timeline_viewer.py1868 if (item.parent_span_name) lines.push(`parent: ${item.parent_span_name}`);CODE
HIGHtools/trace_timeline_viewer.py1870 lines.push(`start: ${niceDuration(item.start_ts - state.globalStart)}`);CODE
HIGHtools/trace_timeline_viewer.py1871 lines.push(`end: ${item.end_ts == null ? 'open' : niceDuration(item.end_ts - state.globalStart)}`);CODE
HIGHtools/trace_timeline_viewer.py1872 if (item.end_ts == null) {CODE
HIGHtools/trace_timeline_viewer.py1873 lines.push(`display_end: ${niceDuration(item.display_end_ts - state.globalStart)}`);CODE
HIGHtools/trace_timeline_viewer.py1875 lines.push(`duration: ${item.end_ts == null ? 'open' : niceDuration(item.end_ts - item.start_ts)}`);CODE
HIGHtools/trace_timeline_viewer.py1877 lines.push(`time: ${niceDuration((item.ts ?? 0) - state.globalStart)}`);CODE
HIGHtools/trace_timeline_viewer.py1879 if (item.state === 'orphan_end') lines.push('warning: unmatched end event');CODE
HIGHtools/trace_timeline_viewer.py1886 lines.push(`${key}: ${typeof value === 'object' ? JSON.stringify(value) : value}`);CODE
HIGHtools/trace_timeline_viewer.py1900 lines.push('── PD disaggregation ──');CODE
HIGHtools/trace_timeline_viewer.py1902 lines.push(' [P] prefill instance');CODE
HIGHtools/trace_timeline_viewer.py1903 pPhases.forEach(p => lines.push(fmtPhase(p)));CODE
HIGHtools/trace_timeline_viewer.py1906 lines.push(' [D] decode instance');CODE
HIGHtools/trace_timeline_viewer.py1907 dPhases.forEach(p => lines.push(fmtPhase(p)));CODE
HIGHtools/trace_timeline_viewer.py1909 lines.push(` total phases: ${(totalDur * 1000).toFixed(1)}ms`);CODE
HIGHtools/trace_timeline_viewer.py1917 lines.push(` ${label}: ${value.toFixed(2)} GB/s`);CODE
HIGHtools/trace_timeline_viewer.py1919 lines.push(` ${label}: ${value.toFixed(1)} MB`);CODE
HIGHtools/trace_timeline_viewer.py1921 lines.push(` ${label}: ${typeof value === 'object' ? JSON.stringify(value) : value}`);CODE
HIGHtools/trace_timeline_viewer.py1929 const activeItem = state.hoveredItem || state.selectedItem;CODE
HIGHtools/trace_timeline_viewer.py2090 if (absoluteY >= layout.top && absoluteY <= layout.top + layout.height) return idx;CODE
HIGHtools/trace_timeline_viewer.py2096 if (!layout) return null;CODE
HIGHtools/trace_timeline_viewer.py2102 let closestPoint = null;CODE
HIGHtools/trace_timeline_viewer.py2111 if (distance <= radius && distance < closestPointDistance) {CODE
HIGHtools/trace_timeline_viewer.py2124 if (localY < itemTop || localY > itemBottom) continue;CODE
40 more matches not shown…
Excessive Try-Catch Wrapping140 hits · 157 pts
SeverityFileLineSnippetContext
LOWtools/convert_torch_dist_to_hf_parallel.py142 except Exception as e:CODE
MEDIUMtools/convert_torch_dist_to_hf_parallel.py143 print(f"Error reading {rel_path}: {e}")CODE
LOWtools/convert_torch_dist_to_hf_parallel.py291 except Exception as e:CODE
MEDIUMtools/convert_torch_dist_to_hf_parallel.py292 print(f"Error processing {name}: {e}")CODE
MEDIUMtools/convert_torch_dist_to_hf_parallel.py132def read_file(rel_path, full_path, ops):CODE
LOWtools/profile_rollout.py12 except Exception as e:CODE
MEDIUMtools/profile_rollout.py13 print(f"Error fetching workers from router: {e}")CODE
LOWtools/profile_rollout.py31 except Exception as e:CODE
LOWtools/profile_rollout.py41 except Exception as e:CODE
MEDIUMtools/profile_rollout.py7def get_workers(router_url):CODE
MEDIUMtools/profile_rollout.py35def stop_profile(worker_url):CODE
LOWtools/convert_hf_to_torch_dist.py39 except Exception:CODE
LOWtools/preprocess_gpt_oss.py139 except Exception:CODE
LOWtools/convert_hf_to_int4.py37 except Exception as e:CODE
LOWslime/backends/megatron_utils/model_provider.py198 except Exception as e:CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py80 except Exception as e:CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py99 except Exception as e:CODE
LOWslime/backends/megatron_utils/server/megatron_server.py351 except Exception as e:CODE
LOWslime/backends/megatron_utils/server/megatron_server.py487 except Exception as e:CODE
LOWslime/backends/megatron_utils/server/megatron_server.py560 except Exception as e:CODE
LOWslime/backends/megatron_utils/server/megatron_server.py590 except Exception as e:CODE
LOWslime/backends/sglang_utils/server_control.py35 except Exception as e:CODE
LOWslime/backends/sglang_utils/server_control.py51 except Exception as e:CODE
LOWslime/backends/sglang_utils/sglang_engine.py303 except Exception as e:CODE
LOWslime/backends/sglang_utils/sglang_engine.py342 except Exception as e:CODE
LOWslime/backends/sglang_utils/external.py65 except Exception as exc:CODE
LOWslime/utils/reloadable_process_group.py319 except Exception as e:CODE
MEDIUMslime/utils/reloadable_process_group.py312def _wrap_low_level_call(check_memory=True):CODE
LOWslime/utils/trace_utils.py405 except Exception as exc:CODE
LOWslime/utils/trace_utils.py415 except Exception as trace_exc:CODE
LOWslime/utils/trace_utils.py421 except Exception as exc:CODE
LOWslime/utils/trace_utils.py426 except Exception as exc:CODE
LOWslime/utils/trace_utils.py430 except Exception as exc:CODE
LOWslime/utils/trace_utils.py93 except Exception as exc:CODE
LOWslime/utils/trace_utils.py162 except Exception as exc:CODE
LOWslime/utils/trace_utils.py258 except Exception as exc:CODE
LOWslime/utils/trace_utils.py288 except Exception as exc:CODE
LOWslime/utils/trace_utils.py305 except Exception as exc:CODE
LOWslime/utils/trace_utils.py327 except Exception as exc:CODE
LOWslime/utils/trace_utils.py346 except Exception as exc:CODE
LOWslime/utils/trace_utils.py360 except Exception as exc:CODE
LOWslime/utils/trace_utils.py391 except Exception as exc:CODE
LOWslime/utils/trace_utils.py452 except Exception as exc:CODE
LOWslime/utils/trace_utils.py658 except Exception as exc:CODE
LOWslime/utils/trace_utils.py683 except Exception as exc:CODE
LOWslime/utils/trace_utils.py722 except Exception as exc:CODE
LOWslime/utils/processing_utils.py127 except Exception:CODE
LOWslime/utils/processing_utils.py147 except Exception:CODE
LOWslime/utils/health_monitor.py152 except Exception as e:CODE
LOWslime/utils/health_monitor.py173 except Exception as e:CODE
LOWslime/utils/http_utils.py66 except Exception:CODE
LOWslime/utils/http_utils.py81 except Exception:CODE
LOWslime/utils/http_utils.py125 except Exception as e:CODE
LOWslime/utils/http_utils.py177 except Exception as e:CODE
LOWslime/utils/http_utils.py305 except Exception as e:CODE
MEDIUMslime/utils/http_utils.py117def run_router(args):CODE
LOWslime/utils/logging_utils.py40 except Exception:CODE
LOWslime/agent/parsing.py77 except Exception:CODE
LOWslime/agent/sandbox.py235 except Exception as e:CODE
LOWslime/agent/sandbox.py263 except Exception as e:CODE
80 more matches not shown…
Deep Nesting120 hits · 116 pts
SeverityFileLineSnippetContext
LOWtools/convert_torch_dist_to_hf_parallel.py57CODE
LOWtools/convert_torch_dist_to_hf_parallel.py84CODE
LOWtools/convert_torch_dist_to_hf_parallel.py165CODE
LOWtools/convert_torch_dist_to_hf_parallel.py60CODE
LOWtools/convert_torch_dist_to_hf_parallel.py170CODE
LOWtools/analyze_profile.py184CODE
LOWtools/analyze_profile.py338CODE
LOWtools/preprocess_gpt_oss.py78CODE
LOWtools/trace_timeline_viewer.py168CODE
LOWtools/convert_k2_thinking_int4_to_bf16.py99CODE
LOWtools/fp8_cast_bf16.py42CODE
LOWtools/convert_torch_dist_to_hf.py106CODE
LOWtools/convert_to_hf.py27CODE
LOWslime/backends/megatron_utils/stateless_adam.py68CODE
LOWslime/backends/megatron_utils/model.py345CODE
LOWslime/backends/megatron_utils/model.py704CODE
LOWslime/backends/megatron_utils/model.py95CODE
LOWslime/backends/megatron_utils/loss.py54CODE
LOWslime/backends/megatron_utils/loss.py389CODE
LOWslime/backends/megatron_utils/loss.py661CODE
LOWslime/backends/megatron_utils/model_provider.py61CODE
LOWslime/backends/megatron_utils/model_provider.py272CODE
LOWslime/backends/megatron_utils/model_provider.py125CODE
LOWslime/backends/megatron_utils/ci_utils.py11CODE
LOWslime/backends/megatron_utils/actor.py285CODE
LOWslime/backends/megatron_utils/actor.py402CODE
LOWslime/backends/megatron_utils/data.py28CODE
LOWslime/backends/megatron_utils/data.py248CODE
LOWslime/backends/megatron_utils/data.py436CODE
LOWslime/backends/megatron_utils/server/megatron_server.py672CODE
LOWslime/backends/megatron_utils/server/logprob_utils.py302CODE
LOW…atron_utils/update_weight/update_weight_from_tensor.py218CODE
LOWslime/backends/megatron_utils/update_weight/common.py53CODE
LOWslime/backends/megatron_utils/update_weight/common.py160CODE
LOW…atron_utils/update_weight/hf_weight_iterator_direct.py138CODE
LOW…megatron_patch/megatron_chunked_grad_coalesce_patch.py67CODE
LOW…ime/backends/megatron_utils/megatron_to_hf/qwen3_vl.py5CODE
LOW…e/backends/megatron_utils/megatron_to_hf/minimax_m2.py6CODE
LOWslime/backends/megatron_utils/megatron_to_hf/gemma4.py41CODE
LOW…ime/backends/megatron_utils/megatron_to_hf/__init__.py38CODE
LOW…ime/backends/megatron_utils/megatron_to_hf/qwen3moe.py6CODE
LOWslime/backends/megatron_utils/megatron_to_hf/llama.py5CODE
LOWslime/backends/megatron_utils/megatron_to_hf/qwen3_5.py34CODE
LOWslime/backends/megatron_utils/megatron_to_hf/glm4.py5CODE
LOW…e/backends/megatron_utils/megatron_to_hf/deepseekv3.py6CODE
LOWslime/backends/megatron_utils/megatron_to_hf/glm4moe.py6CODE
LOWslime/backends/megatron_utils/megatron_to_hf/gpt_oss.py6CODE
LOW…e/backends/megatron_utils/megatron_to_hf/qwen3_next.py44CODE
LOWslime/backends/megatron_utils/megatron_to_hf/qwen2.py5CODE
LOW…atron_utils/megatron_to_hf/processors/quantizer_fp8.py10CODE
LOWslime/backends/sglang_utils/sglang_engine.py80CODE
LOWslime/backends/sglang_utils/sglang_engine.py190CODE
LOWslime/backends/sglang_utils/sglang_engine.py315CODE
LOWslime/utils/arguments.py1594CODE
LOWslime/utils/arguments.py1715CODE
LOWslime/utils/trace_utils.py351CODE
LOWslime/utils/processing_utils.py100CODE
LOWslime/utils/metric_utils.py69CODE
LOWslime/utils/routing_replay.py57CODE
LOWslime/utils/routing_replay.py58CODE
60 more matches not shown…
Modern Structural Boilerplate88 hits · 91 pts
SeverityFileLineSnippetContext
LOWslime/backends/megatron_utils/checkpoint.py92logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/checkpoint.py94__all__ = ["save_checkpoint"]CODE
LOWslime/backends/megatron_utils/initialize.py11logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/arguments.py9__all__ = ["validate_args", "megatron_parse_args", "set_default_megatron_args"]CODE
LOWslime/backends/megatron_utils/arguments.py11logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/model.py41logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/ci_utils.py8logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/hf_checkpoint_saver.py11logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/actor.py42logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/actor.py555 def update_weights(self) -> None:CODE
LOWslime/backends/megatron_utils/sglang.py24__all__ = [CODE
LOWslime/backends/megatron_utils/data.py25logger = logging.getLogger(__name__)CODE
LOWslime/backends/megatron_utils/server/__init__.py9__all__ = [CODE
LOW…egatron_utils/update_weight/update_weight_from_disk.py65 def update_weights(self) -> None:CODE
LOW…atron_utils/update_weight/update_weight_from_tensor.py147 def update_weights(self) -> None:CODE
LOW…n_utils/update_weight/update_weight_from_disk_delta.py27logger = logging.getLogger(__name__)CODE
LOW…n_utils/update_weight/update_weight_from_disk_delta.py82 def update_weights(self) -> None:CODE
LOW…_utils/update_weight/update_weight_from_distributed.py102 def update_weights(self) -> None:CODE
LOW…megatron_patch/megatron_chunked_grad_coalesce_patch.py23logger = logging.getLogger(__name__)CODE
LOW…atron_to_hf/processors/quantizer_compressed_tensors.py13logger = logging.getLogger(__name__)CODE
LOW…atron_to_hf/processors/quantizer_compressed_tensors.py16__all__ = ["quantize_params_compressed_tensors"]CODE
LOW…s/megatron_utils/megatron_to_hf/processors/__init__.py5__all__ = ["remove_padding", "quantize_param", "quantize_params_fp8", "quantize_params_compressed_tensors"]CODE
LOWslime/backends/sglang_utils/server_control.py7logger = logging.getLogger(__name__)CODE
LOWslime/backends/sglang_utils/sglang_engine.py20logger = logging.getLogger(__name__)CODE
LOWslime/backends/sglang_utils/external.py11logger = logging.getLogger(__name__)CODE
LOWslime/backends/sglang_utils/sglang_config.py8logger = logging.getLogger(__name__)CODE
LOWslime/utils/reloadable_process_group.py10logger = logging.getLogger(__name__)CODE
LOWslime/utils/async_utils.py4__all__ = ["get_async_loop", "run"]CODE
LOWslime/utils/dp_schedule.py48logger = logging.getLogger(__name__)CODE
LOWslime/utils/arguments.py16logger = logging.getLogger(__name__)CODE
LOWslime/utils/timer.py10__all__ = ["Timer", "timer"]CODE
LOWslime/utils/timer.py12logger = logging.getLogger(__name__)CODE
LOWslime/utils/trace_utils.py46logger = logging.getLogger(__name__)CODE
LOWslime/utils/train_metric_utils.py10logger = logging.getLogger(__name__)CODE
LOWslime/utils/processing_utils.py10logger = logging.getLogger(__name__)CODE
LOWslime/utils/metric_utils.py7logger = logging.getLogger(__name__)CODE
LOWslime/utils/health_monitor.py7logger = logging.getLogger(__name__)CODE
LOWslime/utils/http_utils.py12logger = logging.getLogger(__name__)CODE
LOWslime/utils/profile_utils.py10logger = logging.getLogger(__name__)CODE
LOWslime/utils/train_dump_utils.py6logger = logging.getLogger(__name__)CODE
LOWslime/utils/tensorboard_utils.py11__all__ = ["_TensorboardAdapter"]CODE
LOWslime/utils/tensorboard_utils.py13logger = logging.getLogger(__name__)CODE
LOWslime/utils/data.py20__all__ = ["Dataset", "get_source"]CODE
LOWslime/utils/data.py22logger = logging.getLogger(__name__)CODE
LOWslime/utils/memory_utils.py8logger = logging.getLogger(__name__)CODE
LOWslime/utils/wandb_utils.py7logger = logging.getLogger(__name__)CODE
LOWslime/agent/parsing.py12logger = logging.getLogger(__name__)CODE
LOWslime/agent/trajectory.py20logger = logging.getLogger(__name__)CODE
LOWslime/agent/trajectory.py505__all__ = [CODE
LOWslime/agent/sandbox.py20logger = logging.getLogger(__name__)CODE
LOWslime/agent/adapters/__init__.py7__all__ = ["AnthropicAdapter", "BaseAdapter", "OpenAIAdapter"]CODE
LOWslime/agent/adapters/openai.py35logger = logging.getLogger(__name__)CODE
LOWslime/agent/adapters/common.py30__all__ = ["TurnRecord"]CODE
LOWslime/agent/adapters/anthropic.py36logger = logging.getLogger(__name__)CODE
LOWslime/agent/harness/__init__.py9__all__ = [CODE
LOWslime/rollout/forge_load.py37logger = logging.getLogger(__name__)CODE
LOWslime/rollout/data_source.py14logger = logging.getLogger(__name__)CODE
LOWslime/rollout/sft_rollout.py6__all__ = ["generate_rollout"]CODE
LOWslime/rollout/sft_rollout.py8logger = logging.getLogger(__name__)CODE
LOWslime/rollout/sglang_streaming_rollout.py38__all__ = ["generate_streaming"]CODE
28 more matches not shown…
Unused Imports93 hits · 90 pts
SeverityFileLineSnippetContext
LOWtools/convert_hf_to_torch_dist.py12CODE
LOWtools/trace_timeline_viewer.py9CODE
LOWslime/backends/megatron_utils/checkpoint.py8CODE
LOWslime/backends/megatron_utils/checkpoint.py133CODE
LOWslime/backends/megatron_utils/__init__.py44CODE
LOWslime/backends/megatron_utils/model_provider.py90CODE
LOWslime/backends/megatron_utils/sglang.py16CODE
LOWslime/backends/megatron_utils/sglang.py11CODE
LOWslime/backends/megatron_utils/sglang.py20CODE
LOWslime/backends/megatron_utils/sglang.py13CODE
LOWslime/backends/megatron_utils/sglang.py22CODE
LOWslime/backends/megatron_utils/server/__init__.py3CODE
LOWslime/backends/megatron_utils/server/__init__.py3CODE
LOWslime/backends/megatron_utils/server/__init__.py3CODE
LOW…egatron_utils/update_weight/update_weight_from_disk.py1CODE
LOW…atron_utils/update_weight/hf_weight_iterator_bridge.py45CODE
LOW…n_utils/update_weight/update_weight_from_disk_delta.py1CODE
LOW…_utils/update_weight/update_weight_from_distributed.py1CODE
LOW…ime/backends/megatron_utils/megatron_patch/__init__.py1CODE
LOW…s/megatron_utils/megatron_to_hf/processors/__init__.py1CODE
LOWslime/backends/sglang_utils/external.py3CODE
LOWslime/utils/dp_schedule.py40CODE
LOWslime/utils/trace_utils.py1CODE
LOWslime/utils/eval_config.py1CODE
LOWslime/utils/disk_delta.py1CODE
LOWslime/agent/parsing.py3CODE
LOWslime/agent/trajectory.py10CODE
LOWslime/agent/sandbox.py9CODE
LOWslime/agent/aiohttp_threaded.py3CODE
LOWslime/agent/adapters/__init__.py3CODE
LOWslime/agent/adapters/__init__.py4CODE
LOWslime/agent/adapters/__init__.py5CODE
LOWslime/agent/adapters/openai.py15CODE
LOWslime/agent/adapters/common.py13CODE
LOWslime/agent/adapters/anthropic.py17CODE
LOWslime/agent/harness/codex.py8CODE
LOWslime/agent/harness/__init__.py3CODE
LOWslime/agent/harness/__init__.py5CODE
LOWslime/agent/harness/__init__.py6CODE
LOWslime/agent/harness/__init__.py7CODE
LOWslime/agent/harness/__init__.py7CODE
LOWslime/agent/harness/common.py16CODE
LOWslime/agent/harness/claude_code.py3CODE
LOWslime/rollout/fully_async_rollout.py26CODE
LOWslime/rollout/rm_hub/ifbench.py1CODE
LOWtests/test_rm_gpqa.py23CODE
LOWtests/test_sample.py18CODE
LOWtests/test_qwen3_linear_attention_cu_seqlens.py1CODE
LOWtests/test_logprob_response_spans.py1CODE
LOWtests/test_loss_cp_invariance.py55CODE
LOWtests/_cp_dist_helpers.py37CODE
LOWtests/test_reloadable_process_group_memory_check.py1CODE
LOWtests/test_rm_math_dapo.py16CODE
LOWtests/test_ppo_logprob_entropy_gpu.py3CODE
LOWtests/test_metric_report.py18CODE
LOWtests/test_metric_report.py24CODE
LOWtests/test_rm_f1.py19CODE
LOWtests/test_cp_utils.py16CODE
LOWtests/test_cp_utils.py22CODE
LOWtests/test_rm_math.py17CODE
33 more matches not shown…
Structural Annotation Overuse38 hits · 59 pts
SeverityFileLineSnippetContext
LOWslime/utils/ppo_utils.py413 # Step 3: Compute returns on full response kl tensor.COMMENT
LOWslime/utils/ppo_utils.py428 # Step 4: Pick up the results corresponding to our local chunk's parts.COMMENT
LOWtests/ci/README.md11### Step 1: EnvCOMMENT
LOWtests/ci/README.md18### Step 2: Prepare `/home/runner/externals`COMMENT
LOWtests/ci/README.md28### Step 3: RunCOMMENT
LOW.claude/skills/add-rollout-function/SKILL.md20### Step 1: Choose the Right Starting PointCOMMENT
LOW.claude/skills/add-rollout-function/SKILL.md30### Step 2: Create the New Rollout ModuleCOMMENT
LOW.claude/skills/add-rollout-function/SKILL.md43### Step 3: Implement Train and Eval Branches ExplicitlyCOMMENT
LOW.claude/skills/add-rollout-function/SKILL.md70### Step 4: Keep Data Contract CompatibleCOMMENT
LOW.claude/skills/add-rollout-function/SKILL.md81### Step 5: Wire Through ArgumentsCOMMENT
LOW.claude/skills/add-reward-function/SKILL.md20### Step 1: Choose Reward ModeCOMMENT
LOW.claude/skills/add-reward-function/SKILL.md29### Step 2: Create Reward ModuleCOMMENT
LOW.claude/skills/add-reward-function/SKILL.md47### Step 3: Keep Reward Type ConsistentCOMMENT
LOW.claude/skills/add-reward-function/SKILL.md53### Step 4: Optional Reward Post-ProcessingCOMMENT
LOW.claude/skills/add-reward-function/SKILL.md71### Step 5: Wire and ValidateCOMMENT
LOW.claude/skills/add-eval-dataset-config/SKILL.md20### Step 1: Choose Config Entry MethodCOMMENT
LOW.claude/skills/add-eval-dataset-config/SKILL.md29### Step 2: Build YAML with Required FieldsCOMMENT
LOW.claude/skills/add-eval-dataset-config/SKILL.md54### Step 3: Understand Override PriorityCOMMENT
LOW.claude/skills/add-eval-dataset-config/SKILL.md68### Step 4: Wire Eval Function if NeededCOMMENT
LOW.claude/skills/add-eval-dataset-config/SKILL.md73### Step 5: Validate Parsing and RuntimeCOMMENT
LOW.claude/skills/add-tests-and-ci/SKILL.md21### Step 1: Pick the Right Test PatternCOMMENT
LOW.claude/skills/add-tests-and-ci/SKILL.md27### Step 2: Keep CI CompatibilityCOMMENT
LOW.claude/skills/add-tests-and-ci/SKILL.md43### Step 3: Register Tests in GitHub CICOMMENT
LOW.claude/skills/add-tests-and-ci/SKILL.md60### Step 4: Run Local ValidationCOMMENT
LOW.claude/skills/add-tests-and-ci/SKILL.md67### Step 5: Keep Workflow Template as Source of TruthCOMMENT
LOW.claude/skills/add-tests-and-ci/SKILL.md80### Step 6: Provide Verifiable PR NotesCOMMENT
LOW.claude/skills/add-dynamic-filter/SKILL.md21### Step 1: Pick the Correct HookCOMMENT
LOW.claude/skills/add-dynamic-filter/SKILL.md28### Step 2: Implement the Function SignatureCOMMENT
LOW.claude/skills/add-dynamic-filter/SKILL.md66### Step 3: Preserve Group StructureCOMMENT
LOW.claude/skills/add-dynamic-filter/SKILL.md72### Step 4: Wire and ValidateCOMMENT
LOW.claude/skills/add-dynamic-filter/SKILL.md83### Step 5: Measure Side EffectsCOMMENT
LOWdocs/en/advanced/sglang-config.md267# Step 1: Launch SGLang engines externallyCOMMENT
LOWdocs/en/advanced/sglang-config.md271# Step 2: Connect slime to external enginesCOMMENT
LOWexamples/search-r1/README.md187### Step 1: Install CondaCOMMENT
LOWexamples/search-r1/README.md204### Step 2: Create Retriever EnvironmentCOMMENT
LOWexamples/search-r1/README.md222### Step 3: Download Index and CorpusCOMMENT
LOWexamples/search-r1/README.md240### Step 4: Start Local Retrieval ServerCOMMENT
LOWexamples/search-r1/README.md275### Step 5: Start TrainingCOMMENT
Self-Referential Comments16 hits · 43 pts
SeverityFileLineSnippetContext
MEDIUMslime/backends/megatron_utils/model_provider.py160 # Define the decoder block specCOMMENT
MEDIUMslime/backends/megatron_utils/model_provider.py168 # Define the decoder layer specCOMMENT
MEDIUMslime/utils/async_utils.py7# Create a background event loop threadCOMMENT
MEDIUMslime/utils/http_utils.py254 # Define the async actorCOMMENT
MEDIUMslime/rollout/rm_hub/__init__.py73 # This function is intended for remote or time-consuming reward model evaluation.COMMENT
MEDIUMdocs/build_all.sh11# Create a lightweight root index with auto redirect based on localStorage (done client side)COMMENT
MEDIUMexamples/tau-bench/trainable_agents.py212 # Initialize tracking variablesCOMMENT
MEDIUMexamples/strands_sglang/subprocess_interpreter.py186 # Create a temporary file with the modified sourceSTRING
MEDIUMexamples/strands_sglang/subprocess_interpreter.py352 # Create a temporary directory first to ensure we have writeSTRING
MEDIUM.github/workflows/pr-test.yml2# This file is auto-generated from the .j2 file via generate_github_workflows.py. Do not edit manually.COMMENT
MEDIUM.github/workflows/generate_github_workflows.py27 + "\n# This file is auto-generated from the .j2 file via generate_github_workflows.py. Do not edit manuaCODE
MEDIUMslime_plugins/mbridge/mimo.py82 # Create a proxy name to use with parent class methodsCOMMENT
MEDIUMslime_plugins/models/qwen3_5.py200 # Define the decoder block specCOMMENT
MEDIUMslime_plugins/models/qwen3_next.py212 # Define the decoder block specCOMMENT
MEDIUMslime_plugins/models/glm5/glm5.py718 # Define the decoder block specCOMMENT
MEDIUM…ime_plugins/rollout_buffer/generator/base_generator.py53 # Create a fresh payload for each attemptCOMMENT
AI Slop Vocabulary10 hits · 32 pts
SeverityFileLineSnippetContext
LOW…atron_utils/megatron_to_hf/processors/quantizer_fp8.py90 # for other parameters, we just return the original converted_named_paramsCOMMENT
MEDIUMslime/rollout/rm_hub/math_dapo_utils.py14# Adapted from https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/tasks/hendrycks_math/utils.pyCOMMENT
LOWslime/ray/rollout.py228 # this group's engines may land on (conservative: just use global max).COMMENT
MEDIUMtests/test_agent/test_harness.py207# §5 harness.run wires the steps in orderCOMMENT
MEDIUMexamples/coding_agent_rl/swe.py175# Workspace prep (agent sandbox, before harness.run)COMMENT
MEDIUMexamples/coding_agent_rl/swe.py228# Diff capture (agent sandbox, after harness.run)COMMENT
MEDIUMexamples/coding_agent_rl/swe.py355# Mirror of swebench.harness.run_evaluation.GIT_APPLY_CMDS: try each in order,COMMENT
MEDIUMexamples/retool/generate_with_retool.py100 # Use a more robust regex that handles nested bracesCOMMENT
MEDIUMexamples/retool/generate_with_retool.py370 # collapse), but reward_func's regex is whitespace-robust andCOMMENT
MEDIUMslime_plugins/models/gemma4.py646 # reduces to even-length, which the CP=1 parity-test harness mayCOMMENT
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/test_qwen3_4B_ppo_train_critic_only.py0megatron: - name: default role: critic overrides: lr: 1e-5 - name: default role: actor overrides: lr: 1e-6STRING
HIGHtests/test_qwen3_4B_ppo.py0megatron: - name: default role: critic overrides: lr: 1e-5 - name: default role: actor overrides: lr: 1e-6STRING
HIGHtests/test_qwen3_4B_ppo_disaggregate.py0megatron: - name: default role: critic overrides: lr: 1e-5 - name: default role: actor overrides: lr: 1e-6STRING
HIGHslime_plugins/mbridge/mimo.py0convert mtp layer parameters from mcore to hf format.STRING
HIGHslime_plugins/mbridge/qwen3_5.py0convert mtp layer parameters from mcore to hf format.STRING
HIGHslime_plugins/mbridge/qwen3_next.py0convert mtp layer parameters from mcore to hf format.STRING
Modern AI Meta-Vocabulary11 hits · 25 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md118[**Dressage**](https://github.com/Accio-Lab/Dressage) is an agentic RL training framework built on slime by [Alibaba AccCODE
MEDIUMREADME.md130[**Relax**](https://github.com/redai-infra/Relax) (Reinforcement Engine Leveraging Agentic X-modality) is an omni-modal CODE
MEDIUMREADME_zh.md128[**Relax**](https://github.com/redai-infra/Relax) (Reinforcement Engine Leveraging Agentic X-modality) 是 RedAI Infra 团队开CODE
MEDIUMtests/test_qwen3_4B_streaming_partial_rollout.py36 # loop is still the stock sglang one (semaphore, abort orchestration).COMMENT
MEDIUMdocs/zh/get_started/customization.md12| [`--custom-generate-function-path`](#2-自定义生成函数---custom-generate-function-path) | 仅覆盖生成步骤(例如用于 RAG 或工具调用)。 |CODE
MEDIUMdocs/zh/get_started/customization.md32## 通过 customization 接口实现 agentic workflowCOMMENT
MEDIUMdocs/en/get_started/customization.md12| [`--custom-generate-function-path`](#2-custom-generate-function---custom-generate-function-path) | Override only the gCODE
MEDIUMexamples/multi_agent/run-qwen3-30B-A3B-multi-agent.sh57# multi-agent do not support eval for nowCOMMENT
MEDIUMexamples/tau-bench/README.md50 "agent_strategy": "tool-calling", # Select between ["tool-calling", "act", "react", "few-shot"], only tool-calling CODE
MEDIUMexamples/tau-bench/generate_with_tau.py25 "agent_strategy": "tool-calling", # Select between ["tool-calling", "act", "react", "few-shot"]CODE
MEDIUMexamples/strands_sglang/README.md3This example connects `slime` with [`strands-sglang`](https://github.com/horizon-rl/strands-sglang) (SGLang extension foCODE
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHslime/backends/sglang_utils/sglang_engine.py243Run /health_generate on the underlying SGLang HTTP server. Args: timeout: Timeout for the health reSTRING
HIGHexamples/tau-bench/openai_tool_adapter.py52 Parse sglang response to OpenAI compatible format Args: response: Raw response text from sSTRING
HIGHexamples/tau-bench/generate_with_tau.py101 Generate a complete agent-environment interaction trajectory for tau-bench. This is the main entry point for sSTRING
HIGHexamples/strands_sglang/subprocess_interpreter.py286Generates a temporary file with the given code, executes it, and deletes the file afterward. Args: STRING
HIGHexamples/strands_sglang/subprocess_interpreter.py440Executes a shell command in a subprocess and captures its output. Args: command (str): The shell coSTRING
Redundant / Tautological Comments18 hits · 24 pts
SeverityFileLineSnippetContext
LOWtools/convert_torch_dist_to_hf_parallel.py475 # Check if this is a linear_q_down_proj or linear_kv_down_proj keyCOMMENT
LOWtools/preprocess_gpt_oss.py132 # Check if this is a quantized expert weightCOMMENT
LOWslime/backends/megatron_utils/model.py549 # Set grad to zero.COMMENT
LOWslime/backends/megatron_utils/model_provider.py72 # Check if the custom provider supports vp_stage parameterCOMMENT
LOWslime/backends/megatron_utils/model_provider.py195 # Check if fp8_model_init supports preserve_high_precision_init_valCOMMENT
LOWslime/backends/megatron_utils/data.py447 if val: # Check if val is not emptyCODE
LOWexamples/tau-bench/trainable_agents.py321 # Check if doneCOMMENT
LOWexamples/strands_sglang/subprocess_interpreter.py195 # Check if command is availableSTRING
LOWexamples/strands_sglang/subprocess_interpreter.py208 # Check if command is availableSTRING
LOWexamples/search-r1/qa_em_format.py86 # Check if this is a tagCOMMENT
LOWexamples/retool/tool_sandbox.py242 # Return resultCOMMENT
LOWexamples/retool/generate_with_retool.py250 # Check if total length exceeds max context lengthCOMMENT
LOWexamples/retool/generate_with_retool.py352 # Check if maximum tool call count reachedCOMMENT
LOWslime_plugins/mbridge/mimo.py51 # Check if this is an MTP layer weightCOMMENT
LOWslime_plugins/mbridge/mimo.py80 # Check if this is a transformer_layer componentCOMMENT
LOWslime_plugins/rollout_buffer/buffer.py77 # Check if module has TASK_TYPE constantCOMMENT
LOWslime_plugins/rollout_buffer/buffer.py82 # Check if module has run_rollout functionCOMMENT
LOW…ime_plugins/rollout_buffer/generator/base_generator.py216 # Check if instance_id should be skippedCOMMENT
Over-Commented Block22 hits · 20 pts
SeverityFileLineSnippetContext
LOW…megatron_patch/megatron_chunked_grad_coalesce_patch.py1# Patch _allreduce_non_tensor_model_parallel_grads (and its legacy aliasCOMMENT
LOWslime/utils/seqlen_balancing.py1# Copied from https://github.com/volcengine/verl/blob/468adf22c43b744348051fccd7a5d830c6c3c36a/verl/utils/seqlen_balanciCOMMENT
LOWslime/utils/ppo_utils.py661 else:COMMENT
LOWslime/utils/ppo_utils.py701 # -------------------------------------------------------------------------COMMENT
LOWslime/rollout/rm_hub/math_dapo_utils.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWslime/ray/rollout.py741 # Per-rollout aggregate, precomputed at the step level (where we canCOMMENT
LOWtests/test_loss_cp_invariance.py161COMMENT
LOWtests/_cp_dist_helpers.py41import sysCOMMENT
LOWtests/_cp_dist_helpers.py141# Shared four-rollout fixture, used by both the metric-report distributedCOMMENT
LOWexamples/delta_weight_sync/run-glm4.7-30B-A3B-delta.sh1#!/bin/bashCOMMENT
LOWexamples/train_infer_mismatch_helper/mis.yaml1# Enable importance sampling, details refer to the comments of compute_mis_weights in mis.pyCOMMENT
LOWexamples/strands_sglang/subprocess_interpreter.py1# Copyright 2025-2026 Strands RL ContributorsCOMMENT
LOWexamples/search-r1/qa_em_format.py1# Adapt from https://github.com/PeterGriffinJin/Search-R1/blob/ceee7b89655ed52f205b9beb98e1190c3eedcfb0/verl/utils/rewarCOMMENT
LOW…es/search-r1/local_dense_retriever/retrieval_server.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWexamples/search-r1/local_dense_retriever/download.py1# Copyright 2024 Bytedance Ltd. and/or its affiliatesCOMMENT
LOWexamples/retool/generate_with_retool.py361 # Tool output is appended verbatim and can push total_length pastCOMMENT
LOWscripts/run-gpt-oss-20B.sh1#!/bin/bashCOMMENT
LOWscripts/run-qwen2.5-0.5B-gb10-smoke.sh1#!/bin/bashCOMMENT
LOWscripts/low_precision/run-qwen3-30b-a3b-fp8.sh1#!/bin/bashCOMMENT
LOWslime_plugins/models/gemma4.py361 hidden_size=self.config.hidden_size,COMMENT
LOWslime_plugins/models/gemma4.py621COMMENT
LOWslime_plugins/models/gemma4.py1061 config.gated_linear_unit = TrueCOMMENT
AI Structural Patterns19 hits · 19 pts
SeverityFileLineSnippetContext
LOWtools/convert_hf_to_int4_direct.py118CODE
LOWslime/backends/megatron_utils/stateless_adam.py16CODE
LOW…atron_to_hf/processors/quantizer_compressed_tensors.py223CODE
LOWslime/utils/http_utils.py317CODE
LOWslime/utils/distributed_utils.py38CODE
LOWslime/utils/data.py203CODE
LOWtests/gemma4/test_gemma4_layer_integration.py38CODE
LOWexamples/tau-bench/openai_tool_adapter.py109CODE
LOW…es/search-r1/local_dense_retriever/retrieval_server.py290CODE
LOWexamples/retool/tool_sandbox.py356CODE
LOWslime_plugins/megatron_bridge/glm4v_moe.py471CODE
LOWslime_plugins/megatron_bridge/glm4v_moe.py342CODE
LOWslime_plugins/models/gemma4.py430CODE
LOWslime_plugins/models/qwen3_5.py151CODE
LOWslime_plugins/models/hf_attention.py88CODE
LOWslime_plugins/models/qwen3_next.py173CODE
LOWslime_plugins/models/glm5/glm5.py186CODE
LOW…ime_plugins/models/glm5/ops/tilelang_sparse_mla_bwd.py84CODE
LOWslime_plugins/rollout_buffer/buffer.py116CODE
Fake / Example Data9 hits · 8 pts
SeverityFileLineSnippetContext
LOWslime/backends/sglang_utils/sglang_config.py16 worker_type: One of "regular", "prefill", "decode", "placeholder",STRING
LOWslime/backends/sglang_utils/sglang_config.py18 "placeholder" reserves GPU slots without creating engines.STRING
LOWslime/backends/sglang_utils/sglang_config.py37 valid_types = {"regular", "prefill", "decode", "placeholder", "encoder"}CODE
LOWslime/ray/rollout.py120 worker_type: str = "regular" # "regular", "prefill", "decode", or "placeholder"CODE
LOWslime/ray/rollout.py151 if self.args.debug_train_only or self.worker_type == "placeholder":CODE
LOWslime/ray/rollout.py324 values = {g.nodes_per_engine for g in self.server_groups if g.worker_type != "placeholder"}CODE
LOWslime/ray/rollout.py1137 all_engines=[None] * num_engines if group_cfg.worker_type != "placeholder" else [],CODE
LOWslime/ray/rollout.py147 Placeholder groups (worker_type="placeholder") skip engine creation entirely.STRING
LOWtests/test_rollout_validation.py25 worker_type="placeholder",CODE
Slop Phrases2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMslime/rollout/on_policy_distillation.py64 # If you have task rewards, you can add them here.COMMENT
MEDIUMexamples/on_policy_distillation/run-qwen3-8B-opd.sh9TEACHER_IP="127.0.0.1" # Use localhost here, you can change it to your IPCODE
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWslime/utils/ppo_utils.py413 # Step 3: Compute returns on full response kl tensor.COMMENT
LOWslime/utils/ppo_utils.py428 # Step 4: Pick up the results corresponding to our local chunk's parts.COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWexamples/geo3k_vlm/run_geo3k_vlm.sh4# Usage:COMMENT