Repository Analysis

hpcaitech/ColossalAI

Making large AI models cheaper, faster and more accessible

19.8 Moderate AI signal View on GitHub
19.8
Adjusted Score
19.8
Raw Score
100%
Time Factor
2026-05-25
Last Push
41,383
Stars
Python
Language
335,260
Lines of Code
2148
Files
3803
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 353MEDIUM 630LOW 2819

Pattern Findings

3803 matches across 17 categories. Click a row to expand file-level details.

Decorative Section Separators531 hits · 1859 pts
SeverityFileLineSnippet
MEDIUM…sts/test_shardformer/test_model/test_shard_deepseek.py130 # ===================================================================================
MEDIUMtests/test_shardformer/test_model/test_shard_mixtral.py123 # ===================================================================================
MEDIUMtests/kit/model_zoo/timm/timm.py6## ==============
MEDIUMtests/kit/model_zoo/timm/timm.py8## ==============
MEDIUMtests/kit/model_zoo/timm/timm.py150# ==============
MEDIUMtests/kit/model_zoo/timm/timm.py152# ==============
MEDIUMtests/kit/model_zoo/transformers/command.py14 # ===============================
MEDIUMtests/kit/model_zoo/transformers/command.py16 # ===============================
MEDIUMtests/kit/model_zoo/transformers/mistral.py7# ===============================
MEDIUMtests/kit/model_zoo/transformers/mistral.py9# ===============================
MEDIUMtests/kit/model_zoo/transformers/t5.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/t5.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/gptj.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/gptj.py10# ===============================
MEDIUMtests/kit/model_zoo/transformers/albert.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/albert.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/albert.py69# ===============================
MEDIUMtests/kit/model_zoo/transformers/albert.py71# ===============================
MEDIUMtests/kit/model_zoo/transformers/opt.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/opt.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/chatglm2.py7# ================================
MEDIUMtests/kit/model_zoo/transformers/chatglm2.py9# ================================
MEDIUMtests/kit/model_zoo/transformers/whisper.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/whisper.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/llama.py14 # ===============================
MEDIUMtests/kit/model_zoo/transformers/llama.py16 # ===============================
MEDIUMtests/kit/model_zoo/transformers/llama.py23 # -----------------------------------
MEDIUMtests/kit/model_zoo/transformers/llama.py28 # -----------------------------------
MEDIUMtests/kit/model_zoo/transformers/vit.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/vit.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/deepseek.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/deepseek.py10# ===============================
MEDIUMtests/kit/model_zoo/transformers/bert.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/bert.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/qwen3.py14 # ===============================
MEDIUMtests/kit/model_zoo/transformers/qwen3.py16 # ===============================
MEDIUMtests/kit/model_zoo/transformers/qwen3.py23 # -----------------------------------
MEDIUMtests/kit/model_zoo/transformers/qwen3.py28 # -----------------------------------
MEDIUMtests/kit/model_zoo/transformers/deepseek_v3.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/deepseek_v3.py10# ===============================
MEDIUMtests/kit/model_zoo/transformers/falcon.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/falcon.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/sam.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/sam.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/qwen2.py14 # ===============================
MEDIUMtests/kit/model_zoo/transformers/qwen2.py16 # ===============================
MEDIUMtests/kit/model_zoo/transformers/qwen2.py23 # -----------------------------------
MEDIUMtests/kit/model_zoo/transformers/qwen2.py28 # -----------------------------------
MEDIUMtests/kit/model_zoo/transformers/mixtral.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/mixtral.py10# ===============================
MEDIUMtests/kit/model_zoo/transformers/gpt.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/gpt.py10# ===============================
MEDIUMtests/kit/model_zoo/transformers/bloom.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/bloom.py8# ===============================
MEDIUMtests/kit/model_zoo/transformers/blip2.py6# ===============================
MEDIUMtests/kit/model_zoo/transformers/blip2.py8# ===============================
MEDIUMtests/test_pipeline/test_schedule/test_zerobubble_pp.py890 # ===================================================================================
MEDIUMtests/test_pipeline/test_schedule/test_zerobubble_pp.py1045 # ===================================================================================
MEDIUM…/test_fx/test_profiler/test_profiler_meta_info_prop.py67 # =====================================================
MEDIUM…/test_fx/test_profiler/test_profiler_meta_info_prop.py83 # =====================================================
471 more matches not shown…
Cross-File Repetition325 hits · 1625 pts
SeverityFileLineSnippet
HIGHtests/test_shardformer/test_layer/test_dist_log_prob.py0compute the log probabilities from logits for the given labels. args: logits (torch.tensor): the input logits. labels (t
HIGHapplications/ColossalChat/coati/distributed/utils.py0compute the log probabilities from logits for the given labels. args: logits (torch.tensor): the input logits. labels (t
HIGHapplications/ColossalChat/coati/models/utils.py0compute the log probabilities from logits for the given labels. args: logits (torch.tensor): the input logits. labels (t
HIGHtests/test_infer/test_kernels/triton/kernel_utils.py0allocate block tables based on provided context lengths; and copy kv to blocked kv cache.
HIGHtests/test_infer/test_kernels/triton/kernel_utils.py0allocate block tables based on provided context lengths; and copy kv to blocked kv cache.
HIGHtests/test_infer/test_kernels/triton/kernel_utils.py0allocate block tables based on provided context lengths; and copy kv to blocked kv cache.
HIGHtests/test_infer/test_kernels/triton/kernel_utils.py0allocate block tables based on provided context lengths; and copy kv to blocked kv cache.
HIGHcolossalai/pipeline/schedule/interleaved_pp.py0load a batch from data iterator. args: data_iter (iterable): data iterator. device (optional[torch.device], optional): t
HIGHcolossalai/pipeline/schedule/one_f_one_b.py0load a batch from data iterator. args: data_iter (iterable): data iterator. device (optional[torch.device], optional): t
HIGHcolossalai/pipeline/schedule/generate.py0load a batch from data iterator. args: data_iter (iterable): data iterator. device (optional[torch.device], optional): t
HIGHcolossalai/pipeline/schedule/zero_bubble_pp.py0load a batch from data iterator. args: data_iter (iterable): data iterator. device (optional[torch.device], optional): t
HIGHcolossalai/nn/optimizer/lamb.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/lars.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/galore.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/distributed_lamb.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/distributed_galore.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/fused_lamb.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/fused_sgd.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r
HIGHcolossalai/nn/optimizer/came.py0performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return
HIGHcolossalai/nn/optimizer/distributed_came.py0performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return
HIGHexamples/images/diffusion/ldm/util.py0performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return
HIGHcolossalai/nn/layer/utils.py0only allow exact division. args: numerator (int): numerator of the division. denominator (int): denominator of the divis
HIGHcolossalai/legacy/nn/layer/utils/common.py0only allow exact division. args: numerator (int): numerator of the division. denominator (int): denominator of the divis
HIGHcolossalai/legacy/tensor/dist_spec_mgr.py0only allow exact division. args: numerator (int): numerator of the division. denominator (int): denominator of the divis
HIGH…tched_bias_addition_function/bias_addition_function.py0this method is used to create the non_bias_func proxy, the node created by this proxy will compute the main computation,
HIGH…ddition_patch/patched_bias_addition_function/addbmm.py0this method is used to create the non_bias_func proxy, the node created by this proxy will compute the main computation,
HIGH…h/patched_bias_addition_module/bias_addition_module.py0this method is used to create the non_bias_func proxy, the node created by this proxy will compute the main computation,
HIGHcolossalai/fx/codegen/activation_checkpoint_codegen.py0add an obj to be tracked as a global. we call this for names that reference objects external to the graph, like function
HIGHcolossalai/fx/codegen/activation_checkpoint_codegen.py0add an obj to be tracked as a global. we call this for names that reference objects external to the graph, like function
HIGHcolossalai/autochunk/autochunk_codegen.py0add an obj to be tracked as a global. we call this for names that reference objects external to the graph, like function
HIGHcolossalai/_analyzer/fx/codegen.py0add an obj to be tracked as a global. we call this for names that reference objects external to the graph, like function
HIGHcolossalai/fx/codegen/activation_checkpoint_codegen.py0delete values after their last use. this ensures that values that are not used in the remainder of the code are freed an
HIGHcolossalai/fx/codegen/activation_checkpoint_codegen.py0delete values after their last use. this ensures that values that are not used in the remainder of the code are freed an
HIGHcolossalai/autochunk/autochunk_codegen.py0delete values after their last use. this ensures that values that are not used in the remainder of the code are freed an
HIGHcolossalai/_analyzer/fx/codegen.py0delete values after their last use. this ensures that values that are not used in the remainder of the code are freed an
HIGHcolossalai/booster/plugin/gemini_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_fsdp_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_fsdp_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_fsdp_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_ddp_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_ddp_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_ddp_plugin.py0save model to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_fsdp_plugin.py0save optimizer to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_fsdp_plugin.py0save optimizer to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/torch_ddp_plugin.py0save optimizer to checkpoint but only on master process.
HIGHcolossalai/booster/plugin/hybrid_parallel_plugin.py0compute and return the gradient norm for gradient clipping. args: param_gradient_pairs (list[tuple[tensor]]): list of (p
HIGHcolossalai/booster/plugin/hybrid_parallel_plugin.py0compute and return the gradient norm for gradient clipping. args: param_gradient_pairs (list[tuple[tensor]]): list of (p
HIGHcolossalai/amp/naive_amp/mixed_precision_optimizer.py0compute and return the gradient norm for gradient clipping. args: param_gradient_pairs (list[tuple[tensor]]): list of (p
HIGHcolossalai/shardformer/policies/command.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/mistral.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/gpt2.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/t5.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/gptj.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/opt.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/chatglm2.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/whisper.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/llama.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/deepseek.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/bert.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
HIGHcolossalai/shardformer/policies/qwen3.py0if under pipeline parallel setting, replacing the original forward method of huggingface to customized forward method, a
265 more matches not shown…
Hyper-Verbose Identifiers1068 hits · 1017 pts
SeverityFileLineSnippet
LOW…heckpoint_io/test_plugins_huggingface_compatibility.py78def test_huggingface_compatibility(world_size):
LOWtests/test_checkpoint_io/test_gemini_checkpoint_io.py39def exam_state_dict_with_origin(
LOWtests/test_checkpoint_io/test_gemini_checkpoint_io.py193def exam_lazy_from_pretrained():
LOWtests/test_checkpoint_io/test_general_checkpoint_io.py23def test_unsharded_checkpoint(use_safetensors: bool, use_async: bool):
LOWtests/test_checkpoint_io/test_general_checkpoint_io.py77def test_sharded_model_checkpoint(use_safetensors: bool, use_async: bool):
LOWtests/test_checkpoint_io/test_general_checkpoint_io.py117def test_sharded_optimizer_checkpoint(use_async: bool):
LOWtests/test_checkpoint_io/test_general_checkpoint_io.py186def test_sharded_optimizer_multiple_param_groups(use_async: bool):
LOW…ts/test_checkpoint_io/test_gemini_torch_compability.py24def exam_torch_load_from_gemini(shard: bool, model_name: str):
LOW…ts/test_checkpoint_io/test_gemini_torch_compability.py90def exam_gemini_load_from_torch(shard: bool, model_name: str):
LOWtests/test_zero/test_gemini/test_zeroddp_state_dict.py18def ignore_the_first_parameter(model: torch.nn.Module):
LOW…sts/test_zero/test_gemini/test_zerooptim_state_dict.py23def exam_zero_optim_state_dict(placement_config, keep_gathered):
LOWtests/test_shardformer/test_flash_attention.py67def post_process_kwargs_for_raw_attn(attn_kwargs: dict):
LOWtests/test_shardformer/test_with_torch_ddp.py18def check_shardformer_with_ddp(lazy_init: bool):
LOWtests/test_shardformer/test_model/_utils.py120def build_model_from_hybrid_plugin(
LOWtests/test_shardformer/test_model/_utils.py174def build_model_from_low_level_zero_plugin(
LOWtests/test_shardformer/test_model/_utils.py200def run_forward_backward_with_hybrid_plugin(
LOWtests/test_shardformer/test_model/_utils.py263def run_forward_backward_with_low_level_zero_plugin(
LOWtests/test_shardformer/test_model/_utils.py301def check_output_hidden_state(
LOWtests/test_shardformer/test_model/_utils.py368def get_grad_tensors_for_check(
LOW…/test_shardformer/test_layer/test_sequence_parallel.py173def test_all_to_all_attention():
LOWtests/test_shardformer/test_layer/test_linear_1d.py121def check_linear_without_weight_grad_store(lazy_init: bool, seq_parallel_mode: bool):
LOWtests/test_shardformer/test_layer/test_linear_1d.py161def check_linear_with_weight_grad_store(lazy_init: bool, seq_parallel_mode: bool):
LOWtests/test_shardformer/test_layer/test_linear_1d.py208def check_linear_col_plus_row(lazy_init: bool, seq_parallel_mode: bool, overlap: bool):
LOWtests/test_shardformer/test_layer/test_dropout.py10def check_dropout_parallel_input():
LOWtests/test_shardformer/test_layer/test_dropout.py42def check_dropout_replicated_input():
LOWtests/test_legacy/test_context/test_hybrid_parallel.py32def check_pipeline_parallel_rank(rank):
LOWtests/test_legacy/test_context/test_hybrid_parallel.py44def check_model_parallel_rank(rank):
LOWtests/test_legacy/test_context/test_hybrid_parallel.py51def check_tensor_parallel_rank(rank):
LOWtests/test_legacy/test_utils/test_memory.py9def _run_colo_set_process_memory_fraction_and_colo_device_memory_capacity():
LOW…est_legacy/test_utils/test_activation_checkpointing.py45def test_activation_checkpointing(cpu_offload, use_reentrant):
LOWtests/test_legacy/test_layers/test_cache_embedding.py224def run_parallel_freq_aware_embed_tablewise(rank, world_size):
LOWtests/test_legacy/test_layers/test_cache_embedding.py310def run_parallel_freq_aware_embed_columnwise(rank, world_size):
LOWtests/test_legacy/test_layers/test_cache_embedding.py389def test_parallel_freq_aware_embed(world_size):
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py203def check_vocab_parallel_embed():
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py245def check_classifier_no_given_weight():
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py311def check_vocab_parallel_classifier_no_given_weight():
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py371def check_classifier_given_embed_weight():
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py422def check_vocab_parallel_classifier_given_embed_weight():
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py474def check_vocab_parallel_loss():
LOW…legacy/test_layers/test_1d/checks_1d/check_layer_1d.py510def check_linear_row_stream_inference():
LOWtests/test_legacy/test_layers/test_2d/test_2d.py51def check_layer_and_operation(rank, world_size, port):
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py276def check_vocab_parallel_embed():
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py323def check_classifier_no_given_weight():
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py401def check_vocab_parallel_classifier_no_given_weight():
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py469def check_classifier_given_embed_weight():
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py521def check_vocab_parallel_classifier_given_embed_weight():
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py610def check_vocab_parallel_loss():
LOWtests/test_legacy/test_layers/test_2p5d/test_2p5d.py39def check_layer_and_operation(rank, world_size, port):
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py280def check_vocab_parallel_embed():
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py328def check_classifier_no_given_weight():
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py407def check_vocab_parallel_classifier_no_given_weight():
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py474def check_classifier_given_embed_weight():
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py526def check_vocab_parallel_classifier_given_embed_weight():
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py615def check_vocab_parallel_loss():
LOWtests/test_legacy/test_layers/test_3d/test_3d.py45def check_layer_and_operation(rank, world_size, port):
LOW…legacy/test_layers/test_3d/checks_3d/check_layer_3d.py206def check_classifier_no_given_weight():
LOW…legacy/test_layers/test_3d/checks_3d/check_layer_3d.py306def check_vocab_parallel_classifier_no_given_weight():
LOW…legacy/test_layers/test_3d/checks_3d/check_layer_3d.py413def check_classifier_given_embed_weight():
LOW…legacy/test_layers/test_3d/checks_3d/check_layer_3d.py497def check_vocab_parallel_classifier_given_embed_weight():
LOW…legacy/test_layers/test_3d/checks_3d/check_layer_3d.py747def check_vocab_parallel_embed():
1008 more matches not shown…
Unused Imports960 hits · 943 pts
SeverityFileLineSnippet
LOWsetup.py8
LOWtests/test_legacy/test_layers/test_1d/test_1d.py6
LOWtests/test_legacy/test_layers/test_2p5d/test_2p5d.py3
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py22
LOW…t_layers/test_2p5d/checks_2p5d/check_operation_2p5d.py9
LOWtests/test_legacy/test_tensor/common_utils/__init__.py1
LOWtests/test_auto_parallel/test_offload/test_perf.py18
LOWtests/test_auto_parallel/test_offload/test_solver.py11
LOWtests/kit/model_zoo/__init__.py3
LOWtests/kit/model_zoo/__init__.py3
LOWtests/kit/model_zoo/__init__.py3
LOWtests/kit/model_zoo/__init__.py3
LOWtests/kit/model_zoo/__init__.py3
LOWtests/kit/model_zoo/__init__.py3
LOWtests/kit/model_zoo/__init__.py4
LOWtests/kit/model_zoo/__init__.py4
LOWtests/kit/model_zoo/__init__.py5
LOWtests/kit/model_zoo/torchrec/__init__.py1
LOWtests/kit/model_zoo/diffusers/__init__.py1
LOWtests/kit/model_zoo/torchvision/__init__.py1
LOWtests/kit/model_zoo/timm/__init__.py1
LOWtests/kit/model_zoo/transformers/__init__.py1
LOWtests/kit/model_zoo/transformers/__init__.py2
LOWtests/kit/model_zoo/transformers/__init__.py3
LOWtests/kit/model_zoo/transformers/__init__.py4
LOWtests/kit/model_zoo/transformers/__init__.py5
LOWtests/kit/model_zoo/transformers/__init__.py6
LOWtests/kit/model_zoo/transformers/__init__.py7
LOWtests/kit/model_zoo/transformers/__init__.py8
LOWtests/kit/model_zoo/transformers/__init__.py9
LOWtests/kit/model_zoo/transformers/__init__.py10
LOWtests/kit/model_zoo/transformers/__init__.py11
LOWtests/kit/model_zoo/transformers/__init__.py12
LOWtests/kit/model_zoo/transformers/__init__.py13
LOWtests/kit/model_zoo/transformers/__init__.py14
LOWtests/kit/model_zoo/transformers/__init__.py15
LOWtests/kit/model_zoo/transformers/__init__.py16
LOWtests/kit/model_zoo/transformers/__init__.py17
LOWtests/kit/model_zoo/transformers/__init__.py18
LOWtests/kit/model_zoo/transformers/__init__.py19
LOWtests/kit/model_zoo/transformers/__init__.py20
LOWtests/kit/model_zoo/torchaudio/__init__.py1
LOWtests/kit/model_zoo/custom/__init__.py1
LOWtests/kit/model_zoo/custom/__init__.py2
LOWtests/kit/model_zoo/custom/__init__.py3
LOWtests/kit/model_zoo/custom/__init__.py4
LOWtests/kit/model_zoo/custom/__init__.py5
LOW…/test_infer/test_kernels/triton/test_rmsnorm_triton.py10
LOWtests/test_infer/test_kernels/triton/test_xine_copy.py8
LOW…nfer/test_kernels/triton/test_rotary_embdding_unpad.py13
LOW…s/test_infer/test_kernels/triton/test_decoding_attn.py19
LOW…ts/test_infer/test_kernels/triton/test_kvcache_copy.py14
LOW…t_infer/test_kernels/triton/test_context_attn_unpad.py15
LOW…fer/test_kernels/triton/test_fused_rotary_embedding.py12
LOWextensions/pybind/optimizer/__init__.py1
LOWextensions/pybind/layernorm/__init__.py1
LOWextensions/pybind/cpu_adam/__init__.py1
LOWextensions/pybind/cpu_adam/__init__.py2
LOWextensions/pybind/softmax/__init__.py1
LOWextensions/pybind/softmax/__init__.py2
900 more matches not shown…
Deep Nesting545 hits · 542 pts
SeverityFileLineSnippet
LOWtests/test_checkpoint_io/test_safetensors_async_io.py118
LOW…ts/test_checkpoint_io/test_torch_fsdp_checkpoint_io.py18
LOW…/test_shardformer/test_model/test_shard_deepseek_v3.py26
LOWtests/test_legacy/test_comm/test_object_list_p2p_v2.py85
LOWtests/test_lora/test_lora.py20
LOW…arallel/test_ckpt_solvers/test_C_solver_consistency.py29
LOW…test_auto_parallel/test_ckpt_solvers/test_linearize.py32
LOW…test_auto_parallel/test_ckpt_solvers/test_linearize.py96
LOW…_tensor_shard/test_node_handler/test_matmul_handler.py50
LOW…_parallel/test_tensor_shard/test_node_handler/utils.py66
LOWtests/kit/model_zoo/registry.py64
LOWtests/test_pipeline/test_schedule/test_zerobubble_pp.py114
LOWtests/test_tensor/test_dtensor/test_dtensor.py22
LOWtests/test_optimizer/test_dist_came.py63
LOWtests/test_optimizer/test_dist_adafactor.py196
LOWtests/test_optimizer/_utils.py230
LOWtests/test_moe/test_moe_checkpoint.py42
LOWtests/test_moe/test_moe_checkpoint.py90
LOW…ochunk_transformer/test_autochunk_transformer_utils.py81
LOWtests/test_fp8/test_fp8_fsdp_comm_hook.py33
LOWextensions/utils.py154
LOWcolossalai/pipeline/weight_grad_store.py19
LOWcolossalai/pipeline/schedule/v_schedule.py81
LOWcolossalai/pipeline/schedule/v_schedule.py290
LOWcolossalai/pipeline/schedule/v_schedule.py318
LOWcolossalai/pipeline/schedule/generate.py203
LOWcolossalai/pipeline/schedule/generate.py348
LOWcolossalai/pipeline/schedule/zero_bubble_pp.py239
LOWcolossalai/pipeline/schedule/zero_bubble_pp.py297
LOWcolossalai/pipeline/schedule/zero_bubble_pp.py871
LOWcolossalai/interface/model.py9
LOWcolossalai/nn/optimizer/adafactor.py86
LOWcolossalai/nn/optimizer/lars.py40
LOWcolossalai/nn/optimizer/galore.py118
LOWcolossalai/nn/optimizer/galore.py235
LOWcolossalai/nn/optimizer/distributed_adafactor.py286
LOWcolossalai/nn/optimizer/came.py64
LOWcolossalai/nn/optimizer/cpu_adam.py127
LOWcolossalai/nn/optimizer/distributed_lamb.py104
LOWcolossalai/nn/optimizer/distributed_galore.py143
LOWcolossalai/nn/optimizer/fused_lamb.py105
LOWcolossalai/nn/optimizer/distributed_came.py68
LOWcolossalai/nn/optimizer/distributed_came.py333
LOWcolossalai/nn/optimizer/hybrid_adam.py93
LOWcolossalai/nn/layer/scaled_softmax.py132
LOWcolossalai/fx/_meta_regist_12.py435
LOWcolossalai/fx/tracer/experimental.py497
LOWcolossalai/fx/tracer/experimental.py525
LOWcolossalai/fx/tracer/experimental.py595
LOWcolossalai/fx/tracer/experimental.py201
LOWcolossalai/fx/tracer/experimental.py334
LOWcolossalai/fx/tracer/experimental.py366
LOWcolossalai/fx/tracer/experimental.py370
LOWcolossalai/fx/tracer/tracer.py83
LOWcolossalai/fx/tracer/tracer.py152
LOWcolossalai/fx/tracer/tracer.py218
LOWcolossalai/fx/tracer/tracer.py317
LOWcolossalai/fx/tracer/tracer.py157
LOW…ai/fx/tracer/meta_patch/patched_function/arithmetic.py8
LOW…lai/fx/tracer/meta_patch/patched_function/torch_ops.py146
485 more matches not shown…
Self-Referential Comments75 hits · 186 pts
SeverityFileLineSnippet
MEDIUM…t_hybrid_parallel_grad_clip_norm/test_amp_optimizer.py74 # Create a list of parameter-gradient pairs containing working parameters and their gradients
MEDIUM…est_tensor_shard/test_metainfo/test_linear_metainfo.py23 """This function is for linear memory test
MEDIUM…est_tensor_shard/test_metainfo/test_linear_metainfo.py61 """This function is for linear memory test
MEDIUM…st_tensor_shard/test_metainfo/test_pooling_metainfo.py14 """This function is for AdaptiveAvgPool memory test
MEDIUM…st_tensor_shard/test_metainfo/test_pooling_metainfo.py55 """This function is for MaxPool memory test
MEDIUM…/test_tensor_shard/test_metainfo/test_conv_metainfo.py23 """This function is for conv memory test
MEDIUM…/test_tensor_shard/test_metainfo/test_conv_metainfo.py65 """This function is for conv function memory test
MEDIUM…hard/test_metainfo/test_binary_elementwise_metainfo.py24 """This function is for binary elementwise ops memory test
MEDIUM…/test_tensor_shard/test_metainfo/test_norm_metainfo.py18 """This function is for batchnorm memory test
MEDIUMtests/test_infer/test_streamingllm.py115 result_list = manager.list([-1] * 1) # Create a shared list
MEDIUMtests/test_infer/test_inference_engine.py90 result_list = manager.list([-1] * world_size) # Create a shared list
MEDIUMtests/test_infer/test_models/test_baichuan.py82 result_list = manager.list([-1] * world_size) # Create a shared list
MEDIUMtests/test_infer/test_models/test_custom_model.py84 result_list = manager.list([-1] * world_size) # Create a shared list
MEDIUMtests/test_infer/test_kernels/triton/kernel_utils.py7# This function is adapted from src/transformers/models/llama/modeling_llama.py
MEDIUMcolossalai/fx/codegen/activation_checkpoint_codegen.py168 """This function is to find the offload regions
MEDIUMcolossalai/booster/plugin/hybrid_parallel_plugin.py1403 # Create a context for gradient synchronization based on the optimizer type.
MEDIUMcolossalai/shardformer/modeling/gpt2.py137 # This function is modified on the basis of transformers.models.gpt2.modeling_gpt2.GPT2Model.forward.
MEDIUMcolossalai/shardformer/modeling/gpt2.py555 # This function is modified on the basis of transformers.models.gpt2.modeling_gpt2.GPT2ForQuestionAnswering.forw
MEDIUMcolossalai/shardformer/modeling/gpt2.py643 # This function is modified on the basis of transformers.models.gpt2.modeling_gpt2.GPT2ForTokenClassification.fo
MEDIUMcolossalai/shardformer/modeling/gpt2.py718 # This function is modified on the basis of transformers.models.gpt2.modeling_gpt2.GPT2ForSequenceClassification
MEDIUMcolossalai/shardformer/modeling/t5.py54 # This function is modified on the basis of transformers.models.t5.modeling_t5.T5Stack.forward.
MEDIUMcolossalai/shardformer/modeling/t5.py290 # This function is modified on the basis of transformers.models.t5.modeling_t5.T5Model.forward.
MEDIUMcolossalai/shardformer/modeling/t5.py430 # This function is modified on the basis of transformers.models.t5.modeling_t5.T5ForConditionalGeneration.forwar
MEDIUMcolossalai/shardformer/modeling/gptj.py99 # This function is modified on the v4.51.3 transformers.models.gptj.modeling_gptj.GPTJModel.forward.
MEDIUMcolossalai/shardformer/modeling/gptj.py288 # This function is modified on the basis of transformers.models.gptj.modeling_gptj.GPTJForCausalLM.forward.
MEDIUMcolossalai/shardformer/modeling/gptj.py381 # This function is modified on the v4.51.3 transformers.models.gptj.modeling_gptj.GPTJForSequenceClassification.
MEDIUMcolossalai/shardformer/modeling/gptj.py503 # This function is modified on the basis of transformers.models.gptj.modeling_gptj.GPTJForQuestionAnswering.forw
MEDIUMcolossalai/shardformer/modeling/gptj.py583 # This function is modified on the v4.51.3 transformers.models.gptj.modeling_gptj.GPTJAttention.forward.
MEDIUMcolossalai/legacy/pipeline/middleware/topo.py127# This class is a middleware between partition splitter
MEDIUMcolossalai/legacy/context/parallel_context.py25 """This class provides interface functions for users to get the parallel context,
MEDIUMcolossalai/legacy/context/random/seed_manager.py11 """This class is a manager of all random seeds involved in the system.
MEDIUMcolossalai/legacy/nn/loss/loss_1d.py30 # Create a mask of valid vocab ids (1 means it needs to be masked).
MEDIUM…lossalai/legacy/zero/sharded_optim/sharded_optim_v2.py189 # This function is called except the last stage of pipeline parallel
MEDIUMcolossalai/legacy/amp/naive_amp/_fp16_optimizer.py128 # Create a fp32 copy
MEDIUMcolossalai/utils/tensor_detector/tensor_detector.py17 """This class is a detector to detect tensor on different devices.
MEDIUMcolossalai/quantization/bnb.py219 # Create a copy of the model
MEDIUMcolossalai/zero/gemini/gemini_ddp.py261 """This function is only triggered for inference."""
MEDIUMcolossalai/zero/gemini/gemini_ddp.py296 """This function is only triggered for inference."""
MEDIUMcolossalai/zero/gemini/gemini_optimizer.py306 # This function is called except the last stage of pipeline parallel
MEDIUM…ssalai/zero/gemini/memory_tracer/memstats_collector.py76 # The following code work for ZeroInitContext, which is deprecated in v0.1.12
MEDIUMcolossalai/lazy/lazy_init.py80 """This class is only for correctness verification."""
MEDIUMcolossalai/inference/batch_bucket.py483 ########## The following methods are expected to be used in modeling ###########
MEDIUMcolossalai/tensor/comm_spec.py423 # Create a new member `logical_process_axes` to distinguish from original flatten
MEDIUM…/tutorial/sequence_parallel/loss_func/cross_entropy.py15 # Create a mask of valid vocab ids (1 means it needs to be masked).
MEDIUM…ce_parallel/data/datasets/test/test_indexed_dataset.py1# This file isn't really a formal automated test, it's just a place to
MEDIUMexamples/images/diffusion/main.py56 # Create an ArgumentParser object with specifies kwargs
MEDIUMexamples/images/diffusion/main.py404 # Create a list of exponentially increasing log steps, starting from 1 and ending at batch_frequency
MEDIUMexamples/images/diffusion/main.py661 # Create the checkpoint and configuration directories within the log directory.
MEDIUMexamples/images/diffusion/main.py755 # Create an empty OmegaConf configuration object
MEDIUMexamples/images/diffusion/main.py796 # Create a Trainer object with the specified command-line arguments and keyword arguments, and set the log direc
MEDIUMexamples/images/diffusion/main.py800 # Create a data module based on the configuration file
MEDIUMexamples/images/diffusion/ldm/data/lsun.py10# This class is used to create a dataset of images from LSUN dataset for training
MEDIUMexamples/images/dreambooth/train_dreambooth.py689 # Create the pipeline using using the trained modules and save it.
MEDIUMexamples/images/dreambooth/train_dreambooth_inpaint.py726 # Create the pipeline using using the trained modules and save it.
MEDIUMexamples/language/gpt/titans/model/embed.py262 # Create a mask of valid vocab ids (1 means it needs to be masked).
MEDIUMexamples/language/gpt/gemini/commons/model_zoo.py5## Define the Model and Loss Based on Huggingface transformers GPT2LMHeadModel
MEDIUM…anguage/gpt/experiments/pipeline_parallel/model_zoo.py5## Define the Model and Loss Based on Huggingface transformers GPT2LMHeadModel
MEDIUM…ples/community/roberta/pretraining/model/deberta_v2.py102 >>> # Create a mask
MEDIUM…ons/ColossalQA/colossalqa/retrieval_conversation_en.py31 # Define the retriever
MEDIUM…ons/ColossalQA/colossalqa/retrieval_conversation_en.py34 # Define the chain to preprocess the input
15 more matches not shown…
Docstring Block Structure25 hits · 125 pts
SeverityFileLineSnippet
HIGHcolossalai/pipeline/schedule/_utils.py72Get the batch size (size of dimension-0) of the first tensor in the batch. Args: batch (Any): Batch to be i
HIGHcolossalai/context/config.py52Reads a python file and constructs a corresponding :class:`Config` object. Args: filename (str): Na
HIGHcolossalai/shardformer/layer/normalization.py140 Convert a native PyTorch layer normalization module to a specific layer normalization module, and optio
HIGHcolossalai/legacy/context/parallel_context.py130Returns the local rank of the current device. Args: parallel_mode (:class:`colossalai.legacy.contex
HIGHcolossalai/legacy/context/parallel_context.py160Returns the global rank of the next device. Args: parallel_mode (:class:`colossalai.legacy.context.
HIGHcolossalai/legacy/context/parallel_context.py182Returns the global rank of the previous device. Args: parallel_mode (:class:`colossalai.legacy.cont
HIGHcolossalai/legacy/context/parallel_context.py204Returns a boolean value indicating whether the current device is the first one among its group for `parallel_mod
HIGHcolossalai/legacy/context/parallel_context.py222Returns a boolean value indicating whether the current device is the last one among its group for `parallel_mode
HIGHcolossalai/legacy/context/parallel_context.py256Returns the world size for `parallel_mode`. Args: parallel_mode (:class:`colossalai.legacy.context.
HIGHcolossalai/legacy/context/parallel_context.py286Returns the group of the current device for `parallel_mode`. Args: parallel_mode (:class:`colossala
HIGHcolossalai/legacy/context/parallel_context.py342Returns the rank of the current device for `parallel_mode` in the group. Args: parallel_mode (:clas
HIGHcolossalai/legacy/utils/checkpointing.py221Loads training states from a checkpoint file. Args: file: a file-like object (has to implement read(), read
HIGH…lossalai/legacy/zero/gemini/tensor_placement_policy.py64 Evict tensors from CUDA device. Args: hold_cuda_tensor_list (List[StatefulTensor]): the li
HIGHcolossalai/legacy/registry/registry.py28Registers a module represented in `module_class`. Args: module_class (class): The module to be regi
HIGHcolossalai/legacy/registry/registry.py45Retrieves a module with name `module_name` and returns the module if it has already been registered before.
HIGHcolossalai/legacy/builder/builder.py10Returns an object of :class:`module` constructed from `config`. Args: module: A python or user-defined clas
HIGHcolossalai/legacy/builder/builder.py27Returns an object constructed from `config`, the type of the object is specified by `registry`. Note: t
HIGHcolossalai/cli/launcher/run.py59Parse an inclusion or exclusion string and filter a hostfile dictionary. Examples: include_str="worker-0,wo
HIGHcolossalai/_analyzer/fx/tracer/symbolic_trace.py37 Traces a ``torch.nn.Module`` or a function and returns a ``GraphModule`` with ``Node``s and ``MetaInfo`` attach
HIGHcolossalai/_analyzer/fx/passes/graph_profile.py233 Run a specific node ``n`` and profile its execution time and memory usage. Calls into call_function, ca
HIGH…lossalai/auto_parallel/checkpoint/ckpt_solver_rotor.py311Backtrack the cost table and retrieve the optimal checkpointing strategy. Args: chain (Chain): A ba
HIGHcolossalai/zero/gemini/placement_policy.py158 Evict tensors from CUDA device. Args: can_evict_chunks (List[StatefulTensor]): the list of
HIGHcolossalai/tensor/d_tensor/layout_converter.py453 Check if the process groups required for sharding have been deleted by torch.distributed.destroy_proces
HIGH…/ColossalChat/coati/distributed/reward/reward_utils.py80 Modified from: https://gist.github.com/lewtun/9c2ce1937b741404090a3dc4c7c022b3 Retrieves the content from the l
HIGHapplications/ColossalChat/coati/models/generation.py279 Generates new tokens using a streaming approach. Args: model (Any): The model used for token generatio
Excessive Try-Catch Wrapping111 hits · 123 pts
SeverityFileLineSnippet
LOW…est_checkpoint_io/test_low_level_zero_checkpoint_io.py149 except Exception as e:
MEDIUM…est_checkpoint_io/test_low_level_zero_checkpoint_io.py95def run_fn(stage, shard, offload, model_fn, data_gen_fn, output_transform_fn, lo
LOWtests/test_shardformer/test_model/test_shard_gpt2.py226 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_gpt2.py271 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_command.py286 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_llama.py81 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_llama.py305 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_llama.py359 except Exception as e:
LOW…sts/test_shardformer/test_model/test_shard_chatglm2.py241 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_qwen3.py214 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_qwen3.py263 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_qwen2.py218 except Exception as e:
LOWtests/test_shardformer/test_model/test_shard_qwen2.py267 except Exception as e:
LOWtests/test_booster/test_plugin/test_gemini_plugin.py62 except Exception as e:
MEDIUMtests/test_booster/test_plugin/test_gemini_plugin.py19def run_fn(init_method, model_fn, data_gen_fn, output_transform_fn, zero_size, t
LOWtests/test_booster/test_plugin/test_3d_plugin.py82 except Exception as e:
MEDIUMtests/test_booster/test_plugin/test_3d_plugin.py48def run_fn(init_method, model_fn, data_gen_fn, output_transform_fn) -> Optional[
LOW…test_booster/test_plugin/test_low_level_zero_plugin.py56 except Exception as e:
LOWtests/test_fx/test_tracer/test_patched_op.py13 except Exception as e:
MEDIUMtests/test_fx/test_tracer/test_patched_op.py9def _run(data, patch_fn):
LOWtests/test_fx/test_tracer/test_patched_module.py16 except Exception as e:
MEDIUMtests/test_fx/test_tracer/test_patched_module.py7def _run(data, module, patch_fn):
LOW…racer/test_torchvision_model/test_torchvision_model.py41 except Exception as e:
LOW…s/test_fx/test_tracer/test_hf_model/hf_tracer_utils.py23 except Exception as e:
LOW…ts/test_fx/test_pipeline/test_timm_model/timm_utils.py29 except Exception as e:
LOWtests/test_fx/test_pipeline/test_topo/topo_utils.py45 except Exception as e:
LOWtests/test_fx/test_pipeline/test_hf_model/hf_utils.py32 except Exception as e:
LOWtests/test_optimizer/test_dist_lamb.py148 except Exception as e:
LOWtests/test_optimizer/test_dist_lamb.py230 except Exception as e:
LOWtests/test_optimizer/test_dist_lamb.py250 except Exception as e:
LOWtests/test_optimizer/test_dist_galore.py80 except Exception as e:
LOWtests/test_optimizer/test_dist_galore.py171 except Exception as e:
LOWtests/test_optimizer/test_dist_galore.py245 except Exception as e:
LOWtests/test_optimizer/test_dist_galore.py264 except Exception as e:
LOWtests/test_optimizer/test_dist_galore.py289 except Exception as e:
LOW…est_autochunk_diffuser/benchmark_autochunk_diffuser.py134 except Exception as e:
LOW…t_autochunk_alphafold/benchmark_autochunk_alphafold.py123 except Exception as e:
LOW…tochunk_transformer/benchmark_autochunk_transformer.py135 except Exception as e:
LOWcolossalai/fx/tracer/experimental.py589 except Exception as e:
LOWcolossalai/fx/tracer/tracer.py312 except Exception as e:
LOWcolossalai/shardformer/layer/parallel_module.py152 except Exception as ex:
LOWcolossalai/shardformer/layer/parallel_module.py330 except Exception as ex:
LOWcolossalai/shardformer/layer/normalization.py22except Exception:
LOWcolossalai/shardformer/shard/sharder.py200 except Exception as e:
LOW…lossalai/legacy/zero/sharded_model/sharded_model_v2.py208 except Exception as e:
LOW…lossalai/legacy/zero/sharded_model/sharded_model_v2.py556 except Exception as ex:
LOWcolossalai/legacy/inference/async_manager.py148 except Exception:
MEDIUMcolossalai/legacy/inference/async_manager.py135def start_dynamic_batching(args, tp_engine, waiting_req_list):
LOWcolossalai/legacy/inference/manager.py293 except Exception:
MEDIUMcolossalai/legacy/inference/manager.py280def start_dynamic_batching(args, tp_engine, waiting_req_list):
LOW…egacy/inference/quant/smoothquant/models/base_model.py228 except Exception as e:
LOWcolossalai/legacy/builder/builder.py55 except Exception as e:
MEDIUMcolossalai/legacy/builder/builder.py56 print(f"An error occurred when building {mod_type} from registry {registry.name}", flush=True)
LOWcolossalai/utils/safetensors.py12except Exception:
LOWcolossalai/cli/launcher/multinode_runner.py55 except Exception as e:
LOWcolossalai/_analyzer/fx/graph_module.py71 except Exception as e:
MEDIUMcolossalai/_analyzer/fx/graph_module.py65def __call__(self, obj, *args, **kwargs):
LOWcolossalai/_analyzer/fx/passes/graph_profile.py257 except Exception as e:
LOWcolossalai/zero/gemini/gemini_ddp.py727 except Exception as ex:
LOWcolossalai/lazy/pretrained.py259 except Exception:
51 more matches not shown…
Over-Commented Block86 hits · 86 pts
SeverityFileLineSnippet
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py641 out_grad = torch.chunk(out_grad, DEPTH, dim=0)[i]
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py661# )
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py681# out.backward(grad)
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py701# torch.distributed.broadcast(A_master, src=0)
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py721# INPUT_SIZE = HIDDEN_SIZE
LOW…legacy/test_layers/test_2d/checks_2d/check_layer_2d.py741# mask_shape = (BATCH_SIZE // DEPTH, NUM_ATTENTION_HEADS // DEPTH, SEQ_LENGTH, SEQ_LENGTH)
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py661
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py681# assert out.shape == (BATCH_SIZE // TESSERACT_DIM, SEQ_LENGTH, INPUT_SIZE // TESSERACT_DIM)
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py701# HIDDEN_SIZE,
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py721# grad = torch.randn(grad_shape, dtype=dtype, device=device)
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py741# attention_dropout_prob=0.5,
LOW…/test_layers/test_2p5d/checks_2p5d/check_layer_2p5d.py761# grad_shape = out.shape
LOW…rallel/test_tensor_shard/test_solver_with_resnet_v2.py21 mesh_shape = (2, 4)
LOW…rallel/test_tensor_shard/test_solver_with_resnet_v2.py41 # %layer1_0_conv2 : [#users=1] = call_module[target=layer1.0.conv2](args = (%layer1_0_relu,), kwargs = {})
LOWtests/kit/model_zoo/transformers/mistral.py1import torch
LOWtests/kit/model_zoo/transformers/whisper.py1import torch
LOWtests/kit/model_zoo/transformers/deepseek.py1# modified from tests/kit/model_zoo/transformers/mistral.py
LOWtests/kit/model_zoo/transformers/bert.py1import torch
LOWtests/kit/model_zoo/transformers/deepseek_v3.py1# modified from tests/kit/model_zoo/transformers/mistral.py
LOWtests/kit/model_zoo/transformers/sam.py1import torch
LOWtests/kit/model_zoo/transformers/mixtral.py1# modified from tests/kit/model_zoo/transformers/mistral.py
LOWtests/kit/model_zoo/transformers/mixtral.py81# name="transformers_mixtral_for_sequence_classification",
LOWtests/kit/model_zoo/transformers/blip2.py1import torch
LOWtests/test_tensor/test_comm_spec_apply.py81 if rank in (0, 1):
LOWtests/test_tensor/test_dtensor/test_comm_spec.py61 sharded_tensor_1 = torch.ones(2, 1) * 3
LOWtests/test_fx/test_tracer/test_bias_addition_module.py41 # %linear : [#users=1] = call_function[target=torch._C._nn.linear](args = (%x, %linear_weight), kwargs = {})
LOW…/test_fx/test_profiler/test_profiler_meta_info_prop.py61 torch.cuda.reset_peak_memory_stats()
LOW…/test_fx/test_profiler/test_profiler_meta_info_prop.py101 # If we need to dive deep into the memory usage by
LOW…e/en/features/mixed_precision_training_with_booster.md221```python
LOWextensions/csrc/common/micros.h101// https://github.com/pytorch/pytorch/commit/3aeb78079bcd68282fe9117088e138b77318e288
LOWextensions/csrc/common/micros.h221 } else { \
LOWextensions/csrc/funcs/cast_functor.h1#pragma once
LOWextensions/csrc/funcs/binary_functor.h1#pragma once
LOWextensions/csrc/funcs/ternary_functor.h1#pragma once
LOWextensions/csrc/funcs/unary_functor.h1#pragma once
LOWextensions/csrc/kernel/cuda/attention/attention_utils.h21
LOWextensions/csrc/kernel/x86/cpu_adam.h21*/
LOWextensions/csrc/kernel/x86/cpu_adam.h41#define SIMD_WIDTH 16
LOWextensions/csrc/kernel/x86/cpu_adam.h61#define SIMD_LOAD(x) _mm256_loadu_ps(x)
LOWcolossalai/pipeline/schedule/v_schedule.py1# Refer from Zero Bubble Pipeline Parallelism.
LOWcolossalai/nn/optimizer/adafactor.py1# coding=utf-8
LOWcolossalai/shardformer/modeling/bert.py1081 # if uni-directional self-attention (decoder) save Tuple(torch.Tensor, torch.Tensor) of
LOWcolossalai/legacy/pipeline/middleware/topo.py121 return res
LOWcolossalai/legacy/moe/openmoe/train.sh21# ep
LOWcolossalai/legacy/moe/openmoe/test_ci.sh1# pip install -r requirements.txt
LOWcolossalai/legacy/moe/openmoe/test_ci.sh21# torchrun --standalone --nproc_per_node 4 train.py \
LOW…salai/legacy/moe/openmoe/model/convert_openmoe_ckpt.py1# coding=utf-8
LOWcolossalai/legacy/moe/openmoe/model/modeling_openmoe.py1# coding=utf-8
LOWcolossalai/_analyzer/fx/graph_module.py21from torch.fx.graph_module import _exec_with_source, _forward_from_src
LOWcolossalai/auto_parallel/checkpoint/ckpt_solver_base.py101 """
LOW…salai/auto_parallel/passes/runtime_preparation_pass.py241 getitem_index = node.args[1]
LOWcolossalai/device/device_mesh.py421 # key is axis name
LOWcolossalai/tensor/colo_parameter.py81
LOW…utorial/sequence_parallel/lr_scheduler/annealing_lr.py1# coding=utf-8
LOWexamples/tutorial/sequence_parallel/data/__init__.py21 (train_dataloader, valid_dataloader, test_dataloader) = (None, None, None)
LOW…/sequence_parallel/data/tokenizer/bert_tokenization.py1# coding=utf-8
LOW…/tutorial/sequence_parallel/data/tokenizer/__init__.py1# coding=utf-8
LOW…tutorial/sequence_parallel/data/tokenizer/tokenizer.py1# coding=utf-8
LOW…l/sequence_parallel/data/datasets/blendable_dataset.py1# coding=utf-8
LOW…torial/sequence_parallel/data/datasets/bert_dataset.py1# coding=utf-8
26 more matches not shown…
Fake / Example Data22 hits · 33 pts
SeverityFileLineSnippet
LOWapplications/ColossalQA/data/tests/test.txt28* Lorem ipsum dolor sit amet.
LOWapplications/ColossalQA/data/tests/test.txt28* Lorem ipsum dolor sit amet.
LOWapplications/ColossalQA/data/tests/test.txt2Lorem ipsum dolor sit amet, consectetuer adipiscing elit
LOWapplications/ColossalQA/data/tests/test.txt2Lorem ipsum dolor sit amet, consectetuer adipiscing elit
LOWapplications/ColossalQA/data/tests/test.txt10Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.
LOWapplications/ColossalQA/data/tests/test.txt10Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.
LOWapplications/ColossalQA/data/tests/test.txt13Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.
LOWapplications/ColossalQA/data/tests/test.txt13Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.
LOWapplications/ColossalQA/data/tests/test.txt16Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.
LOWapplications/ColossalQA/data/tests/test.txt16Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.
LOWapplications/ColossalQA/data/tests/test.txt20Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore.
LOWapplications/ColossalQA/data/tests/test.txt20Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore.
LOWapplications/ColossalQA/data/tests/test.txt23Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.
LOWapplications/ColossalQA/data/tests/test.txt23Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.
LOWapplications/ColossalQA/data/tests/test.txt26Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
LOWapplications/ColossalQA/data/tests/test.txt26Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
LOWapplications/ColossalQA/data/tests/test.txt33Lorem ipsum dolor sit amet Consectetuer adipiscing elit, Sed diam nonummy
LOWapplications/ColossalQA/data/tests/test.txt33Lorem ipsum dolor sit amet Consectetuer adipiscing elit, Sed diam nonummy
LOWapplications/ColossalQA/data/tests/test.txt35Lorem ipsum dolor sit amet Consectetuer adipiscing elit, Sed diam nonummy
LOWapplications/ColossalQA/data/tests/test.txt35Lorem ipsum dolor sit amet Consectetuer adipiscing elit, Sed diam nonummy
LOWapplications/ColossalQA/data/tests/test.txt38Lorem ipsum, Dolor sit amet, Consectetuer
LOWapplications/ColossalQA/data/tests/test.txt38Lorem ipsum, Dolor sit amet, Consectetuer
Redundant / Tautological Comments22 hits · 30 pts
SeverityFileLineSnippet
LOWtests/test_shardformer/test_model/_utils.py324 # Check if the output sequence is gathered before cross entropy
LOWcolossalai/booster/plugin/hybrid_parallel_plugin.py173 # Check if the DP group size is 1, meaning no synchronization is needed.
LOWcolossalai/booster/plugin/hybrid_parallel_plugin.py854 # Check if the list of gradients is empty
LOWcolossalai/booster/plugin/hybrid_parallel_plugin.py1427 # Check if the optimizer is a HybridParallelZeroOptimizer and synchronize data parallelism gradients if so.
LOWcolossalai/quantization/bnb.py160 # Check if the current key is not in the `modules_to_not_convert`
LOWcolossalai/quantization/bnb.py232 # Check if it is a base model
LOWcolossalai/tensor/d_tensor/layout_converter.py472 # Check if each process group is still alive
LOWexamples/images/diffusion/main.py257 # Check if the train dataset is iterable
LOWexamples/images/diffusion/main.py274 # Check if the validation dataset is iterable
LOWexamples/images/diffusion/main.py289 # Check if the test dataset is iterable
LOWexamples/images/diffusion/main.py620 # Check if the "resume" option is specified, resume training from the checkpoint if it is true
LOWexamples/images/diffusion/main.py854 # Assign melk to SIGUSR1 signal and divein to SIGUSR2 signal
LOW…flows/scripts/example_checks/detect_changed_example.py19 # Output the result using print. Then the shell can get the values.
LOW…ons/ColossalChat/coati/distributed/reward/reward_fn.py140 # Check if the sequence is over length
LOW…ons/ColossalChat/coati/distributed/reward/reward_fn.py205 # Check if the sequence is over length
LOW…ons/ColossalChat/coati/distributed/reward/reward_fn.py286 # Check if the sequence is over length
LOW…tions/ColossalChat/coati/dataset/tokenization_utils.py112 # Check if all labels are ignored, this may happen when the tokenized length is too long
LOW…tions/ColossalChat/coati/dataset/tokenization_utils.py321 # Check if loss mask is all 0s (no loss), this may happen when the tokenized length is too long
LOWapplications/ColossalChat/tests/test_train.sh406 # Check if the plugin is either "gemini_auto" or "gemini" and set grad_accu to '1'
LOWapplications/ColossalChat/tests/test_lora.py59 # Check if model has overfitted
LOW…ns/ColossalChat/examples/training_scripts/train_kto.py182 # Check if the user specified weights fit into the theoratical lower and upper bounds from Eq. (8) of https://arxiv.
LOW…t/examples/data_preparation_scripts/prepare_dataset.py173 # Set stop_ids to eos_token_id for other dataset types if not exist
AI Slop Vocabulary17 hits · 30 pts
SeverityFileLineSnippet
LOWcolossalai/fx/tracer/tracer.py97 # if no extra manipulation is applied, we just pass the origin arguments to create_proxy function
MEDIUMcolossalai/legacy/context/parallel_mode.py17 # this is added to facilitate amp and grad clipping in hybrid parallel
LOW…lossalai/legacy/zero/sharded_optim/sharded_optim_v2.py339 # We just set p.data = p.colo_attr.saved_grad.payload here
MEDIUM…egacy/zero/shard_utils/bucket_tensor_shard_strategy.py40 # Ensure we utilize maximum PCIE bandwidth
LOWcolossalai/autochunk/estimate_memory.py197 # if node is placeholder, just add the size of the node
LOWcolossalai/cli/launcher/hostinfo.py36 port = 22 # no port specified, lets just use the ssh port
LOWcolossalai/zero/gemini/chunk/chunk.py332 # just use another way for the movement
LOWcolossalai/lazy/lazy_init.py340 # inplace op, just return origin lazy tensor
MEDIUMcolossalai/kernel/triton/context_attn_unpad.py602 # NOTE use `triton.next_power_of_2` here to utilize the cache mechanism of triton
MEDIUMcolossalai/kernel/triton/flash_decoding.py409 # NOTE use `triton.next_power_of_2` here to utilize the cache mechanism of triton
LOW…utorial/sequence_parallel/lr_scheduler/annealing_lr.py67 # If the learning rate is constant, just return the initial value.
LOWexamples/language/gpt/gemini/train_gpt_demo.py210 # we just use randomly generated data here
LOW…uage/gpt/experiments/pipeline_parallel/train_gpt_pp.py143 # we just use randomly generated data here
LOW…pt/experiments/auto_parallel/auto_parallel_with_gpt.py81 # we just use randomly generated data here
LOW…les/community/roberta/pretraining/utils/global_vars.py113 # pollutes the runs list, so we just add each as a scalar
MEDIUM…/ColossalChat/coati/distributed/reward/reward_utils.py21 """Performs comprehensive validation of response structure.
MEDIUM…cations/ColossalChat/coati/utils/reward_score/utils.py21 """Performs comprehensive validation of response structure.
Slop Phrases6 hits · 14 pts
SeverityFileLineSnippet
MEDIUMcolossalai/shardformer/shard/shard_config.py116 # you can add all the optimization flag here
MEDIUM…s/tutorial/opt/inference/script/processing_ckpt_66b.py7# you can use whether wget or git lfs
MEDIUM…ples/community/roberta/preprocessing/sentence_split.py143 # if you have multiple server, you can use code below or modify code to openmpi
MEDIUM…mples/community/roberta/preprocessing/tokenize_mask.py239 # if you have multiple server, you can use code below or modify code to openmpi
MEDIUMapplications/ColossalQA/data/tests/test.html1113<p>If you are using {}-formatting (<a class="reference internal" href="https://docs.python.org/3/library/stdtypes.html#s
MEDIUMapplications/ColossalQA/data/tests/test.html1296counterparts in <a class="reference internal" href="https://docs.python.org/3/library/logging.html#logging.Logger" title
Cross-Language Confusion3 hits · 10 pts
SeverityFileLineSnippet
HIGHcolossalai/legacy/nn/layer/parallel_3d/_utils.py90 return _async_grad_bucket.push(op, grad, param_id)
HIGHcolossalai/legacy/moe/layer/layers.py312 | C1 || C2 || C3 || C4 |
HIGHcolossalai/legacy/moe/layer/layers.py313 | A1 || A2 | | R1 | A3 || R2 | A4 || R3 | | R4 |
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICAL…ns/ColossalChat/coati/distributed/inference_backend.py284 self.llm.llm_engine.model_executor.driver_worker.model_runner.model.load_weights(state_dict.items())
Verbosity Indicators3 hits · 2 pts
SeverityFileLineSnippet
LOWcolossalai/fx/codegen/activation_checkpoint_codegen.py586 # we need to check if the checkpoint need to offload the input
LOWcolossalai/fx/codegen/activation_checkpoint_codegen.py593 # we need to check if the checkpoint need use_reentrant=False
LOW.github/workflows/scripts/check_doc_i18n.py6 # First, we need to check if the two directories exist
Overly Generic Function Names3 hits · 2 pts
SeverityFileLineSnippet
LOWcolossalai/auto_parallel/tensor_shard/utils/misc.py20 def do_something():
LOWcolossalai/testing/utils.py235 def do_something(rank, world_size, port):
LOWcolossalai/testing/utils.py241 def do_something(rank, world_size, port, arg1, arg2):