Accessible large language models via k-bit quantization for PyTorch.
This report summarizes scanner evidence for bitsandbytes-foundation/bitsandbytes, a Python project with 8,518 GitHub stars. SynthScan examined 37,711 lines of code across 134 source files, recording 292 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 9.8 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 192 finding(s).
Are imports declared and package/API names verified? 71 finding(s).
Are wrappers, guards, and repeated structures necessary? 118 finding(s).
Which changes need focused human review? 292 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 292 distinct pattern matches across 14 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 |
|---|---|---|---|---|
| LOW | bitsandbytes/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/__init__.py | 12 | CODE | |
| LOW | bitsandbytes/__init__.py | 12 | CODE | |
| LOW | bitsandbytes/__init__.py | 13 | CODE | |
| LOW | bitsandbytes/__init__.py | 13 | CODE | |
| LOW | bitsandbytes/__init__.py | 13 | CODE | |
| LOW | bitsandbytes/__init__.py | 18 | CODE | |
| LOW | bitsandbytes/__init__.py | 19 | CODE | |
| LOW | bitsandbytes/__init__.py | 20 | CODE | |
| LOW | bitsandbytes/__init__.py | 21 | CODE | |
| LOW | bitsandbytes/__init__.py | 36 | CODE | |
| LOW | bitsandbytes/__init__.py | 39 | CODE | |
| LOW | bitsandbytes/__init__.py | 42 | CODE | |
| LOW | bitsandbytes/__init__.py | 46 | CODE | |
| LOW | bitsandbytes/__init__.py | 49 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/nn/__init__.py | 5 | CODE | |
| LOW | bitsandbytes/backends/utils.py | 7 | CODE | |
| LOW | bitsandbytes/backends/utils.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 6 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 6 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 6 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 7 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 7 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 7 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 7 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 7 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 7 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 8 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 16 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 16 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 16 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 16 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 16 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 16 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 17 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 17 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 17 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 18 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 18 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 18 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 18 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 19 | CODE | |
| LOW | bitsandbytes/optim/__init__.py | 19 | CODE | |
| 11 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/fsdp_state_dict_save.py | 23 | def _current_accelerator_type(): | CODE |
| LOW | tests/test_functional.py | 113 | def test_dynamic_blockwise_quantization(self, device, dtype, nested, blocksize, signed): | CODE |
| LOW | tests/test_functional.py | 175 | def test_dynamic_blockwise_quantization_large(self, device, dtype, blocksize): | CODE |
| LOW | tests/test_functional.py | 328 | def test_bench_dequantization(self): | CODE |
| LOW | tests/test_linear4bit.py | 39 | def test_linear_serialization( | CODE |
| LOW | tests/test_linear4bit.py | 256 | def test_quant_storage_shard_roundtrip(device, quant_type, quant_storage): | CODE |
| LOW | tests/test_optim.py | 343 | def test_override_config_after_register(device): | CODE |
| LOW | tests/test_optim.py | 593 | def test_ademamix_state_dict_no_nan(optim_name, optim_factory, device): | CODE |
| LOW | tests/test_optim.py | 688 | def test_lamb_max_unorm_threaded_to_config(optim_cls, max_unorm): | CODE |
| LOW | tests/test_optim.py | 698 | def test_lamb_max_unorm_changes_update(): | CODE |
| LOW | tests/test_parametrize.py | 143 | def test_prequantized_replacement(device, dtype, quant_type): | CODE |
| LOW | tests/test_parametrize.py | 174 | def test_state_dict_functionality(device, dtype, quant_type, compress_statistics): | CODE |
| LOW | tests/test_parametrize.py | 206 | def test_moe_realistic_forward(device, dtype): | CODE |
| LOW | tests/test_parametrize.py | 272 | def test_quant_state_preservation(device, dtype): | CODE |
| LOW | tests/test_parametrize.py | 340 | def test_different_blocksizes(device, dtype, blocksize): | CODE |
| LOW | tests/test_parametrize.py | 376 | def test_parametrization_forward_method(): | CODE |
| LOW | tests/test_parametrize.py | 453 | def test_counter_balanced_under_checkpoint_early_stop(self): | CODE |
| LOW | tests/test_parametrize.py | 487 | def test_counter_never_goes_negative(self): | CODE |
| LOW | tests/test_cuda_setup_evaluator.py | 131 | def test_override_invalid_format(monkeypatch, cuda120_spec): | CODE |
| LOW | tests/test_ops.py | 120 | def test_dequantize_blockwise(self, device, dtype, blocksize): | CODE |
| LOW | tests/test_ops.py | 384 | def test_quantize_blockwise_non_contiguous(self, device, dtype, blocksize): | CODE |
| LOW | tests/test_ops.py | 403 | def test_dequantize_blockwise_non_contiguous(self, device, dtype, blocksize): | CODE |
| LOW | tests/test_linear8bitlt.py | 77 | def test_linear_serialization( | CODE |
| LOW | tests/test_modules.py | 487 | def test_embedding_not_implemented_error(): | CODE |
| LOW | tests/test_generation.py | 44 | def get_prompt_for_generation_eval(text, add_roles=True): | CODE |
| LOW | agents/security_guide.md | 788 | - def test_quantize_boundary_values(): | CODE |
| LOW | agents/security_guide.md | 793 | def test_quantize_boundary_values(): | CODE |
| LOW | benchmarking/optimizer_benchmark.py | 23 | def test_stream_optimizer_bench(dim1, gtype, optim_name, mode): | CODE |
| LOW | bitsandbytes/cextension.py | 22 | def get_cuda_bnb_library_path(cuda_specs: CUDASpecs) -> Path: | CODE |
| LOW | bitsandbytes/cextension.py | 152 | def get_available_cuda_binary_versions() -> list[str]: | CODE |
| LOW | bitsandbytes/cextension.py | 211 | def _format_lib_error_message( | CODE |
| LOW | bitsandbytes/functional.py | 1676 | def _convert_weight_packed_for_cpu(qweight: torch.Tensor, quant_state: QuantState, block_n: int = 32): | CODE |
| LOW | bitsandbytes/functional.py | 1730 | def _convert_weight_packed_for_cpu_inverse( | CODE |
| LOW | bitsandbytes/utils.py | 108 | def execute_and_return_decoded_std_streams(command_string): | CODE |
| LOW⚡ | bitsandbytes/nn/parametrize.py | 129 | def _disable_parametrization_cache(module: nn.Module, inputs: tuple[Any, ...], output: Any): | CODE |
| LOW⚡ | bitsandbytes/nn/parametrize.py | 139 | def _enable_parametrization_cache(module: nn.Module, inputs: tuple[Any, ...]): | CODE |
| LOW⚡ | bitsandbytes/nn/parametrize.py | 143 | def _register_parametrization_hooks(module: nn.Module, param_name: str): | CODE |
| LOW | bitsandbytes/nn/parametrize.py | 170 | def _parametrized_state_dict_post_hook( | CODE |
| LOW | bitsandbytes/nn/modules.py | 112 | def _fill_padding_idx_with_zero(self) -> None: | CODE |
| LOW | bitsandbytes/nn/modules.py | 194 | def _fill_padding_idx_with_zero(self) -> None: | CODE |
| LOW | bitsandbytes/nn/modules.py | 930 | def _forward_with_partial_dequantize(self, input: Tensor): | CODE |
| LOW | bitsandbytes/backends/mps/ops.py | 53 | def _quantize_blockwise_compute( | CODE |
| LOW | bitsandbytes/backends/cpu/ops.py | 327 | def _compute_update_norm_and_scale( | CODE |
| LOW | bitsandbytes/backends/cuda/ops.py | 358 | def _dequantize_blockwise_impl( | CODE |
| LOW | bitsandbytes/backends/xpu/ops.py | 66 | def _dequantize_blockwise_impl( | CODE |
| LOW | bitsandbytes/backends/triton/kernels_8bit_quant.py | 107 | def quantize_blockwise_triton(A, code, blocksize, absmax=None, out=None): | CODE |
| LOW | bitsandbytes/backends/triton/ops.py | 41 | def dequantize_blockwise_inplace( | CODE |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 509 | def _dequantize_blockwise_pytorch( | CODE |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 544 | def _quantize_blockwise_pytorch( | CODE |
| LOW | bitsandbytes/backends/default/ops.py | 200 | def _dequantize_blockwise_compute( | CODE |
| LOW | bitsandbytes/diagnostics/cuda.py | 50 | def find_cuda_libraries_in_path_list(paths_list_candidate: str) -> Iterable[Path]: | CODE |
| LOW | bitsandbytes/diagnostics/cuda.py | 72 | def is_relevant_candidate_env_var(env_var: str, value: str) -> bool: | CODE |
| LOW | bitsandbytes/diagnostics/cuda.py | 85 | def get_potentially_lib_path_containing_env_vars() -> dict[str, str]: | CODE |
| LOW | bitsandbytes/diagnostics/cuda.py | 172 | def print_runtime_diagnostics() -> None: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/fsdp_state_dict_save.py | 63 | CODE | |
| LOW | tests/test_functional.py | 767 | CODE | |
| LOW | tests/test_optim.py | 387 | CODE | |
| LOW | tests/test_autograd.py | 36 | CODE | |
| LOW | tests/test_autograd.py | 143 | CODE | |
| LOW | agents/query_issues.py | 201 | CODE | |
| LOW | agents/query_issues.py | 367 | CODE | |
| LOW | agents/fetch_issues.py | 161 | CODE | |
| LOW | examples/xpu/benchmark_paged_memory.py | 82 | CODE | |
| LOW | bitsandbytes/functional.py | 772 | CODE | |
| LOW | bitsandbytes/functional.py | 1216 | CODE | |
| LOW | bitsandbytes/functional.py | 1338 | CODE | |
| LOW | bitsandbytes/functional.py | 1440 | CODE | |
| LOW | bitsandbytes/utils.py | 121 | CODE | |
| LOW | bitsandbytes/backends/cpu/ops.py | 345 | CODE | |
| LOW | bitsandbytes/backends/cpu/ops.py | 469 | CODE | |
| LOW | bitsandbytes/backends/cpu/ops.py | 39 | CODE | |
| LOW | bitsandbytes/backends/cpu/ops.py | 95 | CODE | |
| LOW | bitsandbytes/backends/cpu/ops.py | 140 | CODE | |
| LOW | bitsandbytes/backends/cuda/ops.py | 385 | CODE | |
| LOW | bitsandbytes/backends/cuda/ops.py | 454 | CODE | |
| LOW | bitsandbytes/backends/cuda/ops.py | 584 | CODE | |
| LOW | bitsandbytes/backends/xpu/ops.py | 30 | CODE | |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 93 | CODE | |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 237 | CODE | |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 583 | CODE | |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 730 | CODE | |
| LOW | bitsandbytes/backends/triton/kernels_optim.py | 877 | CODE | |
| LOW | bitsandbytes/backends/default/ops.py | 369 | CODE | |
| LOW | bitsandbytes/backends/default/ops.py | 430 | CODE | |
| LOW | bitsandbytes/optim/lars.py | 206 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 192 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 273 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 286 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 492 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 664 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 232 | CODE | |
| LOW | bitsandbytes/diagnostics/cuda.py | 50 | CODE | |
| LOW | bitsandbytes/diagnostics/main.py | 70 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | agents/code_standards.md | 1298 | Quantize tensor A in blocks of 4-bit values. Quantizes tensor A by dividing it into blocks which are independently | STRING |
| HIGH | bitsandbytes/functional.py | 352 | Verifies that the input tensors are all on the same device. An input tensor may also be marked as `paged`, in which | STRING |
| HIGH | bitsandbytes/functional.py | 621 | Quantize a tensor in blocks of values. The input tensor is quantized by dividing it into blocks of `blocksize` valu | STRING |
| HIGH | bitsandbytes/functional.py | 698 | Dequantize a tensor in blocks of values. The input tensor is dequantized by dividing it into blocks of `blocksize` | STRING |
| HIGH | bitsandbytes/functional.py | 893 | Quantize tensor A in blocks of 4-bit values. Quantizes tensor A by dividing it into blocks which are independently | STRING |
| HIGH | bitsandbytes/functional.py | 1000 | Dequantizes a packed 4-bit quantized tensor. The input tensor is dequantized by dividing it into blocks of `blocksi | STRING |
| HIGH | bitsandbytes/functional.py | 1537 | Performs an 8-bit integer matrix multiplication. A linear transformation is applied such that `out = A @ B.T`. When | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bitsandbytes/functional.py | 1080 | CODE | |
| LOW | bitsandbytes/nn/modules.py | 54 | CODE | |
| LOW | bitsandbytes/nn/modules.py | 214 | CODE | |
| LOW | bitsandbytes/backends/hpu/ops.py | 16 | CODE | |
| LOW | bitsandbytes/backends/hpu/ops.py | 53 | CODE | |
| LOW | bitsandbytes/optim/rmsprop.py | 9 | CODE | |
| LOW | bitsandbytes/optim/rmsprop.py | 65 | CODE | |
| LOW | bitsandbytes/optim/rmsprop.py | 118 | CODE | |
| LOW | bitsandbytes/optim/ademamix.py | 108 | CODE | |
| LOW | bitsandbytes/optim/ademamix.py | 271 | CODE | |
| LOW | bitsandbytes/optim/ademamix.py | 300 | CODE | |
| LOW | bitsandbytes/optim/ademamix.py | 327 | CODE | |
| LOW | bitsandbytes/optim/ademamix.py | 356 | CODE | |
| LOW | bitsandbytes/optim/ademamix.py | 387 | CODE | |
| LOW | bitsandbytes/optim/lamb.py | 9 | CODE | |
| LOW | bitsandbytes/optim/lamb.py | 68 | CODE | |
| LOW | bitsandbytes/optim/lamb.py | 138 | CODE | |
| LOW | bitsandbytes/optim/lars.py | 12 | CODE | |
| LOW | bitsandbytes/optim/adagrad.py | 9 | CODE | |
| LOW | bitsandbytes/optim/adagrad.py | 68 | CODE | |
| LOW | bitsandbytes/optim/adagrad.py | 132 | CODE | |
| LOW | bitsandbytes/optim/adamw.py | 10 | CODE | |
| LOW | bitsandbytes/optim/adamw.py | 63 | CODE | |
| LOW | bitsandbytes/optim/adamw.py | 127 | CODE | |
| LOW | bitsandbytes/optim/adamw.py | 180 | CODE | |
| LOW | bitsandbytes/optim/adamw.py | 230 | CODE | |
| LOW | bitsandbytes/optim/adamw.py | 291 | CODE | |
| LOW | bitsandbytes/optim/adam.py | 10 | CODE | |
| LOW | bitsandbytes/optim/adam.py | 63 | CODE | |
| LOW | bitsandbytes/optim/adam.py | 127 | CODE | |
| LOW | bitsandbytes/optim/adam.py | 180 | CODE | |
| LOW | bitsandbytes/optim/adam.py | 233 | CODE | |
| LOW | bitsandbytes/optim/adam.py | 297 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 404 | CODE | |
| LOW | bitsandbytes/optim/optimizer.py | 594 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CMakeLists.txt | 1 | # This CMake config hopefully makes it easier to compile. | COMMENT |
| LOW | csrc/cpu_ops.h | 1 | #ifndef BITSANDBYTES_CPU_OPS_H | COMMENT |
| LOW | csrc/cpu_ops.h | 81 | COMMENT | |
| LOW | csrc/cpu_ops.cpp | 1 | #include "cpu_ops.h" | COMMENT |
| LOW | csrc/pythonInterface.cpp | 1 | // Copyright (c) Facebook, Inc. and its affiliates. | COMMENT |
| LOW | csrc/pythonInterface.cpp | 21 | #define cublasLtHandle_t hipblasLtHandle_t | COMMENT |
| LOW | agents/architecture_guide.md | 901 | #define BNB_CC_AMPERE 800 | COMMENT |
| LOW | examples/cpu/cpu_training.py | 321 | COMMENT | |
| LOW | examples/cpu/cpu_training.py | 341 | # -------------------------------------------------- | COMMENT |
| LOW | examples/cpu/cpu_training.py | 361 | # {'loss': '2.428', 'grad_norm': '9.062', 'learning_rate': '0.0002', 'epoch': '0.2'} | COMMENT |
| LOW | examples/xpu/benchmark_paged_memory.py | 241 | # ------------------------------ ---------------- ---------------- ---------------- ---------------- | COMMENT |
| LOW | examples/xpu/paged_xpu_training.py | 321 | # 25 | 2.6691 | 2.6727 | 0.003588 | COMMENT |
| LOW | examples/xpu/paged_xpu_training.py | 341 | COMMENT | |
| LOW | examples/xpu/paged_xpu_training.py | 361 | # Optimizer: paged_adamw8bit | Dtype: bf16 | COMMENT |
| LOW | scripts/stale.py | 1 | # Copyright 2023 The HuggingFace Team, the AllenNLP library authors. All rights reserved. | COMMENT |
| LOW | benchmarking/matmul_benchmark.py | 141 | COMMENT | |
| LOW | benchmarking/matmul_benchmark.py | 161 | # out32, Sout32 = F.igemmlt(C32A, CxB, SA, SB) | COMMENT |
| LOW | benchmarking/matmul_benchmark.py | 201 | # linear8bit_train(A) | COMMENT |
| LOW | benchmarking/int8/training_benchmark.py | 61 | # torch.cuda.empty_cache() | COMMENT |
| LOW | benchmarking/int8/training_benchmark.py | 81 | ##out2 = F.mm_dequant(out2_32, Sout2_32, statsout1t, statsw2t) | COMMENT |
| LOW | benchmarking/int8/training_benchmark.py | 101 | ## grad2 | COMMENT |
| LOW | benchmarking/int8/training_benchmark.py | 121 | # #Cw1, Cw1t, statsw1, statsw1t, coo_tensor = F.double_quant(w1) | COMMENT |
| LOW | benchmarking/int8/training_benchmark.py | 141 | # # fc2 | COMMENT |
| LOW | benchmarking/int8/training_benchmark.py | 161 | # #CTgradt, Sgradt = F.transform2(Cgradt, formatB, transpose=True) | COMMENT |
| LOW | bitsandbytes/functional.py | 801 | 0.44070982933044434, | COMMENT |
| LOW | bitsandbytes/backends/cuda/ops.py | 1141 | # lambda: f"g and p must have the same number of elements, got {g.numel()} and {p.numel()}", | COMMENT |
| LOW | bitsandbytes/backends/triton/kernels_8bit_quant.py | 1 | import torch | COMMENT |
| LOW | bitsandbytes/backends/triton/ops.py | 201 | gnorm_scale: float = 1.0, | COMMENT |
| LOW | bitsandbytes/backends/triton/ops.py | 221 | # ) | COMMENT |
| LOW | bitsandbytes/backends/triton/kernels_4bit.py | 1 | import torch | COMMENT |
| LOW | bitsandbytes/backends/triton/kernels_4bit.py | 301 | mul_low = dequantize_nf4_tree(lower) * absmax | COMMENT |
| LOW | bitsandbytes/backends/triton/kernels_4bit.py | 321 | # triton.Config({'SPLIT_SIZE': 256}), | COMMENT |
| LOW | bitsandbytes/backends/triton/kernels_4bit.py | 501 | ######################### Fallback dequantization functions ######################### | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_linear4bit.py | 401 | # Create a small network with Linear4bit layers | COMMENT |
| MEDIUM | tests/test_linear8bitlt.py | 280 | # Create a small network with Linear8bitLt layers | COMMENT |
| MEDIUM | tests/test_linear8bitlt.py | 336 | # Create a Linear8bitLt layer on CPU | COMMENT |
| MEDIUM | tests/test_linear8bitlt.py | 340 | # Create a sample input. | COMMENT |
| MEDIUM | bitsandbytes/nn/parametrize.py | 186 | # Create a clean entry. | COMMENT |
| MEDIUM | bitsandbytes/nn/modules.py | 795 | # Create a new parameter on the target device. | COMMENT |
| MEDIUM | bitsandbytes/backends/triton/kernels_optim.py | 631 | # Create a 32-bit copy of the parameter for high-precision updates | COMMENT |
| MEDIUM | bitsandbytes/backends/triton/kernels_optim.py | 764 | # Create a 32-bit copy of the parameter for high-precision updates | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | agents/pr_review_guide.md | 1543 | # Step 1: Write the JSON payload to a temp file | COMMENT |
| LOW | agents/pr_review_guide.md | 1565 | # Step 2: Post the review | COMMENT |
| LOW | agents/pr_review_guide.md | 1570 | # Step 3: Clean up | COMMENT |
| LOW | agents/issue_maintenance_guide.md | 17 | ## Step 1: Get the Landscape | COMMENT |
| LOW | agents/issue_maintenance_guide.md | 32 | ## Step 2: Identify Closeable Issues | COMMENT |
| LOW | agents/issue_maintenance_guide.md | 71 | ## Step 3: Deep-Dive Suspected Duplicates | COMMENT |
| LOW | agents/issue_maintenance_guide.md | 90 | ## Step 4: Present Recommendations (Do NOT Close Yet) | COMMENT |
| LOW | agents/issue_maintenance_guide.md | 108 | ## Step 5: Wait for Developer Approval, Then Close | COMMENT |
| LOW | agents/issue_maintenance_guide.md | 122 | ## Step 6: Report Results | COMMENT |
| LOW | agents/dispatch_guide.md | 15 | ## Step 0: Check Existing Reviews on Open PRs | COMMENT |
| LOW | agents/dispatch_guide.md | 36 | ## Step 1: Find Candidate Issues | COMMENT |
| LOW | agents/dispatch_guide.md | 65 | ## Step 2: Deep-Dive Each Candidate | COMMENT |
| LOW | agents/dispatch_guide.md | 100 | ## Step 3: Generate Prompt Files | COMMENT |
| LOW | agents/dispatch_guide.md | 296 | ## Step 4: Output Launch Commands | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples/cpu/cpu_training.py | 341 | # -------------------------------------------------- | COMMENT |
| MEDIUM⚡ | examples/xpu/benchmark_paged_memory.py | 237 | # ===================================================================================== | COMMENT |
| MEDIUM⚡ | examples/xpu/benchmark_paged_memory.py | 239 | # ===================================================================================== | COMMENT |
| MEDIUM⚡ | examples/xpu/benchmark_paged_memory.py | 247 | # ===================================================================================== | COMMENT |
| MEDIUM | examples/xpu/paged_xpu_training.py | 315 | # ------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | bitsandbytes/cextension.py | 166 | except (ValueError, IndexError): | CODE |
| HIGH | bitsandbytes/diagnostics/cuda.py | 68 | except (OSError, PermissionError): | CODE |
| HIGH | bitsandbytes/diagnostics/cuda.py | 62 | except OSError: # Assume an esoteric error trying to poke at the directory | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/fsdp_state_dict_save.py | 94 | except Exception as e: | CODE |
| MEDIUM | agents/fetch_issues.py | 187 | print(f"Error on attempt {attempt + 1}: {e}", file=sys.stderr) | CODE |
| LOW | bitsandbytes/cextension.py | 394 | except Exception as e: | CODE |
| LOW | bitsandbytes/__init__.py | 66 | except Exception as e: | CODE |
| LOW | bitsandbytes/cuda_specs.py | 78 | except Exception: | CODE |
| LOW | bitsandbytes/cuda_specs.py | 103 | except Exception as e: | CODE |
| LOW | bitsandbytes/backends/utils.py | 88 | except Exception: | CODE |
| LOW | bitsandbytes/backends/mps/ops.py | 46 | except Exception: | CODE |
| LOW | bitsandbytes/backends/cpu/ops.py | 250 | except Exception as exc: # pragma: no cover - best effort fallback | CODE |
| LOW | bitsandbytes/backends/default/ops.py | 25 | except Exception: | CODE |
| LOW | bitsandbytes/backends/default/ops.py | 29 | except Exception: | CODE |
| MEDIUM | bitsandbytes/backends/default/ops.py | 17 | def decorator(fn): | CODE |
| LOW | bitsandbytes/diagnostics/main.py | 124 | except Exception: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bitsandbytes/cextension.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/utils.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/nn/modules.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/autograd/_functions.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/backends/cpu/ops.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/backends/xpu/ops.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/optim/optimizer.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | bitsandbytes/diagnostics/cuda.py | 47 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | agents/security_guide.md | 1160 | ### 14.2 What to check in AI-generated PRs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bitsandbytes/backends/triton/ops.py | 118 | # Check if this is fine and fast | COMMENT |