A Flexible Framework for Experiencing Heterogeneous LLM Inference/Fine-tune Optimizations
This report summarizes scanner evidence for kvcache-ai/ktransformers, a Python project with 19,592 GitHub stars. SynthScan examined 429,446 lines of code across 1356 source files, recording 4393 pattern matches distributed across 25 syntactic categories. The legacy adjusted pattern signal is 16.5 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 2297 finding(s).
Are imports declared and package/API names verified? 1031 finding(s).
Are wrappers, guards, and repeated structures necessary? 1889 finding(s).
Which changes need focused human review? 4393 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 4393 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | archive/merge_tensors/merge_safetensor_gguf.py | 0 | :param folder_path: folder path :return: key_to_file_map | STRING |
| HIGH | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 0 | :param folder_path: folder path :return: key_to_file_map | STRING |
| HIGH | kt-kernel/scripts/check.py | 0 | :param folder_path: folder path :return: key_to_file_map | STRING |
| HIGH | archive/merge_tensors/merge_safetensor_gguf.py | 0 | # :param name: name of the tensor # :return: translated name # | STRING |
| HIGH | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 0 | # :param name: name of the tensor # :return: translated name # | STRING |
| HIGH | kt-kernel/scripts/check.py | 0 | # :param name: name of the tensor # :return: translated name # | STRING |
| HIGH | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/bench/bench_moe.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …chive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_moe_kernel.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_moe_amx.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_moe_amx_k.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_moe_kml.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/examples/test_mlp.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …ive/kt-sft/csrc/ktransformers_ext/examples/test_mlp.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/examples/test_mlp.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/examples/test_moe.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …ft/csrc/ktransformers_ext/examples/test_sft_amx_moe.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …ive/kt-sft/csrc/ktransformers_ext/examples/test_moe.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …kt-sft/csrc/ktransformers_ext/examples/test_sft_moe.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/examples/test_moe_kernel.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/examples/test_moe_kml.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/examples/test_linear.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …/kt-sft/csrc/ktransformers_ext/examples/test_linear.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/examples/test_linear.py | 0 | description : author : chenht2022 date : 2024-07-25 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/bench/bench_attention.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | …/csrc/ktransformers_ext/bench/bench_attention_torch.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | …kt-sft/csrc/ktransformers_ext/bench/bench_attention.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | …/csrc/ktransformers_ext/bench/bench_attention_torch.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | kt-kernel/bench/bench_attention.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | kt-kernel/bench/bench_attention_torch.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | …hive/csrc/ktransformers_ext/examples/test_attention.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | …-sft/csrc/ktransformers_ext/examples/test_attention.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | kt-kernel/examples/test_attention.py | 0 | description : author : jianwei dong date : 2024-08-28 10:32:05 version : 1.0.0 lasteditors : chenht2022 lastedittime : 2 | STRING |
| HIGH | archive/csrc/ktransformers_ext/bench/bench_mlp.py | 0 | description : author : chenht2022 date : 2024-07-16 10:43:18 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …chive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py | 0 | description : author : chenht2022 date : 2024-07-16 10:43:18 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_mlp.py | 0 | description : author : chenht2022 date : 2024-07-16 10:43:18 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/bench/bench_linear.py | 0 | description : author : chenht2022 date : 2024-07-25 10:31:59 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …ve/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py | 0 | description : author : chenht2022 date : 2024-07-25 10:31:59 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_linear.py | 0 | description : author : chenht2022 date : 2024-07-25 10:31:59 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …ive/csrc/ktransformers_ext/bench/bench_linear_torch.py | 0 | description : author : chenht2022 date : 2024-07-25 10:31:59 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …sft/csrc/ktransformers_ext/bench/bench_linear_torch.py | 0 | description : author : chenht2022 date : 2024-07-25 10:31:59 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_linear_torch.py | 0 | description : author : chenht2022 date : 2024-07-25 10:31:59 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 0 | description : author : chenht2022 date : 2024-07-16 10:43:18 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | …kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 0 | description : author : chenht2022 date : 2024-07-16 10:43:18 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | kt-kernel/bench/bench_mlp_torch.py | 0 | description : author : chenht2022 date : 2024-07-16 10:43:18 version : 1.0.0 lasteditors : chenht2022 lastedittime : 202 | STRING |
| HIGH | archive/csrc/custom_marlin/utils/format24.py | 0 | class for creating n:m sparsity masks. masks will be created using the n:m ratio, where for every block of m weights, n | STRING |
| HIGH | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 0 | class for creating n:m sparsity masks. masks will be created using the n:m ratio, where for every block of m weights, n | STRING |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 0 | class for creating n:m sparsity masks. masks will be created using the n:m ratio, where for every block of m weights, n | STRING |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 0 | class for creating n:m sparsity masks. masks will be created using the n:m ratio, where for every block of m weights, n | STRING |
| HIGH | archive/kt-sft/ktransformers/local_chat.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/kt-sft/ktransformers/optimize/optimize.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/kt-sft/ktransformers/util/utils.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/ktransformers/local_chat_test.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/ktransformers/local_chat.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/ktransformers/optimize/optimize.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/ktransformers/util/utils.py | 0 | description : author : boxin zhang, azure-tang version : 0.1.0 copyright (c) 2024 by kvcache.ai, all rights reserved. | STRING |
| HIGH | archive/kt-sft/ktransformers/local_chat.py | 0 | '): # end multi lines input line = line[:-3] # suffix | STRING |
| HIGH | archive/ktransformers/local_chat.py | 0 | '): # end multi lines input line = line[:-3] # suffix | STRING |
| 347 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ktransformers.py | 8 | CODE | |
| LOW | ktransformers.py | 29 | CODE | |
| LOW | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 18 | CODE | |
| LOW | archive/merge_tensors/merge_safetensor_gguf.py | 5 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py | 12 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py | 12 | CODE | |
| LOW | …ive/csrc/ktransformers_ext/bench/bench_linear_torch.py | 12 | CODE | |
| LOW | …ive/csrc/ktransformers_ext/bench/bench_linear_torch.py | 12 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 12 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 12 | CODE | |
| LOW | …/csrc/ktransformers_ext/bench/bench_attention_torch.py | 16 | CODE | |
| LOW | archive/csrc/ktransformers_ext/cuda/setup.py | 2 | CODE | |
| LOW | archive/csrc/ktransformers_ext/cuda/setup.py | 3 | CODE | |
| LOW | archive/csrc/ktransformers_ext/cuda/test_dequant.py | 1 | CODE | |
| LOW | archive/csrc/ktransformers_ext/examples/test_mlp.py | 13 | CODE | |
| LOW | archive/csrc/ktransformers_ext/examples/test_moe.py | 13 | CODE | |
| LOW | …hive/csrc/ktransformers_ext/examples/test_attention.py | 13 | CODE | |
| LOW | archive/csrc/ktransformers_ext/examples/test_linear.py | 13 | CODE | |
| LOW | archive/csrc/custom_marlin/setup.py | 1 | CODE | |
| LOW | archive/csrc/custom_marlin/setup.py | 2 | CODE | |
| LOW | archive/csrc/custom_marlin/test_cuda_graph.py | 1 | CODE | |
| LOW | archive/csrc/custom_marlin/test_cuda_graph.py | 6 | CODE | |
| LOW | archive/csrc/custom_marlin/utils/marlin_utils.py | 13 | CODE | |
| LOW | archive/kt-sft/withoutKT_PEFT.py | 2 | CODE | |
| LOW | archive/kt-sft/withoutKT_PEFT.py | 4 | CODE | |
| LOW | archive/kt-sft/withoutKT_PEFT.py | 9 | CODE | |
| LOW | archive/kt-sft/withoutKT_PEFT.py | 9 | CODE | |
| LOW | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 5 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py | 12 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py | 12 | CODE | |
| LOW | …sft/csrc/ktransformers_ext/bench/bench_linear_torch.py | 12 | CODE | |
| LOW | …sft/csrc/ktransformers_ext/bench/bench_linear_torch.py | 12 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 12 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 12 | CODE | |
| LOW | …/csrc/ktransformers_ext/bench/bench_attention_torch.py | 16 | CODE | |
| LOW | archive/kt-sft/csrc/ktransformers_ext/cuda/setup.py | 2 | CODE | |
| LOW | archive/kt-sft/csrc/ktransformers_ext/cuda/setup.py | 3 | CODE | |
| LOW | …ive/kt-sft/csrc/ktransformers_ext/cuda/test_dequant.py | 1 | CODE | |
| LOW | …ive/kt-sft/csrc/ktransformers_ext/examples/test_mlp.py | 13 | CODE | |
| LOW | …ive/kt-sft/csrc/ktransformers_ext/examples/test_moe.py | 13 | CODE | |
| LOW | …-sft/csrc/ktransformers_ext/examples/test_attention.py | 13 | CODE | |
| LOW | …/kt-sft/csrc/ktransformers_ext/examples/test_linear.py | 13 | CODE | |
| LOW | archive/kt-sft/csrc/custom_marlin/setup.py | 1 | CODE | |
| LOW | archive/kt-sft/csrc/custom_marlin/setup.py | 2 | CODE | |
| LOW | archive/kt-sft/csrc/custom_marlin/test_cuda_graph.py | 1 | CODE | |
| LOW | archive/kt-sft/csrc/custom_marlin/test_cuda_graph.py | 6 | CODE | |
| LOW | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py | 13 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 2 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 8 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 9 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 11 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 11 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 11 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 11 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 19 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 21 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 21 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 22 | CODE | |
| LOW | archive/kt-sft/ktransformers/moe_test_module.py | 25 | CODE | |
| LOW | archive/kt-sft/ktransformers/__init__.py | 18 | CODE | |
| 949 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | archive/setup.py | 80 | def get_musa_bare_metal_version(self, musa_dir): | CODE |
| LOW | archive/setup.py | 90 | def get_rocm_bare_metal_version(self, rocm_dir): | CODE |
| LOW | archive/setup.py | 154 | def get_cuda_bare_metal_version(self, cuda_dir): | CODE |
| LOW | archive/setup.py | 163 | def get_cuda_version_of_torch(self): | CODE |
| LOW | archive/setup.py | 365 | def run_command_with_live_tail(ext: str, command: List[str], output_lines: int = 20, | CODE |
| LOW | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 27 | def read_safetensor_keys_from_folder(folder_path) -> dict: | CODE |
| LOW | archive/merge_tensors/merge_safetensor_gguf.py | 15 | def read_safetensor_keys_from_folder(folder_path)->dict: | CODE |
| LOW | archive/csrc/custom_marlin/utils/format24.py | 21 | def _calculate_meta_reordering_scatter_offsets(m, meta_ncols, meta_dtype, | CODE |
| LOW | archive/csrc/custom_marlin/utils/format24.py | 52 | def sparse_semi_structured_from_dense_cutlass(dense): | CODE |
| LOW | archive/csrc/custom_marlin/utils/format24.py | 184 | def sparse_semi_structured_to_dense_cutlass(sparse, meta_reordered): | CODE |
| LOW | archive/kt-sft/setup.py | 105 | def get_musa_bare_metal_version(self, musa_dir): | CODE |
| LOW | archive/kt-sft/setup.py | 115 | def get_rocm_bare_metal_version(self, rocm_dir): | CODE |
| LOW | archive/kt-sft/setup.py | 179 | def get_cuda_bare_metal_version(self, cuda_dir): | CODE |
| LOW | archive/kt-sft/setup.py | 188 | def get_cuda_version_of_torch(self): | CODE |
| LOW | archive/kt-sft/setup.py | 384 | def run_command_with_live_tail(ext: str, command: List[str], output_lines: int = 20, | CODE |
| LOW | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 15 | def read_safetensor_keys_from_folder(folder_path)->dict: | CODE |
| LOW | …kt-sft/csrc/ktransformers_ext/examples/test_sft_moe.py | 604 | def test_backward_one_vs_many_comparison(): | CODE |
| LOW | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 21 | def _calculate_meta_reordering_scatter_offsets(m, meta_ncols, meta_dtype, | CODE |
| LOW | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 52 | def sparse_semi_structured_from_dense_cutlass(dense): | CODE |
| LOW | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 184 | def sparse_semi_structured_to_dense_cutlass(sparse, meta_reordered): | CODE |
| LOW | archive/kt-sft/ktransformers/local_chat.py | 239 | # def first_token_argmax_baseline(model, tokenizer, prompt_text, device): | COMMENT |
| LOW | archive/kt-sft/ktransformers/operators/cpuinfer.py | 328 | def update_importance_one_block( | CODE |
| LOW | archive/kt-sft/ktransformers/operators/cpuinfer.py | 473 | def clear_importance_all_layers( | CODE |
| LOW | archive/kt-sft/ktransformers/operators/cpuinfer.py | 704 | def get_all_kvcache_one_layer( | CODE |
| LOW | …ve/kt-sft/ktransformers/operators/dynamic_attention.py | 271 | def get_preselect_block_table_and_attn_score( | CODE |
| LOW | …ive/kt-sft/ktransformers/operators/triton_attention.py | 165 | def _decode_grouped_att_m_fwd( | CODE |
| LOW | …ive/kt-sft/ktransformers/operators/triton_attention.py | 313 | def _decode_softmax_reducev_fwd( | CODE |
| LOW | …ive/kt-sft/ktransformers/operators/triton_attention.py | 358 | def decode_attention_fwd_grouped( | CODE |
| LOW | archive/kt-sft/ktransformers/util/custom_gguf.py | 97 | def quant_shape_to_byte_shape(shape: Sequence[int], quant_type: GGMLQuantizationType): | CODE |
| LOW | archive/kt-sft/ktransformers/util/custom_gguf.py | 635 | def translate_name_to_gguf_mixtral(name): | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/custom_gguf.py | 704 | def translate_adapter_name_to_gguf(name): | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 29 | def _compute_default_rope_parameters( | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 71 | def _compute_linear_scaling_rope_parameters( | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 112 | def _compute_dynamic_ntk_parameters( | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 259 | def _compute_longrope_parameters( | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 407 | def _validate_default_rope_parameters(config: PretrainedConfig, ignore_keys: Optional[set] = None): | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 415 | def _validate_linear_scaling_rope_parameters(config: PretrainedConfig, ignore_keys: Optional[set] = None): | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 427 | def _validate_dynamic_scaling_rope_parameters(config: PretrainedConfig, ignore_keys: Optional[set] = None): | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 441 | def _validate_yarn_parameters(config: PretrainedConfig, ignore_keys: Optional[set] = None): | CODE |
| LOW | …chive/kt-sft/ktransformers/util/modeling_rope_utils.py | 479 | def _validate_longrope_parameters(config: PretrainedConfig, ignore_keys: Optional[set] = None): | CODE |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 389 | def get_undequanted_tensor_and_ggml_type(self, name): | CODE |
| LOW | archive/kt-sft/ktransformers/util/utils.py | 527 | def prefill_and_generate_capture( | CODE |
| LOW | …/kt-sft/ktransformers/server/utils/create_interface.py | 38 | def get_thread_context_manager() -> GlobalContextManager: | CODE |
| LOW | …kt-sft/ktransformers/server/backend/context_manager.py | 29 | async def get_context_by_run_object(self, run: RunObject) -> ThreadContext: | CODE |
| LOW | archive/kt-sft/ktransformers/server/backend/base.py | 57 | def report_last_time_performance(self): | CODE |
| LOW | …transformers/server/backend/interfaces/transformers.py | 176 | def format_and_tokenize_input_ids(self, thread_id: ObjectID, messages: List): | CODE |
| LOW | …ransformers/server/backend/interfaces/balance_serve.py | 94 | def report_last_time_performance(profiler: Profiler): | CODE |
| LOW | …ransformers/server/backend/interfaces/balance_serve.py | 411 | def format_and_tokenize_input_ids(self, thread_id: ObjectID, messages: List): | CODE |
| LOW | …/ktransformers/server/schemas/assistants/assistants.py | 133 | def get_related_threads_objects(self) -> List: | CODE |
| LOW | …ft/ktransformers/server/schemas/assistants/messages.py | 160 | def stream_response_with_event(self, event: MessageBase.Status) -> MessageStreamResponse: | CODE |
| LOW | …t/ktransformers/server/schemas/assistants/streaming.py | 136 | def wrap_async_generator_into_queue(async_events: AsyncIterable) -> asyncio.Queue: | CODE |
| LOW | …kt-sft/ktransformers/server/schemas/assistants/runs.py | 105 | def stream_response_with_event(self,event:RunBase.Status)->RunStreamResponse: | CODE |
| LOW | …kt-sft/ktransformers/server/schemas/assistants/runs.py | 123 | def create_message_creation_step(self): | CODE |
| LOW | …kt-sft/ktransformers/server/balance_serve/sched_rpc.py | 179 | def get_inference_context_raw(self): | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 891 | def init_model_parallel_group( | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 967 | def init_distributed_environment( | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 1014 | def initialize_model_parallel( | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 1091 | def ensure_model_parallel_initialized( | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 1120 | def model_parallel_is_initialized(): | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 1129 | def patch_tensor_parallel_group(tp_group: GroupCoordinator): | CODE |
| 617 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker/docker-utils.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | docker/docker-utils.sh | 161 | ################################################################################ | COMMENT |
| LOW | docker/build-docker-tar.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | docker/push-to-dockerhub.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | docker/push-to-dockerhub.sh | 581 | # - Automatic version detection | COMMENT |
| LOW | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 1 | # coding=utf-8 | COMMENT |
| LOW | archive/csrc/ktransformers_ext/ext_bindings.cpp | 21 | #if defined(__x86_64__) && defined(__HAS_AVX512F__) && defined(__HAS_AMX__) | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 1 | #pragma once | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 21 | #define cublasDestroy mublasDestroy | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 41 | #define cudaEventCreateWithFlags musaEventCreateWithFlags | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 61 | #define cudaMallocManaged musaMallocManaged | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 81 | #define cudaStreamWaitEvent musaStreamWaitEvent | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 101 | #define cuMemGetAllocationGranularity muMemGetAllocationGranularity | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/musa.h | 121 | #define cudaGraphExecUpdate musaGraphExecUpdate | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 1 | #pragma once | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 21 | #define CUBLAS_TF32_TENSOR_OP_MATH 0 | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 41 | #define cublasSgemm hipblasSgemm | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 61 | #define cudaGetDevice hipGetDevice | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 81 | #define cudaMemset hipMemset | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 101 | #define cudaStreamCreateWithFlags hipStreamCreateWithFlags | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 121 | #define cudaGraphKernelNodeSetParams hipGraphKernelNodeSetParams | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 141 | #define CUBLAS_STATUS_INTERNAL_ERROR HIPBLAS_STATUS_INTERNAL_ERROR | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/hip.h | 161 | #define RDNA2 | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/cuda.h | 1 | #pragma once | COMMENT |
| LOW | archive/csrc/ktransformers_ext/vendors/vendor.h | 1 | #ifndef CPUINFER_VENDOR_VENDOR_H | COMMENT |
| LOW | …ive/csrc/ktransformers_ext/operators/kvcache/kvcache.h | 21 | #include <fstream> | COMMENT |
| LOW | archive/csrc/ktransformers_ext/operators/amx/la/amx.hpp | 21 | #include <sys/syscall.h> | COMMENT |
| LOW | archive/csrc/ktransformers_ext/operators/amx/la/amx.hpp | 41 | namespace amx { | COMMENT |
| LOW | archive/csrc/ktransformers_ext/cpu_backend/cpuinfer.h | 21 | #ifdef KTRANSFORMERS_USE_CUDA | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 1 | #pragma once | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 21 | #define cublasDestroy mublasDestroy | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 41 | #define cudaEventCreateWithFlags musaEventCreateWithFlags | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 61 | #define cudaMallocManaged musaMallocManaged | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 81 | #define cudaStreamWaitEvent musaStreamWaitEvent | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 101 | #define cuMemGetAllocationGranularity muMemGetAllocationGranularity | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/musa.h | 121 | #define cudaGraphExecUpdate musaGraphExecUpdate | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 1 | #pragma once | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 21 | #define CUBLAS_TF32_TENSOR_OP_MATH 0 | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 41 | #define cublasSgemm hipblasSgemm | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 61 | #define cudaGetDevice hipGetDevice | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 81 | #define cudaMemset hipMemset | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 101 | #define cudaStreamCreateWithFlags hipStreamCreateWithFlags | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 121 | #define cudaGraphKernelNodeSetParams hipGraphKernelNodeSetParams | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 141 | #define CUBLAS_STATUS_INTERNAL_ERROR HIPBLAS_STATUS_INTERNAL_ERROR | COMMENT |
| LOW | …chive/csrc/ktransformers_ext/cpu_backend/vendors/hip.h | 161 | #define RDNA2 | COMMENT |
| LOW | …hive/csrc/ktransformers_ext/cpu_backend/vendors/cuda.h | 1 | #pragma once | COMMENT |
| LOW | …ve/csrc/ktransformers_ext/cpu_backend/vendors/vendor.h | 1 | #ifndef CPUINFER_VENDOR_VENDOR_H | COMMENT |
| LOW | archive/csrc/ktransformers_ext/cuda/binding.cpp | 1 | /** | COMMENT |
| LOW | archive/csrc/ktransformers_ext/cuda/gptq_marlin/ops.h | 21 | COMMENT | |
| LOW | archive/csrc/balance_serve/sched/scheduler.h | 1 | #pragma once | COMMENT |
| LOW | archive/csrc/balance_serve/sched/scheduler.cpp | 1 | #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO | COMMENT |
| LOW | archive/csrc/balance_serve/sched/metrics.h | 1 | #ifndef Metrics_H | COMMENT |
| LOW | archive/csrc/balance_serve/sched/utils/all.hpp | 1 | #pragma once | COMMENT |
| LOW | archive/csrc/balance_serve/kvc2/test/page_pool_test.cpp | 1 | COMMENT | |
| LOW | …ve/csrc/balance_serve/kvc2/test/kvc2test/lookup-mt.cpp | 61 | // // common prefix | COMMENT |
| LOW | …ve/csrc/balance_serve/kvc2/test/kvc2test/lookup-mt.cpp | 81 | // // insert partly new | COMMENT |
| LOW | …e/csrc/balance_serve/kvc2/test/kvc2test/lookup-gpu.cpp | 101 | cmp_handle_data(k1, k_from_gpu, 3); | COMMENT |
| LOW | …e/csrc/balance_serve/kvc2/test/kvc2test/lookup-gpu.cpp | 121 | COMMENT | |
| LOW | …e/csrc/balance_serve/kvc2/test/kvc2test/lookup-gpu.cpp | 141 | // auto ids2 = random_ids(10 * config.num_token_per_page, gen); | COMMENT |
| LOW | archive/csrc/balance_serve/kvc2/src/async_store.cpp | 1 | COMMENT | |
| 621 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | archive/setup.py | 113 | except (subprocess.CalledProcessError, FileNotFoundError): | CODE |
| HIGH | archive/setup.py | 124 | except (FileNotFoundError, IOError): | CODE |
| HIGH | archive/setup.py | 148 | except (subprocess.CalledProcessError, FileNotFoundError): | CODE |
| HIGH | archive/kt-sft/setup.py | 138 | except (subprocess.CalledProcessError, FileNotFoundError): | CODE |
| HIGH | archive/kt-sft/setup.py | 149 | except (FileNotFoundError, IOError): | CODE |
| HIGH | archive/kt-sft/setup.py | 173 | except (subprocess.CalledProcessError, FileNotFoundError): | CODE |
| HIGH | archive/kt-sft/ktransformers/operators/attention.py | 29 | except: | CODE |
| HIGH | archive/kt-sft/ktransformers/util/vendors.py | 55 | except: | CODE |
| HIGH | archive/kt-sft/ktransformers/util/vendors.py | 31 | except (ImportError, AttributeError): | CODE |
| HIGH | archive/kt-sft/ktransformers/util/vendors.py | 70 | except (ImportError, AttributeError): | CODE |
| HIGH | archive/kt-sft/ktransformers/util/vendors.py | 97 | except (ImportError, AttributeError): | CODE |
| HIGH | archive/kt-sft/ktransformers/tests/score.py | 83 | except queue.Empty: | CODE |
| HIGH | archive/kt-sft/ktransformers/tests/score.py | 89 | except queue.Empty: | CODE |
| HIGH | …chive/kt-sft/ktransformers/tests/AIME_2024/eval_api.py | 66 | except: | CODE |
| HIGH | archive/kt-sft/ktransformers/server/config/log.py | 102 | except OSError: | CODE |
| HIGH | archive/kt-sft/ktransformers/server/config/log.py | 97 | except OSError: | CODE |
| HIGH | …ransformers/server/backend/interfaces/balance_serve.py | 242 | except queue.Full: | CODE |
| HIGH | …serve/inference/distributed/custom_all_reduce_utils.py | 71 | except RuntimeError: | CODE |
| HIGH | archive/kt-sft/ktransformers/sft/lora.py | 150 | except Exception: | CODE |
| HIGH | archive/kt-sft/ktransformers/sft/lora.py | 327 | except Exception: | CODE |
| HIGH | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 582 | except AttributeError: | CODE |
| HIGH | archive/kt-sft/ktransformers/sft/metrics_utils/env.py | 61 | except Exception: | CODE |
| HIGH | archive/kt-sft/ktransformers/sft/metrics_utils/env.py | 68 | except Exception: | CODE |
| HIGH | archive/kt-sft/ktransformers/sft/metrics_utils/env.py | 75 | except Exception: | CODE |
| HIGH | archive/kt-sft/ktransformers/sft/metrics_utils/env.py | 84 | except Exception: | CODE |
| HIGH | archive/ktransformers/local_chat.py | 20 | except: | CODE |
| HIGH | archive/ktransformers/local_chat.py | 69 | except: | CODE |
| HIGH | archive/ktransformers/operators/attention.py | 28 | except: | CODE |
| HIGH | archive/ktransformers/util/vendors.py | 55 | except: | CODE |
| HIGH | archive/ktransformers/util/vendors.py | 31 | except (ImportError, AttributeError): | CODE |
| HIGH | archive/ktransformers/util/vendors.py | 70 | except (ImportError, AttributeError): | CODE |
| HIGH | archive/ktransformers/util/vendors.py | 97 | except (ImportError, AttributeError): | CODE |
| HIGH | archive/ktransformers/tests/score.py | 83 | except queue.Empty: | CODE |
| HIGH | archive/ktransformers/tests/score.py | 89 | except queue.Empty: | CODE |
| HIGH | archive/ktransformers/tests/AIME_2024/eval_api.py | 68 | except: | CODE |
| HIGH | archive/ktransformers/server/config/log.py | 102 | except OSError: | CODE |
| HIGH | archive/ktransformers/server/config/log.py | 97 | except OSError: | CODE |
| HIGH | …ransformers/server/backend/interfaces/balance_serve.py | 350 | except queue.Full: | CODE |
| HIGH | …serve/inference/distributed/custom_all_reduce_utils.py | 71 | except RuntimeError: | CODE |
| HIGH | kt-kernel/bench/bench_bf16_moe.py | 77 | except Exception: | CODE |
| HIGH | kt-kernel/bench/compare_moe_performance.py | 183 | except: | CODE |
| HIGH | kt-kernel/bench/compare_moe_performance.py | 330 | except ImportError: | CODE |
| HIGH | kt-kernel/bench/compare_moe_performance.py | 869 | except: | CODE |
| HIGH | kt-kernel/bench/compare_moe_performance.py | 1058 | except: | CODE |
| HIGH | kt-kernel/bench/bench_fp8_perchannel_moe.py | 77 | except Exception: | CODE |
| HIGH | kt-kernel/bench/bench_moe_amx.py | 63 | except RuntimeError: | CODE |
| HIGH | kt-kernel/bench/bench_fp8_moe.py | 78 | except Exception: | CODE |
| HIGH | kt-kernel/bench/bench_fp4_moe.py | 232 | except Exception: | CODE |
| HIGH | kt-kernel/test/validate_dsv4_mxfp4_sft_layer.py | 80 | except OSError: | CODE |
| HIGH | kt-kernel/test/validate_dsv4_mxfp4_sft_layer.py | 95 | except OSError: | CODE |
| HIGH | kt-kernel/test/ci/ci_utils.py | 30 | except psutil.NoSuchProcess: | CODE |
| HIGH | kt-kernel/test/ci/ci_utils.py | 44 | except psutil.NoSuchProcess: | CODE |
| HIGH | kt-kernel/python/experts_base.py | 139 | except Exception: | CODE |
| HIGH | kt-kernel/python/experts_base.py | 155 | except Exception: | CODE |
| HIGH | kt-kernel/python/experts_base.py | 321 | except Exception: | CODE |
| HIGH | kt-kernel/python/utils/loader.py | 868 | except: | CODE |
| HIGH | kt-kernel/python/utils/loader.py | 902 | except: | CODE |
| HIGH | kt-kernel/python/cli/i18n.py | 1295 | except Exception: | CODE |
| HIGH | kt-kernel/python/cli/main.py | 442 | except (OSError, IOError): | CODE |
| HIGH | kt-kernel/python/cli/utils/model_table_builder.py | 171 | except Exception: | CODE |
| 49 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ktransformers.py | 30 | except Exception: | CODE |
| MEDIUM | ktransformers.py | 27 | def has_sft_support() -> bool: | CODE |
| LOW | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 47 | except Exception as e: | CODE |
| MEDIUM | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 48 | print(f"Error reading Safetensor file {file_path}: {e}") | CODE |
| LOW | archive/merge_tensors/merge_safetensor_gguf.py | 48 | except Exception as e: | CODE |
| MEDIUM | archive/merge_tensors/merge_safetensor_gguf.py | 49 | print(f"Error reading Safetensor file {file_path}: {e}") | CODE |
| LOW | archive/kt-sft/setup.py | 45 | except Exception: | CODE |
| LOW | archive/kt-sft/setup.py | 73 | except Exception: | CODE |
| LOW | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 48 | except Exception as e: | CODE |
| MEDIUM | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 49 | print(f"Error reading Safetensor file {file_path}: {e}") | CODE |
| LOW | archive/kt-sft/test_adapter/infer_with_adapter.py | 27 | except Exception as e: | CODE |
| LOW | archive/kt-sft/test_adapter/inspect_adapter.py | 60 | except Exception as e: | CODE |
| LOW | archive/kt-sft/test_adapter/inspect_adapter.py | 77 | except Exception as e: | CODE |
| LOW | archive/kt-sft/test_adapter/inspect_adapter.py | 94 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/local_chat.py | 224 | except Exception as e: | CODE |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 71 | print(f"Error opening Safetensor file {file_path}: {e}") | CODE |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 81 | print(f"Error reading Safetensor file {file_path}: {e}") | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 70 | except Exception as e: | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 80 | except Exception as e: | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 557 | except Exception as e: | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 566 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/util/utils.py | 74 | except Exception: | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/weight_loader.py | 85 | except Exception as e: | CODE |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/weight_loader.py | 86 | print(f"Error opening Safetensor file {file_path}: {e}") | CODE |
| LOW⚡ | archive/kt-sft/ktransformers/util/weight_loader.py | 95 | except Exception as e: | CODE |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/weight_loader.py | 96 | print(f"Error reading Safetensor file {file_path}: {e}") | CODE |
| LOW | archive/kt-sft/ktransformers/tests/mmlu_pro_test.py | 150 | except Exception as e: | CODE |
| MEDIUM | archive/kt-sft/ktransformers/tests/mmlu_pro_test.py | 151 | print(f"Error processing request {i}: {e}") | CODE |
| LOW | archive/kt-sft/ktransformers/tests/mmlu_test_multi.py | 156 | except Exception as e: | CODE |
| MEDIUM | archive/kt-sft/ktransformers/tests/mmlu_test_multi.py | 157 | print(f"Error processing request {index}: {e}") | CODE |
| LOW | archive/kt-sft/ktransformers/tests/mmlu_test.py | 142 | except Exception as e: | CODE |
| MEDIUM | archive/kt-sft/ktransformers/tests/mmlu_test.py | 143 | print(f"Error processing request {i}: {e}") | CODE |
| LOW | archive/kt-sft/ktransformers/tests/test_speed.py | 116 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/tests/test_speed.py | 134 | except Exception as e: | CODE |
| MEDIUM | archive/kt-sft/ktransformers/tests/test_speed.py | 48 | def fetch_event_stream(session, request_id, prompt, max_tokens, model): | CODE |
| LOW | archive/kt-sft/ktransformers/tests/test_client.py | 63 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/tests/test_client.py | 73 | except Exception as e: | CODE |
| MEDIUM | archive/kt-sft/ktransformers/tests/test_client.py | 15 | def fetch_event_stream(session, payload, request_id, stream): | CODE |
| LOW | …chive/kt-sft/ktransformers/tests/humaneval/eval_api.py | 75 | except Exception as e: | CODE |
| MEDIUM | …chive/kt-sft/ktransformers/tests/humaneval/eval_api.py | 78 | print(f"Error: {e}") | CODE |
| LOW | …chive/kt-sft/ktransformers/tests/AIME_2024/eval_api.py | 110 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/server/utils/sql_utils.py | 97 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/server/utils/sql_utils.py | 108 | except Exception as e: | CODE |
| LOW | archive/kt-sft/ktransformers/server/utils/sql_utils.py | 123 | except Exception as e: | CODE |
| LOW | …kt-sft/ktransformers/server/balance_serve/sched_rpc.py | 98 | except Exception as e: | CODE |
| LOW | …serve/inference/distributed/custom_all_reduce_utils.py | 244 | except Exception as e: | CODE |
| LOW | …/balance_serve/inference/distributed/parallel_state.py | 1248 | except Exception as e: | CODE |
| MEDIUM | …/balance_serve/inference/distributed/parallel_state.py | 1249 | print("Error ignored in is_in_the_same_node: %s", e) | CODE |
| LOW | …lance_serve/inference/distributed/custom_all_reduce.py | 20 | except Exception: | CODE |
| LOW | …/balance_serve/inference/distributed/pynccl_wrapper.py | 193 | except Exception as e: | CODE |
| LOW | …s/server/balance_serve/inference/distributed/pynccl.py | 62 | except Exception: | CODE |
| LOW | …-sft/ktransformers/server/api/openai/endpoints/chat.py | 379 | except Exception as e: | STRING |
| LOW | archive/kt-sft/ktransformers/sft/lora.py | 150 | except Exception: | CODE |
| LOW | archive/kt-sft/ktransformers/sft/lora.py | 228 | except Exception: | CODE |
| LOW | archive/kt-sft/ktransformers/sft/lora.py | 327 | except Exception: | CODE |
| MEDIUM | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 153 | def active_adapters(self) -> list[str]: | CODE |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 919 | except Exception: # something went wrong, roll back | CODE |
| LOW | …t-sft/ktransformers/sft/flops_utils/lora_test_utils.py | 29 | except Exception as e: | CODE |
| LOW | …t-sft/ktransformers/sft/flops_utils/lora_test_utils.py | 40 | except Exception as e: | CODE |
| LOW | …t-sft/ktransformers/sft/flops_utils/lora_test_utils.py | 58 | except Exception as e: | CODE |
| 314 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | archive/setup.py | 238 | CODE | |
| LOW | archive/setup.py | 490 | CODE | |
| LOW | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 27 | CODE | |
| LOW | …chive/merge_tensors/merge_safetensor_gguf_for_qwen3.py | 103 | CODE | |
| LOW | archive/merge_tensors/merge_safetensor_gguf.py | 15 | CODE | |
| LOW | archive/merge_tensors/merge_safetensor_gguf.py | 97 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py | 80 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_moe.py | 31 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py | 29 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_mlp.py | 28 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_linear.py | 28 | CODE | |
| LOW | …ive/csrc/ktransformers_ext/bench/bench_linear_torch.py | 26 | CODE | |
| LOW | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 47 | CODE | |
| LOW | archive/kt-sft/setup.py | 259 | CODE | |
| LOW | archive/kt-sft/setup.py | 509 | CODE | |
| LOW | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 15 | CODE | |
| LOW | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py | 97 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py | 80 | CODE | |
| LOW | …chive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py | 31 | CODE | |
| LOW | …e/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py | 29 | CODE | |
| LOW | …chive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py | 28 | CODE | |
| LOW | …ve/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py | 28 | CODE | |
| LOW | …sft/csrc/ktransformers_ext/bench/bench_linear_torch.py | 26 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py | 47 | CODE | |
| LOW | …ft/csrc/ktransformers_ext/examples/test_sft_amx_moe.py | 476 | CODE | |
| LOW | …ft/csrc/ktransformers_ext/examples/test_sft_amx_moe.py | 501 | CODE | |
| LOW | …ft/csrc/ktransformers_ext/examples/test_sft_amx_moe.py | 536 | CODE | |
| LOW | …ft/csrc/ktransformers_ext/examples/test_sft_amx_moe.py | 551 | CODE | |
| LOW | archive/kt-sft/ktransformers/local_chat.py | 87 | CODE | |
| LOW | archive/kt-sft/ktransformers/optimize/optimize.py | 20 | CODE | |
| LOW | archive/kt-sft/ktransformers/optimize/optimize.py | 55 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/linear.py | 83 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/cpuinfer.py | 30 | CODE | |
| LOW | …ve/kt-sft/ktransformers/operators/dynamic_attention.py | 271 | CODE | |
| LOW | …ve/kt-sft/ktransformers/operators/dynamic_attention.py | 605 | CODE | |
| LOW | …sft/ktransformers/operators/balance_serve_attention.py | 327 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 88 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 353 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 799 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 1022 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 1069 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_gguf.py | 170 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/vendors.py | 23 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/vendors.py | 75 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 47 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 100 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 260 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 296 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 426 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/custom_loader.py | 508 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/utils.py | 166 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/utils.py | 61 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/weight_loader.py | 59 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/weight_loader.py | 190 | CODE | |
| LOW | archive/kt-sft/ktransformers/tests/mmlu_test_multi.py | 115 | CODE | |
| LOW | archive/kt-sft/ktransformers/tests/test_speed.py | 48 | CODE | |
| LOW | archive/kt-sft/ktransformers/tests/test_client.py | 15 | CODE | |
| LOW | …chive/kt-sft/ktransformers/tests/humaneval/eval_api.py | 34 | CODE | |
| LOW | …/kt-sft/ktransformers/server/utils/create_interface.py | 19 | CODE | |
| LOW | …kt-sft/ktransformers/server/backend/context_manager.py | 29 | CODE | |
| 314 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | install.sh | 47 | # ─── Helpers ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 81 | # ─── Submodule init ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 97 | # ─── sglang install ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 126 | # ─── kt-kernel install ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 145 | # ─── deps install ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 161 | # ─── "all" subcommand ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 212 | # ─── Subcommand dispatcher ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …/balance_serve/inference/distributed/parallel_state.py | 327 | # -------------------------------------------- | COMMENT |
| MEDIUM | archive/third_party/llamafile/tinyblas_cpu.h | 30 | // ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝ ╚═════╝ ╚═══╝╚═╝ ╚═╝╚═════╝ | COMMENT |
| MEDIUM | …ive/ktransformers/operators/ascend/ascend_attention.py | 920 | # ------------------------------------------------------- | COMMENT |
| MEDIUM | …ive/ktransformers/operators/ascend/ascend_attention.py | 922 | # ------------------------------------------------------- | COMMENT |
| MEDIUM | …ive/ktransformers/operators/ascend/ascend_attention.py | 994 | # ------------------------------------------------------- | COMMENT |
| MEDIUM | …ive/ktransformers/operators/ascend/ascend_attention.py | 996 | # ------------------------------------------------------- | COMMENT |
| MEDIUM | archive/ktransformers/tests/UT/test_kdeepseek_ln_npu.py | 12 | # ========================== | COMMENT |
| MEDIUM | archive/ktransformers/tests/UT/test_kdeepseek_ln_npu.py | 14 | # ========================== | COMMENT |
| MEDIUM⚡ | …s/tests/UT/test_kdeepseek_attention_w8a8a2serve_npu.py | 221 | # ========================== | COMMENT |
| MEDIUM⚡ | …s/tests/UT/test_kdeepseek_attention_w8a8a2serve_npu.py | 223 | # ========================== | COMMENT |
| MEDIUM | …/balance_serve/inference/distributed/parallel_state.py | 327 | # -------------------------------------------- | COMMENT |
| MEDIUM⚡ | …sformers/models/ascend/custom_ascend_modeling_qwen3.py | 87 | # --------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …sformers/models/ascend/custom_ascend_modeling_qwen3.py | 89 | # --------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/CMakeLists.txt | 493 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/CMakeLists.txt | 505 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/setup.py | 75 | # ------------------------- | COMMENT |
| MEDIUM | kt-kernel/setup.py | 77 | # ------------------------- | COMMENT |
| MEDIUM | kt-kernel/bench/bench_write_buffer.py | 102 | # ============================================================================== | COMMENT |
| MEDIUM | kt-kernel/bench/bench_write_buffer.py | 104 | # ============================================================================== | COMMENT |
| MEDIUM | kt-kernel/bench/bench_write_buffer.py | 326 | # ============================================================================== | COMMENT |
| MEDIUM | kt-kernel/bench/bench_write_buffer.py | 328 | # ============================================================================== | COMMENT |
| MEDIUM | kt-kernel/bench/bench_write_buffer.py | 408 | # ============================================================================== | COMMENT |
| MEDIUM | kt-kernel/bench/bench_write_buffer.py | 410 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | kt-kernel/test/test_native_moe_loader_auto_release.py | 79 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kt-kernel/test/test_native_moe_loader_auto_release.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/test/test_native_moe_loader_auto_release.py | 199 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/test/test_native_moe_loader_auto_release.py | 201 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kt-kernel/python/experts.py | 314 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/experts.py | 316 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/experts_base.py | 42 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/python/experts_base.py | 23 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kt-kernel/python/cli/utils/model_registry.py | 425 | # ============================================================================ | COMMENT |
| MEDIUM | kt-kernel/python/cli/utils/model_registry.py | 427 | # ============================================================================ | COMMENT |
| MEDIUM | kt-kernel/python/sft/wrapper.py | 190 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/wrapper.py | 192 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/wrapper.py | 296 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/wrapper.py | 298 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/wrapper.py | 1177 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/wrapper.py | 1179 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/arch.py | 21 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/arch.py | 23 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/arch.py | 42 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/arch.py | 44 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/lora.py | 582 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/lora.py | 584 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/lora.py | 731 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/lora.py | 733 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/lora.py | 907 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | kt-kernel/python/sft/lora.py | 909 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/lora.py | 44 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/lora.py | 46 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/lora.py | 97 | # ============================================================================= | COMMENT |
| MEDIUM | kt-kernel/python/sft/lora.py | 99 | # ============================================================================= | COMMENT |
| 27 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kt-kernel/operators/moe-sft-tp.hpp | 881 | // Step 1: For each NUMA, allocate and copy partitioned weights | COMMENT |
| LOW⚡ | kt-kernel/operators/moe-sft-tp.hpp | 922 | // Step 2: Set weight pointers BEFORE load_weights (Bug #24 fix) | COMMENT |
| LOW⚡ | kt-kernel/operators/moe-sft-tp.hpp | 932 | // Step 3: Prepare backward weights (this also clears weight pointers) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5062 | // Step 1: Expert routing (reuse base class logic) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5069 | // Step 2: Buffer pool allocation (reuse base class logic) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5075 | // Step 3: Copy input to expert buffers | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5091 | // Step 4: Quantize input | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5100 | // Step 5: Gate + Up GEMM (base projection) | COMMENT |
| LOW | kt-kernel/operators/amx/sft-k2-moe.hpp | 5148 | // Step 6: Activation (silu(gate) * up) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5160 | // Step 7: Quantize intermediate for down projection | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5169 | // Step 8: Down GEMM | COMMENT |
| LOW | kt-kernel/operators/amx/sft-k2-moe.hpp | 5199 | // Step 9: Weighted merge | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 4696 | // Step 1: intermediate = input @ lora_A^T (optimized with T_BLOCK=4, R_BLOCK=4) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 4702 | // Step 2: output += scale * (intermediate @ lora_B_transposed) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5212 | // Step 1: Zero per-expert grad_output buffers | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5222 | // Step 2: Scatter grad_output to per-expert BF16 buffers | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5383 | // Step 1: grad_output @ down_lora_B_transposed -> [local_num_tokens, rank] | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5390 | // Step 2: grad_times_b @ down_lora_A -> [local_num_tokens, inter_size] (AVX512) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5400 | // Step 5: LoRA gradient computation (parallelized across blocks) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1138 | // Step 1: Expert routing (reuse base class logic) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1161 | // Step 2: Buffer pool allocation (reuse base class logic) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1265 | // Step 3: Copy input to expert buffers | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1306 | // Step 4: Quantize input | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1332 | // Step 5: Gate + Up GEMM (base projection) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1445 | // Step 6: Activation (silu(gate) * up) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1512 | // Step 7: Quantize intermediate for down projection | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1523 | // Step 8: Down GEMM | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1581 | // Step 9: Weighted merge | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1813 | // Step 1: Down projection backward | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1981 | // Step 4: Compute grad_weights (gradient for routing weights) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 2154 | // Step 5: Base weight gradient accumulation (full weight grad mode) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4310 | // Step 1: input @ lora_A^T -> lora_intermediate | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4342 | // Step 2: Quantize lora_intermediate to BufferA | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4475 | // Step 1: intermediate @ down_lora_A^T -> lora_intermediate | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4502 | // Step 2: Quantize lora_intermediate to BufferA | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4760 | // Step 1: intermediate = input @ lora_A^T (optimized with T_BLOCK=4, R_BLOCK=4) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4771 | // Step 2: output += scale * (intermediate @ lora_B_transposed) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 5280 | // Step 3: Quantize scattered grad_output to BufferA | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 6478 | // Step 6: grad_A = G_B^T @ X | COMMENT |
| LOW | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1657 | // Step 1: Reduce 512 -> 256 by adding high/low halves (8 ops) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1671 | // Step 2: Pack pairs into single 512-bit vectors | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1679 | // Step 3: Reduce 256 -> 128 within each pair | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1686 | // Step 4: Reduce 128 -> 64 -> 32 within each | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/la/avx_kernels.hpp | 924 | // Step 1: Interleave 16-bit | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/la/avx_kernels.hpp | 934 | // Step 2: Interleave 32-bit | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/la/avx_kernels.hpp | 944 | // Step 3: Interleave 64-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 985 | // Step 1: Interleave 16-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 1003 | // Step 2: Interleave 32-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 1021 | // Step 3: Interleave 64-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 1039 | // Step 4: Permute 128-bit lanes | COMMENT |
| LOW | kt-kernel/python/cli/utils/quant_interactive.py | 245 | # Step 1: Select model | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/quant_interactive.py | 260 | # Step 2: Configure quantization method | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/quant_interactive.py | 263 | # Step 3: Configure CPU parameters | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/quant_interactive.py | 266 | # Step 4: Configure output path | COMMENT |
| LOW | kt-kernel/python/cli/utils/quant_interactive.py | 288 | # Step 5: Calculate space requirements and check availability | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 893 | # Step 1: Select model | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 898 | # Step 2: Select inference method | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 993 | # Step 3: Configure NUMA and CPU | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 996 | # Step 4: Configure GPU experts | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 999 | # Step 5: Configure KV Cache (only for raw) | COMMENT |
| 82 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker/docker-utils.sh | 106 | # Check if image exists | COMMENT |
| LOW | docker/docker-utils.sh | 230 | # Check if Docker daemon is running | COMMENT |
| LOW | docker/docker-utils.sh | 240 | # Check if user is logged into Docker registry | COMMENT |
| LOW | docker/docker-utils.sh | 297 | # Check if file/directory exists and is writable | COMMENT |
| LOW | docker/build-docker-tar.sh | 373 | # Check if tar file already exists | COMMENT |
| LOW | docker/push-to-dockerhub.sh | 290 | # Check if we should skip build | COMMENT |
| LOW | docker/push-to-dockerhub.sh | 862 | # Check if we should skip build | COMMENT |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 470 | # Check if we need to allocate or expand buffers | COMMENT |
| LOW | archive/kt-sft/ktransformers/util/weight_loader.py | 177 | # Check if any safetensor files exist in the folder | COMMENT |
| LOW | archive/kt-sft/ktransformers/util/weight_loader.py | 197 | # Check if path exists | COMMENT |
| LOW | archive/kt-sft/ktransformers/util/weight_loader.py | 362 | # Check if any GGUF files exist in the folder | COMMENT |
| LOW | …-sft/ktransformers/server/api/openai/endpoints/chat.py | 203 | # Check if tools are present | STRING |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py | 571 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) | CODE |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py | 1021 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) | CODE |
| LOW | archive/ktransformers/util/weight_loader.py | 177 | # Check if any safetensor files exist in the folder | COMMENT |
| LOW | archive/ktransformers/util/weight_loader.py | 197 | # Check if path exists | COMMENT |
| LOW | archive/ktransformers/util/weight_loader.py | 362 | # Check if any GGUF files exist in the folder | COMMENT |
| LOW | …hive/ktransformers/server/api/openai/endpoints/chat.py | 203 | # Check if tools are present | STRING |
| LOW | kt-kernel/bench/bench_bf16_moe.py | 222 | # Print results | COMMENT |
| LOW | kt-kernel/bench/bench_fp8_perchannel_moe.py | 234 | # Print results | COMMENT |
| LOW | kt-kernel/bench/bench_fp8_moe.py | 243 | # Print results | COMMENT |
| LOW | kt-kernel/test/per_commit/test_moe_amx_bench_int8.py | 23 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/test/per_commit/test_moe_amx_accuracy_int4.py | 19 | # Check if dependencies are available | COMMENT |
| LOW | …kernel/test/per_commit/test_moe_amx_accuracy_int4_1.py | 19 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/test/per_commit/test_moe_amx_bench_int4.py | 23 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/test/per_commit/test_basic_cpu.py | 17 | # Check if kt_kernel_ext is available | COMMENT |
| LOW | …ernel/test/per_commit/test_moe_amx_accuracy_int4_1k.py | 19 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/test/per_commit/test_moe_amx_accuracy_int8.py | 19 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/test/per_commit/test_moe_amx_bench_int4_1k.py | 24 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/test/per_commit/test_moe_amx_bench_int4_1.py | 23 | # Check if dependencies are available | COMMENT |
| LOW | kt-kernel/python/_cpu_detect.py | 109 | # Check if all required flags are present | COMMENT |
| LOW | kt-kernel/python/utils/llamafile.py | 93 | # Check if intermediate_size is divisible by QK_K | COMMENT |
| LOW | kt-kernel/python/utils/loader.py | 253 | # Check if backward weights exist | COMMENT |
| LOW | kt-kernel/python/utils/loader.py | 381 | # Check if any key matches this format pattern | COMMENT |
| LOW | kt-kernel/python/cli/main.py | 373 | # Check if path exists or parent is writable | COMMENT |
| LOW | kt-kernel/python/cli/main.py | 380 | # Check if we can create it (parent writable) | COMMENT |
| LOW | kt-kernel/python/cli/main.py | 407 | # Check if already installed | COMMENT |
| LOW | kt-kernel/python/cli/main.py | 505 | # Check if this is first run | COMMENT |
| LOW | kt-kernel/python/cli/utils/console.py | 142 | # Check if response matches a choice directly | COMMENT |
| LOW | kt-kernel/python/cli/utils/quant_interactive.py | 226 | # Check if available space >= required * 1.2 (20% buffer) | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_verifier.py | 28 | # Read file in chunks to handle large files | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_verifier.py | 671 | # Check if already verified | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_verifier.py | 683 | # Check if repo_id exists | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_scanner.py | 94 | # Check if size meets minimum threshold | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_scanner.py | 633 | # Check if this root is a parent of any already selected root | COMMENT |
| LOW | kt-kernel/python/cli/utils/kv_cache_calculator.py | 67 | # Check if it's MLA (Multi-head Latent Attention) model | COMMENT |
| LOW | kt-kernel/python/cli/utils/kv_cache_calculator.py | 96 | # Check if it's NSA (Native Sparse Attention) model | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_discovery.py | 101 | # Check if already in registry | COMMENT |
| LOW | kt-kernel/python/cli/utils/model_discovery.py | 105 | # Check if already discovered in this session | COMMENT |
| LOW | kt-kernel/python/cli/utils/tuna_engine.py | 202 | # Check if process has output | COMMENT |
| LOW | kt-kernel/python/cli/utils/tuna_engine.py | 321 | # Check if we got a valid response | COMMENT |
| LOW | kt-kernel/python/cli/utils/tuna_engine.py | 432 | # Check if even 0 doesn't work | COMMENT |
| LOW | kt-kernel/python/cli/utils/download_helper.py | 77 | # Check if filename matches pattern | COMMENT |
| LOW | kt-kernel/python/cli/utils/environment.py | 117 | # Check if venv is available (built into Python) | COMMENT |
| LOW | kt-kernel/python/cli/utils/environment.py | 146 | # Check if env_name appears as a separate word in the output | COMMENT |
| LOW | kt-kernel/python/cli/utils/environment.py | 703 | # Check if writable | COMMENT |
| LOW | kt-kernel/python/cli/utils/environment.py | 742 | # Check if parent exists for paths that don't exist yet | COMMENT |
| LOW | kt-kernel/python/cli/utils/environment.py | 917 | # Check if this directory is a model | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/model_registry.py | 324 | # Check if query is contained in name | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/model_registry.py | 328 | # Check if query is contained in aliases | COMMENT |
| 41 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | archive/csrc/ktransformers_ext/examples/test_mlp.py | 39 | CODE | |
| LOW | archive/csrc/ktransformers_ext/examples/test_moe.py | 42 | CODE | |
| LOW | …ft/csrc/ktransformers_ext/examples/test_sft_amx_moe.py | 107 | CODE | |
| LOW | …ive/kt-sft/csrc/ktransformers_ext/examples/test_mlp.py | 39 | CODE | |
| LOW | …ive/kt-sft/csrc/ktransformers_ext/examples/test_moe.py | 42 | CODE | |
| LOW | …kt-sft/csrc/ktransformers_ext/examples/test_sft_moe.py | 66 | CODE | |
| LOW | archive/kt-sft/ktransformers/local_chat.py | 87 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/layernorm.py | 72 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/layernorm.py | 113 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/layernorm.py | 157 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/models.py | 215 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/models.py | 577 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/models.py | 1048 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/models.py | 1501 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/cpuinfer.py | 30 | CODE | |
| LOW | …ve/kt-sft/ktransformers/operators/dynamic_attention.py | 34 | CODE | |
| LOW | archive/kt-sft/ktransformers/operators/RoPE.py | 276 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/utils.py | 344 | CODE | |
| LOW | archive/kt-sft/ktransformers/util/utils.py | 527 | CODE | |
| LOW | …kt-sft/ktransformers/server/balance_serve/sched_rpc.py | 181 | CODE | |
| LOW | …formers/server/balance_serve/inference/model_runner.py | 59 | CODE | |
| LOW | …ormers/server/balance_serve/inference/forward_batch.py | 198 | CODE | |
| LOW | …ive/kt-sft/ktransformers/models/configuration_llama.py | 143 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_mixtral.py | 1124 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_mixtral.py | 1373 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_mixtral.py | 1563 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_mixtral.py | 1686 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 345 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 679 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 1074 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 1217 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 1328 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 1405 | CODE | |
| LOW | …kt-sft/ktransformers/models/configuration_qwen2_moe.py | 115 | CODE | |
| LOW | …ve/kt-sft/ktransformers/models/modeling_deepseek_v3.py | 268 | CODE | |
| LOW | …ve/kt-sft/ktransformers/models/modeling_deepseek_v3.py | 1390 | CODE | |
| LOW | …ve/kt-sft/ktransformers/models/modeling_deepseek_v3.py | 1638 | CODE | |
| LOW | …ve/kt-sft/ktransformers/models/modeling_deepseek_v3.py | 1844 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen2_moe.py | 1115 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen2_moe.py | 1364 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen2_moe.py | 1593 | CODE | |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen2_moe.py | 1716 | CODE | |
| LOW | …kt-sft/ktransformers/models/configuration_qwen3_moe.py | 161 | CODE | |
| LOW | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 259 | CODE | |
| LOW | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 1424 | CODE | |
| LOW | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 1679 | CODE | |
| LOW | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 1899 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_llama.py | 993 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_llama.py | 1271 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_llama.py | 1458 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_llama.py | 1587 | CODE | |
| LOW | archive/kt-sft/ktransformers/models/modeling_llama.py | 1693 | CODE | |
| LOW | …-sft/ktransformers/models/configuration_deepseek_v3.py | 106 | CODE | |
| LOW | …/kt-sft/ktransformers/models/configuration_deepseek.py | 113 | CODE | |
| LOW | …formers/configs/model_config/configuration_deepseek.py | 115 | CODE | |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 1403 | CODE | |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py | 475 | CODE | |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py | 564 | CODE | |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py | 1014 | CODE | |
| LOW | archive/ktransformers/local_chat_test.py | 55 | CODE | |
| 87 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kt-kernel/operators/moe-sft-tp.hpp | 881 | // Step 1: For each NUMA, allocate and copy partitioned weights | COMMENT |
| LOW⚡ | kt-kernel/operators/moe-sft-tp.hpp | 922 | // Step 2: Set weight pointers BEFORE load_weights (Bug #24 fix) | COMMENT |
| LOW⚡ | kt-kernel/operators/moe-sft-tp.hpp | 932 | // Step 3: Prepare backward weights (this also clears weight pointers) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5062 | // Step 1: Expert routing (reuse base class logic) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5069 | // Step 2: Buffer pool allocation (reuse base class logic) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5075 | // Step 3: Copy input to expert buffers | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5091 | // Step 4: Quantize input | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5100 | // Step 5: Gate + Up GEMM (base projection) | COMMENT |
| LOW | kt-kernel/operators/amx/sft-k2-moe.hpp | 5148 | // Step 6: Activation (silu(gate) * up) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5160 | // Step 7: Quantize intermediate for down projection | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft-k2-moe.hpp | 5169 | // Step 8: Down GEMM | COMMENT |
| LOW | kt-kernel/operators/amx/sft-k2-moe.hpp | 5199 | // Step 9: Weighted merge | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 4696 | // Step 1: intermediate = input @ lora_A^T (optimized with T_BLOCK=4, R_BLOCK=4) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 4702 | // Step 2: output += scale * (intermediate @ lora_B_transposed) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5212 | // Step 1: Zero per-expert grad_output buffers | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5222 | // Step 2: Scatter grad_output to per-expert BF16 buffers | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5383 | // Step 1: grad_output @ down_lora_B_transposed -> [local_num_tokens, rank] | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5390 | // Step 2: grad_times_b @ down_lora_A -> [local_num_tokens, inter_size] (AVX512) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/sft_moe.hpp | 5400 | // Step 5: LoRA gradient computation (parallelized across blocks) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1138 | // Step 1: Expert routing (reuse base class logic) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1161 | // Step 2: Buffer pool allocation (reuse base class logic) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1265 | // Step 3: Copy input to expert buffers | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1306 | // Step 4: Quantize input | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1332 | // Step 5: Gate + Up GEMM (base projection) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1445 | // Step 6: Activation (silu(gate) * up) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1512 | // Step 7: Quantize intermediate for down projection | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1523 | // Step 8: Down GEMM | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1581 | // Step 9: Weighted merge | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1813 | // Step 1: Down projection backward | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 1981 | // Step 4: Compute grad_weights (gradient for routing weights) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 2154 | // Step 5: Base weight gradient accumulation (full weight grad mode) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4310 | // Step 1: input @ lora_A^T -> lora_intermediate | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4342 | // Step 2: Quantize lora_intermediate to BufferA | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4475 | // Step 1: intermediate @ down_lora_A^T -> lora_intermediate | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4502 | // Step 2: Quantize lora_intermediate to BufferA | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4760 | // Step 1: intermediate = input @ lora_A^T (optimized with T_BLOCK=4, R_BLOCK=4) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 4771 | // Step 2: output += scale * (intermediate @ lora_B_transposed) | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 5280 | // Step 3: Quantize scattered grad_output to BufferA | COMMENT |
| LOW | kt-kernel/operators/amx/sft_moe.hpp | 6478 | // Step 6: grad_A = G_B^T @ X | COMMENT |
| LOW | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1657 | // Step 1: Reduce 512 -> 256 by adding high/low halves (8 ops) | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1671 | // Step 2: Pack pairs into single 512-bit vectors | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1679 | // Step 3: Reduce 256 -> 128 within each pair | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/test/test_lora_fused_add.cpp | 1686 | // Step 4: Reduce 128 -> 64 -> 32 within each | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/la/avx_kernels.hpp | 924 | // Step 1: Interleave 16-bit | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/la/avx_kernels.hpp | 934 | // Step 2: Interleave 32-bit | COMMENT |
| LOW⚡ | kt-kernel/operators/amx/la/avx_kernels.hpp | 944 | // Step 3: Interleave 64-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 985 | // Step 1: Interleave 16-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 1003 | // Step 2: Interleave 32-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 1021 | // Step 3: Interleave 64-bit | COMMENT |
| LOW | kt-kernel/operators/amx/la/avx_kernels.hpp | 1039 | // Step 4: Permute 128-bit lanes | COMMENT |
| LOW | kt-kernel/python/cli/utils/quant_interactive.py | 245 | # Step 1: Select model | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/quant_interactive.py | 260 | # Step 2: Configure quantization method | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/quant_interactive.py | 263 | # Step 3: Configure CPU parameters | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/quant_interactive.py | 266 | # Step 4: Configure output path | COMMENT |
| LOW | kt-kernel/python/cli/utils/quant_interactive.py | 288 | # Step 5: Calculate space requirements and check availability | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 893 | # Step 1: Select model | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 898 | # Step 2: Select inference method | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 993 | # Step 3: Configure NUMA and CPU | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 996 | # Step 4: Configure GPU experts | COMMENT |
| LOW⚡ | kt-kernel/python/cli/utils/run_interactive.py | 999 | # Step 5: Configure KV Cache (only for raw) | COMMENT |
| 18 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | archive/csrc/custom_marlin/utils/format24.py | 142 | -1, idxs0.unsqueeze(-1)) # type: ignore[possibly-undefined] | CODE |
| HIGH | archive/csrc/custom_marlin/utils/format24.py | 149 | k // 2) # type: ignore[possibly-undefined] | CODE |
| HIGH | archive/csrc/custom_marlin/utils/format24.py | 172 | (m * meta_ncols, )) # type: ignore[possibly-undefined] | CODE |
| HIGH | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 142 | -1, idxs0.unsqueeze(-1)) # type: ignore[possibly-undefined] | CODE |
| HIGH | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 149 | k // 2) # type: ignore[possibly-undefined] | CODE |
| HIGH | archive/kt-sft/csrc/custom_marlin/utils/format24.py | 172 | (m * meta_ncols, )) # type: ignore[possibly-undefined] | CODE |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 142 | -1, idxs0.unsqueeze(-1)) # type: ignore[possibly-undefined] | CODE |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 149 | k // 2) # type: ignore[possibly-undefined] | CODE |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 172 | (m * meta_ncols, )) # type: ignore[possibly-undefined] | CODE |
| HIGH | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 1393 | trainable params: 1843200 || all params: 775873280 || trainable%: 0.23756456724479544 | STRING |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 142 | -1, idxs0.unsqueeze(-1)) # type: ignore[possibly-undefined] | CODE |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 149 | k // 2) # type: ignore[possibly-undefined] | CODE |
| HIGH | …xt/operators/custom_marlin/quantize/utils/format_24.py | 172 | (m * meta_ncols, )) # type: ignore[possibly-undefined] | CODE |
| HIGH | kt-kernel/python/cli/i18n.py | 306 | "sglang_recommend_source": "Recommend reinstalling with the kvcache-ai fork: pip uninstall sglang -y && pip inst | CODE |
| HIGH | kt-kernel/python/cli/i18n.py | 926 | "sglang_recommend_source": "建议重新安装 kvcache-ai 分支: pip uninstall sglang -y && pip install sglang-kt", | CODE |
| HIGH | kt-kernel/python/cli/commands/doctor.py | 426 | kt_kernel_hint = "Reinstall SGLang: pip uninstall sglang -y && pip install sglang-kt (or run ./install.sh fr | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 165 | CODE | |
| MEDIUM | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 166 | CODE | |
| MEDIUM | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 195 | CODE | |
| MEDIUM | …chive/kt-sft/ktransformers/models/modeling_deepseek.py | 196 | CODE | |
| MEDIUM | archive/ktransformers/models/modeling_deepseek.py | 164 | CODE | |
| MEDIUM | archive/ktransformers/models/modeling_deepseek.py | 165 | CODE | |
| MEDIUM | archive/ktransformers/models/modeling_deepseek.py | 194 | CODE | |
| MEDIUM | archive/ktransformers/models/modeling_deepseek.py | 195 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 131 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 133 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 137 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 140 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 148 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 149 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 154 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 155 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 160 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 173 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 176 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 177 | CODE | |
| MEDIUM | kt-kernel/python/cli/commands/bench.py | 179 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 298 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 300 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 301 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 302 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 307 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 309 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 310 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla.py | 311 | CODE | |
| MEDIUM | kt-kernel/examples/test_gate.py | 40 | CODE | |
| MEDIUM | kt-kernel/examples/test_gate.py | 42 | CODE | |
| MEDIUM | kt-kernel/examples/test_gate.py | 43 | CODE | |
| MEDIUM | kt-kernel/examples/test_gate.py | 44 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla_quant.py | 32 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla_quant.py | 34 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla_quant.py | 35 | CODE | |
| MEDIUM | kt-kernel/examples/test_mla_quant.py | 36 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | archive/kt-sft/ktransformers/util/custom_loader.py | 509 | Create a model loader for the given path by detecting the model format. The function checks for the pre | STRING |
| HIGH | …-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py | 86 | Dequantizes the given weight tensor using the provided scale tensor. Args: x (torch.Tensor): The quant | STRING |
| HIGH | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 935 | Get the status of each adapter layer in the model. This method returns a list of `TunerLayerStatus` dataclass i | STRING |
| HIGH | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 965 | Get the status of tuners of the model. This method returns a `TunerModelStatus` dataclass instance, which conta | STRING |
| HIGH | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 1663 | Get the status of each adapter layer in the model. This function returns a list of `TunerLayerStatus` dataclass ins | STRING |
| HIGH | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 1781 | Get the status of tuners of the model. This function returns a `TunerModelStatus` dataclass instance, which contain | STRING |
| HIGH | archive/ktransformers/util/custom_loader.py | 536 | Create a model loader for the given path by detecting the model format. The function checks for the pre | STRING |
| HIGH | …hive/ktransformers/ktransformers_ext/triton/fp8gemm.py | 86 | Dequantizes the given weight tensor using the provided scale tensor. Args: x (torch.Tensor): The quant | STRING |
| HIGH | kt-kernel/python/_cpu_detect.py | 188 | Load the appropriate kt_kernel_ext variant. Tries to import the specified variant, with automatic fallback to | STRING |
| HIGH | kt-kernel/python/experts.py | 165 | Factory method to create the appropriate backend implementation. Args: layer_idx: Layer in | STRING |
| HIGH | kt-kernel/python/cli/utils/tuna_engine.py | 21 | Get the number of experts per layer from model config. Args: model_path: Path to the model directory | STRING |
| HIGH | kt-kernel/python/cli/utils/tuna_engine.py | 397 | Run tuna auto-tuning to find optimal num_gpu_experts. Args: model_path: Path to the model tens | STRING |
| HIGH | kt-kernel/python/sft/arch.py | 63 | Get MoE architecture configuration based on model type. Args: config: HuggingFace model configuration | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | archive/csrc/balance_serve/kvc2/test/pytest_load.py | 8 | # Create a kvc2 instance | COMMENT |
| MEDIUM | …/balance_serve/kvc2/test/pytest_raw_insert_and_read.py | 8 | # Create a kvc2 instance | COMMENT |
| MEDIUM | archive/csrc/balance_serve/kvc2/test/pytest_mem_read.py | 8 | # Create a kvc2 instance | COMMENT |
| MEDIUM | …csrc/balance_serve/kvc2/test/pytest_mem_prefix_test.py | 8 | # Create a kvc2 instance | COMMENT |
| MEDIUM | archive/csrc/custom_marlin/utils/quant_utils.py | 41 | # Create a tensor for bitwise right shift operation | COMMENT |
| MEDIUM | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py | 41 | # Create a tensor for bitwise right shift operation | COMMENT |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/custom_loader.py | 552 | # Create the appropriate loader based on detected file types | COMMENT |
| MEDIUM | archive/kt-sft/ktransformers/util/utils.py | 266 | # This function is to check if we run this model on XPU with FP16 dtype | COMMENT |
| MEDIUM | …/balance_serve/inference/distributed/pynccl_wrapper.py | 1 | # This file is a pure Python wrapper for the NCCL library. | COMMENT |
| MEDIUM⚡ | archive/ktransformers/util/custom_loader.py | 579 | # Create the appropriate loader based on detected file types | COMMENT |
| MEDIUM | archive/ktransformers/util/utils.py | 324 | # This function is to check if we run this model on XPU with FP16 dtype | COMMENT |
| MEDIUM | …/balance_serve/inference/distributed/pynccl_wrapper.py | 1 | # This file is a pure Python wrapper for the NCCL library. | COMMENT |
| MEDIUM | kt-kernel/python/experts.py | 87 | # Create a mask where experts 0, 2, 5 are on GPU | STRING |
| MEDIUM | kt-kernel/python/experts_base.py | 433 | # Create a new pinned tensor and copy data into it | COMMENT |
| MEDIUM | kt-kernel/python/utils/llamafile.py | 133 | # Initialize base class | COMMENT |
| MEDIUM | kt-kernel/python/utils/moe_kernel.py | 86 | # Initialize base class | COMMENT |
| MEDIUM | kt-kernel/python/utils/amx.py | 342 | # Initialize base class | COMMENT |
| MEDIUM | kt-kernel/python/cli/main.py | 47 | # Create main app with dynamic help | COMMENT |
| MEDIUM | kt-kernel/python/cli/utils/user_model_registry.py | 88 | self.save() # Create the file | CODE |
| MEDIUM | kt-kernel/python/cli/commands/model.py | 899 | # Create a sub-row with empty cells except for the first column (7 columns total with #) | COMMENT |
| MEDIUM | kt-kernel/python/cli/commands/model.py | 948 | # Create a sub-row with empty cells except for the first column | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 831 | # TODO: consider replacing this patching of methods with a more robust mechanism: setting a flag and | COMMENT |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_model.py | 128 | # model, just add a `peft_config` dict attribute to your model. | COMMENT |
| LOW | …ive/ktransformers/operators/ascend/ascend_attention.py | 215 | # FIXME this is wrong in random choose pages for sched, currently just use kv without history | COMMENT |
| MEDIUM | archive/ktransformers/models/modeling_smallthinker.py | 1051 | # "unexpected if using padding tokens in conjunction with `inputs_embeds.`" | COMMENT |
| MEDIUM | kt-kernel/bench/compare_moe_performance.py | 291 | """Get comprehensive system information""" | STRING |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 98 | // Check BF16 buffer for NaN/Inf (using robust v != v check) | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 103 | // Use val != val for robust NaN detection | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 125 | // Check FP32 buffer for NaN/Inf (using robust v != v check) | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 130 | // Use val != val for robust NaN detection | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 1689 | // Use v != v for robust NaN detection | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 2061 | // Use v != v for robust NaN detection | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 2101 | // Use fv != fv for robust NaN detection | COMMENT |
| MEDIUM | kt-kernel/operators/amx/sft_moe.hpp | 2707 | // Use v != v for robust NaN detection | COMMENT |
| MEDIUM | kt-kernel/operators/amx/test/mmq.cpp | 689 | // pack again with 128 to fully utilize vector length | COMMENT |
| MEDIUM | kt-kernel/operators/amx/test/mmq.cpp | 731 | // pack again with 128 to fully utilize vector length | COMMENT |
| MEDIUM | kt-kernel/operators/amx/test/mmq.cpp | 833 | // pack again with 128 to fully utilize vector length | COMMENT |
| MEDIUM | kt-kernel/operators/amx/test/mmq-test.cpp | 693 | // pack again with 128 to fully utilize vector length | COMMENT |
| MEDIUM | kt-kernel/operators/amx/test/mmq-test.cpp | 735 | // pack again with 128 to fully utilize vector length | COMMENT |
| MEDIUM | kt-kernel/operators/amx/test/mmq-test.cpp | 837 | // pack again with 128 to fully utilize vector length | COMMENT |
| MEDIUM | .github/model-e2e/inside.py | 49 | # The group was created with start_new_session=True by this harness. Never | COMMENT |
| MEDIUM | .github/workflows/release-four-main.yml | 3 | # Manual only. Main/version merges never publish. Requires the #2195 harness. | COMMENT |
| MEDIUM | .github/workflows/model-e2e-release.yml | 3 | # Reuses the PR/PyPI harness; cannot publish. Called twice by the release workflow. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ktransformers.py | 35 | __all__ = ["__version__", "has_sft_support"] | CODE |
| LOW | archive/kt-sft/ktransformers/operators/layernorm.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | …serve/inference/distributed/custom_all_reduce_utils.py | 266 | __all__ = ["gpu_p2p_access_check"] | CODE |
| LOW | …/balance_serve/inference/distributed/pynccl_wrapper.py | 273 | __all__ = [ | CODE |
| LOW | …ers/server/balance_serve/inference/sampling/sampler.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | …alance_serve/inference/sampling/penaltylib/__init__.py | 7 | __all__ = [ | CODE |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 1466 | __all__ = [ | STRING |
| LOW | …kt-sft/ktransformers/models/configuration_qwen3_moe.py | 233 | __all__ = ["Qwen3MoeConfig"] | CODE |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/peft_model.py | 1268 | def set_adapter(self, adapter_name: str) -> None: | CODE |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py | 168 | def set_adapter(self, adapter_names: str | list[str]) -> None: | CODE |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_model.py | 38 | logger = logging.getLogger(__name__) | CODE |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_model.py | 375 | def _set_adapter_layers(self, enabled: bool = True) -> None: | STRING |
| LOW | …hive/kt-sft/ktransformers/sft/peft_utils/lora_model.py | 397 | # def set_adapter(self, adapter_names: str | list[str]) -> None: | STRING |
| LOW | archive/ktransformers/operators/layernorm.py | 43 | logger = logging.getLogger(__name__) | CODE |
| LOW | …serve/inference/distributed/custom_all_reduce_utils.py | 266 | __all__ = ["gpu_p2p_access_check"] | CODE |
| LOW | …/balance_serve/inference/distributed/pynccl_wrapper.py | 273 | __all__ = [ | CODE |
| LOW | …ers/server/balance_serve/inference/sampling/sampler.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | …alance_serve/inference/sampling/penaltylib/__init__.py | 7 | __all__ = [ | CODE |
| LOW | archive/ktransformers/models/modeling_smallthinker.py | 1214 | __all__ = [ | CODE |
| LOW | archive/ktransformers/models/modeling_qwen3_moe.py | 1465 | __all__ = [ | STRING |
| LOW | archive/ktransformers/models/modeling_glm4_moe.py | 649 | __all__ = ["Glm4MoePreTrainedModel", "Glm4MoeModel", "Glm4MoeForCausalLM"] | CODE |
| LOW | archive/ktransformers/models/configuration_glm4_moe.py | 242 | __all__ = ["Glm4MoeConfig"] | CODE |
| LOW | …chive/ktransformers/models/configuration_qwen3_next.py | 263 | __all__ = ["Qwen3NextConfig"] | STRING |
| LOW | archive/ktransformers/models/configuration_qwen3_moe.py | 233 | __all__ = ["Qwen3MoeConfig"] | CODE |
| LOW | …ive/ktransformers/models/configuration_smallthinker.py | 180 | __all__ = ["SmallthinkerConfig"] | CODE |
| LOW | archive/ktransformers/models/modeling_qwen3_next.py | 1280 | __all__ = [ | CODE |
| LOW | kt-kernel/bench/compare_moe_performance.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/__init__.py | 104 | __all__ = [ | CODE |
| LOW | kt-kernel/python/experts_base.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/utils/__init__.py | 11 | __all__ = [ | CODE |
| LOW | kt-kernel/python/utils/amx.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/cli/i18n.py | 1336 | def set_lang(lang: str) -> None: | CODE |
| LOW | kt-kernel/python/cli/main.py | 57 | def _update_help_texts() -> None: | CODE |
| LOW | kt-kernel/python/cli/config/__init__.py | 7 | __all__ = ["Settings", "get_settings"] | CODE |
| LOW⚡ | kt-kernel/python/sft/wrapper.py | 54 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/config.py | 35 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/config.py | 198 | def _set_torch_num_threads(num_threads: int) -> None: | CODE |
| LOW | kt-kernel/python/sft/deepseek_v4.py | 35 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/checkpoint.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | kt-kernel/python/sft/arch.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/__init__.py | 115 | __all__ = [ | CODE |
| LOW | kt-kernel/python/sft/autograd.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/layer.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/artifacts.py | 2049 | __all__ = [ | CODE |
| LOW | kt-kernel/python/sft/lora.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/weights.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/base.py | 479 | def update_base_weights(self) -> None: | CODE |
| LOW | kt-kernel/python/sft/base.py | 521 | def update_lora_weights(self) -> None: ... | CODE |
| LOW | kt-kernel/python/sft/amx.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | kt-kernel/python/sft/amx.py | 1018 | def update_lora_weights(self) -> None: | CODE |
| LOW | kt-kernel/python/sft/amx.py | 1040 | def update_base_weights(self) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | …sformers/models/ascend/custom_ascend_modeling_qwen3.py | 70 | self.model.embed_tokens.weight.data = self.model.embed_tokens.weight.data.to(torch.float16) | CODE |
| CRITICAL⚡ | …sformers/models/ascend/custom_ascend_modeling_qwen3.py | 73 | self.model.norm.weight.data = self.model.norm.weight.data.to(torch.float16) | CODE |
| CRITICAL⚡ | …sformers/models/ascend/custom_ascend_modeling_qwen3.py | 75 | self.model.norm.bias.data = self.model.norm.bias.data.to(torch.float16) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 969 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 1126 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 1475 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/kt-sft/ktransformers/operators/experts.py | 1771 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/kt-sft/ktransformers/models/modeling_mixtral.py | 878 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/kt-sft/ktransformers/models/modeling_mixtral.py | 1465 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 292 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen3_moe.py | 1166 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen2_moe.py | 848 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | …hive/kt-sft/ktransformers/models/modeling_qwen2_moe.py | 1455 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | archive/ktransformers/operators/experts.py | 547 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/operators/experts.py | 665 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/operators/experts.py | 863 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/operators/experts.py | 1161 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/models/modeling_smallthinker.py | 116 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/models/modeling_smallthinker.py | 956 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | archive/ktransformers/models/modeling_mixtral.py | 877 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/models/modeling_mixtral.py | 1464 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | archive/ktransformers/models/modeling_qwen3_moe.py | 291 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/models/modeling_qwen3_moe.py | 1165 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | archive/ktransformers/models/modeling_qwen2_moe.py | 847 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/models/modeling_qwen2_moe.py | 1454 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| MEDIUM | archive/ktransformers/models/custom_cache.py | 372 | # you can use following code as check | COMMENT |
| LOW | archive/ktransformers/models/modeling_qwen3_next.py | 853 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | archive/ktransformers/models/modeling_qwen3_next.py | 1255 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …c/ktransformers_ext/operators/kvcache/kvcache_attn.cpp | 2248 | // window_size=(-1, -1), # -1 means infinite context window | COMMENT |
| MEDIUM | …ive/csrc/ktransformers_ext/operators/kvcache/kvcache.h | 708 | // window_size=(-1, -1), # -1 means infinite context window | COMMENT |
| MEDIUM | …c/ktransformers_ext/operators/kvcache/kvcache_attn.cpp | 2248 | // window_size=(-1, -1), # -1 means infinite context window | COMMENT |
| MEDIUM | …sft/csrc/ktransformers_ext/operators/kvcache/kvcache.h | 708 | // window_size=(-1, -1), # -1 means infinite context window | COMMENT |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/custom_gguf.py | 710 | # NOT fine-tun embedding model | COMMENT |
| MEDIUM⚡ | archive/kt-sft/ktransformers/util/custom_gguf.py | 710 | # NOT fine-tun embedding model | COMMENT |
| MEDIUM | kt-kernel/operators/kvcache/kvcache_attn.cpp | 1602 | // window_size=(-1, -1), # -1 means infinite context window | COMMENT |
| MEDIUM | kt-kernel/operators/kvcache/kvcache.h | 619 | // window_size=(-1, -1), # -1 means infinite context window | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | archive/setup.py | 551 | # In this example, we pass in the version to C++. You might not need to. | COMMENT |
| HIGH | archive/kt-sft/setup.py | 568 | # In this example, we pass in the version to C++. You might not need to. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | kt-kernel/examples/test_moe_amx.py | 428 | # Only test BF16 and INT8 as requested | COMMENT |
| HIGH | kt-kernel/examples/test_moe_amx.py | 486 | # Only test BF16 and INT8 as requested | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker/build-docker-tar.sh | 15 | # Usage: | COMMENT |
| LOW | docker/push-to-dockerhub.sh | 16 | # Usage: | COMMENT |
| LOW | docker/push-to-dockerhub.sh | 588 | # Usage: | COMMENT |
| LOW | …hive/csrc/balance_serve/kvc2/test/test_cuda_stream.cpp | 86 | // Example usage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …chive/kt-sft/ktransformers/tests/function_call_test.py | 12 | api_key="placeholder", | CODE |
| LOW | archive/ktransformers/tests/function_call_test.py | 12 | api_key="placeholder", | CODE |
| LOW | .github/release/test_four_main.py | 194 | "user.email=test@example.org", | CODE |