AI Slop Code RIsk Monitor

liguodongiot/llm-action

本项目旨在分享大模型相关技术原理以及实战经验(大模型工程化、大模型应用落地)

8.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for liguodongiot/llm-action, a HTML project with 25,151 GitHub stars. SynthScan examined 108,803 lines of code across 783 source files, recording 416 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 8.2 (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.

8.2
Adjusted Signal
8.2
Raw Pattern Score
100%
Time Factor
2026-07-19
Last Push
25.2K
Stars
HTML
Language
108.8K
Lines of Code
783
Files
416
Pattern Hits
2026-10-12
Scan Date
0.06
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 9.7/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 18.1/100 · LOW

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

Agent Over-Engineering Ratio 12.5/100 · LOW

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

PR Review Velocity Impact 32.0/100 · MEDIUM

Which changes need focused human review? 416 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 19HIGH 29MEDIUM 54LOW 314

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 416 distinct pattern matches across 17 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.

Hallucination Indicators19 hits · 255 pts
SeverityFileLineSnippetContext
CRITICAL…m-train/pytorch/distribution/tensor-parallel/README.md54torch.distributed.tensor.parallel.style.make_input_replicate_1d(input, device_mesh=None)CODE
CRITICAL…-train/pytorch/distribution/pipeline-parallel/1-流水线.md73- torch.distributed.pipeline.sync.skip.skippable.skippable(stash=(), pop=())CODE
CRITICAL⚡…-train/pytorch/distribution/pipeline-parallel/1-流水线.md113- torch.distributed.pipeline.sync.skip.skippable.stash(name, tensor)CODE
CRITICAL⚡…-train/pytorch/distribution/pipeline-parallel/1-流水线.md115- torch.distributed.pipeline.sync.skip.skippable.pop(name)CODE
CRITICAL⚡…-train/pytorch/distribution/pipeline-parallel/1-流水线.md117- torch.distributed.pipeline.sync.skip.skippable.verify_skippables(module)CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py247 model.language_model.embedding.word_embeddings.weight.data.copy_(out_word_embed[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py249 model.language_model.embedding.position_embeddings.weight.data.copy_(pos_embed)CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py302 l.self_attention.query_key_value.weight.data.copy_(qkv_weight[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py303 l.self_attention.dense.weight.data.copy_(dense_weight[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py306 l.mlp.dense_h_to_4h.weight.data.copy_(mlp_l0_weight[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py307 l.mlp.dense_4h_to_h.weight.data.copy_(mlp_l1_weight[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py309 l.self_attention.query_key_value.bias.data.copy_(qkv_bias[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py310 l.self_attention.dense.bias.data.copy_(dense_bias)CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py311 l.mlp.dense_h_to_4h.bias.data.copy_(mlp_l0_bias[tp_rank])CODE
CRITICAL⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py312 l.mlp.dense_4h_to_h.bias.data.copy_(mlp_l1_bias)CODE
CRITICAL…t2/merge_ck_and_inference/checkpoint_saver_megatron.py323 models[tp_rank].language_model.encoder.final_layernorm.weight.data.copy_(final_layernorm_weight)CODE
CRITICAL…t2/merge_ck_and_inference/checkpoint_saver_megatron.py324 models[tp_rank].language_model.encoder.final_layernorm.bias.data.copy_(final_layernorm_bias)CODE
CRITICAL…t2/merge_ck_and_inference/checkpoint_saver_megatron.py352 models[tp_rank].language_model.pooler.dense.weight.data.copy_(pooler_weight)CODE
CRITICAL…t2/merge_ck_and_inference/checkpoint_saver_megatron.py353 models[tp_rank].language_model.pooler.dense.bias.data.copy_(pooler_bias)CODE
Unused Imports142 hits · 142 pts
SeverityFileLineSnippetContext
LOWllm-data-engineering/sft-dataset/jinja-llm-bloom.py2CODE
LOWllm-data-engineering/sft-dataset/jinja-llm-baichuan2.py2CODE
LOWllm-data-engineering/sft-dataset/jinja-llm-baichuan.py2CODE
LOWllm-data-engineering/sft-dataset/jinja-llm.py2CODE
LOWllm-data-engineering/sft-dataset/jinja-llm-chatglm3.py2CODE
LOWllm-eval/llm-performance/stat_gpu_memory.py1CODE
LOW…performance/hardware-performance/pynvml-stat-memory.py1CODE
LOW…al/llm-performance/vllm/vllm-locust-qwen1.5-7b-long.py3CODE
LOW…al/llm-performance/vllm/vllm-locust-qwen1.5-7b-long.py4CODE
LOW…al/llm-performance/vllm/vllm-locust-qwen1.5-7b-long.py4CODE
LOW…al/llm-performance/mindie/lantency/stat_input_token.py4CODE
LOW…al/llm-performance/mindie/lantency/stat_input_token.py4CODE
LOW…al/llm-performance/mindie/lantency/perfermance-stat.py5CODE
LOW…performance/mindie/locust-lantency-throughput/hello.py3CODE
LOW…performance/mindie/locust-lantency-throughput/hello.py4CODE
LOW…ocust-lantency-throughput/llm-910b4-chatglm3-6b-2tp.py3CODE
LOW…ocust-lantency-throughput/llm-910b4-chatglm3-6b-2tp.py4CODE
LOW…ocust-lantency-throughput/llm-910b4-chatglm3-6b-2tp.py4CODE
LOW…e/locust-lantency-throughput/llm-910b4-qwen-72b-8tp.py2CODE
LOW…e/locust-lantency-throughput/llm-910b4-qwen-72b-8tp.py3CODE
LOW…e/locust-lantency-throughput/llm-910b4-qwen-72b-8tp.py3CODE
LOW…cust-lantency-throughput/llm-910b4-baichuan2-7b-2tp.py3CODE
LOW…cust-lantency-throughput/llm-910b4-baichuan2-7b-2tp.py4CODE
LOW…cust-lantency-throughput/llm-910b4-baichuan2-7b-2tp.py4CODE
LOW…ie/locust-lantency-throughput/llm-910b4-qwen1.5-4tp.py2CODE
LOW…ie/locust-lantency-throughput/llm-910b4-qwen1.5-4tp.py3CODE
LOW…ie/locust-lantency-throughput/llm-910b4-qwen1.5-4tp.py3CODE
LOW…nference/ascend/mindformers/mindsporelite-inference.py12CODE
LOWllm-inference/ascend/mindformers/mindsporelite-stat.py3CODE
LOWllm-inference/ascend/mindformers/mindsporelite-stat.py11CODE
LOW…nference/ascend/mindformers/baichuan2/baichuan-stat.py2CODE
LOW…nce/ascend/mindformers/baichuan2/baichuan-inference.py1CODE
LOW…nce/ascend/mindformers/baichuan2/baichuan-inference.py2CODE
LOW…-inference/ascend/mindformers/chatglm3/chatglm-stat.py2CODE
LOW…m-inference/ascend/mindformers/chatglm3/chatglm-gen.py2CODE
LOW…rence/ascend/mindformers/chatglm3/chatglm-inference.py5CODE
LOWllm-inference/web/flask/llm-qwen-mindspore-lite.py4CODE
LOWllm-inference/web/flask/llm-qwen-mindspore-lite.py7CODE
LOWllm-inference/web/flask/llm-qwen-mindspore-lite.py9CODE
LOWllm-inference/web/fastapi/llm-qwen-mindspore-lite.py4CODE
LOWllm-inference/web/fastapi/llm-qwen-mindspore-lite.py7CODE
LOWllm-inference/web/fastapi/llm-qwen-mindspore-lite.py9CODE
LOWllm-inference/web/fastapi/llm-qwen-mindspore-lite.py15CODE
LOWllm-inference/web/fastapi/llm-qwen-mindspore-lite.py17CODE
LOW…ter-transformer/bloom/firefly_lambada_1w_stat_token.py1CODE
LOW…ter-transformer/bloom/firefly_lambada_1w_stat_token.py10CODE
LOW…ter-transformer/bloom/firefly_lambada_1w_stat_token.py12CODE
LOW…er-transformer/megatron-gpt2/gpt_summarization_stat.py7CODE
LOW…/faster-transformer/megatron-gpt2/gpt_summarization.py7CODE
LOWllm-inference/triton/resnet50/client.py5CODE
LOW…se/distribution-parallelism/moe-parallel/paddle_moe.py6CODE
LOW…se/distribution-parallelism/moe-parallel/paddle_moe.py8CODE
LOWai-framework/mxnet/oneflow_cnn_mnist.py6CODE
LOWai-framework/mxnet/mxnet_cnn_mnist.py1CODE
LOWai-framework/mxnet/mxnet_cnn_mnist.py12CODE
LOWai-framework/mxnet/mxnet_cnn_mnist.py12CODE
LOWai-framework/mxnet/mxnet_cnn_mnist.py26CODE
LOWai-framework/mxnet/mxnet_mlp_mnist.py2CODE
LOWai-framework/mxnet/mnist.py4CODE
LOWllm-train/alpaca-lora/generate.py7CODE
82 more matches not shown…
Decorative Section Separators32 hits · 110 pts
SeverityFileLineSnippetContext
MEDIUMllm-inference/DeepSpeed-Inference.md9# ---------------------------------------COMMENT
MEDIUMllm-inference/DeepSpeed-Inference.md11# ---------------------------------------COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py24# ----------------COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py124# -------------------------------------COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py137# -------------------COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py246# -----------------------------------COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py341# -------------COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py445# -------------------------------------COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py19# -------------------------------------------COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py37# ------------------------COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py56# -------------------------------COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py119# -------------------------------------------COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py196# ----------------------------------------------COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py250# ---------------------COMMENT
MEDIUM…t2/merge_ck_and_inference/checkpoint_saver_megatron.py204 #-----------COMMENT
MEDIUM⚡…t2/merge_ck_and_inference/checkpoint_saver_megatron.py254 #-------------------COMMENT
MEDIUMllm-algo/chatglm/模型架构.md220 # ===================================COMMENT
MEDIUMllm-algo/chatglm/模型架构.md222 # ===================================COMMENT
MEDIUMllm-algo/chatglm/模型架构.md264 # =========================COMMENT
MEDIUMllm-algo/chatglm/模型架构.md266 # =========================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md138 # ===========================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md140 # ===========================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md160 # =========================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md162 # =========================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md253 # =================================================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md255 # =================================================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md256 # =====================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md258 # =====================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md322 # ==================================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md324 # ==================================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md328 # =================COMMENT
MEDIUM⚡llm-algo/chatglm2/模型架构.md330 # =================COMMENT
Cross-File Repetition14 hits · 70 pts
SeverityFileLineSnippetContext
HIGH…-inference/ascend/mindformers/chatglm3/chatglm-stat.py0# 2. 自定义修改配置后实例化 config = autoconfig.from_pretrained('/root/workspace/model/chatglm3-6b_ms/run_glm3_6b.yaml') config.useSTRING
HIGH…m-inference/ascend/mindformers/chatglm3/chatglm-gen.py0# 2. 自定义修改配置后实例化 config = autoconfig.from_pretrained('/root/workspace/model/chatglm3-6b_ms/run_glm3_6b.yaml') config.useSTRING
HIGH…rence/ascend/mindformers/chatglm3/chatglm-inference.py0# 2. 自定义修改配置后实例化 config = autoconfig.from_pretrained('/root/workspace/model/chatglm3-6b_ms/run_glm3_6b.yaml') config.useSTRING
HIGHllm-train/alpaca/train_ddp.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHllm-train/alpaca/train.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHllm-train/qlora/qlora.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHllm-train/chinese-llama-alpaca/run_clm_sft_with_peft.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHllm-localization/ascend/standford-alpaca/train.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHllm-train/alpaca/train_ddp.py0make dataset and collator for supervised fine-tuning.STRING
HIGHllm-train/alpaca/train.py0make dataset and collator for supervised fine-tuning.STRING
HIGHllm-localization/ascend/standford-alpaca/train.py0make dataset and collator for supervised fine-tuning.STRING
HIGH…tribution/tensor-parallel/sequence_parallel_example.py0main body of the demo of a basic version of tensor parallel by using pytorch native apis.STRING
HIGH…ch/distribution/tensor-parallel/2d_parallel_example.py0main body of the demo of a basic version of tensor parallel by using pytorch native apis.STRING
HIGH…istribution/tensor-parallel/tensor_parallel_example.py0main body of the demo of a basic version of tensor parallel by using pytorch native apis.STRING
Over-Commented Block71 hits · 62 pts
SeverityFileLineSnippetContext
LOWllm-tools/profiler-recipe.py21# Name Self CPU CPU total CPU time avg # of CallsCOMMENT
LOWllm-tools/profiler-recipe.py41# --------------------------------- ------------ -------------------------------------------COMMENT
LOWllm-tools/profiler-recipe.py81COMMENT
LOWllm-tools/profiler-recipe.py121# --------------------------------- ------------ ------------ ------------COMMENT
LOWllm-tools/profiler-recipe.py141# aten::empty 94.79 Mb 94.79 Mb 121COMMENT
LOWllm-tools/profiler-recipe.py181 with_stack=True,COMMENT
LOWllm-pipeline/REAEMD.md81# --llama \COMMENT
LOWllm-pipeline/REAEMD.md101# --gradient_checkpointing \COMMENT
LOWllm-pipeline/REAEMD.md121# --num_train_epochs 2 \COMMENT
LOWllm-train/qlora/accuracy.py1# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.COMMENT
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py1#!/usr/bin/env pythonCOMMENT
LOWllm-train/chinese-llama-alpaca/run_clm_sft_with_peft.py1#!/usr/bin/env pythonCOMMENT
LOW…ibution/data-parallel/minGPT-ddp/sbatch_run_sig_opt.sh1COMMENT
LOW…rch/distribution/data-parallel/minGPT-ddp/multinode.sh1#!/bin/bashCOMMENT
LOW…istribution/data-parallel/minGPT-ddp/sbatch_run_sig.sh1#!/bin/bashCOMMENT
LOW…ch/distribution/data-parallel/minGPT-ddp/sbatch_run.sh1COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py61COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py121COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py141######################################################################COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py221######################################################################COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py241 # Need batch dimension first for pipeline parallelism.COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py341# -------------COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py461 mp.spawn(run_worker, args=(world_size, ), nprocs=world_size, join=True)COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py481# [RANK 1]: -----------------------------------------------------------------------------------------COMMENT
LOW…pytorch/distribution/pipeline-parallel/ddp_pipeline.py501# [RANK 0]: | epoch 3 | 20/ 50 batches | lr 4.51 | ms/batch 698.27 | loss 12.01 | ppl 164364.60COMMENT
LOWllm-train/alpa/train/pipeshard_parallelism.py41ray.init()COMMENT
LOWllm-train/alpa/train/pipeshard_parallelism.py181COMMENT
LOWllm-train/alpa/train/pipeshard_parallelism.py201#COMMENT
LOWllm-train/alpa/train/pipeshard_parallelism.py241auto_pipeline_actual_state = auto_pipeline_train_step(state, batch)COMMENT
LOWllm-train/alpa/train/pipeshard_parallelism.py261#COMMENT
LOW…egatron/gpt2/merge_ck_and_inference/checkpoint_util.py1import argparseCOMMENT
LOW…egatron/gpt2/merge_ck_and_inference/checkpoint_util.py21COMMENT
LOW…egatron/gpt2/merge_ck_and_inference/checkpoint_util.py41# consumed_valid_samplesCOMMENT
LOW…egatron/gpt2/merge_ck_and_inference/checkpoint_util.py61# "mlp l1 weight"COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp21END: Cython Metadata */COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp41 #endifCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp61#elseCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp81 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp101#endifCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp121#endifCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp141 #define PyObject_Free(p) PyMem_Free(p)COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp161#if PY_MAJOR_VERSION >= 3COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp181 #define PyInt_FromSsize_t PyLong_FromSsize_tCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp201#elseCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp221#define __Pyx_PyType_AsAsync(obj) NULLCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp281COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp301#include "stdlib.h"COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp321# elseCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp341#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp361 #define __Pyx_sst_abs(value) abs(value)COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp381 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromStringCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp401#elseCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp521COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp601#endifCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp621 #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp1041 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp1061 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp1141#endifCOMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp1161 int memview_is_new_reference);COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp1181COMMENT
11 more matches not shown…
Self-Referential Comments17 hits · 56 pts
SeverityFileLineSnippetContext
MEDIUMllm-inference/flexflow-serve/benchmark-batch1.py43# Create the sampling configsCOMMENT
MEDIUMai-framework/deepspeed/hello_bert/train_bert_ds.py117 # Create the labels firstCOMMENT
MEDIUMai-framework/deepspeed/hello_bert/train_bert_ds.py941 # Create the labels firstCOMMENT
MEDIUMai-framework/deepspeed/hello_bert/train_bert.py117 # Create the labels firstCOMMENT
MEDIUMllm-train/galore/torchrun_main.py433 # The below code is only executed during the update stepCOMMENT
MEDIUM…tribution/tensor-parallel/sequence_parallel_example.py49 # Create a optimizer for the parallelized module.COMMENT
MEDIUM…ch/distribution/tensor-parallel/2d_parallel_example.py75 # Create a optimizer for the parallelized module.COMMENT
MEDIUM…istribution/tensor-parallel/tensor_parallel_example.py57 # Create a optimizer for the parallelized module.COMMENT
MEDIUM…pytorch/distribution/pipeline-parallel/ddp_pipeline.py23# Define the modelCOMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py101# Define the training stepCOMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py127# Define a MLP model with manual stage boundaries.COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py154# Define the training step.COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py213# Define the parallel method.COMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py222# Define the training step. The function body is the same as the above one.COMMENT
MEDIUM⚡llm-compression/quantization/llm-qat/cfd70ff/utils.py16# Define a utility method for setting the logging parameters of a loggerCOMMENT
MEDIUM⚡llm-compression/quantization/llm-qat/cfd70ff/utils.py24 # Define a formatter for the log messagesCOMMENT
MEDIUM⚡llm-compression/quantization/llm-qat/cfd70ff/utils.py29 # Create a console handler for outputting log messages to the consoleCOMMENT
Empty Error Handlers9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHllm-train/alpaca-lora/generate.py21except: # noqa: E722CODE
HIGH…tribution/tensor-parallel/sequence_parallel_example.py15except BaseException as e:CODE
HIGH…ch/distribution/tensor-parallel/2d_parallel_example.py21except BaseException as e:CODE
HIGHllm-train/chatglm-lora/finetune_ddp.py103except:CODE
HIGH…2/merge_ck_and_inference/run_text_generation_server.py71except ValueError as ve:CODE
HIGH…2/merge_ck_and_inference/run_text_generation_server.py76except ValueError as ve:CODE
HIGHllm-train/megatron/gpt2/data/download.py129except:CODE
HIGHllm-localization/ascend/mindie/script/model-test.py23except ModuleNotFoundError:CODE
HIGHllm-localization/ascend/mindie/script/model-test.py42except TypeError:CODE
Hyper-Verbose Identifiers43 hits · 44 pts
SeverityFileLineSnippetContext
LOWllm-data-engineering/sft-dataset/数据集格式.md93def preprocess_function_train(examples):CODE
LOWllm-data-engineering/sft-dataset/数据集格式.md156def build_inputs_with_special_tokens(CODE
LOWllm-data-engineering/sft-dataset/数据集格式.md434def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):CODE
LOW…nference/ascend/mindformers/mindsporelite-inference.py26def pipeline_from_model_paths(args_, tokenizer):CODE
LOW…nference/ascend/mindformers/mindsporelite-inference.py76def pipeline_from_infer_config(args_, tokenizer):CODE
LOWllm-inference/ascend/mindformers/mindsporelite-stat.py33def pipeline_from_model_paths(args_, tokenizer):CODE
LOWllm-inference/ascend/mindformers/mindsporelite-stat.py83def pipeline_from_infer_config(args_, tokenizer):CODE
LOWllm-train/alpaca-lora/finetune_metrics_epoch.py152 def generate_and_tokenize_prompt(data_point):CODE
LOWllm-train/alpaca-lora/finetune.py146 def generate_and_tokenize_prompt(data_point):CODE
LOWllm-train/chatglm/main.py176 def preprocess_function_train(examples):CODE
LOWllm-train/alpaca/train_ddp.py54def safe_save_model_for_hf_trainer(trainer: transformers.Trainer, output_dir: str):CODE
LOWllm-train/alpaca/train_ddp.py63def smart_tokenizer_and_embedding_resize(CODE
LOWllm-train/alpaca/train_ddp.py173def make_supervised_data_module(tokenizer: transformers.PreTrainedTokenizer, data_args) -> Dict:CODE
LOWllm-train/alpaca/train.py53def safe_save_model_for_hf_trainer(trainer: transformers.Trainer, output_dir: str):CODE
LOWllm-train/alpaca/train.py62def smart_tokenizer_and_embedding_resize(CODE
LOWllm-train/alpaca/train.py172def make_supervised_data_module(tokenizer: transformers.PreTrainedTokenizer, data_args) -> Dict:CODE
LOWllm-train/qlora/qlora.py346def print_trainable_parameters(args, model):CODE
LOWllm-train/qlora/qlora.py363def smart_tokenizer_and_embedding_resize(CODE
LOWllm-train/qlora/qlora.py438def extract_unnatural_instructions_data(examples, extract_reformulations=False):CODE
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py75def preprocess_logits_for_metrics(logits, labels):CODE
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py83def fault_tolerance_data_collator(features: List) -> Dict[str, Any]:CODE
LOWllm-train/chinese-llama-alpaca/run_clm_sft_with_peft.py433def smart_tokenizer_and_embedding_resize(CODE
LOWllm-train/alpa/train/pipeshard_parallelism.py161def manual_pipeline_train_step(state, batch):CODE
LOWllm-train/megatron/gpt2/data/cMinhash.cpp8142 * cdef setitem_slice_assign_scalar(self, memoryview dst, value):COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp8186 * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp8213 * cdef setitem_slice_assign_scalar(self, memoryview dst, value):COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp8451 * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp14045 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<COMMENT
LOWllm-train/megatron/gpt2/data/cMinhash.cpp14149 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<COMMENT
LOWllm-algo/chatglm/模型架构.md176def apply_rotary_pos_emb_index(q, k, cos, sin, position_id):CODE
LOWllm-algo/chatglm/模型架构.md362 def split_tensor_along_last_dim(self, tensor, num_partitions,CODE
LOWllm-algo/chatglm2/模型架构.md749 def _update_model_kwargs_for_generation(CODE
LOWllm-algo/chatglm2/模型架构.md780 def prepare_inputs_for_generation(CODE
LOW⚡llm-compression/quantization/llm-qat/cfd70ff/utils.py39def safe_save_model_for_hf_trainer(trainer: transformers.Trainer, output_dir: str):CODE
LOWllm-localization/ascend/standford-alpaca/train.py51def smart_tokenizer_and_embedding_resize(CODE
LOWllm-localization/ascend/standford-alpaca/train.py161def make_supervised_data_module(tokenizer: transformers.PreTrainedTokenizer, data_args) -> Dict:CODE
LOWllm-localization/ascend/mindie/script/model-test.py1237 def __compare_simplified_dataset_results(self):CODE
LOWllm-localization/ascend/mindie/script/model-test.py1370 def __compare_full_dataset_results(self):CODE
LOWllm-localization/ascend/mindie/script/model-test.py1456 def __patch_hf_transformers_utils(self):CODE
LOWllm-localization/ascend/mindie/script/model-test.py799 def process_before_extraction(gen, choice_dict):STRING
LOWllm-localization/ascend/mindie/script/model-test.py977 def __run_full_dataset_truthfulqa(self):STRING
LOWllm-localization/ascend/mindie/script/model-test.py986 def format_prompt_with_answer_strings(question, ans):STRING
LOWllm-localization/ascend/mindie/script/model-test.py1153 def __run_full_dataset_humaneval(self):STRING
Cross-Language Confusion5 hits · 38 pts
SeverityFileLineSnippetContext
HIGH⚡llm-train/megatron/gpt2/data/download.py251 url varchar(2048) not null,CODE
HIGH⚡llm-train/megatron/gpt2/data/download.py252 domain varchar(255) not null,CODE
HIGH⚡llm-train/megatron/gpt2/data/download.py253 word_count int null,CODE
HIGH⚡llm-train/megatron/gpt2/data/download.py254 elapsed int null,CODE
HIGH⚡llm-train/megatron/gpt2/data/download.py255 scraper varchar(255) not null,CODE
Deep Nesting36 hits · 34 pts
SeverityFileLineSnippetContext
LOW…er-transformer/megatron-gpt2/gpt_summarization_stat.py24CODE
LOW…er-transformer/megatron-gpt2/gpt_summarization_stat.py354CODE
LOW…/faster-transformer/megatron-gpt2/gpt_summarization.py21CODE
LOW…/faster-transformer/megatron-gpt2/gpt_summarization.py327CODE
LOWai-framework/mxnet/mxnet_cnn_mnist.py122CODE
LOWllm-train/alpaca-lora/export_state_dict_checkpoint.py80CODE
LOWllm-train/chatglm/main.py38CODE
LOWllm-train/chatglm/main.py148CODE
LOWllm-train/chatglm/main.py176CODE
LOWllm-train/qlora/qlora.py262CODE
LOWllm-train/qlora/qlora.py438CODE
LOWllm-train/qlora/qlora.py475CODE
LOWllm-train/qlora/qlora.py490CODE
LOWllm-train/qlora/qlora.py514CODE
LOWllm-train/qlora/qlora.py545CODE
LOWllm-train/galore/torchrun_main.py134CODE
LOW…/peft/clm/peft_lora_clm_accelerate_ds_zero3_offload.py109CODE
LOW…/chinese-llama-alpaca/merge_llama_with_chinese_lora.py67CODE
LOW…/chinese-llama-alpaca/merge_llama_with_chinese_lora.py111CODE
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py83CODE
LOW…2/merge_ck_and_inference/checkpoint_loader_megatron.py19CODE
LOW…t2/merge_ck_and_inference/checkpoint_saver_megatron.py22CODE
LOWllm-train/megatron/gpt2/data/download.py193CODE
LOWllm-localization/ascend/mindie/script/model-test.py297CODE
LOWllm-localization/ascend/mindie/script/model-test.py471CODE
LOWllm-localization/ascend/mindie/script/model-test.py535CODE
LOWllm-localization/ascend/mindie/script/model-test.py587CODE
LOWllm-localization/ascend/mindie/script/model-test.py669CODE
LOWllm-localization/ascend/mindie/script/model-test.py789CODE
LOWllm-localization/ascend/mindie/script/model-test.py889CODE
LOWllm-localization/ascend/mindie/script/model-test.py1075CODE
LOWllm-localization/ascend/mindie/script/model-test.py1153CODE
LOWllm-localization/ascend/mindie/script/model-test.py1224CODE
LOWllm-localization/ascend/mindie/script/model-test.py1264CODE
LOWllm-localization/ascend/mindie/script/model-test.py1499CODE
LOWllm-localization/ascend/mindie/script/model-test.py334CODE
AI Structural Patterns10 hits · 10 pts
SeverityFileLineSnippetContext
LOW…m-inference/ascend/mindformers/text_generator_infer.py217CODE
LOWllm-inference/vllm/api_client.py32CODE
LOWllm-inference/vllm/api_client.py48CODE
LOWai-framework/transformer-engine/mnist/main_stat.py43CODE
LOWai-framework/transformer-engine/mnist/main.py43CODE
LOWai-framework/deepspeed/hello_bert/train_bert.py566CODE
LOWllm-train/alpaca-lora/finetune_metrics_epoch.py28CODE
LOWllm-train/alpaca-lora/finetune.py28CODE
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py145CODE
LOWllm-localization/ascend/mindie/script/model-test.py1044CODE
Excessive Try-Catch Wrapping5 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUM…er-transformer/megatron-gpt2/gpt_summarization_stat.py342 print('Error with datapoint : ', data_point_idx)CODE
MEDIUM…/faster-transformer/megatron-gpt2/gpt_summarization.py325 print('Error with datapoint : ', data_point_idx)CODE
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py463 except Exception:CODE
MEDIUM…ron/gpt2/merge_ck_and_inference/text_generation_cli.py20 print(f"Error {response.status_code}: {response.json()['message']}")CODE
LOWllm-localization/ascend/mindie/script/model-test.py258 except Exception as e:STRING
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWllm-train/alpaca-lora/finetune_metrics_epoch.py104 # Check if parameter passed or if set within environCOMMENT
LOWllm-train/alpaca-lora/finetune.py98 # Check if parameter passed or if set within environCOMMENT
LOW…-compression/quantization/llm-qat/f4d873a/datautils.py91 # Loop through the list of dictionariesCOMMENT
LOW…-compression/quantization/llm-qat/f4d873a/datautils.py98 # Append the value to the list associated with the key in dict_of_listsCOMMENT
Slop Phrases2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py44# Alternatively, you can use the following command to connect to an existingCOMMENT
MEDIUMllm-train/alpa/train/pipeshard_parallelism.py191# device assignment of each stage, you can use the more advancedCOMMENT
Modern Structural Boilerplate5 hits · 5 pts
SeverityFileLineSnippetContext
LOWllm-train/chatglm/main.py36logger = logging.getLogger(__name__)CODE
LOWllm-train/qlora/qlora.py46logger = logging.getLogger(__name__)CODE
LOWllm-train/chinese-llama-alpaca/run_clm_pt_with_peft.py310logger = logging.getLogger(__name__)CODE
LOWllm-train/chinese-llama-alpaca/run_clm_sft_with_peft.py195logger = logging.getLogger(__name__)CODE
LOWllm-train/megatron/gpt2/data/file_utils.py36logger = logging.getLogger(__name__) # pylint: disable=invalid-nameCODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHllm-train/qlora/accuracy.py33 Args: predictions (`list` of `int`): Predicted labels. references (`list` of `int`): Ground truth labels. nSTRING
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWllm-data-engineering/sft-dataset/jinja-demo.py10result = template.render(name='John Doe')CODE