Repository Analysis

abetlen/llama-cpp-python

Python bindings for llama.cpp

9.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of abetlen/llama-cpp-python, a Python project with 10,485 GitHub stars. SynthScan v2.0 examined 44,784 lines of code across 96 source files, recording 509 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 9.0 places this repository in the Low AI signal 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).

9.0
Adjusted Score
9.0
Raw Score
100%
Time Factor
2026-07-12
Last Push
10.5K
Stars
Python
Language
44.8K
Lines of Code
96
Files
509
Pattern Hits
2026-07-14
Scan Date
0.07
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 7MEDIUM 14LOW 488

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 509 distinct pattern matches across 14 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.

Hyper-Verbose Identifiers297 hits · 197 pts
SeverityFileLineSnippetContext
LOWtests/test_llama.py69def llama_cpp_transformer_model_path():CODE
LOWtests/test_llama.py77def llama_cpp_embedding_model_path():CODE
LOWtests/test_llama.py85def llama_cpp_recurrent_model_path():CODE
LOWtests/test_llama.py93def llama_cpp_hybrid_model_path():CODE
LOWtests/test_llama.py23def test_llama_cpp_tokenization():CODE
LOWtests/test_llama.py261def test_real_llama_repeated_prompt_cache(llama_cpp_model_path):STRING
LOWtests/test_llama.py292def _assert_prompt_cache_reset_handles_history_edit(STRING
LOWtests/test_llama.py335def test_recurrent_model_prompt_cache_reset(llama_cpp_recurrent_model_path):STRING
LOWtests/test_llama.py343def test_hybrid_model_prompt_cache_reset(llama_cpp_hybrid_model_path):STRING
LOWtests/test_llama.py385def _eval_alternate_same_length_prompt(model, tokens, expected_next_token):STRING
LOWtests/test_llama.py409def _assert_exact_cached_prompt_reuse_matches_fresh(STRING
LOWtests/test_llama.py449def _assert_loaded_exact_cached_prompt_reuse_matches_fresh(STRING
LOWtests/test_llama.py486def _assert_ram_cache_exact_prompt_hit_matches_fresh(STRING
LOWtests/test_llama.py541def _assert_shorter_prompt_prefix_reuse_matches_fresh(STRING
LOWtests/test_llama.py569def test_exact_cached_prompt_reuse_matches_fresh(STRING
LOWtests/test_llama.py585def test_loaded_exact_cached_prompt_reuse_matches_fresh(STRING
LOWtests/test_llama.py601def test_ram_cache_exact_prompt_hit_matches_fresh(STRING
LOWtests/test_llama.py617def test_shorter_prompt_prefix_reuse_matches_fresh(STRING
LOWtests/test_llama.py630def test_real_llama_embeddings(llama_cpp_embedding_model_path):STRING
LOWtests/test_llama_grammar.py18def test_composed_pydantic_grammar():STRING
LOWtests/test_llama_speculative.py6def test_find_candidate_pred_tokens():CODE
LOWtests/test_llama_chat_format.py85def test_hf_tokenizer_config_str_to_chat_formatter():CODE
LOWexamples/server/server.py13156 def request_needs_prompt_logits(request: CompletionRequest) -> bool:CODE
LOWexamples/server/server.py13162 def request_needs_uncached_prompt_logprobs(request: CompletionRequest) -> bool:CODE
LOWexamples/server/server.py13166 def clear_sequence_cache_match(request: CompletionRequest) -> None:CODE
LOWexamples/server/server.py13170 def can_lookup_sequence_cache(self, request: CompletionRequest) -> bool:CODE
LOWexamples/server/server.py13177 def is_sequence_cache_match_usable(CODE
LOWexamples/server/server.py4529 def _regex_literal_prefix_and_remainder(pattern: str) -> Tuple[str, str]:CODE
LOWexamples/server/server.py4584 def _consume_optional_literal_prefix(CODE
LOWexamples/server/server.py4599 def _split_regex_alternatives(pattern: str) -> List[str]:CODE
LOWexamples/server/server.py4633 def _regex_lookahead_literal_specs(cls, pattern: str) -> List[Tuple[str, bool]]:CODE
LOWexamples/server/server.py4671 def _regex_capture_end_literal_specs(cls, pattern: str) -> List[Tuple[str, bool]]:CODE
LOWexamples/server/server.py4683 def _regex_capture_end_literals(cls, pattern: str) -> List[str]:CODE
LOWexamples/server/server.py4728 def _literal_suffix_prefix_length(text: str, literal: str) -> int:CODE
LOWexamples/server/server.py4763 def _compile_iterator_pattern(pattern: str) -> Optional[Tuple[str, str]]:CODE
LOWexamples/server/server.py4774 def _compile_iterator_block_pattern(CODE
LOWexamples/server/server.py4853 def _compile_word_capture_pattern(CODE
LOWexamples/server/server.py4872 def _consume_until_any_literal(CODE
LOWexamples/server/server.py4907 def _compile_tool_call_item_plan(CODE
LOWexamples/server/server.py4976 def _compile_segment_message_plan(CODE
LOWexamples/server/server.py5045 def _compile_tagged_message_plan(CODE
LOWexamples/server/server.py5224 def _parameter_schema_for_tool(CODE
LOWexamples/server/server.py5250 def _raw_string_tool_arguments(self, tool_name: str, value: str) -> Optional[Dict[str, str]]:CODE
LOWexamples/server/server.py5282 def _single_string_tool_argument_name(self, tool_name: str) -> Optional[str]:CODE
LOWexamples/server/server.py5314 def _text_tool_argument_from_object(CODE
LOWexamples/server/server.py5364 def _raw_object_tool_arguments(cls, value: str) -> Optional[Dict[str, Any]]:CODE
LOWexamples/server/server.py5386 def _trim_partial_gemma_quote_marker(value: str) -> str:CODE
LOWexamples/server/server.py5585 def _advance_direct_tool_call_state(self, text: str) -> Tuple[bool, List[Dict[str, Any]]]:CODE
LOWexamples/server/server.py5836 def _advance_direct_stream_state(self, text: str) -> Tuple[bool, List[Dict[str, Any]]]:CODE
LOWexamples/server/server.py6673 def _partial_regex_key_value_item(CODE
LOWexamples/server/server.py6708 def _trim_partial_tool_call_prefix(CODE
LOWexamples/server/server.py7172 def _normalize_tool_call_item(CODE
LOWexamples/server/server.py7255 def _serialize_partial_json_prefix(cls, value: Any) -> str:CODE
LOWexamples/server/server.py7302 def _contains_partial_json_value(cls, value: Any) -> bool:CODE
LOWexamples/server/server.py7314 def _serialize_partial_json_state(cls, value: Any) -> Tuple[str, bool]:CODE
LOWexamples/server/server.py7357 def _serialize_tool_arguments(cls, arguments: Any, *, partial: bool = False) -> str:CODE
LOWexamples/server/server.py7897 def _tools_for_response_parser(CODE
LOWexamples/server/server.py7933 def _response_reasoning_effort(CODE
LOWexamples/server/server.py7945 def _response_text_from_content(content: Any) -> str:CODE
LOWexamples/server/server.py7969 def _response_chat_content_from_content(CODE
237 more matches not shown…
Deep Nesting65 hits · 40 pts
SeverityFileLineSnippetContext
LOWdocker/open_llama/hug_model.py29CODE
LOWexamples/low_level_api/low_level_api_chat_cpp.py338CODE
LOWexamples/low_level_api/low_level_api_chat_cpp.py699CODE
LOWexamples/server/server.py15737CODE
LOWexamples/server/server.py329CODE
LOWexamples/server/server.py364CODE
LOWexamples/server/server.py526CODE
LOWexamples/server/server.py1818CODE
LOWexamples/server/server.py2239CODE
LOWexamples/server/server.py3503CODE
LOWexamples/server/server.py4529CODE
LOWexamples/server/server.py5419CODE
LOWexamples/server/server.py5585CODE
LOWexamples/server/server.py5836CODE
LOWexamples/server/server.py6003CODE
LOWexamples/server/server.py6380CODE
LOWexamples/server/server.py6734CODE
LOWexamples/server/server.py7366CODE
LOWexamples/server/server.py7687CODE
LOWexamples/server/server.py8137CODE
LOWexamples/server/server.py8698CODE
LOWexamples/server/server.py8952CODE
LOWexamples/server/server.py9308CODE
LOWexamples/server/server.py9492CODE
LOWexamples/server/server.py10021CODE
LOWexamples/server/server.py10998CODE
LOWexamples/server/server.py11235CODE
LOWexamples/server/server.py11582CODE
LOWexamples/server/server.py12744CODE
LOWexamples/server/server.py13363CODE
LOWexamples/server/server.py13537CODE
LOWexamples/server/server.py13764CODE
LOWexamples/server/server.py13860CODE
LOWexamples/server/server.py14313CODE
LOWexamples/server/server.py15866CODE
LOWexamples/server/server.py15911CODE
LOWexamples/server/server.py16174CODE
LOWexamples/server/server.py330CODE
LOWexamples/server/server.py377CODE
LOWllama_cpp/llama_chat_format.py1461CODE
LOWllama_cpp/llama_chat_format.py1824CODE
LOWllama_cpp/llama_chat_format.py4131CODE
LOWllama_cpp/llama_chat_format.py1491CODE
LOWllama_cpp/llama_chat_format.py1575CODE
LOWllama_cpp/llama_chat_format.py1875CODE
LOWllama_cpp/llama_chat_format.py2140CODE
LOWllama_cpp/llama_chat_format.py2852CODE
LOWllama_cpp/llama_chat_format.py3140CODE
LOWllama_cpp/llama_chat_format.py3402CODE
LOWllama_cpp/llama_chat_format.py3673CODE
LOWllama_cpp/llama_chat_format.py1625CODE
LOWllama_cpp/llama.py60CODE
LOWllama_cpp/llama.py697CODE
LOWllama_cpp/llama.py847CODE
LOWllama_cpp/llama.py1188CODE
LOWllama_cpp/_ctypes_extensions.py26CODE
LOWllama_cpp/llama_grammar.py439CODE
LOWllama_cpp/llama_grammar.py500CODE
LOWllama_cpp/llama_grammar.py697CODE
LOWllama_cpp/llama_grammar.py446CODE
5 more matches not shown…
Unused Imports40 hits · 34 pts
SeverityFileLineSnippetContext
LOWtests/test_llama.py1CODE
LOWtests/test_llama.py6CODE
LOWexamples/low_level_api/ReasonAct.py2CODE
LOWexamples/server/server.py17CODE
LOWexamples/server/server.py39CODE
LOWexamples/batch-processing/server.py26CODE
LOWllama_cpp/llama_cache.py14CODE
LOWllama_cpp/llama_tokenizer.py1CODE
LOWllama_cpp/llama_chat_format.py1CODE
LOWllama_cpp/__init__.py1CODE
LOWllama_cpp/__init__.py2CODE
LOWllama_cpp/llama_cpp.py1CODE
LOWllama_cpp/llama_cpp.py16CODE
LOWllama_cpp/llama_cpp.py23CODE
LOWllama_cpp/llama_cpp.py23CODE
LOWllama_cpp/llama_cpp.py23CODE
LOWllama_cpp/_internals.py1CODE
LOWllama_cpp/_internals.py7CODE
LOWllama_cpp/_internals.py22CODE
LOWllama_cpp/llama.py1CODE
LOWllama_cpp/llama.py33CODE
LOWllama_cpp/llama.py35CODE
LOWllama_cpp/llama.py35CODE
LOWllama_cpp/llama.py35CODE
LOWllama_cpp/mtmd_cpp.py1CODE
LOWllama_cpp/mtmd_cpp.py5CODE
LOWllama_cpp/mtmd_cpp.py5CODE
LOWllama_cpp/_ctypes_extensions.py1CODE
LOWllama_cpp/llama_cpp_ext.py7CODE
LOWllama_cpp/llava_cpp.py1CODE
LOWllama_cpp/llava_cpp.py4CODE
LOWllama_cpp/server/types.py1CODE
LOWllama_cpp/server/model.py1CODE
LOWllama_cpp/server/cli.py1CODE
LOWllama_cpp/server/settings.py1CODE
LOWllama_cpp/server/app.py1CODE
LOWllama_cpp/server/errors.py1CODE
LOWllama_cpp/server/errors.py6CODE
LOWllama_cpp/server/errors.py6CODE
LOWllama_cpp/server/__main__.py25CODE
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHllama_cpp/llama.py123Load a llama.cpp model from `model_path`. Examples: Basic usage >>> import llama_cpp STRING
HIGHllama_cpp/llama.py598Tokenize a string. Args: text: The utf-8 encoded string to tokenize. add_bos: Whether tSTRING
HIGHllama_cpp/llama.py868Create a generator of tokens from a prompt. Examples: >>> llama = Llama("models/ggml-7b.bin") STRING
HIGHllama_cpp/llama.py1836Generate text from a prompt. Args: prompt: The prompt to generate text from. suffix: A STRING
HIGHllama_cpp/llama.py1933Generate text from a prompt. Args: prompt: The prompt to generate text from. suffix: A STRING
Self-Referential Comments8 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMdocker/open_llama/hug_model.py44 # Creating a symbolic link from destination to "model.bin"COMMENT
MEDIUMdocker/open_llama/hug_model.py74 # Create an argument parserCOMMENT
MEDIUMdocker/open_llama/hug_model.py92 # Define the parametersCOMMENT
MEDIUMscripts/releases-to-pep-503.sh33# Create an index html fileCOMMENT
MEDIUMscripts/releases-to-pep-503.sh49# Create an index html file in llama-cpp-python directoryCOMMENT
MEDIUMllama_cpp/llama_chat_format.py3160 """This method is no longer used in the new implementation."""STRING
MEDIUMllama_cpp/_internals.py635 # This method is deprecated in favor of using LlamaSampler directlyCOMMENT
MEDIUMllama_cpp/_internals.py874 # Create a new wrapper around the cloned samplerCOMMENT
Excessive Try-Catch Wrapping29 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMdocker/open_llama/hug_model.py135 print("Error - model choice was None")CODE
MEDIUMexamples/server/server.py3273def resolve_model_path(self) -> str:CODE
LOWexamples/server/server.py9349 except Exception:CODE
LOWexamples/server/server.py10829 except Exception:CODE
LOWexamples/server/server.py12461 except Exception:CODE
LOWexamples/server/server.py12480 except Exception: # noqa: BLE001CODE
LOWexamples/server/server.py13208 except Exception: # noqa: BLE001CODE
LOWexamples/server/server.py13282 except Exception: # noqa: BLE001CODE
LOWexamples/server/server.py13331 except Exception: # noqa: BLE001CODE
LOWexamples/server/server.py16229 except Exception:CODE
LOWexamples/server/server.py3194 except Exception:STRING
LOWexamples/server/server.py3232 except Exception as exc:STRING
LOWexamples/server/server.py3244 except Exception:STRING
LOWexamples/server/server.py3303 except Exception as exc:STRING
LOWllama_cpp/llama_chat_format.py718 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py1011 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py1738 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py2095 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py3085 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py3619 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py4314 except Exception as e:CODE
LOWllama_cpp/llama_chat_format.py4433 except Exception as e:CODE
LOWllama_cpp/llama.py487 except Exception as e:CODE
LOWllama_cpp/_ctypes_extensions.py93 except Exception as e:CODE
LOWllama_cpp/_ctypes_extensions.py103 except Exception as e:CODE
LOWllama_cpp/llama_grammar.py33 except Exception as err:CODE
LOWllama_cpp/server/errors.py180 except Exception as exc:CODE
LOWllama_cpp/server/errors.py198 except Exception:CODE
LOWllama_cpp/server/__main__.py80 except Exception as e:CODE
Over-Commented Block30 hits · 15 pts
SeverityFileLineSnippetContext
LOWexamples/server/server.py1#!/usr/bin/env -S uv run --scriptCOMMENT
LOWllama_cpp/llama_cpp.py61# GGML_TYPE_Q4_0 = 2,COMMENT
LOWllama_cpp/llama_cpp.py81# GGML_TYPE_IQ2_S = 22,COMMENT
LOWllama_cpp/llama_cpp.py201llama_token_p = ctypes.POINTER(llama_token)COMMENT
LOWllama_cpp/llama_cpp.py241# LLAMA_VOCAB_PRE_TYPE_MPT = 5,COMMENT
LOWllama_cpp/llama_cpp.py261# LLAMA_VOCAB_PRE_TYPE_EXAONE = 25,COMMENT
LOWllama_cpp/llama_cpp.py341LLAMA_TOKEN_TYPE_CONTROL = 3COMMENT
LOWllama_cpp/llama_cpp.py381# // LLAMA_FTYPE_MOSTLY_Q4_3 = 6, // support has been removedCOMMENT
LOWllama_cpp/llama_cpp.py401# LLAMA_FTYPE_MOSTLY_IQ3_S = 26, // except 1d tensorsCOMMENT
LOWllama_cpp/llama_cpp.py461# enum llama_rope_scaling_type {COMMENT
LOWllama_cpp/llama_cpp.py501# enum llama_flash_attn_type {COMMENT
LOWllama_cpp/llama_cpp.py601# //COMMENT
LOWllama_cpp/llama_cpp.py661# enum llama_model_kv_override_type {COMMENT
LOWllama_cpp/llama_cpp.py781# ggml_backend_buffer_type_t buft;COMMENT
LOWllama_cpp/llama_cpp.py801# // Called with a progress value between 0.0 and 1.0. Pass NULL to disable.COMMENT
LOWllama_cpp/llama_cpp.py901COMMENT
LOWllama_cpp/llama_cpp.py921# float rope_freq_base; // RoPE base frequency, 0 = from modelCOMMENT
LOWllama_cpp/llama_cpp.py941COMMENT
LOWllama_cpp/llama_cpp.py1101# enum ggml_type output_tensor_type; // output tensor typeCOMMENT
LOWllama_cpp/llama_cpp.py1301COMMENT
LOWllama_cpp/llama_cpp.py1341# // Optional: an auto threadpool gets created in ggml if not passed explicitlyCOMMENT
LOWllama_cpp/llama_cpp.py2221COMMENT
LOWllama_cpp/llama_cpp.py2901LLAMA_STATE_SEQ_FLAGS_NONE = 0COMMENT
LOWllama_cpp/llama_cpp.py3021COMMENT
LOWllama_cpp/llama_cpp.py3081# // Process a batch of tokens.COMMENT
LOWllama_cpp/llama_cpp.py3201COMMENT
LOWllama_cpp/llama_cpp.py3981# /// @param add_special Allow to add BOS and EOS tokens if model is configured to do so.COMMENT
LOWllama_cpp/llama_cpp.py4081# /// @details Convert the provided tokens into text (inverse of llama_tokenize()).COMMENT
LOWllama_cpp/llama_cpp.py4141# /// @param n_msg Number of llama_chat_message in this chatCOMMENT
LOWllama_cpp/llama_cpp.py4241# // user code can implement the interface below in order to create custom llama_samplerCOMMENT
Cross-Language Confusion2 hits · 12 pts
SeverityFileLineSnippetContext
HIGHtests/test_llama_chat_format.py75 "pad_token": null,CODE
HIGHllama_cpp/llama_cache.py138 # self.cache.push(_key, side="front") # type: ignoreCOMMENT
Redundant / Tautological Comments7 hits · 10 pts
SeverityFileLineSnippetContext
LOWscripts/get-releases.sh20 # Check if the response is valid JSONCOMMENT
LOWscripts/releases-to-pep-503.sh24# Check if all_releases.txt existsCOMMENT
LOW.github/workflows/build-wheels-cuda.yaml272 # Set tag_name to <tag>-cu<cuda_version>.COMMENT
LOWllama_cpp/llama_chat_format.py2818 # Check if vision is supportedCOMMENT
LOWllama_cpp/llama.py1468 # Check if stop sequence is in the tokenCOMMENT
LOWllama_cpp/server/app.py110 # Check if yaml fileCOMMENT
LOWllama_cpp/server/__main__.py63 # Check if yaml fileCOMMENT
AI Structural Patterns16 hits · 10 pts
SeverityFileLineSnippetContext
LOWexamples/server/server.py11235CODE
LOWllama_cpp/llama_chat_format.py1461CODE
LOWllama_cpp/llama_chat_format.py1824CODE
LOWllama_cpp/llama_chat_format.py4131CODE
LOWllama_cpp/llama_chat_format.py69CODE
LOWllama_cpp/llama_chat_format.py613CODE
LOWllama_cpp/llama_chat_format.py2852CODE
LOWllama_cpp/llama_chat_format.py3402CODE
LOWllama_cpp/llama.py60CODE
LOWllama_cpp/llama.py697CODE
LOWllama_cpp/llama.py785CODE
LOWllama_cpp/llama.py847CODE
LOWllama_cpp/llama.py1188CODE
LOWllama_cpp/llama.py1808CODE
LOWllama_cpp/llama.py1905CODE
LOWllama_cpp/llama.py1997CODE
Modern AI Meta-Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md310 # n_ctx=2048, # Uncomment to increase the context windowCOMMENT
MEDIUMREADME.md314 max_tokens=32, # Generate up to 32 tokens, set to None to generate up to the end of the context windowCODE
MEDIUMllama_cpp/llama.py1346 # Truncate max_tokens if requested tokens would exceed the context windowCOMMENT
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOWllama_cpp/llama_types.py300# NOTE: The following type names are not part of the OpenAI OpenAPI specificationCOMMENT
LOWllama_cpp/llama_cpp.py4138# /// NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https:/COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMllama_cpp/llama_cpp.py2998# // NOTE: this is a helper function to facilitate transition to the new batch API - avoid using itCOMMENT
Modern Structural Boilerplate4 hits · 1 pts
SeverityFileLineSnippetContext
LOWexamples/server/server.py12176 def set_draft_processing_enabled(self, enabled: bool) -> None:CODE
LOWexamples/server/server.py1201 def set_target_processing_enabled(self, enabled: bool) -> None:STRING
LOWexamples/server/server.py1398 def set_target_processing_enabled(self, enabled: bool) -> None:STRING
LOWexamples/server/server.py1461 def _set_nextn_layer_offset(self, offset: int) -> None:STRING