Python bindings for llama.cpp
This report summarizes scanner evidence for abetlen/llama-cpp-python, a Python project with 10,642 GitHub stars. SynthScan examined 45,738 lines of code across 96 source files, recording 538 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 9.9 (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? 455 finding(s).
Are imports declared and package/API names verified? 41 finding(s).
Are wrappers, guards, and repeated structures necessary? 373 finding(s).
Which changes need focused human review? 538 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 538 distinct pattern matches across 16 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⚡ | tests/test_llama.py | 69 | def llama_cpp_transformer_model_path(): | CODE |
| LOW⚡ | tests/test_llama.py | 77 | def llama_cpp_embedding_model_path(): | CODE |
| LOW⚡ | tests/test_llama.py | 85 | def llama_cpp_recurrent_model_path(): | CODE |
| LOW⚡ | tests/test_llama.py | 93 | def llama_cpp_hybrid_model_path(): | CODE |
| LOW | tests/test_llama.py | 23 | def test_llama_cpp_tokenization(): | CODE |
| LOW | tests/test_llama.py | 270 | def test_real_llama_repeated_prompt_cache(llama_cpp_model_path): | STRING |
| LOW | tests/test_llama.py | 301 | def _assert_prompt_cache_reset_handles_history_edit( | STRING |
| LOW | tests/test_llama.py | 344 | def test_recurrent_model_prompt_cache_reset(llama_cpp_recurrent_model_path): | STRING |
| LOW | tests/test_llama.py | 352 | def test_hybrid_model_prompt_cache_reset(llama_cpp_hybrid_model_path): | STRING |
| LOW | tests/test_llama.py | 394 | def _eval_alternate_same_length_prompt(model, tokens, expected_next_token): | STRING |
| LOW | tests/test_llama.py | 418 | def _assert_exact_cached_prompt_reuse_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 458 | def _assert_loaded_exact_cached_prompt_reuse_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 495 | def _assert_ram_cache_exact_prompt_hit_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 550 | def _assert_shorter_prompt_prefix_reuse_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 578 | def test_exact_cached_prompt_reuse_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 594 | def test_loaded_exact_cached_prompt_reuse_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 610 | def test_ram_cache_exact_prompt_hit_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 626 | def test_shorter_prompt_prefix_reuse_matches_fresh( | STRING |
| LOW | tests/test_llama.py | 639 | def test_real_llama_embeddings(llama_cpp_embedding_model_path): | STRING |
| LOW | tests/test_llama_grammar.py | 18 | def test_composed_pydantic_grammar(): | STRING |
| LOW | tests/test_llama_speculative.py | 6 | def test_find_candidate_pred_tokens(): | CODE |
| LOW | tests/test_llama_chat_format.py | 85 | def test_hf_tokenizer_config_str_to_chat_formatter(): | CODE |
| LOW⚡ | examples/server/server.py | 13183 | def request_needs_prompt_logits(request: CompletionRequest) -> bool: | CODE |
| LOW⚡ | examples/server/server.py | 13189 | def request_needs_uncached_prompt_logprobs(request: CompletionRequest) -> bool: | CODE |
| LOW⚡ | examples/server/server.py | 13193 | def clear_sequence_cache_match(request: CompletionRequest) -> None: | CODE |
| LOW⚡ | examples/server/server.py | 13197 | def can_lookup_sequence_cache(self, request: CompletionRequest) -> bool: | CODE |
| LOW⚡ | examples/server/server.py | 13204 | def is_sequence_cache_match_usable( | CODE |
| LOW | examples/server/server.py | 4529 | def _regex_literal_prefix_and_remainder(pattern: str) -> Tuple[str, str]: | CODE |
| LOW | examples/server/server.py | 4584 | def _consume_optional_literal_prefix( | CODE |
| LOW | examples/server/server.py | 4599 | def _split_regex_alternatives(pattern: str) -> List[str]: | CODE |
| LOW | examples/server/server.py | 4633 | def _regex_lookahead_literal_specs(cls, pattern: str) -> List[Tuple[str, bool]]: | CODE |
| LOW | examples/server/server.py | 4671 | def _regex_capture_end_literal_specs(cls, pattern: str) -> List[Tuple[str, bool]]: | CODE |
| LOW | examples/server/server.py | 4683 | def _regex_capture_end_literals(cls, pattern: str) -> List[str]: | CODE |
| LOW | examples/server/server.py | 4728 | def _literal_suffix_prefix_length(text: str, literal: str) -> int: | CODE |
| LOW | examples/server/server.py | 4763 | def _compile_iterator_pattern(pattern: str) -> Optional[Tuple[str, str]]: | CODE |
| LOW | examples/server/server.py | 4774 | def _compile_iterator_block_pattern( | CODE |
| LOW | examples/server/server.py | 4853 | def _compile_word_capture_pattern( | CODE |
| LOW | examples/server/server.py | 4872 | def _consume_until_any_literal( | CODE |
| LOW | examples/server/server.py | 4907 | def _compile_tool_call_item_plan( | CODE |
| LOW | examples/server/server.py | 4976 | def _compile_segment_message_plan( | CODE |
| LOW | examples/server/server.py | 5045 | def _compile_tagged_message_plan( | CODE |
| LOW | examples/server/server.py | 5224 | def _parameter_schema_for_tool( | CODE |
| LOW | examples/server/server.py | 5250 | def _raw_string_tool_arguments(self, tool_name: str, value: str) -> Optional[Dict[str, str]]: | CODE |
| LOW | examples/server/server.py | 5282 | def _single_string_tool_argument_name(self, tool_name: str) -> Optional[str]: | CODE |
| LOW | examples/server/server.py | 5314 | def _text_tool_argument_from_object( | CODE |
| LOW | examples/server/server.py | 5364 | def _raw_object_tool_arguments(cls, value: str) -> Optional[Dict[str, Any]]: | CODE |
| LOW | examples/server/server.py | 5386 | def _trim_partial_gemma_quote_marker(value: str) -> str: | CODE |
| LOW | examples/server/server.py | 5585 | def _advance_direct_tool_call_state(self, text: str) -> Tuple[bool, List[Dict[str, Any]]]: | CODE |
| LOW | examples/server/server.py | 5836 | def _advance_direct_stream_state(self, text: str) -> Tuple[bool, List[Dict[str, Any]]]: | CODE |
| LOW | examples/server/server.py | 6673 | def _partial_regex_key_value_item( | CODE |
| LOW | examples/server/server.py | 6708 | def _trim_partial_tool_call_prefix( | CODE |
| LOW | examples/server/server.py | 7172 | def _normalize_tool_call_item( | CODE |
| LOW | examples/server/server.py | 7255 | def _serialize_partial_json_prefix(cls, value: Any) -> str: | CODE |
| LOW | examples/server/server.py | 7302 | def _contains_partial_json_value(cls, value: Any) -> bool: | CODE |
| LOW | examples/server/server.py | 7314 | def _serialize_partial_json_state(cls, value: Any) -> Tuple[str, bool]: | CODE |
| LOW | examples/server/server.py | 7357 | def _serialize_tool_arguments(cls, arguments: Any, *, partial: bool = False) -> str: | CODE |
| LOW | examples/server/server.py | 7897 | def _tools_for_response_parser( | CODE |
| LOW | examples/server/server.py | 7933 | def _response_reasoning_effort( | CODE |
| LOW | examples/server/server.py | 7945 | def _response_text_from_content(content: Any) -> str: | CODE |
| LOW | examples/server/server.py | 7969 | def _response_chat_content_from_content( | CODE |
| 255 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | examples/server/server.py | 12546 | except FileNotFoundError: | CODE |
| HIGH | examples/server/server.py | 12554 | except OSError: | CODE |
| HIGH | examples/server/server.py | 15022 | except ValueError: | CODE |
| HIGH | examples/server/server.py | 16339 | except WebSocketDisconnect: | CODE |
| HIGH | examples/server/server.py | 15631 | except RuntimeError: | CODE |
| HIGH | examples/server/server.py | 10834 | except OSError: | CODE |
| HIGH | examples/server/server.py | 12491 | except FileNotFoundError: | CODE |
| HIGH | examples/server/server.py | 11229 | except OSError: | CODE |
| HIGH | llama_cpp/llama.py | 1552 | except UnicodeError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker/open_llama/hug_model.py | 29 | CODE | |
| LOW | examples/low_level_api/low_level_api_chat_cpp.py | 344 | CODE | |
| LOW | examples/low_level_api/low_level_api_chat_cpp.py | 705 | CODE | |
| LOW | examples/server/server.py | 15764 | CODE | |
| LOW | examples/server/server.py | 329 | CODE | |
| LOW | examples/server/server.py | 364 | CODE | |
| LOW | examples/server/server.py | 526 | CODE | |
| LOW | examples/server/server.py | 1818 | CODE | |
| LOW | examples/server/server.py | 2239 | CODE | |
| LOW | examples/server/server.py | 3503 | CODE | |
| LOW | examples/server/server.py | 4529 | CODE | |
| LOW | examples/server/server.py | 5419 | CODE | |
| LOW | examples/server/server.py | 5585 | CODE | |
| LOW | examples/server/server.py | 5836 | CODE | |
| LOW | examples/server/server.py | 6003 | CODE | |
| LOW | examples/server/server.py | 6380 | CODE | |
| LOW | examples/server/server.py | 6734 | CODE | |
| LOW | examples/server/server.py | 7366 | CODE | |
| LOW | examples/server/server.py | 7687 | CODE | |
| LOW | examples/server/server.py | 8137 | CODE | |
| LOW | examples/server/server.py | 8698 | CODE | |
| LOW | examples/server/server.py | 8952 | CODE | |
| LOW | examples/server/server.py | 9308 | CODE | |
| LOW | examples/server/server.py | 9492 | CODE | |
| LOW | examples/server/server.py | 10021 | CODE | |
| LOW | examples/server/server.py | 11000 | CODE | |
| LOW | examples/server/server.py | 11239 | CODE | |
| LOW | examples/server/server.py | 11601 | CODE | |
| LOW | examples/server/server.py | 12771 | CODE | |
| LOW | examples/server/server.py | 13390 | CODE | |
| LOW | examples/server/server.py | 13564 | CODE | |
| LOW | examples/server/server.py | 13791 | CODE | |
| LOW | examples/server/server.py | 13887 | CODE | |
| LOW | examples/server/server.py | 14340 | CODE | |
| LOW | examples/server/server.py | 15893 | CODE | |
| LOW | examples/server/server.py | 15938 | CODE | |
| LOW | examples/server/server.py | 16201 | CODE | |
| LOW | examples/server/server.py | 330 | CODE | |
| LOW | examples/server/server.py | 377 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1460 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1823 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 4132 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1490 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1574 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1874 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 2139 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 2850 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 3140 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 3401 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 3674 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1624 | CODE | |
| LOW | llama_cpp/llama.py | 60 | CODE | |
| LOW | llama_cpp/llama.py | 704 | CODE | |
| LOW | llama_cpp/llama.py | 854 | CODE | |
| LOW | llama_cpp/llama.py | 1195 | CODE | |
| LOW | llama_cpp/_ctypes_extensions.py | 26 | CODE | |
| LOW | llama_cpp/llama_grammar.py | 439 | CODE | |
| LOW | llama_cpp/llama_grammar.py | 500 | CODE | |
| LOW | llama_cpp/llama_grammar.py | 697 | CODE | |
| LOW | llama_cpp/llama_grammar.py | 446 | CODE | |
| 5 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_llama.py | 1 | CODE | |
| LOW | tests/test_llama.py | 6 | CODE | |
| LOW | examples/low_level_api/ReasonAct.py | 2 | CODE | |
| LOW | examples/server/server.py | 17 | CODE | |
| LOW | examples/server/server.py | 39 | CODE | |
| LOW | examples/batch-processing/server.py | 26 | CODE | |
| LOW | llama_cpp/llama_cache.py | 14 | CODE | |
| LOW | llama_cpp/llama_tokenizer.py | 1 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1 | CODE | |
| LOW | llama_cpp/__init__.py | 1 | CODE | |
| LOW | llama_cpp/__init__.py | 2 | CODE | |
| LOW | llama_cpp/llama_cpp.py | 1 | CODE | |
| LOW | llama_cpp/llama_cpp.py | 16 | CODE | |
| LOW | llama_cpp/llama_cpp.py | 23 | CODE | |
| LOW | llama_cpp/llama_cpp.py | 23 | CODE | |
| LOW | llama_cpp/llama_cpp.py | 23 | CODE | |
| LOW | llama_cpp/_internals.py | 1 | CODE | |
| LOW | llama_cpp/_internals.py | 7 | CODE | |
| LOW | llama_cpp/_internals.py | 22 | CODE | |
| LOW | llama_cpp/llama.py | 1 | CODE | |
| LOW | llama_cpp/llama.py | 33 | CODE | |
| LOW | llama_cpp/llama.py | 35 | CODE | |
| LOW | llama_cpp/llama.py | 35 | CODE | |
| LOW | llama_cpp/llama.py | 35 | CODE | |
| LOW | llama_cpp/mtmd_cpp.py | 1 | CODE | |
| LOW | llama_cpp/mtmd_cpp.py | 5 | CODE | |
| LOW | llama_cpp/_ctypes_extensions.py | 1 | CODE | |
| LOW | llama_cpp/llama_cpp_ext.py | 7 | CODE | |
| LOW | llama_cpp/llava_cpp.py | 1 | CODE | |
| LOW | llama_cpp/llava_cpp.py | 4 | CODE | |
| LOW | llama_cpp/server/types.py | 1 | CODE | |
| LOW | llama_cpp/server/model.py | 1 | CODE | |
| LOW | llama_cpp/server/cli.py | 1 | CODE | |
| LOW | llama_cpp/server/settings.py | 1 | CODE | |
| LOW | llama_cpp/server/app.py | 1 | CODE | |
| LOW | llama_cpp/server/errors.py | 1 | CODE | |
| LOW | llama_cpp/server/errors.py | 6 | CODE | |
| LOW | llama_cpp/server/errors.py | 6 | CODE | |
| LOW | llama_cpp/server/__main__.py | 25 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | llama_cpp/llama.py | 123 | Load a llama.cpp model from `model_path`. Examples: Basic usage >>> import llama_cpp | STRING |
| HIGH | llama_cpp/llama.py | 605 | Tokenize a string. Args: text: The utf-8 encoded string to tokenize. add_bos: Whether t | STRING |
| HIGH | llama_cpp/llama.py | 875 | Create a generator of tokens from a prompt. Examples: >>> llama = Llama("models/ggml-7b.bin") | STRING |
| HIGH | llama_cpp/llama.py | 1843 | Generate text from a prompt. Args: prompt: The prompt to generate text from. suffix: A | STRING |
| HIGH | llama_cpp/llama.py | 1940 | Generate text from a prompt. Args: prompt: The prompt to generate text from. suffix: A | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker/open_llama/hug_model.py | 44 | # Creating a symbolic link from destination to "model.bin" | COMMENT |
| MEDIUM | docker/open_llama/hug_model.py | 74 | # Create an argument parser | COMMENT |
| MEDIUM | docker/open_llama/hug_model.py | 92 | # Define the parameters | COMMENT |
| MEDIUM | scripts/releases-to-pep-503.sh | 33 | # Create an index html file | COMMENT |
| MEDIUM | scripts/releases-to-pep-503.sh | 49 | # Create an index html file in llama-cpp-python directory | COMMENT |
| MEDIUM | llama_cpp/llama_chat_format.py | 3160 | """This method is no longer used in the new implementation.""" | STRING |
| MEDIUM | llama_cpp/_internals.py | 637 | # This method is deprecated in favor of using LlamaSampler directly | COMMENT |
| MEDIUM | llama_cpp/_internals.py | 876 | # Create a new wrapper around the cloned sampler | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker/open_llama/hug_model.py | 135 | print("Error - model choice was None") | CODE |
| MEDIUM | examples/server/server.py | 3273 | def resolve_model_path(self) -> str: | CODE |
| LOW | examples/server/server.py | 9349 | except Exception: | CODE |
| LOW | examples/server/server.py | 10831 | except Exception: | CODE |
| LOW | examples/server/server.py | 12488 | except Exception: | CODE |
| LOW | examples/server/server.py | 12507 | except Exception: # noqa: BLE001 | CODE |
| LOW | examples/server/server.py | 13235 | except Exception: # noqa: BLE001 | CODE |
| LOW | examples/server/server.py | 13309 | except Exception: # noqa: BLE001 | CODE |
| LOW | examples/server/server.py | 13358 | except Exception: # noqa: BLE001 | CODE |
| LOW | examples/server/server.py | 16256 | except Exception: | CODE |
| LOW | examples/server/server.py | 3194 | except Exception: | STRING |
| LOW | examples/server/server.py | 3232 | except Exception as exc: | STRING |
| LOW | examples/server/server.py | 3244 | except Exception: | STRING |
| LOW | examples/server/server.py | 3303 | except Exception as exc: | STRING |
| LOW | llama_cpp/llama_chat_format.py | 717 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 1010 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 1737 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 2094 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 3085 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 3620 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 4315 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_chat_format.py | 4434 | except Exception as e: | CODE |
| LOW | llama_cpp/llama.py | 494 | except Exception as e: | CODE |
| LOW | llama_cpp/_ctypes_extensions.py | 93 | except Exception as e: | CODE |
| LOW | llama_cpp/_ctypes_extensions.py | 103 | except Exception as e: | CODE |
| LOW | llama_cpp/llama_grammar.py | 33 | except Exception as err: | CODE |
| LOW | llama_cpp/server/errors.py | 180 | except Exception as exc: | CODE |
| LOW | llama_cpp/server/errors.py | 198 | except Exception: | CODE |
| LOW | llama_cpp/server/__main__.py | 80 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/server/server.py | 1 | #!/usr/bin/env -S uv run --script | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 61 | # GGML_TYPE_Q4_0 = 2, | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 81 | # GGML_TYPE_IQ2_S = 22, | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 201 | llama_token_p = ctypes.POINTER(llama_token) | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 241 | # LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_LLM = 2, | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 261 | # LLAMA_VOCAB_PRE_TYPE_CODESHELL = 22, | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 321 | # LLAMA_ROPE_TYPE_IMROPE = GGML_ROPE_TYPE_IMROPE, | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 341 | LLAMA_TOKEN_TYPE_UNDEFINED = 0 | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 381 | # LLAMA_FTYPE_MOSTLY_Q4_1 = 3, // except 1d tensors | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 401 | # LLAMA_FTYPE_MOSTLY_IQ3_XXS = 23, // except 1d tensors | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 481 | # LLAMA_POOLING_TYPE_NONE = 0, | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 501 | LLAMA_ATTENTION_TYPE_NON_CAUSAL = 1 | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 621 | # typedef bool (*llama_progress_callback)(float progress, void * user_data); | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 641 | # // ) | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 701 | COMMENT | |
| LOW | llama_cpp/llama_cpp.py | 821 | COMMENT | |
| LOW | llama_cpp/llama_cpp.py | 841 | # // Called with a progress value between 0.0 and 1.0. Pass NULL to disable. | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 941 | # // https://github.com/ggml-org/llama.cpp/pull/7544 | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 961 | # float rope_freq_scale; // RoPE frequency scaling factor, 0 = from model | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 981 | COMMENT | |
| LOW | llama_cpp/llama_cpp.py | 1141 | # int32_t nthread; // number of threads to use for quantizing, if <=0 will use std::thread::har | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 3141 | COMMENT | |
| LOW | llama_cpp/llama_cpp.py | 3241 | COMMENT | |
| LOW | llama_cpp/llama_cpp.py | 3501 | # // Wait until all computations are finished | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 4281 | _warn_deprecated("llama_vocab_cls", "use llama_vocab_bos instead") | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 4341 | COMMENT | |
| LOW | llama_cpp/llama_cpp.py | 4441 | text_len_max: The length of the buffer. | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 4561 | # void (*apply) ( struct llama_sampler * smpl, llama_token_data_array * cur_p); // required | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 5221 | """Set callback for all future logging events. | COMMENT |
| LOW | llama_cpp/mtmd_cpp.py | 241 | # float temp; // sampling temperature, or noise scale for flow-matching decoders | COMMENT |
| LOW | llama_cpp/mtmd_cpp.py | 281 | ("state_size", c_size_t), | COMMENT |
| LOW | llama_cpp/mtmd_cpp.py | 421 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_llama_chat_format.py | 75 | "pad_token": null, | CODE |
| HIGH | llama_cpp/llama_cache.py | 138 | # self.cache.push(_key, side="front") # type: ignore | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/get-releases.sh | 20 | # Check if the response is valid JSON | COMMENT |
| LOW | scripts/releases-to-pep-503.sh | 24 | # Check if all_releases.txt exists | COMMENT |
| LOW | .github/workflows/build-wheels-cuda.yaml | 272 | # Set tag_name to <tag>-cu<cuda_version>. | COMMENT |
| LOW | llama_cpp/llama_chat_format.py | 2816 | # Check if vision is supported | COMMENT |
| LOW | llama_cpp/llama.py | 1475 | # Check if stop sequence is in the token | COMMENT |
| LOW | llama_cpp/server/app.py | 110 | # Check if yaml file | COMMENT |
| LOW | llama_cpp/server/__main__.py | 63 | # Check if yaml file | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/server/server.py | 11239 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1460 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 1823 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 4132 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 68 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 612 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 2850 | CODE | |
| LOW | llama_cpp/llama_chat_format.py | 3401 | CODE | |
| LOW | llama_cpp/llama.py | 60 | CODE | |
| LOW | llama_cpp/llama.py | 704 | CODE | |
| LOW | llama_cpp/llama.py | 792 | CODE | |
| LOW | llama_cpp/llama.py | 854 | CODE | |
| LOW | llama_cpp/llama.py | 1195 | CODE | |
| LOW | llama_cpp/llama.py | 1815 | CODE | |
| LOW | llama_cpp/llama.py | 1912 | CODE | |
| LOW | llama_cpp/llama.py | 2004 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README.md | 310 | # n_ctx=2048, # Uncomment to increase the context window | COMMENT |
| MEDIUM | README.md | 314 | max_tokens=32, # Generate up to 32 tokens, set to None to generate up to the end of the context window | CODE |
| MEDIUM | llama_cpp/llama.py | 1353 | # Truncate max_tokens if requested tokens would exceed the context window | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | llama_cpp/llama_types.py | 300 | # NOTE: The following type names are not part of the OpenAI OpenAPI specification | COMMENT |
| LOW | llama_cpp/llama_cpp.py | 4454 | # /// NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https:/ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | llama_cpp/llama_cpp.py | 3088 | # // NOTE: this is a helper function to facilitate transition to the new batch API - avoid using it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | llama_cpp/llama_cpp.py | 3386 | # // TODO: implement get_embeddings() and get_logits() for llama_batch_ext | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/server/server.py | 12203 | def set_draft_processing_enabled(self, enabled: bool) -> None: | CODE |
| LOW | examples/server/server.py | 1201 | def set_target_processing_enabled(self, enabled: bool) -> None: | STRING |
| LOW | examples/server/server.py | 1398 | def set_target_processing_enabled(self, enabled: bool) -> None: | STRING |
| LOW | examples/server/server.py | 1461 | def _set_nextn_layer_offset(self, offset: int) -> None: | STRING |