Repository Analysis

ggml-org/llama.cpp

LLM inference in C/C++

3.7 Likely human-written View on GitHub
3.7
Adjusted Score
3.7
Raw Score
100%
Time Factor
2026-05-30
Last Push
113,758
Stars
C++
Language
685,017
Lines of Code
1978
Files
1859
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 4HIGH 72MEDIUM 165LOW 1618

Pattern Findings

1859 matches across 20 categories. Click a row to expand file-level details.

Over-Commented Block823 hits · 806 pts
SeverityFileLineSnippet
LOWtools/quantize/quantize.cpp1#include "llama.h"
LOWtools/ui/embed.cpp1// llama-ui-embed: generate ui.cpp / ui.h that embed UI assets as C arrays.
LOWtools/ui/scripts/dev.sh1#!/bin/bash
LOWtools/cvector-generator/pca.hpp1#include "common.h"
LOWtools/cvector-generator/cvector-generator.cpp1#include "ggml.h"
LOWtools/cvector-generator/cvector-generator.cpp21#include <algorithm>
LOWtools/mtmd/mtmd.h1#ifndef MTMD_H
LOWtools/mtmd/mtmd.h41# define MTMD_API __declspec(dllimport)
LOWtools/mtmd/mtmd.h121// whether the current model supports vision input
LOWtools/mtmd/mtmd.h201};
LOWtools/mtmd/mtmd-helper.cpp1// fix problem with std::min and std::max
LOWtools/mtmd/mtmd-helper.cpp21#ifndef MTMD_AUDIO_DEBUG
LOWtools/mtmd/mtmd.cpp1#include "clip.h"
LOWtools/mtmd/clip.cpp1#include "clip.h"
LOWtools/mtmd/mtmd-helper.h1#ifndef MTMD_HELPER_H
LOWtools/mtmd/mtmd-helper.h21//
LOWtools/mtmd/mtmd-helper.h41MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_buf(mtmd_context * ctx, const unsigned char * buf, size_t len);
LOWtools/mtmd/clip-impl.h1#pragma once
LOWtools/mtmd/clip-impl.h21#define KEY_NAME "general.name"
LOWtools/mtmd/clip-impl.h41#define KEY_IMAGE_MAX_PIXELS "clip.vision.image_max_pixels"
LOWtools/mtmd/clip-impl.h61#define KEY_SAM_N_HEAD "clip.vision.sam.head_count"
LOWtools/mtmd/clip-impl.h81#define TN_CLASS_EMBD "v.class_embd"
LOWtools/mtmd/clip-impl.h101#define TN_LS_2 "%s.blk.%d.ls2.%s" // layer scale
LOWtools/mtmd/clip-impl.h121#define TN_MM_PROJECTOR "mm.model.fc.%s" // idefics3, deepseekocr
LOWtools/mtmd/clip-impl.h141#define TN_VIT_MERGER_ATTN_Q "v.vit_merger.attn_q.%s"
LOWtools/mtmd/clip-impl.h161#define TN_MM_AUDIO_FC "mm.a.fc.%s" // fully connected layer
LOWtools/mtmd/clip-impl.h181#define TN_SAM_PRE_NORM "v.sam.blk.%d.pre_ln.%s"
LOWtools/mtmd/clip-impl.h201#define TN_NORM_CONV "%s.blk.%d.norm_conv.%s"
LOWtools/mtmd/clip-impl.h221#define TN_QF_CROSS_ATTN_K "a.proj_blk.%d.cross_attn_k.%s"
LOWtools/mtmd/clip-impl.h241#define TN_A_FFN_POST_NORM "%s.blk.%d.ffn_post_norm.%s"
LOWtools/mtmd/clip-impl.h261#define TN_MNV5_BLK_PW_EXP_BN "v.blk.%d.%d.pw_exp.bn.weight"
LOWtools/mtmd/clip-impl.h281#define TN_MNV5_MSFA_FFN_PROJ_BN "v.msfa.ffn.pw_proj.bn.weight"
LOWtools/mtmd/mtmd-audio.cpp1#include "mtmd-audio.h"
LOWtools/mtmd/mtmd-cli.cpp1#include "arg.h"
LOW…ls/mtmd/legacy-models/convert_image_encoder_to_gguf.py281 block_count = v_hparams["num_hidden_layers"] - 1 if has_llava_projector else v_hparams["num_hidden_layers"]
LOW…ls/mtmd/legacy-models/convert_image_encoder_to_gguf.py301 # [
LOW…egacy-models/minicpmv-convert-image-encoder-to-gguf.py1# coding=utf-8
LOWtools/mtmd/models/mimovl.cpp1#include "models.h"
LOWtools/mtmd/debug/mtmd-debug.cpp1#include "mtmd-debug.h"
LOWtools/completion/completion.cpp1#include "arg.h"
LOWtools/completion/completion.cpp21#include <unistd.h>
LOWtools/server/server-common.h1#pragma once
LOWtools/server/server-http.cpp1#include "common.h"
LOWtools/server/server-task.cpp1#include "server-task.h"
LOWtools/server/server-common.cpp1#include "common.h"
LOWtools/server/server-common.cpp1441 const bool spm_infill,
LOWtools/server/server-context.cpp1
LOWtools/server/server-context.cpp21#include <cinttypes>
LOWtools/server/server-context.cpp3181 // | Eagle3 | yes |
LOWtools/server/server-context.cpp3201 // if (llama_model_has_encoder(model_dft.get())) {
LOWtools/server/server-http.h1#pragma once
LOWtools/server/server-chat.cpp281 if (response_body.contains("max_output_tokens")) {
LOWtools/server/server-models.cpp1#include "server-common.h"
LOWtools/server/server-models.cpp21#include <filesystem>
LOWtools/server/server-queue.cpp1#include "server-task.h"
LOWtools/server/server-tools.cpp1#include "server-tools.h"
LOWtools/server/server.cpp1#include "server-context.h"
LOWtools/server/tests/unit/test_tool_call.py121 assert expected_function_name == tool_call["function"]["name"], f'Expected tool name to be {tool_call["function"]["n
LOWtools/server/tests/unit/test_tool_call.py141# def test_completion_with_required_tool_tiny_fast(template_name: str, tool: dict, argument_key: str | None, stream: Com
LOWtools/server/tests/unit/test_tool_call.py161# # Functionary v3.2 format supports raw python content, which w/ a dummy stories model will never end on its own.
763 more matches not shown…
Cross-File Repetition59 hits · 295 pts
SeverityFileLineSnippet
HIGH…legacy-models/glmedge-convert-image-encoder-to-gguf.py0returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings
HIGH…ls/mtmd/legacy-models/convert_image_encoder_to_gguf.py0returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings
HIGH…egacy-models/minicpmv-convert-image-encoder-to-gguf.py0returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings
HIGHtests/test-grammar-llguidance.cpp0({ "type": "integer", "minimum": 5, "maximum": 30 })
HIGHtests/test-grammar-integration.cpp0({ "type": "integer", "minimum": 5, "maximum": 30 })
HIGHtests/test-json-schema-to-grammar.cpp0({ "type": "integer", "minimum": 5, "maximum": 30 })
HIGHtests/test-grammar-llguidance.cpp0({ "type": "integer", "minimum": -123, "maximum": 42 })
HIGHtests/test-grammar-integration.cpp0({ "type": "integer", "minimum": -123, "maximum": 42 })
HIGHtests/test-json-schema-to-grammar.cpp0({ "type": "integer", "minimum": -123, "maximum": 42 })
HIGHtests/test-grammar-llguidance.cpp0({ "items": [ { "format": "date" }, { "format": "uuid" }, { "format": "time" }, { "format": "date-time" } ] })
HIGHtests/test-grammar-integration.cpp0({ "items": [ { "format": "date" }, { "format": "uuid" }, { "format": "time" }, { "format": "date-time" } ] })
HIGHtests/test-json-schema-to-grammar.cpp0({ "items": [ { "format": "date" }, { "format": "uuid" }, { "format": "time" }, { "format": "date-time" } ] })
HIGHtests/test-grammar-llguidance.cpp0({ "type": "string", "minlength": 1, "maxlength": 4 })
HIGHtests/test-grammar-integration.cpp0({ "type": "string", "minlength": 1, "maxlength": 4 })
HIGHtests/test-json-schema-to-grammar.cpp0({ "type": "string", "minlength": 1, "maxlength": 4 })
HIGHtests/test-grammar-llguidance.cpp0({ "enum": ["red", "amber", "green", null, 42, ["foo"]] })
HIGHtests/test-grammar-integration.cpp0({ "enum": ["red", "amber", "green", null, 42, ["foo"]] })
HIGHtests/test-json-schema-to-grammar.cpp0({ "enum": ["red", "amber", "green", null, 42, ["foo"]] })
HIGHtests/test-grammar-llguidance.cpp0({ "items": { "type": ["number", "integer"] }, "minitems": 3, "maxitems": 5 })
HIGHtests/test-grammar-integration.cpp0({ "items": { "type": ["number", "integer"] }, "minitems": 3, "maxitems": 5 })
HIGHtests/test-json-schema-to-grammar.cpp0({ "items": { "type": ["number", "integer"] }, "minitems": 3, "maxitems": 5 })
HIGHtests/test-grammar-llguidance.cpp0({ "type": "object", "properties": { "number": { "type": "number" }, "street_name": { "type": "string" }, "street_type":
HIGHtests/test-grammar-llguidance.cpp0({ "type": "object", "properties": { "number": { "type": "number" }, "street_name": { "type": "string" }, "street_type":
HIGHtests/test-grammar-integration.cpp0({ "type": "object", "properties": { "number": { "type": "number" }, "street_name": { "type": "string" }, "street_type":
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania" })
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania" })
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania" })
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania" })
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania" })
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania" })
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type": "avenue" })
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type": "avenue" })
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type": "avenue" })
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type": "avenue" })
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type": "avenue" })
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type": "avenue" })
HIGHtests/test-grammar-llguidance.cpp0({ "number": "1600", "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-llguidance.cpp0({ "number": "1600", "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-llguidance.cpp0({ "number": "1600", "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-integration.cpp0({ "number": "1600", "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-integration.cpp0({ "number": "1600", "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-integration.cpp0({ "number": "1600", "street_name": "pennsylvania", "street_type":"avenue"})
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue", "direction":"nw"})
HIGHtests/test-grammar-llguidance.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue", "direction":"nw"})
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue", "direction":"nw"})
HIGHtests/test-grammar-integration.cpp0({ "number": 1600, "street_name": "pennsylvania", "street_type":"avenue", "direction":"nw"})
HIGHtests/test-grammar-llguidance.cpp0({ "properties": { "b": {"type": "string"}, "a": {"type": "string"}, "d": {"type": "string"}, "c": {"type": "string"} },
HIGHtests/test-grammar-integration.cpp0({ "properties": { "b": {"type": "string"}, "a": {"type": "string"}, "d": {"type": "string"}, "c": {"type": "string"} },
HIGHtests/test-json-schema-to-grammar.cpp0({ "properties": { "b": {"type": "string"}, "a": {"type": "string"}, "d": {"type": "string"}, "c": {"type": "string"} },
HIGHtests/test-json-schema-to-grammar.cpp0( array ::= "[" space ( value ("," space value)* )? "]" space boolean ::= ("true" | "false") space char ::= [^"\\\x7f\x0
HIGHtests/test-json-schema-to-grammar.cpp0( array ::= "[" space ( value ("," space value)* )? "]" space boolean ::= ("true" | "false") space char ::= [^"\\\x7f\x0
HIGHtests/test-json-schema-to-grammar.cpp0( array ::= "[" space ( value ("," space value)* )? "]" space boolean ::= ("true" | "false") space char ::= [^"\\\x7f\x0
HIGHexamples/llama-eval/llama-eval.py0solve the following math problem step by step. put your answer inside \\boxed{{}}. {question} remember to put your answe
HIGHexamples/llama-eval/llama-eval.py0solve the following math problem step by step. put your answer inside \\boxed{{}}. {question} remember to put your answe
HIGHexamples/llama-eval/llama-eval.py0solve the following math problem step by step. put your answer inside \\boxed{{}}. {question} remember to put your answe
Hyper-Verbose Identifiers290 hits · 281 pts
SeverityFileLineSnippet
LOWtools/ui/tests/unit/agentic-strip.test.ts11function stripLegacyContextMarkers(content: string): string {
LOW…ls/ui/src/lib/contexts/chat-settings-config.context.ts12export function setChatSettingsConfigContext(
LOW…ls/ui/src/lib/contexts/chat-settings-config.context.ts18export function getChatSettingsConfigContext(): ChatSettingsConfigContext {
LOWtools/ui/src/lib/stores/agentic.svelte.ts985export function agenticPendingPermissionRequest(conversationId: string) {
LOWtools/ui/src/lib/stores/agentic.svelte.ts993export function agenticPendingContinueRequest(conversationId: string) {
LOWtools/ui/src/lib/stores/agentic.svelte.ts1001export function agenticHasPendingSteeringMessage(conversationId: string) {
LOWtools/ui/src/lib/stores/agentic.svelte.ts1005export function agenticInjectSteeringMessage(
LOWtools/ui/src/lib/stores/agentic.svelte.ts1013export function agenticPendingSteeringMessageContent(conversationId: string) {
LOWtools/ui/src/lib/stores/agentic.svelte.ts1017export function agenticPendingSteeringMessageExtras(conversationId: string) {
LOWtools/ui/src/lib/stores/agentic.svelte.ts1021export function agenticClearSteeringMessage(conversationId: string) {
LOWtools/ui/src/lib/utils/audio-recording.ts249export function isAudioRecordingSupported(): boolean {
LOWtools/ui/src/lib/utils/sanitize.ts21export function sanitizeKeyValuePairValue(raw: string): string {
LOWtools/ui/src/lib/utils/modality-file-validation.ts17export function isFileTypeSupportedByModel(
LOWtools/ui/src/lib/utils/modality-file-validation.ts134export function generateModalityErrorMessage(
LOWtools/ui/src/lib/utils/clipboard.ts103export function formatMessageForClipboard(
LOWtools/ui/src/lib/utils/clipboard.ts255function isValidMcpPromptAttachment(obj: unknown): obj is {
LOWtools/ui/src/lib/utils/text.ts15export function generateConversationTitle(content: string, useFirstLine: boolean = false): string {
LOWtools/ui/src/lib/utils/mcp.ts41export function detectMcpTransportFromUrl(url: string): MCPTransportType {
LOWtools/ui/src/lib/utils/code.ts51export function detectIncompleteCodeBlock(markdown: string): IncompleteCodeBlock | null {
LOWtools/ui/src/lib/utils/image-error-fallback.ts5export function getImageErrorFallbackHtml(src: string): string {
LOWtools/ui/src/lib/utils/agentic.ts179export function parseToolResultWithImages(
LOWtools/ui/src/lib/utils/convert-files-to-extra.ts30export async function parseFilesToMessageExtras(
LOWtools/ui/src/lib/utils/file-type.ts110export function getFileTypeCategoryByExtension(filename: string): FileTypeCategory | null {
LOWtools/ui/src/lib/utils/process-uploaded-files.ts51export async function processFilesToChatUploaded(
LOWtools/ui/src/lib/utils/request-helpers.ts87export function formatDiagnosticErrorMessage(error: unknown): string {
LOWtools/ui/src/lib/utils/attachment-display.ts47export function getAttachmentDisplayItems(
LOW…ttings/SettingsChat/SettingsChatImportExportTab.svelte44 function handleSettingsExportConfirm() {
LOW…ttings/SettingsChat/SettingsChatImportExportTab.svelte68 function handleSettingsExportCancel() {
LOW…s/app/chat/ChatMessages/ChatMessage/ChatMessage.svelte322 function handleShowDeleteDialogChange(show: boolean) {
LOW…i/src/lib/components/app/chat/ChatForm/ChatForm.svelte411 function handleInlineResourcePickerClose() {
LOW…i/src/lib/components/app/chat/ChatForm/ChatForm.svelte417 function handleInlineResourceSelect() {
LOW…c/lib/components/app/chat/ChatScreen/ChatScreen.svelte180 function handleProcessingInfoVisibility(visible: boolean) {
LOW…c/lib/components/app/chat/ChatScreen/ChatScreen.svelte204 function handleErrorDialogOpenChange(open: boolean) {
LOW…tion/SidebarNavigation/SidebarNavigationActions.svelte27 function handleSearchModeDeactivate() {
LOW…/navigation/SidebarNavigation/SidebarNavigation.svelte113 export function handleMobileSidebarItemClick() {
LOW…nts/app/content/MarkdownContent/MarkdownContent.svelte292 function handlePreviewDialogOpenChange(open: boolean) {
LOW…ownContent/plugins/rehype/resolve-attachment-images.ts10export function rehypeResolveAttachmentImages(options: { attachments?: DatabaseMessageExtra[] }) {
LOW…omponents/app/dialogs/DialogMcpResourcesBrowser.svelte128 async function handleAttachTemplateResource() {
LOW…omponents/app/dialogs/DialogMcpResourcesBrowser.svelte204 function getAllResourcesFlatInTreeOrder(): MCPResourceInfo[] {
LOWtools/ui/src/lib/hooks/use-auto-scroll.svelte.ts212export function createAutoScrollController(options: AutoScrollOptions = {}): AutoScrollController {
LOWtools/mtmd/legacy-models/llava_surgery_v2.py65def clean_vision_tower_from_checkpoint(checkpoint_path):
LOWtools/mtmd/legacy-models/llava_surgery_v2.py101def find_relevant_checkpoints(checkpoint_paths, newline_criteria, projector):
LOW…ls/mtmd/legacy-models/convert_image_encoder_to_gguf.py233def get_non_negative_vision_feature_layers(v_hparams):
LOWtools/server/bench/speed-bench/speed_bench.py139def parse_completion_response(data: dict[str, Any]) -> tuple[dict[str, Any], dict[str, Any], str | None, str]:
LOWtools/server/tests/conftest.py7def stop_server_after_each_test():
LOWtools/server/tests/unit/test_infill.py12def test_infill_without_input_extra():
LOWtools/server/tests/unit/test_infill.py24def test_infill_with_input_extra():
LOWtools/server/tests/unit/test_infill.py47def test_invalid_input_extra_req(input_extra):
LOWtools/server/tests/unit/test_basic.py99def test_server_model_aliases_and_tags():
LOWtools/server/tests/unit/test_security.py17def test_access_public_endpoint(endpoint: str):
LOWtools/server/tests/unit/test_security.py25def test_access_static_assets_without_api_key():
LOWtools/server/tests/unit/test_security.py61def test_correct_api_key_anthropic_header():
LOWtools/server/tests/unit/test_security.py74def test_openai_library_correct_api_key():
LOWtools/server/tests/unit/test_router.py32def test_router_chat_completion_stream(model: str, success: bool):
LOWtools/server/tests/unit/test_router.py118def test_router_models_max_evicts_lru():
LOWtools/server/tests/unit/test_router.py147def test_router_no_models_autoload():
LOWtools/server/tests/unit/test_router.py180def test_router_api_key_required():
LOWtools/server/tests/unit/test_router.py216def test_router_reload_models():
LOWtools/server/tests/unit/test_ctx_shift.py50def test_ctx_shift_disabled_short_prompt(n_predict: int, n_token_output: int, truncated: bool):
LOWtools/server/tests/unit/test_ctx_shift.py63def test_ctx_shift_disabled_long_prompt():
230 more matches not shown…
Decorative Section Separators70 hits · 222 pts
SeverityFileLineSnippet
MEDIUMtools/mtmd/clip.cpp3424 // ├─────┤ │
MEDIUMtools/mtmd/clip.cpp3426 // ├─────┤ │
MEDIUMtools/mtmd/clip.cpp3428 // └─────┘ │
MEDIUMtools/mtmd/clip.cpp3429 // ──────┘ x B
MEDIUM…com/arm/aichat/internal/gguf/GgufMetadataReaderImpl.kt120 // ── 1. header ──────────────────────────────────────────────────────────
MEDIUM…com/arm/aichat/internal/gguf/GgufMetadataReaderImpl.kt129 // ── 3. build structured object ────────────────────────────────────────
MEDIUMexamples/llama.android/lib/src/main/cpp/CMakeLists.txt14# --------------------------------------------------------------------------
MEDIUMexamples/llama.android/lib/src/main/cpp/CMakeLists.txt16# --------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py17# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py19# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py77# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py79# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py242# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py244# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py273# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py275# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py1076# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py1078# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py1089# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-function-call.py1091# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py29# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py31# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py97# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py99# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py254# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py256# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py337# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py339# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py372# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py374# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py913# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py915# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py927# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-parallel-tc.py929# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py29# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py31# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py100# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py102# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py258# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py260# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py355# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py357# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py970# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py972# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py984# ---------------------------------------------------------------------------
MEDIUMscripts/server-test-structured.py986# ---------------------------------------------------------------------------
MEDIUMscripts/jinja/jinja-tester.py157# ------------------------
MEDIUMscripts/jinja/jinja-tester.py159# ------------------------
MEDIUMscripts/jinja/jinja-tester.py287# ------------------------
MEDIUMscripts/jinja/jinja-tester.py289# ------------------------
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py121# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py123# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py230# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py232# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py271# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py273# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py365# ---------------------------------------------------------------------------
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py367# ---------------------------------------------------------------------------
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py515# =============================================================================
MEDIUMscripts/snapdragon/qdc/run_qdc_jobs.py517# =============================================================================
10 more matches not shown…
Excessive Try-Catch Wrapping113 hits · 188 pts
SeverityFileLineSnippet
LOWconvert_hf_to_gguf_update.py267 except Exception as e:
LOWconvert_hf_to_gguf_update.py302 except Exception as e:
LOWtools/server/bench/bench.py58 except Exception:
LOWtools/server/bench/bench.py84 except Exception:
LOWtools/server/bench/speed-bench/speed_bench.py252 except Exception as exc:
LOWtools/server/bench/speed-bench/speed_bench.py389 except Exception as exc:
LOWtools/server/bench/speed-bench/speed_bench_compare.py73 except Exception as exc:
LOWtools/server/tests/utils.py296 except Exception as e:
LOWtools/server/tests/utils.py321 except Exception as e:
MEDIUMtools/server/tests/utils.py322 print(f"Error waiting for server: {e}")
LOWtools/server/tests/utils.py631 except Exception as e:
MEDIUMtools/server/tests/utils.py627def worker(index, func, args):
LOWgguf-py/gguf/scripts/gguf_editor_gui.py923 except Exception as e:
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1588 except Exception as e:
MEDIUMexamples/pydantic_models_to_grammar_examples.py66 print(f"Error: unknown tool {json_data['function']}")
MEDIUMexamples/pydantic_models_to_grammar_examples.py142 print(f"Error: unknown tool {json_data['function']}")
MEDIUMexamples/pydantic_models_to_grammar_examples.py285 print(f"Error: unknown tool {call['function']}")
MEDIUMexamples/pydantic_models_to_grammar.py1001 print(f"An error occurred while saving the grammar file: {e}")
MEDIUMexamples/pydantic_models_to_grammar.py1008 print(f"An error occurred while saving the documentation file: {e}")
LOWexamples/llama-eval/llama-eval.py1055 except Exception as e:
LOWexamples/llama-eval/llama-eval.py1097 except Exception as e:
LOWexamples/llama-eval/llama-eval.py1137 except Exception as e:
MEDIUMexamples/llama-eval/llama-eval.py1138 print(f"Error: Cannot reach server {server_config.name} ({server_config.url}): {e}", file=sys.stderr)
LOWexamples/llama-eval/llama-eval.py1235 except Exception as e:
MEDIUMexamples/llama-eval/llama-eval.py1471 print(f"Error: --server ({len(server_urls)} URLs) and --threads ({len(thread_counts)} values) must have the same
MEDIUMexamples/llama-eval/llama-eval.py1478 print(f"Error: --server-name ({len(server_names)} names) and --server ({len(server_urls)} URLs) must have th
MEDIUMexamples/llama-eval/llama-eval.py1489 print("Error: GPQA dataset requires --grader-type llm")
MEDIUMexamples/llama-eval/llama-eval.py1499 print(f"Error: Model mismatch. State has '{eval_state.model_name}', but --model is '{args.model}'")
MEDIUMexamples/llama-eval/llama-eval.py1525 print("Error: --grader-type llm requires --grader-model or --model")
MEDIUMexamples/llama-eval/llama-eval.py1537 print("Error: No existing eval state found to resume")
MEDIUMexamples/llama-eval/llama-eval.py1543 print("Error: --grader-type llm requires --grader-model or --model")
LOWexamples/llama-eval/llama-server-simulator.py295 except Exception as e:
MEDIUMexamples/llama-eval/llama-server-simulator.py296 print(f"Error processing request: {e}")
LOW…ples/model-conversion/scripts/causal/compare-logits.py18 except Exception as e:
MEDIUM…ples/model-conversion/scripts/causal/compare-logits.py52 print(f"Error: PyTorch logits file not found: {pytorch_file}")
MEDIUM…ples/model-conversion/scripts/causal/compare-logits.py57 print(f"Error: llama.cpp logits file not found: {llamacpp_file}")
MEDIUM…mples/model-conversion/scripts/causal/run-org-model.py116 print("Error: Model path must be specified either via --model-path argument or MODEL_PATH environment variable")
MEDIUM…del-conversion/scripts/embedding/run-original-model.py125 print(f"Error: Prompts file '{args.prompts_file}' not found")
LOW…del-conversion/scripts/embedding/run-original-model.py127 except Exception as e:
MEDIUM…del-conversion/scripts/embedding/run-original-model.py128 print(f"Error reading prompts file: {e}")
MEDIUM…del-conversion/scripts/embedding/run-original-model.py139 print("Error: Model path must be specified either via --model-path argument "
LOWexamples/model-conversion/scripts/utils/check-nmse.py172 except Exception as e:
LOW…conversion/scripts/utils/hf-add-model-to-collection.py31 except Exception as e:
MEDIUM…conversion/scripts/utils/hf-add-model-to-collection.py33 print(f"Error: {e}")
LOW…conversion/scripts/utils/hf-add-model-to-collection.py49 except Exception as e:
LOW…es/model-conversion/scripts/utils/inspect-org-model.py50 except Exception as e:
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py51 print(f"Error reading {single_file}: {e}")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py54 print(f"Error: No safetensors files found in {model_path}")
LOW…es/model-conversion/scripts/utils/inspect-org-model.py111 except Exception as e:
LOW…es/model-conversion/scripts/utils/inspect-org-model.py120 except Exception as e:
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py121 print(f"Error reading {single_file}: {e}")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py124 print(f"Error: No safetensors files found in {model_path}")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py182 print(f"Error: Could not find tensor '{tensor_name}' in model index")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py212 print(f"Error: Tensor '{tensor_name}' not found in {tensor_file}")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py216 print(f"Error: The file '{file_path}' was not found.")
LOW…es/model-conversion/scripts/utils/inspect-org-model.py218 except Exception as e:
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py219 print(f"An error occurred: {e}")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py268 print("Error: --model-path not provided and MODEL_PATH environment variable not set")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py273 print(f"Error: Model path does not exist: {model_path}")
MEDIUM…es/model-conversion/scripts/utils/inspect-org-model.py277 print(f"Error: Model path is not a directory: {model_path}")
53 more matches not shown…
Deep Nesting166 hits · 158 pts
SeverityFileLineSnippet
LOWconvert_lora_to_gguf.py58
LOWconvert_lora_to_gguf.py222
LOWconvert_hf_to_gguf.py30
LOWconvert_hf_to_gguf.py162
LOWconvert_llama_ggml_to_gguf.py204
LOWconvert_llama_ggml_to_gguf.py287
LOW…egacy-models/minicpmv-convert-image-encoder-to-gguf.py202
LOW…egacy-models/minicpmv-convert-image-encoder-to-gguf.py312
LOWtools/server/bench/bench.py24
LOWtools/server/tests/utils.py383
LOWtools/server/tests/unit/test_router.py32
LOWtools/server/tests/unit/test_vision_api.py8
LOWtools/server/tests/unit/test_chat_completion.py388
LOWtools/server/tests/unit/test_completion.py463
LOWgguf-py/gguf/gguf_writer.py113
LOWgguf-py/gguf/gguf_writer.py330
LOWgguf-py/gguf/gguf_writer.py438
LOWgguf-py/gguf/gguf_writer.py1084
LOWgguf-py/gguf/gguf_writer.py1313
LOWgguf-py/gguf/vocab.py149
LOWgguf-py/gguf/metadata.py240
LOWgguf-py/gguf/metadata.py365
LOWgguf-py/gguf/gguf_reader.py57
LOWgguf-py/gguf/gguf_reader.py318
LOWgguf-py/gguf/constants.py4291
LOWgguf-py/gguf/scripts/gguf_convert_endian.py72
LOWgguf-py/gguf/scripts/gguf_new_metadata.py103
LOWgguf-py/gguf/scripts/gguf_editor_gui.py448
LOWgguf-py/gguf/scripts/gguf_editor_gui.py495
LOWgguf-py/gguf/scripts/gguf_editor_gui.py643
LOWgguf-py/gguf/scripts/gguf_editor_gui.py784
LOWgguf-py/gguf/scripts/gguf_editor_gui.py938
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1062
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1131
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1476
LOWgguf-py/gguf/scripts/gguf_dump.py32
LOWgguf-py/gguf/scripts/gguf_dump.py153
LOWgguf-py/gguf/scripts/gguf_dump.py228
LOWgguf-py/gguf/scripts/gguf_dump.py444
LOWgguf-py/tests/test_quants.py145
LOWgguf-py/tests/test_quants.py88
LOWtests/test-tokenizer-random.py255
LOWtests/test-tokenizer-random.py267
LOWexamples/json_schema_to_grammar.py30
LOWexamples/json_schema_to_grammar.py53
LOWexamples/json_schema_to_grammar.py337
LOWexamples/json_schema_to_grammar.py397
LOWexamples/json_schema_to_grammar.py568
LOWexamples/json_schema_to_grammar.py343
LOWexamples/json_schema_to_grammar.py421
LOWexamples/pydantic_models_to_grammar_examples.py89
LOWexamples/convert_legacy_llama.py699
LOWexamples/convert_legacy_llama.py1100
LOWexamples/convert_legacy_llama.py773
LOWexamples/pydantic_models_to_grammar.py55
LOWexamples/pydantic_models_to_grammar.py280
LOWexamples/pydantic_models_to_grammar.py528
LOWexamples/pydantic_models_to_grammar.py676
LOWexamples/pydantic_models_to_grammar.py832
LOWexamples/pydantic_models_to_grammar.py1260
106 more matches not shown…
Unused Imports159 hits · 158 pts
SeverityFileLineSnippet
LOWconvert_lora_to_gguf.py4
LOWconvert_hf_to_gguf.py4
LOWconvert_llama_ggml_to_gguf.py2
LOW…legacy-models/glmedge-convert-image-encoder-to-gguf.py8
LOW…ls/mtmd/legacy-models/convert_image_encoder_to_gguf.py8
LOW…egacy-models/minicpmv-convert-image-encoder-to-gguf.py414
LOWtools/server/bench/bench.py1
LOWtools/server/bench/speed-bench/speed_bench.py2
LOWtools/server/bench/speed-bench/speed_bench_compare.py2
LOWtools/server/bench/speed-bench/speed_bench_compare.py9
LOWtools/server/tests/conftest.py2
LOWtools/server/tests/utils.py17
LOWtools/server/tests/utils.py17
LOWtools/server/tests/unit/test_infill.py2
LOWtools/server/tests/unit/test_basic.py3
LOWtools/server/tests/unit/test_security.py3
LOWtools/server/tests/unit/test_sleep.py3
LOWtools/server/tests/unit/test_router.py2
LOWtools/server/tests/unit/test_ctx_shift.py2
LOWtools/server/tests/unit/test_speculative.py2
LOWtools/server/tests/unit/test_compat_oai_responses.py3
LOWtools/server/tests/unit/test_tool_call.py10
LOWtools/server/tests/unit/test_vision_api.py2
LOWtools/server/tests/unit/test_rerank.py2
LOWtools/server/tests/unit/test_embedding.py5
LOWtools/server/tests/unit/test_ignore_eos.py2
LOWtools/server/tests/unit/test_chat_completion.py3
LOWtools/server/tests/unit/test_tokenize.py2
LOWtools/server/tests/unit/test_kv_keep_only_active.py4
LOWtools/server/tests/unit/test_compat_gcp.py2
LOWtools/server/tests/unit/test_proxy.py2
LOWtools/server/tests/unit/test_slot_save.py2
LOWtools/server/tests/unit/test_completion.py7
LOWtools/server/tests/unit/test_compat_anthropic.py6
LOWtools/server/tests/unit/test_template.py13
LOWtools/server/tests/unit/test_lora.py2
LOWgguf-py/gguf/gguf_writer.py1
LOWgguf-py/gguf/vocab.py1
LOWgguf-py/gguf/metadata.py1
LOWgguf-py/gguf/gguf_reader.py5
LOWgguf-py/gguf/tensor_mapping.py1
LOWgguf-py/gguf/utility.py1
LOWgguf-py/gguf/constants.py1
LOWgguf-py/gguf/__init__.py1
LOWgguf-py/gguf/__init__.py2
LOWgguf-py/gguf/__init__.py3
LOWgguf-py/gguf/__init__.py4
LOWgguf-py/gguf/__init__.py5
LOWgguf-py/gguf/__init__.py6
LOWgguf-py/gguf/__init__.py7
LOWgguf-py/gguf/__init__.py8
LOWgguf-py/gguf/__init__.py9
LOWgguf-py/gguf/lazy.py1
LOWgguf-py/gguf/quants.py1
LOWgguf-py/gguf/scripts/gguf_convert_endian.py2
LOWgguf-py/gguf/scripts/gguf_new_metadata.py2
LOWgguf-py/gguf/scripts/gguf_editor_gui.py2
LOWgguf-py/gguf/scripts/gguf_dump.py2
LOWgguf-py/gguf/scripts/gguf_hash.py2
LOWgguf-py/tests/__init__.py1
99 more matches not shown…
Redundant / Tautological Comments65 hits · 115 pts
SeverityFileLineSnippet
LOWtools/mtmd/tests.sh16# Check if the first argument is "big", then run test with big models
LOWtools/mtmd/tests.sh31# Check if the second argument is "flash", then enable flash attention
LOWtools/server/tests/utils.py298 # Check if process died
LOWtools/server/tests/utils.py644 # Check if there were any exceptions
LOWtools/server/tests/unit/test_compat_anthropic.py295 # Check if model used the tool (it might not always, depending on the model)
LOWtools/tts/convert_pt_to_hf.py40# Check if the loaded model is a state_dict or a model instance
LOWgguf-py/gguf/metadata.py261 # Check if we erroneously matched against './' or '../' etc...
LOWgguf-py/gguf/metadata.py457 # Check if Hugging Face ID is present in URL
LOWgguf-py/gguf/metadata.py515 # Check if Hugging Face ID is present in URL
LOWgguf-py/gguf/gguf_reader.py75 # Check if it's unsafe to perform slice optimization on data
LOWgguf-py/gguf/gguf_reader.py233 # Check if it's a simple scalar type.
LOWgguf-py/gguf/utility.py207 # Check if we have enough data to read the metadata
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1150 # Check if this is an enum field
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1155 # Check if it's a name
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1160 # Check if it's a number or "NAME (value)" format
LOWgguf-py/gguf/scripts/gguf_editor_gui.py965 # Check if this is an enum array
LOWgguf-py/gguf/scripts/gguf_editor_gui.py972 # Check if this is an enum field
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1072 # Check if this field has an enum type
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1317 # Check if this is one of the linked tokenizer keys
LOWgguf-py/gguf/scripts/gguf_editor_gui.py1431 # Check if key already exists
LOWgguf-py/gguf/scripts/gguf_dump.py336 # Check if new Tensor Group
LOWtests/test-lora-conversion-inference.sh139# Print results
LOWexamples/convert_legacy_llama.py1200 # Check if it's a set of safetensors files first
LOWexamples/pydantic_models_to_grammar.py490 # Check if the field is optional (not required)
LOWexamples/pydantic_models_to_grammar.py96 if not parts: # Check if the list is empty
LOWexamples/llama-eval/llama-server-simulator.py127 # Check if question text is contained in the cleaned request
LOW…mples/model-conversion/scripts/utils/perplexity-gen.sh16# Check if data/wikitext-2-raw directory exists
LOW…odel-conversion/scripts/utils/perplexity-run-simple.sh15# Check if data/wikitext-2-raw directory exists
LOWexamples/model-conversion/scripts/utils/common.py65 # Check if there's an overlap between first and last indices or if we're at the edge case of s = 2 * max_seq
LOW…model-conversion/scripts/utils/hf-create-collection.py23 # Check if HF_TOKEN is available
LOW…mples/model-conversion/scripts/utils/semantic_check.py40 # Check if this is pooled (single embedding) or per-token embeddings
LOW…mples/model-conversion/scripts/utils/semantic_check.py85 # Check if the distance of each token embedding from the origin and compare
LOWscripts/compare-llama-bench.py187 # Check if all required Python libraries are installed. Would have failed earlier if not.
LOWscripts/verify-checksum-models.py31# Check if the hash list file exists
LOWscripts/verify-checksum-models.py54 # Check if the file exists
LOWscripts/verify-checksum-models.py70 # Add the results to the array
LOWscripts/verify-checksum-models.py82# Output the results as a table
LOWscripts/apple/validate-macos.sh688# Check if authentication credentials are provided
LOWscripts/apple/validate-macos.sh707# Check if app was created successfully
LOWscripts/apple/validate-macos.sh715# Check if app binary exists and is executable
LOWscripts/apple/validate-macos.sh723# Check if framework was properly embedded
LOWscripts/apple/validate-macos.sh731# Check if framework binary exists
LOWscripts/apple/validate-visionos.sh682# Check if authentication credentials are provided
LOWscripts/apple/validate-visionos.sh707# Check if validation failed because the app isn't in App Store Connect
LOWscripts/apple/validate-visionos.sh716 # Check if IPA was created successfully
LOWscripts/apple/validate-visionos.sh724 # Check if app binary exists and is executable
LOWscripts/apple/validate-visionos.sh732 # Check if framework was properly embedded
LOWscripts/apple/validate-visionos.sh740 # Check if framework binary exists
LOWscripts/apple/validate-ios.sh691# Check if authentication credentials are provided
LOWscripts/apple/validate-ios.sh716# Check if validation failed because the app isn't in App Store Connect
LOWscripts/apple/validate-ios.sh725 # Check if IPA was created successfully
LOWscripts/apple/validate-ios.sh733 # Check if app binary exists and is executable
LOWscripts/apple/validate-ios.sh741 # Check if framework was properly embedded
LOWscripts/apple/validate-ios.sh749 # Check if framework binary exists
LOWscripts/apple/validate-tvos.sh684# Check if authentication credentials are provided
LOWscripts/apple/validate-tvos.sh709# Check if validation failed because the app isn't in App Store Connect
LOWscripts/apple/validate-tvos.sh718 # Check if IPA was created successfully
LOWscripts/apple/validate-tvos.sh726 # Check if app binary exists and is executable
LOWscripts/apple/validate-tvos.sh734 # Check if framework was properly embedded
LOWscripts/apple/validate-tvos.sh742 # Check if framework binary exists
5 more matches not shown…
Self-Referential Comments27 hits · 86 pts
SeverityFileLineSnippet
MEDIUMbuild-xcframework.sh367 # Create a separate directory for dSYMs for all platforms
MEDIUMbuild-xcframework.sh375 # Create a copy of the binary that will be stripped
MEDIUMtools/tts/convert_pt_to_hf.py135# Create the weight map
MEDIUMci/run.sh714 # Create a fresh python3 venv and enter it
MEDIUMgguf-py/gguf/metadata.py66 # Create a new Metadata instance
MEDIUMgguf-py/gguf/scripts/gguf_editor_gui.py42# Define the tokenizer keys that should be edited together
MEDIUMgguf-py/gguf/scripts/gguf_editor_gui.py228 # Create a dialog with enum options
MEDIUMgguf-py/gguf/scripts/gguf_editor_gui.py539 # Create a widget to hold the button
MEDIUMgguf-py/gguf/scripts/gguf_editor_gui.py579 # Create a dialog with enum options
MEDIUMgguf-py/gguf/scripts/gguf_editor_gui.py705 # Create a dialog with enum options
MEDIUMgguf-py/gguf/scripts/gguf_editor_gui.py1271 # Create a dialog with enum options
MEDIUMexamples/ts-type-to-grammar.sh10# Create a temporary directory
MEDIUMexamples/pydantic_models_to_grammar.py186 # Define the rule identifier based on max_digit and min_digit
MEDIUMexamples/pydantic_models_to_grammar.py241 # Define the integer part rule
MEDIUMexamples/pydantic_models_to_grammar.py248 # Define the fractional part rule based on precision constraints
MEDIUMexamples/pydantic_models_to_grammar.py264 # Define the float rule
MEDIUMexamples/pydantic_models_to_grammar.py370 # Defining the union grammar rule separately
MEDIUMexamples/pydantic_models_to_grammar.py1179 # Creating the dynamic model
MEDIUM…model-conversion/scripts/utils/hf-create-collection.py39 # Create the collection
MEDIUMscripts/verify-checksum-models.py25# Define the path to the llama directory (parent folder of script directory)
MEDIUMscripts/verify-checksum-models.py28# Define the file with the list of hashes and filenames
MEDIUMscripts/verify-checksum-models.py40# Create an array to store the results
MEDIUMscripts/apple/validate-macos.sh574# Create a simple xcscheme file to avoid xcodebuild scheme issues
MEDIUMscripts/apple/validate-macos.sh670# Create a zip file for potential distribution
MEDIUMscripts/apple/validate-visionos.sh568# Create a simple xcscheme file to avoid xcodebuild scheme issues
MEDIUMscripts/apple/validate-ios.sh577# Create a simple xcscheme file to avoid xcodebuild scheme issues
MEDIUMscripts/apple/validate-tvos.sh570# Create a simple xcscheme file to avoid xcodebuild scheme issues
Verbosity Indicators39 hits · 61 pts
SeverityFileLineSnippet
LOWtools/ui/src/lib/utils/latex-protection.ts151 // Step 0: Temporarily remove blockquote markers (>) to process LaTeX correctly
LOWtools/ui/src/lib/utils/latex-protection.ts165 // Step 1: Protect code blocks
LOWtools/ui/src/lib/utils/latex-protection.ts174 // Step 2: Protect existing LaTeX expressions
LOWtools/ui/src/lib/utils/latex-protection.ts210 // Step 3: Escape standalone $ before digits (currency like $5 → \$5)
LOWtools/ui/src/lib/utils/latex-protection.ts214 // Step 4: Restore protected LaTeX expressions (they are valid)
LOWtools/ui/src/lib/utils/latex-protection.ts229 // Step 5: Apply additional escaping functions (brackets and mhchem)
LOWtools/ui/src/lib/utils/latex-protection.ts237 // Step 6: Convert remaining \(...\) → $...$, \[...\] → $$...$$
LOWtools/ui/src/lib/utils/latex-protection.ts253 // Step 7: Restore code blocks
LOWtools/ui/src/lib/utils/latex-protection.ts259 // Step 8: Restore blockquote markers
LOWtools/mtmd/models/mobilenetv5.cpp217 // Step 1: Compute Q @ K.T
LOWtests/test-backend-ops.cpp1932 // Step 1: create input tensors that don't depend on any other tensors:
LOWtests/test-backend-ops.cpp1939 // Step 2: use the op that you want to test in the GGML compute graph.
LOWtests/test-backend-ops.cpp1943 // Step 3: return the output tensor.
LOWscripts/debug-test.sh62# Step 0: Check the args
LOWscripts/debug-test.sh95# Step 1: Reset and Setup folder context
LOWscripts/debug-test.sh109# Step 2: Setup Build Environment and Compile Test Binaries
LOWscripts/debug-test.sh118# Step 3: Find all tests available that matches REGEX
LOWscripts/debug-test.sh134# Step 4: Identify Test Command for Debugging
LOWscripts/debug-test.sh171# Step 5: Execute or GDB Debug
LOWggml/src/ggml-webgpu/ggml-webgpu.cpp1290 // For set rows specifically, we need to check if src and idx are empty
LOWggml/src/ggml-cann/aclnn_ops.cpp2809 // Step 5: multiply by attn_factor
LOWggml/src/ggml-cann/aclnn_ops.cpp2826 // Step 6: repeat
LOWggml/src/ggml-cann/aclnn_ops.cpp3090 // Step 1: Prepare trans tensors for F16 type conversion to F32 if needed
LOWggml/src/ggml-cann/aclnn_ops.cpp3115 // Step 2: Prepare head tensors for tail splitting if needed
LOWggml/src/ggml-cann/aclnn_ops.cpp3144 // Step 3: Execute RotaryPositionEmbedding
LOWggml/src/ggml-cann/aclnn_ops.cpp3191 // Step 4: Copy unrotated tail portion from source to destination
LOWggml/src/ggml-cann/aclnn_ops.cpp3220 // Step 5: Cast back to F16 if needed
LOWggml/src/ggml-cann/aclnn_ops.cpp3906 // Step 1: cast the src0 (Query) to fp16 if needed
LOWggml/src/ggml-cann/aclnn_ops.cpp3929 // Step 2: create the acl tensors for src1 (Key), src2 (Value),
LOWggml/src/ggml-cann/aclnn_ops.cpp3973 // Step 3: create the PSEShift tensor if needed
LOWggml/src/ggml-cann/aclnn_ops.cpp4042 // Step 4: set the inputs for FusedInferAttention.
LOWggml/src/ggml-cann/aclnn_ops.cpp4103 // Step 6: post-processing — slice padded output and/or cast to f32
LOWsrc/llama-sampler.cpp2947 // Step 1: Look for restart sequences to limit the maximum repetition length.
LOWsrc/llama-sampler.cpp3008 // Step 2: Iterate in reverse over the last N tokens of the context, using the "Z-algorithm" (in
LOWsrc/llama-sampler.cpp3072 // Step 3: Iterate over dry_repeat_count and last_tokens, examining the maximum repeat length
LOWsrc/llama-sampler.cpp3099 // Step 4: Apply logit penalties based on the maximum repeat length for relevant tokens.
LOWsrc/models/kimi-linear.cpp197 // Step 1: Q, K, V projections -> [d_inner, n_tokens]
LOWsrc/models/kimi-linear.cpp377 // Step 1: Q projection and reshape
LOWsrc/models/kimi-linear.cpp382 // Step 2: KV compression
Hallucination Indicators4 hits · 55 pts
SeverityFileLineSnippet
CRITICALcommon/arg.cpp468 params.speculative.draft.mparams.path.empty() &&
CRITICALcommon/arg.cpp469 params.speculative.draft.mparams.hf_repo.empty() &&
CRITICALcommon/arg.cpp470 params.speculative.draft.mparams.url.empty()) {
CRITICALexamples/speculative/speculative.cpp52 if (params.speculative.draft.mparams.path.empty()) {
Synthetic Comment Markers8 hits · 42 pts
SeverityFileLineSnippet
HIGHCONTRIBUTING.md18Code that is initially generated by AI and subsequently edited will still be considered AI-generated. AI assistance is p
HIGHtools/completion/README.md90<!-- IMPORTANT: The list below is auto-generated by llama-gen-docs; do NOT modify it manually -->
HIGHtools/server/README.md28<!-- IMPORTANT: The list below is auto-generated by llama-gen-docs; do NOT modify it manually -->
HIGHtools/cli/README.md7<!-- IMPORTANT: The list below is auto-generated by llama-gen-docs; do NOT modify it manually -->
HIGHtests/test-backend-ops.cpp9813 printf(" --test-file reads test operators from a test file generated by llama-export-graph-ops\n");
HIGHexamples/gen-docs/gen-docs.cpp14#define NOTE_MESSAGE "<!-- IMPORTANT: The list below is auto-generated by llama-gen-docs; do NOT modify it manually
HIGHggml/src/ggml-virtgpu/regenerate_remoting.py3# Generated by Claude AI
HIGHggml/src/ggml-hexagon/ggml-hexagon.cpp2484 // Check for F16 support only as requested
AI Slop Vocabulary14 hits · 36 pts
SeverityFileLineSnippet
MEDIUMgguf-py/gguf/metadata.py394 # (Definitely not part of hugging face formal/informal standard)
MEDIUMgguf-py/gguf/metadata.py410 # (Definitely not part of hugging face formal/informal standard... but with model_ appended to match their s
MEDIUMgguf-py/gguf/lazy.py49 # TODO: make this even more comprehensive
LOWexamples/model-conversion/scripts/utils/common.py70 # If there's overlap, just use the combined unique indices
MEDIUMexamples/embedding/embedding.cpp122 // utilize the full context
LOWscripts/jinja/jinja-tester.py116 # Malformed template, just add the token
LOWscripts/jinja/jinja-tester.py135 # Malformed template, just add the token
LOWconversion/deepseek.py40 # @bluebread: there's no window_size in config but just add it here anyway
MEDIUMggml/src/ggml-zendnn/ggml-zendnn.cpp600 // gather + batched matmul + scatter approach. Future versions will leverage
MEDIUMggml/src/ggml-cpu/amx/mmq.cpp603 // pack again with 128 to fully utilize vector length
MEDIUMggml/src/ggml-cpu/amx/mmq.cpp645 // pack again with 128 to fully utilize vector length
MEDIUMggml/src/ggml-cpu/amx/mmq.cpp743 // pack again with 128 to fully utilize vector length
MEDIUMggml/src/ggml-opencl/ggml-opencl.cpp4396 // that wraps around q and d to utilize image access path.
MEDIUMggml/src/ggml-opencl/ggml-opencl.cpp4430 // that wraps around q and d to utilize image access path.
Cross-Language Confusion3 hits · 12 pts
SeverityFileLineSnippet
HIGHtests/test-tokenizer-random.py346 if unicodedata.category(chr(cpt)) in ("Cn", "Cs", "Co"): # undefined, surrogates, private
HIGHscripts/tool_bench.py10 cmake -B build && cmake --build build --config Release -j -t llama-server
HIGHscripts/snapdragon/qdc/run_qdc_jobs.py173 "cd $basedir; chmod +x bin/* lib/* 2>/dev/null;",
Example Usage Blocks8 hits · 12 pts
SeverityFileLineSnippet
LOWtools/ui/scripts/dev.sh8# Usage:
LOWgguf-py/examples/writer.py13# Example usage:
LOWtests/test-tokenizer-0.sh3# Usage:
LOWtests/test-tokenizer-random.py4# Sample usage:
LOWexamples/json_schema_pydantic_example.py1# Usage:
LOWscripts/sync-ggml-am.sh5# Usage:
LOWscripts/hf.sh5# Usage:
LOWggml/src/ggml-sycl/dpct/helper.hpp3012 /// Example usage:
Fake / Example Data4 hits · 6 pts
SeverityFileLineSnippet
LOWtools/server/tests/unit/test_ctx_shift.py8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWtools/server/tests/unit/test_ctx_shift.py8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWtools/server/tests/unit/test_ctx_shift.py14Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWtools/server/tests/unit/test_ctx_shift.py14Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippet
HIGHtools/server/README.md1467 -H "x-api-key: your-api-key" \
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHexamples/pydantic_models_to_grammar.py532 Generate GBNF Grammar from Pydantic Models. This method takes a list of Pydantic models and uses them to gener
Slop Phrases4 hits · 5 pts
SeverityFileLineSnippet
LOW.github/ISSUE_TEMPLATE/030-research.yml9 Don't forget to check for any [duplicate research issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=
LOW.github/ISSUE_TEMPLATE/040-refactor.yml9 Don't forget to [check for existing refactor issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3A
LOWconversion/base.py1353 # To avoid unexpected issues - we make sure to normalize non-normalized tokens
LOWconversion/base.py2097 # To avoid unexpected issues - we make sure to normalize non-normalized tokens
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOWtools/server/tests/conftest.py19def do_something():