Repository Analysis

liguodongiot/llm-action

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

7.8 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of liguodongiot/llm-action, a HTML project with 24,717 GitHub stars. SynthScan v2.0 examined 108,801 lines of code across 783 source files, recording 407 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 7.8 places this repository in the Low 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).

7.8
Adjusted Score
7.8
Raw Score
100%
Time Factor
2026-07-01
Last Push
24.7K
Stars
HTML
Language
108.8K
Lines of Code
783
Files
407
Pattern Hits
2026-07-14
Scan Date
0.05
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 19HIGH 20MEDIUM 54LOW 314

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 407 distinct pattern matches across 16 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.

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
MEDIUMllm-algo/chatglm2/模型架构.md253 # =================================================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md255 # =================================================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md256 # =====================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md258 # =====================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md322 # ==================================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md324 # ==================================COMMENT
MEDIUMllm-algo/chatglm2/模型架构.md328 # =================COMMENT
MEDIUMllm-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
MEDIUMllm-compression/quantization/llm-qat/cfd70ff/utils.py16# Define a utility method for setting the logging parameters of a loggerCOMMENT
MEDIUMllm-compression/quantization/llm-qat/cfd70ff/utils.py24 # Define a formatter for the log messagesCOMMENT
MEDIUMllm-compression/quantization/llm-qat/cfd70ff/utils.py29 # Create a console handler for outputting log messages to the consoleCOMMENT
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
LOWllm-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
HIGHllm-train/megatron/gpt2/data/download.py251 url varchar(2048) not null,CODE
HIGHllm-train/megatron/gpt2/data/download.py252 domain varchar(255) not null,CODE
HIGHllm-train/megatron/gpt2/data/download.py253 word_count int null,CODE
HIGHllm-train/megatron/gpt2/data/download.py254 elapsed int null,CODE
HIGHllm-train/megatron/gpt2/data/download.py255 scraper varchar(255) not null,CODE
Deep Nesting36 hits · 36 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