Minimalist ML framework for Rust
This report presents the forensic synthetic code analysis of huggingface/candle, a Rust project with 20,662 GitHub stars. SynthScan v2.0 examined 248,237 lines of code across 928 source files, recording 499 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 2.7 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 499 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-transformers/src/utils.rs | 1 | //! Shared utilities: repeat_kv, repeat_penalty, causal mask. | COMMENT |
| LOW | candle-transformers/src/models/starcoder2.rs | 1 | //! StarCoder model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/quantized_mixformer.rs | 1 | //! Module containing quantized MixFormer model implementation. | COMMENT |
| LOW | candle-transformers/src/models/parler_tts.rs | 1 | //! Parler Model implementation for parler_tts text-to-speech synthesis | COMMENT |
| LOW | candle-transformers/src/models/eva2.rs | 1 | //! EVA-2 inference implementation. | COMMENT |
| LOW | candle-transformers/src/models/quantized_moondream.rs | 1 | //! Implementation of a quantized Moondream vision language model. | COMMENT |
| LOW | candle-transformers/src/models/dinov2.rs | 1 | //! Implementation of the DINOv2 models from Meta Research. | COMMENT |
| LOW | candle-transformers/src/models/dinov2.rs | 21 | //! | COMMENT |
| LOW | candle-transformers/src/models/csm.rs | 1 | //! Implementation of the Conversational Speech Model (CSM) from Sesame | COMMENT |
| LOW | …e-transformers/src/models/quantized_recurrent_gemma.rs | 1 | //! Recurrent Gemma model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/quantized_phi.rs | 1 | //! Phi2 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/mobilenetv4.rs | 1 | //! # MobileNet-v4 | COMMENT |
| LOW | candle-transformers/src/models/rwkv_v7.rs | 1 | //! RWKV v7 "Goose" (x070) model implementation. | COMMENT |
| LOW | candle-transformers/src/models/paligemma.rs | 1 | //! Multimodal multi-purpose model combining Gemma-based language model with SigLIP image understanding | COMMENT |
| LOW | candle-transformers/src/models/t5.rs | 1 | //! T5 model implementation. | COMMENT |
| LOW | candle-transformers/src/models/t5.rs | 21 | //! ```bash | COMMENT |
| LOW | candle-transformers/src/models/t5.rs | 41 | //! --prompt "<2de> How are you, my friend?" \ | COMMENT |
| LOW | candle-transformers/src/models/phi3.rs | 1 | //! Microsoft Phi-3 model implementation | COMMENT |
| LOW | candle-transformers/src/models/bigcode.rs | 1 | //! BigCode implementation in Rust based on the GPT-BigCode model. | COMMENT |
| LOW | candle-transformers/src/models/rwkv_v6.rs | 1 | //! RWKV v6 model implementation. | COMMENT |
| LOW | candle-transformers/src/models/quantized_blip.rs | 1 | //! BLIP model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/quantized_rwkv_v5.rs | 1 | //! RWKV v5 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/vgg.rs | 1 | //! VGG-16 model implementation. | COMMENT |
| LOW | candle-transformers/src/models/recurrent_gemma.rs | 1 | //! Recurrent Gemma model implementation | COMMENT |
| LOW | candle-transformers/src/models/quantized_mpt.rs | 1 | //! Quantized MPT model implementation. | COMMENT |
| LOW | candle-transformers/src/models/stable_lm.rs | 1 | //! StableLM model implementation. | COMMENT |
| LOW | candle-transformers/src/models/quantized_stable_lm.rs | 1 | //! Module for quantized StableLM implementation. | COMMENT |
| LOW | candle-transformers/src/models/mixtral.rs | 1 | //! Mixtral Model, a sparse mixture of expert model based on the Mistral architecture | COMMENT |
| LOW | candle-transformers/src/models/rwkv_v5.rs | 1 | //! RWKV v5 model implementation. | COMMENT |
| LOW | candle-transformers/src/models/rwkv_v5.rs | 21 | //! ```bash | COMMENT |
| LOW | candle-transformers/src/models/olmo.rs | 1 | //! OLMo (Open Language Model) implementation | COMMENT |
| LOW | candle-transformers/src/models/qwen2.rs | 1 | //! Qwen2 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/mod.rs | 1 | //! Candle implementations for various deep learning models | COMMENT |
| LOW | candle-transformers/src/models/dinov2reg4.rs | 1 | //! Implementation of the DINOv2 revision (4 regularization) | COMMENT |
| LOW | candle-transformers/src/models/dinov2reg4.rs | 21 | //! | COMMENT |
| LOW | candle-transformers/src/models/quantized_rwkv_v6.rs | 1 | //! RWKV v6 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/phi.rs | 1 | //! Microsoft Phi model implementation | COMMENT |
| LOW | candle-transformers/src/models/convnext.rs | 1 | //! ConvNeXt implementation. | COMMENT |
| LOW | candle-transformers/src/models/segformer.rs | 1 | //! Segformer model implementation for semantic segmentation and image classification. | COMMENT |
| LOW | candle-transformers/src/models/quantized_gemma3.rs | 1 | //! Gemma 3 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/qwen2_moe.rs | 1 | //! Qwen2 model implementation with Mixture of Experts support. | COMMENT |
| LOW | candle-transformers/src/models/quantized_qwen2.rs | 1 | //! Qwen2 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/quantized_t5.rs | 1 | //! T5 model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/quantized_blip_text.rs | 1 | //! Quantized BLIP text module implementation. | COMMENT |
| LOW | candle-transformers/src/models/quantized_mistral.rs | 1 | //! Mistral model implementation with quantization support. | COMMENT |
| LOW | candle-transformers/src/models/bert.rs | 1 | //! BERT (Bidirectional Encoder Representations from Transformers) | COMMENT |
| LOW | candle-transformers/src/models/efficientvit.rs | 1 | //! EfficientViT (MSRA) inference implementation based on timm. | COMMENT |
| LOW | candle-transformers/src/models/efficientvit.rs | 21 | //! --example efficientvit \ | COMMENT |
| LOW | candle-transformers/src/models/quantized_llama2_c.rs | 1 | //! Quantized Llama2 model implementation. | COMMENT |
| LOW | candle-transformers/src/models/mobileclip.rs | 1 | //! Mobile CLIP model, combining a lightweight vision encoder with a text encoder | COMMENT |
| LOW | candle-transformers/src/models/quantized_llama.rs | 1 | //! Quantized llama model implementation. | COMMENT |
| LOW | candle-transformers/src/models/quantized_llama.rs | 521 | span, | COMMENT |
| LOW | candle-transformers/src/models/quantized_llama.rs | 621 | COMMENT | |
| LOW | candle-transformers/src/models/trocr.rs | 1 | //! TrOCR model implementation. | COMMENT |
| LOW | candle-transformers/src/models/nomic_bert.rs | 1 | //! # NomicBERT | COMMENT |
| LOW | candle-transformers/src/models/mpt.rs | 1 | //! Module implementing the MPT (Multi-Purpose Transformer) model | COMMENT |
| LOW | candle-transformers/src/models/yi.rs | 1 | //! Yi model implementation. | COMMENT |
| LOW | candle-transformers/src/models/quantized_metavoice.rs | 1 | //! Quantized MetaVoice model implementation. | COMMENT |
| LOW | candle-transformers/src/models/stella_en_v5.rs | 1 | //! Stella v5 model implementation. | COMMENT |
| LOW | candle-transformers/src/models/stella_en_v5.rs | 501 | // state = other_layernorm(xs) | COMMENT |
| 255 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 23 | // ─── Config ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 77 | // ─── State ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 155 | // ─── Tokenizer ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 159 | // ─── Helpers ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 191 | // ─── TimeMix (Attention) ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 458 | // ─── ChannelMix (FFN) ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 549 | // ─── DeaAttention (v7b only) ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 724 | // ─── Block ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 831 | // ─── Model ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/quantized_llama.rs | 604 | // ── Mask shape tests ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/quantized_llama.rs | 622 | // ── Mask value tests ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/quantized_llama.rs | 672 | // ── Mask broadcast compatibility test ───────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 5 | // ── Text config defaults ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 50 | // ── Rope parameters ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 68 | // ── Gemma4TextConfig ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 147 | // ── Vision config defaults ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 189 | // ── Gemma4VisionConfig ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 236 | // ── Audio config defaults ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 302 | // ── Gemma4AudioConfig ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 374 | // ── Top-level config defaults ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/config.rs | 386 | // ── Gemma4Config ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 11 | // ── RmsNorm (Gemma-style) ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 52 | // ── 2D Vision Rotary Embedding ────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 114 | // ── PatchEmbedder ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 185 | // ── VisionAttention ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 275 | // ── VisionMlp ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 310 | // ── VisionEncoderLayer ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 368 | // ── VisionPooler ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/vision.rs | 437 | // ── VisionTower (public) ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/mod.rs | 95 | // ── Vision embedding injection ────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/mod.rs | 118 | // ── Audio embedding injection ─────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 11 | // ── RmsNorm (standard, no +1 offset for audio) ───────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 41 | // ── LayerNorm (for SSCP conv blocks) ──────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 67 | // ── SSCP Conv Blocks ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 170 | // ── SubSampleConvProjection ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 225 | // ── Relative Position Embedding ───────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 367 | // ── Conformer Attention ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 645 | // ── Conformer FeedForward ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 699 | // ── Conformer LightConv1d ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 772 | // ── ConformerBlock ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/audio.rs | 808 | // ── AudioModel (public) ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 12 | // ── RmsNorm (Gemma-style with +1 offset) ──────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 53 | // ── RotaryEmbedding (standard, for sliding layers) ────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 100 | // ── ProportionalRotaryEmbedding (for global/full layers) ──────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 153 | // ── MLP ───────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 192 | // ── Flash attention ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 210 | // ── KvCache ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 218 | // ── Attention ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 386 | // ── DecoderLayer ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 477 | // ── Causal mask ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | candle-transformers/src/models/gemma4/text.rs | 515 | // ── TextModel ─────────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-wasm-examples/quant-qwen3/serve.py | 85 | def find_or_download_tokenizer(): | CODE |
| LOW | candle-pyo3/stub.py | 127 | def process_additional_function(fn): | CODE |
| LOW⚡ | candle-pyo3/tests/native/test_tensor.py | 8 | def test_tensor_can_be_constructed(): | CODE |
| LOW⚡ | candle-pyo3/tests/native/test_tensor.py | 13 | def test_tensor_can_be_constructed_from_list(): | CODE |
| LOW⚡ | candle-pyo3/tests/native/test_tensor.py | 18 | def test_tensor_can_be_constructed_from_list_of_lists(): | CODE |
| LOW⚡ | candle-pyo3/tests/native/test_tensor.py | 23 | def test_tensor_can_be_quantized(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 43 | def test_tensor_can_be_indexed(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 51 | def test_tensor_can_be_sliced(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 87 | def test_tensor_supports_equality_operations_with_scalars(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 109 | def test_tensor_supports_equality_operations_with_tensors(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 133 | def test_tensor_equality_operations_can_broadcast(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 145 | def test_tensor_can_be_hashed(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 153 | def test_tensor_can_be_expanded_with_none(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 168 | def test_tensor_can_be_index_via_tensor(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 179 | def test_tensor_can_be_index_via_list(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 190 | def test_tensor_can_be_cast_via_to(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 212 | def test_tensor_can_be_moved_via_to(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 234 | def test_tensor_can_be_moved_and_cast_via_to(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 272 | def test_tensor_can_be_subtracted(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 290 | def test_tensor_can_be_multiplied(): | CODE |
| LOW | candle-pyo3/tests/native/test_tensor.py | 308 | def test_tensor_can_be_divided(): | CODE |
| LOW | candle-pyo3/tests/native/test_utils.py | 10 | def test_can_roundtrip_safetensors(): | CODE |
| LOW | candle-pyo3/tests/native/test_shape.py | 6 | def test_absolute_shapes_are_valid(): | CODE |
| LOW | candle-pyo3/tests/native/test_shape.py | 17 | def test_relative_shapes_are_valid(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 9 | def test_module_can_be_constructed(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 18 | def test_module_registers_tensors(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 30 | def test_module_registers_submodules(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 45 | def test_module_can_dump_statedict(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 61 | def test_module_can_load_statedict(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 77 | def test_module_throws_on_shape_mismatch(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 92 | def test_module_throws_on_missing_key(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 108 | def test_module_can_load_quantized_tensors(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 124 | def test_module_dequantizes_tensors_automatically(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 139 | def test_module_can_be_moved_to_cuda(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_module.py | 151 | def test_module_can_be_moved_from_cuda_to_cpu(): | CODE |
| LOW⚡ | candle-pyo3/tests/bindings/test_linear.py | 6 | def test_linear_layer_can_be_constructed(): | CODE |
| LOW⚡ | candle-pyo3/tests/bindings/test_linear.py | 11 | def test_linear_layer_can_forward_a_singular_input(): | CODE |
| LOW⚡ | candle-pyo3/tests/bindings/test_linear.py | 18 | def test_linear_layer_can_forward_a_batched_input(): | CODE |
| LOW⚡ | candle-pyo3/tests/bindings/test_linear.py | 25 | def test_quantized_linear_layer_can_forward_a_singular_input(): | CODE |
| LOW⚡ | candle-pyo3/tests/bindings/test_linear.py | 33 | def test_quantized_linear_layer_can_forward_a_batched_input(): | CODE |
| LOW | candle-pyo3/tests/bindings/test_testing.py | 8 | def test_assert_equal_asserts_correctly(dtype: candle.DType): | CODE |
| LOW | candle-pyo3/tests/bindings/test_testing.py | 18 | def test_assert_almost_equal_asserts_correctly(dtype: candle.DType): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 766 | // Step 1: Squeeze F dimension: (B, C, 1, H, W) -> (B, C, H, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 769 | // Step 2: Reshape H into (H_tokens, pH): (B, C, H, W) -> (B, C, H_t, pH, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 772 | // Step 3: Reshape W into (W_tokens, pW): (B, C, H_t, pH, W) -> (B, C, H_t, pH, W_t, pW) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 775 | // Step 4: Permute to match Python: (C, H_t, pH, W_t, pW) -> (H_t, W_t, pH, pW, C) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 780 | // Step 5: Reshape to patches: (B, H_t, W_t, pH, pW, C) -> (B, H_t*W_t, pH*pW*C) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 823 | // Step 1: Reshape to (B, H_t, W_t, pH, pW, C) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 826 | // Step 2: Permute to match Python: (H_t, W_t, pH, pW, C) -> (C, H_t, pH, W_t, pW) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 831 | // Step 3: Reshape to combine H and W: (B, C, H_t, pH, W_t, pW) -> (B, C, H, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 834 | // Step 4: Add back F dimension: (B, C, H, W) -> (B, C, 1, H, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/paddleocr_vl/mod.rs | 915 | // Step 1: Get text embeddings | COMMENT |
| LOW⚡ | candle-transformers/src/models/paddleocr_vl/mod.rs | 923 | // Step 2: Encode images | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 934 | // Step 3: Merge vision embeddings into text embeddings | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 956 | // Step 4: Compute M-RoPE position IDs | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 979 | // Step 5: Forward through text model with export | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 1014 | // Step 0: Prefill with image | COMMENT |
| LOW⚡ | candle-core/tests/pth.py | 20 | # Step 1: Create a 3D NumPy array with Fortran order using a range of numbers | COMMENT |
| LOW⚡ | candle-core/tests/pth.py | 28 | # Step 2: Convert the NumPy array to a PyTorch tensor | COMMENT |
| LOW⚡ | candle-core/tests/pth.py | 34 | # Step 3: Save the PyTorch tensor to a .pth file | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 766 | // Step 1: Squeeze F dimension: (B, C, 1, H, W) -> (B, C, H, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 769 | // Step 2: Reshape H into (H_tokens, pH): (B, C, H, W) -> (B, C, H_t, pH, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 772 | // Step 3: Reshape W into (W_tokens, pW): (B, C, H_t, pH, W) -> (B, C, H_t, pH, W_t, pW) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 775 | // Step 4: Permute to match Python: (C, H_t, pH, W_t, pW) -> (H_t, W_t, pH, pW, C) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 780 | // Step 5: Reshape to patches: (B, H_t, W_t, pH, pW, C) -> (B, H_t*W_t, pH*pW*C) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 823 | // Step 1: Reshape to (B, H_t, W_t, pH, pW, C) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 826 | // Step 2: Permute to match Python: (H_t, W_t, pH, pW, C) -> (C, H_t, pH, W_t, pW) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 831 | // Step 3: Reshape to combine H and W: (B, C, H_t, pH, W_t, pW) -> (B, C, H, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/z_image/transformer.rs | 834 | // Step 4: Add back F dimension: (B, C, H, W) -> (B, C, 1, H, W) | COMMENT |
| LOW⚡ | candle-transformers/src/models/paddleocr_vl/mod.rs | 915 | // Step 1: Get text embeddings | COMMENT |
| LOW⚡ | candle-transformers/src/models/paddleocr_vl/mod.rs | 923 | // Step 2: Encode images | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 934 | // Step 3: Merge vision embeddings into text embeddings | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 956 | // Step 4: Compute M-RoPE position IDs | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 979 | // Step 5: Forward through text model with export | COMMENT |
| LOW | candle-transformers/src/models/paddleocr_vl/mod.rs | 1014 | // Step 0: Prefill with image | COMMENT |
| LOW⚡ | candle-core/tests/pth.py | 20 | # Step 1: Create a 3D NumPy array with Fortran order using a range of numbers | COMMENT |
| LOW⚡ | candle-core/tests/pth.py | 28 | # Step 2: Convert the NumPy array to a PyTorch tensor | COMMENT |
| LOW⚡ | candle-core/tests/pth.py | 34 | # Step 3: Save the PyTorch tensor to a .pth file | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-wasm-examples/quant-qwen3/serve.py | 10 | CODE | |
| LOW | candle-pyo3/e5.py | 8 | CODE | |
| LOW | candle-pyo3/py_src/candle/__init__.py | 4 | CODE | |
| LOW | candle-pyo3/py_src/candle/__init__.py | 49 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/linear.py | 1 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 1 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 2 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 2 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 2 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 3 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 4 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/__init__.py | 5 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/container.py | 3 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/sparse.py | 2 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/sparse.py | 2 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/sparse.py | 2 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/normalization.py | 4 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/normalization.py | 4 | CODE | |
| LOW | candle-pyo3/py_src/candle/models/llama.py | 3 | CODE | |
| LOW | candle-pyo3/tests/native/test_utils.py | 2 | CODE | |
| LOW | candle-pyo3/tests/native/test_utils.py | 2 | CODE | |
| LOW | candle-pyo3/tests/native/test_shape.py | 1 | CODE | |
| LOW | candle-pyo3/tests/bindings/test_linear.py | 2 | CODE | |
| LOW | candle-examples/examples/flux/t5_tokenizer.py | 1 | CODE | |
| LOW | candle-examples/examples/resnet/export_models.py | 2 | CODE | |
| LOW | candle-examples/examples/resnet/export_models.py | 3 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | candle-wasm-examples/quant-qwen3/serve.py | 12 | print("Error: Required packages not installed", file=sys.stderr) | CODE |
| LOW⚡ | candle-wasm-examples/quant-qwen3/serve.py | 50 | except Exception as e: | CODE |
| MEDIUM⚡ | candle-wasm-examples/quant-qwen3/serve.py | 51 | print(f"Error downloading {filename}: {e}", file=sys.stderr) | CODE |
| MEDIUM⚡ | candle-wasm-examples/quant-qwen3/serve.py | 60 | print(f"Error: Custom path does not exist: {custom_path}", file=sys.stderr) | CODE |
| LOW | candle-wasm-examples/quant-qwen3/serve.py | 142 | except Exception as e: | CODE |
| MEDIUM | candle-wasm-examples/quant-qwen3/serve.py | 133 | def send_file(self, filepath, content_type): | CODE |
| LOW | candle-pyo3/py_src/candle/nn/module.py | 462 | except Exception as ex: | STRING |
| LOW | …es/examples/marian-mt/python/convert_slow_tokenizer.py | 43 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | candle-transformers/src/models/rwkv_v7.rs | 66 | /// This is more robust than computing from a formula, as different | COMMENT |
| MEDIUM | candle-transformers/src/models/rwkv_v5.rs | 72 | // Certainly a weird convention but taken from modeling_rwkv5.py | COMMENT |
| MEDIUM | candle-transformers/src/models/segment_anything/mod.rs | 4 | //! in an image based on prompts like points or boxes. //! This model provides a robust and fast image segmentation pipe | COMMENT |
| MEDIUM | candle-nn/src/loss.rs | 78 | /// A robust loss function that combines `MAE` and `MSE` losses: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | candle-pyo3/tests/native/test_tensor.py | 134 | # Create a decoder attention mask as a test case | COMMENT |
| MEDIUM⚡ | candle-core/tests/pth.py | 17 | # Create a tensor with fortran contiguous memory layout | COMMENT |
| MEDIUM | …ples/examples/reinforcement-learning/atari_wrappers.py | 303 | # Create the environment. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-pyo3/stub.py | 87 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/container.py | 136 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/container.py | 153 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/module.py | 97 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/module.py | 391 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/module.py | 592 | CODE | |
| LOW | candle-pyo3/py_src/candle/nn/module.py | 659 | CODE | |
| LOW | …ples/examples/reinforcement-learning/atari_wrappers.py | 232 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | candle-examples/examples/quantized-lfm2/main.rs | 41 | /// GGUF file to load, typically a .gguf file generated by llama.cpp. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | candle-examples/examples/stella-en-v5/README.md | 1 | # candle-stella-en-v5: Implementation of [stella_en_1.5B_v5](https://huggingface.co/dunzhang/stella_en_1.5B_v5) embeddin | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-transformers/src/models/voxtral/model.rs | 901 | let dummy_token = Tensor::new(&[1u32], &config.device)?; | CODE |
| LOW | candle-transformers/src/models/voxtral/model.rs | 902 | let dummy_embed = self.language_model.embed(&dummy_token)?; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-pyo3/py_src/candle/nn/container.py | 19 | __all__ = ["Sequential", "ModuleList", "ModuleDict"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | candle-pyo3/stub.py | 37 | # Check if we have a return type annotation in the docstring | STRING |