Repository Analysis

google-ai-edge/LiteRT-LM

LiteRT-LM is Google's production-ready, high-performance, open-source inference framework for deploying Large Language Models on edge devices.

20.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of google-ai-edge/LiteRT-LM, a C++ project with 5,888 GitHub stars. SynthScan v2.0 examined 81,660 lines of code across 445 source files, recording 1207 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 20.1 places this repository in the Moderate 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).

20.1
Adjusted Score
20.1
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.9K
Stars
C++
Language
81.7K
Lines of Code
445
Files
1.2K
Pattern Hits
2026-07-14
Scan Date
0.05
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 21MEDIUM 223LOW 963

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 1207 distinct pattern matches across 16 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.

Over-Commented Block585 hits · 574 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# Copyright 2026 Google LLC.COMMENT
LOW__init__.py1# Copyright 2025 The ODML Authors.COMMENT
LOWPackage.swift1// swift-tools-version: 5.9COMMENT
LOWtools/pytest/conftest.py1# Copyright 2026 Google LLC.COMMENT
LOWtools/pytest/utils.py1# Copyright 2026 Google LLC.COMMENT
LOWtools/pytest/test_e2e_sanity_checks.py1# Copyright 2026 Google LLC.COMMENT
LOWcmake/packages/litert_lm/CMakeLists.txt1# Copyright 2026 Google LLC.COMMENT
LOWpython/litert_lm/interfaces.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/messages_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/verify_api.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/_ffi.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/benchmark.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/conversation.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/tools.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/session.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/engine_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/tool_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/_messages.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/engine.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/utils.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/bundle_pypi_package.sh1#!/bin/bashCOMMENT
LOWpython/litert_lm/examples/simple_main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/examples/multimodal_main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm/examples/tool_main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/utils_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/utils.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/litert_lm_eval_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/litert_lm_eval.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_eval/runners/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOW…lm_eval/runners/lm_eval_runner/litert_lm_model_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOW…thon/litert_lm_eval/runners/lm_eval_runner/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/model_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/config.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/help_formatter.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/common_test.py1# Licensed under the Apache License, Version 2.0 (the "License");COMMENT
LOWpython/litert_lm_cli/venv_manager_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/cli_helpers.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/model.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/venv_manager.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/common.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/cli_helpers_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/huggingface_download_test.py1# Licensed under the Apache License, Version 2.0 (the "License");COMMENT
LOWpython/litert_lm_cli/huggingface_download.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/main_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/main.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/help_formatter_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/config_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/delete.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/import.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/run.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/benchmark.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/list.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/rename.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/convert.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/serve_test.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/__init__.py1# Copyright 2026 The ODML Authors.COMMENT
LOWpython/litert_lm_cli/commands/serve.py1# Copyright 2026 The ODML Authors.COMMENT
525 more matches not shown…
Decorative Section Separators208 hits · 543 pts
SeverityFileLineSnippetContext
MEDIUMruntime/core/CMakeLists.txt18# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt20# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt55# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt57# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt91# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt93# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt113# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt115# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt159# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt161# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt189# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt191# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt230# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt232# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt270# ==============================================================================COMMENT
MEDIUMruntime/core/CMakeLists.txt272# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt18# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt20# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt45# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt47# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt62# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt64# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt82# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt84# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt99# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt101# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt127# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt129# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt158# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt160# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt177# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt179# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt201# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt203# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt224# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt226# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt248# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt250# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt265# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt267# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt284# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt286# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt307# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt309# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt329# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt331# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt348# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt350# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt369# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt371# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt392# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt394# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt415# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt417# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt436# ==============================================================================COMMENT
MEDIUMruntime/util/CMakeLists.txt438# ==============================================================================COMMENT
MEDIUMruntime/framework/CMakeLists.txt18# ==============================================================================COMMENT
MEDIUMruntime/framework/CMakeLists.txt20# ==============================================================================COMMENT
MEDIUMruntime/framework/CMakeLists.txt30# ==============================================================================COMMENT
MEDIUMruntime/framework/CMakeLists.txt32# ==============================================================================COMMENT
148 more matches not shown…
Hyper-Verbose Identifiers242 hits · 243 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/messages_test.py77 def test_tool_response_content(self):CODE
LOWpython/litert_lm/messages_test.py112 def test_contents_of_sequence(self):CODE
LOWpython/litert_lm/messages_test.py176 def test_message_with_tool_calls(self):CODE
LOWpython/litert_lm/messages_test.py195 def test_message_with_channels(self):CODE
LOWpython/litert_lm/tools.py28def _parse_param_descriptions(docstring: str) -> dict[str, str]:CODE
LOWpython/litert_lm/engine_test.py373 def test_engine_abc_inheritance(self):CODE
LOWpython/litert_lm/engine_test.py377 def test_engine_tokenization_api(self):CODE
LOWpython/litert_lm/engine_test.py387 def test_engine_special_token_metadata(self):CODE
LOWpython/litert_lm/engine_test.py401 def test_conversation_abc_inheritance(self):CODE
LOWpython/litert_lm/engine_test.py408 def test_create_conversation_with_messages(self):CODE
LOWpython/litert_lm/engine_test.py416 def test_create_conversation_with_message_objects(self):CODE
LOWpython/litert_lm/engine_test.py440 def test_create_conversation_with_max_output_tokens_async(self):CODE
LOWpython/litert_lm/engine_test.py450 def test_conversation_send_message_object(self):CODE
LOWpython/litert_lm/engine_test.py459 def test_conversation_send_contents_object(self):CODE
LOWpython/litert_lm/engine_test.py468 def test_conversation_send_dict_message(self):CODE
LOWpython/litert_lm/engine_test.py477 def test_conversation_with_thinking_config(self):CODE
LOWpython/litert_lm/engine_test.py72 def test_backend_cpu_equality(self):CODE
LOWpython/litert_lm/engine_test.py88 def test_engine_init_with_cpu_thread_counts(self):CODE
LOWpython/litert_lm/engine_test.py123 def test_engine_init_with_npu_backend(self):CODE
LOWpython/litert_lm/engine_test.py155 def test_npu_backend_non_windows(self):CODE
LOWpython/litert_lm/engine_test.py164 def test_npu_backend_windows_no_openvino(self):CODE
LOWpython/litert_lm/engine_test.py175 def test_npu_backend_windows_openvino_no_npu(self):CODE
LOWpython/litert_lm/engine_test.py188 def test_npu_backend_windows_openvino_with_npu(self):CODE
LOWpython/litert_lm/engine_test.py209 def test_engine_init_with_legacy_backend_class(self):CODE
LOWpython/litert_lm/engine_test.py226 def test_sampler_config_validation(self):CODE
LOWpython/litert_lm/engine_test.py245 def test_conversation_with_sampler_config(self):CODE
LOWpython/litert_lm/engine_test.py260 def test_session_with_sampler_config(self):CODE
LOWpython/litert_lm/engine_test.py273 def test_conversation_send_message(self):CODE
LOWpython/litert_lm/engine_test.py288 def test_conversation_render_message_to_string(self):CODE
LOWpython/litert_lm/engine_test.py299 def test_conversation_send_message_async(self):CODE
LOWpython/litert_lm/engine_test.py312 def test_conversation_send_message_async_cancel(self):CODE
LOWpython/litert_lm/engine_test.py353 def test_benchmark_class_with_thread_count(self):CODE
LOWpython/litert_lm/engine_test.py427 def test_create_conversation_with_max_output_tokens(self):CODE
LOWpython/litert_lm/engine_test.py508 def test_conversation_token_count(self):CODE
LOWpython/litert_lm/engine_test.py518 def test_conversation_get_benchmark_info(self):CODE
LOWpython/litert_lm/engine_test.py531 def test_create_conversation_with_extra_context(self):CODE
LOWpython/litert_lm/engine_test.py539 def test_tool_event_handler_storage(self):CODE
LOWpython/litert_lm/engine_test.py556 def test_session_api_run_decode(self):CODE
LOWpython/litert_lm/engine_test.py570 def test_session_api_run_text_scoring_with_token_lengths(self):CODE
LOWpython/litert_lm/engine_test.py594 def test_session_api_run_text_scoring_no_token_lengths(self):CODE
LOWpython/litert_lm/engine_test.py614 def test_session_api_run_decode_async(self):CODE
LOWpython/litert_lm/engine_test.py628 def test_session_api_cancel_process(self):CODE
LOWpython/litert_lm/engine_test.py647 def test_conversation_send_message_with_repetition_penalty_config(self):CODE
LOWpython/litert_lm/engine_test.py665 def test_conversation_send_message_async_with_repetition_penalty_config(self):CODE
LOWpython/litert_lm/engine_test.py683 def test_conversation_send_message_with_max_output_tokens(self):CODE
LOWpython/litert_lm/engine_test.py695 def test_conversation_send_message_async_with_max_output_tokens(self):CODE
LOWpython/litert_lm/engine_test.py708 def test_session_api_apply_prompt_template(self, apply_prompt_template):CODE
LOWpython/litert_lm/engine_test.py718 def test_create_conversation_with_tools(self):CODE
LOWpython/litert_lm/engine_test.py731 def test_send_message_async_with_tools(self):CODE
LOWpython/litert_lm/tool_test.py104 def test_tool_from_function_cases(CODE
LOWpython/litert_lm/tool_test.py138 def test_tool_from_function_array(self, type_hint):CODE
LOWpython/litert_lm/tool_test.py167 def test_create_conversation_with_open_api_tools(self):CODE
LOWpython/litert_lm/tool_test.py207 def test_tool_execution_exception(self):CODE
LOWpython/litert_lm/tool_test.py219 def test_tool_execution_non_json_serializable(self):CODE
LOWpython/litert_lm/tool_test.py232 def test_create_conversation_with_mixed_tools(self):CODE
LOWpython/litert_lm/tool_test.py269 def test_tool_with_no_arguments(self):CODE
LOWpython/litert_lm/tool_test.py281 def test_create_conversation_with_malformed_tool_description(self):CODE
LOWpython/litert_lm/tool_test.py316 def test_handle_tool_calls_valid(self):CODE
LOWpython/litert_lm/tool_test.py341 def test_handle_tool_calls_missing_function_key(self):CODE
LOWpython/litert_lm/tool_test.py351 def test_handle_tool_calls_old_format_ignored(self):CODE
182 more matches not shown…
Docstring Block Structure21 hits · 105 pts
SeverityFileLineSnippetContext
HIGHtools/pytest/utils.py25Loads test data from a JSON file. Dynamically loads test data from a JSON file matching the caller's filename. ArgSTRING
HIGHpython/litert_lm/utils.py51Converts a ThinkingConfig to a LiteRtLmThinkingConfig opaque pointer. Args: lib: The loaded C library instance.STRING
HIGHpython/litert_lm_cli/cli_helpers.py35Prompts the user to select an option from a list. Args: choices: The list of choices to present. message: TheSTRING
HIGHpython/litert_lm_cli/cli_helpers.py70Resolves the model file when it is missing, prompting the user. Args: from_huggingface_repo: The HuggingFace repoSTRING
HIGHpython/litert_lm_cli/model.py45Returns the attachment type (audio or image) from the file path. Args: path: Path to the attachment. Returns: STRING
HIGHpython/litert_lm_cli/common.py48Returns the cache directory value for the given cache mode. Args: cache: The cache mode. Valid values are "disk",STRING
HIGHpython/litert_lm_cli/huggingface_download.py85Downloads a file from HuggingFace Hub. Args: repo_id: The HuggingFace repository ID. filename: The filename tSTRING
HIGHpython/litert_lm_cli/huggingface_download.py162Lists .litertlm files in a HuggingFace repository. Args: repo_id: The HuggingFace repository ID. token: The HSTRING
HIGHpython/litert_lm_cli/commands/import.py41Downloads an experimental model. Args: model_id: The unique ID of the experimental model to download. user_agSTRING
HIGHpython/litert_lm_cli/commands/import.py92Copies the source file to dest, falling back to download if needed. If the source is a local file (equal to model_filSTRING
HIGHpython/litert_lm_cli/commands/serve_util.py96Retrieves the persistent server engine or initializes it on first request. Lifetime Management: The LiteRT-LM EnginSTRING
HIGHpython/litert_lm_cli/commands/openai_handler.py416Translates an OpenAI message to a LiteRT-LM message format. This function takes a message dictionary, typically from STRING
HIGHpython/litert_lm_builder/litertlm_builder_cli.py342Parses the command-line arguments. Args: parser: The argument parser to use. Returns: A list of parsed argSTRING
HIGHpython/litert_lm_builder/litertlm_peek.py91Reads the header of a LiteRT-LM file and returns the metadata. Args: file_path: The path to the LiteRT-LM file. STRING
HIGHpython/litert_lm_builder/litertlm_builder.py302Initializes a LitertLmFileBuilder from a loaded TOML string. Args: toml_str: The TOML string to parse. STRING
HIGHpython/litert_lm_builder/litertlm_builder.py445Adds llm metadata to the litertlm file. Args: llm_metadata_path: The path to the llm metadata file. Can be biSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py496Adds a tflite model to the litertlm file. Args: tflite_model_path: The path to the tflite model file. mSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py568Adds tflite weights to the litertlm file. Args: tflite_weights_path: The path to the tflite weights file. STRING
HIGHpython/litert_lm_builder/litertlm_builder.py612Adds a sentencepiece tokenizer to the litertlm file. Args: sp_tokenizer_path: The path to the sentencepiece tSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py649Adds a hf tokenizer to the litertlm file. Args: hf_tokenizer_path: The path to the hf tokenizer `tokenizer.jsSTRING
HIGHpython/litert_lm_builder/litertlm_builder.py695Adds generic binary data to the litertlm file. Args: generic_binary_data_path: The path to the generic binarySTRING
Unused Imports47 hits · 43 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/interfaces.py17CODE
LOWpython/litert_lm/_ffi.py16CODE
LOWpython/litert_lm/conversation.py16CODE
LOWpython/litert_lm/tools.py17CODE
LOWpython/litert_lm/__init__.py17CODE
LOWpython/litert_lm/__init__.py18CODE
LOWpython/litert_lm/__init__.py19CODE
LOWpython/litert_lm/__init__.py20CODE
LOWpython/litert_lm/__init__.py21CODE
LOWpython/litert_lm/__init__.py22CODE
LOWpython/litert_lm/__init__.py23CODE
LOWpython/litert_lm/__init__.py24CODE
LOWpython/litert_lm/__init__.py25CODE
LOWpython/litert_lm/__init__.py26CODE
LOWpython/litert_lm/__init__.py27CODE
LOWpython/litert_lm/__init__.py28CODE
LOWpython/litert_lm/__init__.py29CODE
LOWpython/litert_lm/__init__.py30CODE
LOWpython/litert_lm/__init__.py31CODE
LOWpython/litert_lm/__init__.py32CODE
LOWpython/litert_lm/__init__.py33CODE
LOWpython/litert_lm/__init__.py34CODE
LOWpython/litert_lm/__init__.py35CODE
LOWpython/litert_lm/__init__.py36CODE
LOWpython/litert_lm/__init__.py37CODE
LOWpython/litert_lm/__init__.py38CODE
LOWpython/litert_lm/__init__.py39CODE
LOWpython/litert_lm/__init__.py40CODE
LOWpython/litert_lm/__init__.py41CODE
LOWpython/litert_lm/__init__.py42CODE
LOWpython/litert_lm/__init__.py43CODE
LOWpython/litert_lm/_messages.py16CODE
LOWpython/litert_lm/engine.py16CODE
LOWpython/litert_lm_eval/litert_lm_eval.py43CODE
LOWpython/litert_lm_eval/litert_lm_eval.py49CODE
LOWpython/litert_lm_cli/config.py16CODE
LOWpython/litert_lm_cli/model.py17CODE
LOWpython/litert_lm_cli/commands/run.py33CODE
LOWpython/litert_lm_cli/commands/convert.py17CODE
LOWpython/litert_lm_cli/commands/convert.py18CODE
LOWpython/litert_lm_cli/commands/convert.py22CODE
LOWpython/litert_lm_cli/commands/convert.py23CODE
LOWpython/litert_lm_cli/commands/convert.py24CODE
LOWpython/litert_lm_cli/commands/serve_test.py87CODE
LOWpython/litert_lm_cli/commands/serve.py20CODE
LOWpython/litert_lm_cli/commands/serve_util.py15CODE
LOWpython/litert_lm_cli/commands/gemini_handler.py20CODE
Excessive Try-Catch Wrapping30 hits · 31 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/conversation.py76 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/conversation.py110 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/conversation.py182 except Exception:CODE
LOWpython/litert_lm/session.py41 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm/engine.py197 except Exception: # pylint: disable=broad-exception-caughtCODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py78 except Exception: # pylint: disable=broad-exceptCODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py120 except Exception as e:CODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py135 except Exception as e:CODE
LOWpython/litert_lm_cli/config.py84 except Exception as e:CODE
LOWpython/litert_lm_cli/config.py115 except Exception as e:CODE
LOWpython/litert_lm_cli/model.py166 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/common.py212 except Exception:CODE
LOWpython/litert_lm_cli/huggingface_download.py67 except Exception as e:CODE
LOWpython/litert_lm_cli/commands/run.py371 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/run.py375 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/benchmark.py127 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/gemini_handler.py228 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/gemini_handler.py367 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/gemini_handler.py430 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py136 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py540 except Exception as e:CODE
LOWpython/litert_lm_cli/commands/openai_handler.py678 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py690 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py901 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py956 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py1097 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOWpython/litert_lm_cli/commands/openai_handler.py1155 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOW…/litert_lm_cli/commands/serve_openai_streaming_test.py75 except Exception: # pylint: disable=broad-exception-caughtCODE
LOW…/litert_lm_cli/commands/serve_openai_streaming_test.py187 except Exception as e: # pylint: disable=broad-exception-caughtCODE
MEDIUMpython/litert_lm_builder/litertlm_peek_main.py59 print(f"Error processing file: {e}", file=sys.stderr)CODE
Deep Nesting28 hits · 27 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/conversation.py128CODE
LOWpython/litert_lm/conversation.py245CODE
LOWpython/litert_lm/tools.py28CODE
LOWpython/litert_lm/session.py129CODE
LOWpython/litert_lm/engine_test.py123CODE
LOWpython/litert_lm/engine_test.py312CODE
LOWpython/litert_lm/engine.py207CODE
LOWpython/litert_lm/engine.py425CODE
LOWpython/litert_lm/utils.py78CODE
LOWpython/litert_lm/examples/tool_main.py42CODE
LOWpython/litert_lm_eval/utils.py20CODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py143CODE
LOW…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py207CODE
LOWpython/litert_lm_cli/model_test.py46CODE
LOWpython/litert_lm_cli/model.py115CODE
LOWpython/litert_lm_cli/common.py172CODE
LOWpython/litert_lm_cli/commands/import.py84CODE
LOWpython/litert_lm_cli/commands/run.py80CODE
LOWpython/litert_lm_cli/commands/run.py175CODE
LOWpython/litert_lm_cli/commands/serve.py33CODE
LOWpython/litert_lm_cli/commands/openai_handler.py412CODE
LOWpython/litert_lm_cli/commands/openai_handler.py616CODE
LOWpython/litert_lm_cli/commands/openai_handler.py693CODE
LOW…/litert_lm_cli/commands/serve_openai_streaming_test.py32CODE
LOWpython/litert_lm_builder/litertlm_peek.py303CODE
LOWpython/litert_lm_builder/litertlm_peek.py399CODE
LOWpython/litert_lm_builder/litertlm_peek.py440CODE
LOWpython/litert_lm_builder/litertlm_builder.py299CODE
Example Usage Blocks11 hits · 16 pts
SeverityFileLineSnippetContext
LOWruntime/components/prompt_template.h35// Example usage:COMMENT
LOW…s_processor/constrained_decoding/constrained_decoder.h40// Example usage:COMMENT
LOWruntime/engine/engine.h45// Example usage:COMMENT
LOWruntime/engine/engine.h275 // Example usage:COMMENT
LOWruntime/engine/engine.h293 // Example usage:COMMENT
LOWruntime/engine/engine_factory.h44// Example usage:COMMENT
LOWruntime/conversation/conversation.h131 // Example usage:COMMENT
LOWruntime/conversation/conversation.h463// Example usage:COMMENT
LOWruntime/conversation/conversation.h581 // Example usage:COMMENT
LOWswift/Conversation.swift30/// Example usage:COMMENT
LOWswift/Engine.swift22/// Example usage:COMMENT
AI Slop Vocabulary7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMpython/litert_lm/verify_api.py25 """Executes master comprehensive E2E tests covering multi-turn reasoning, streaming, tools, and telemetry."""STRING
MEDIUM…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py33# Define the placeholder used by the evaluation harness.COMMENT
LOWpython/litert_lm_cli/main_test.py394 # Since we are in an isolated filesystem, we'll just use simple namesCOMMENT
LOWpython/litert_lm_cli/main_test.py399 # or just use paths that will exist.COMMENT
LOWpython/litert_lm_builder/litertlm_builder.py859 # This is expected if the file is in text format. We'll just pass and tryCOMMENT
MEDIUMruntime/util/litert_lm_loader.h92 // A simple hash combine. For more robust hashing, considerCOMMENT
MEDIUM…ntime/framework/resource_management/resource_manager.h45// as the LlmExecutor, enabling multiple sessions to utilize it concurrently.COMMENT
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUM…tert_lm_eval/runners/lm_eval_runner/litert_lm_model.py33# Define the placeholder used by the evaluation harness.COMMENT
MEDIUMpython/litert_lm_builder/litertlm_peek_test.py109 # Create a temporary directory for dumping files.COMMENT
MEDIUMpython/litert_lm_builder/litertlm_peek_test.py190 # Create a temporary directory for dumping files.COMMENT
MEDIUM.github/workflows/ml-ci-build-win.yml142 # Create a dedicated directory on the big drive for the B: mountCOMMENT
Modern AI Meta-Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md10- **Gemma4 12B Support**: LiteRT-LM now supports Gemma4 12B ([blog](https://developers.googleblog.com/bringing-gemma-4CODE
MEDIUMREADME.md59[Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI Edge](https://developers.googlebCODE
MEDIUMREADME.md62[Bring state-of-the-art agentic skills to the edge with Gemma 4](https://developers.googleblog.com/bring-state-of-the-arCODE
MEDIUMREADME.md132 ([blog](https://developers.googleblog.com/bring-state-of-the-art-agentic-skills-to-the-edge-with-gemma-4/))CODE
MEDIUMdocs/getting-started/cmake.md44├── sentencepiece.cmake # Primary orchestration module (ExternalProject_Add)CODE
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm/interfaces.py343CODE
LOWpython/litert_lm/interfaces.py439CODE
LOWpython/litert_lm/conversation.py36CODE
LOWpython/litert_lm/engine.py52CODE
LOWpython/litert_lm/engine.py207CODE
LOWpython/litert_lm_cli/commands/run.py175CODE
LOWpython/litert_lm_cli/commands/run.py516CODE
LOWpython/litert_lm_cli/commands/benchmark.py37CODE
LOWpython/litert_lm_cli/commands/benchmark.py171CODE
Fake / Example Data5 hits · 6 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm_cli/huggingface_download_test.py80 repo_id=repo_id, filename=filename, token="fake-token"CODE
LOWpython/litert_lm_cli/huggingface_download_test.py96 self.assertEqual(req.get_header("Authorization"), "Bearer fake-token")CODE
LOWpython/litert_lm_cli/huggingface_download_test.py179 repo_id=repo_id, token="fake-token"CODE
LOWpython/litert_lm_cli/huggingface_download_test.py185 self.assertEqual(req.get_header("Authorization"), "Bearer fake-token")CODE
LOWpython/litert_lm_cli/huggingface_download_test.py204 repo_id=repo_id, token="fake-token"CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm_cli/main_test.py130 # Check if expected keys are added.COMMENT
LOWpython/litert_lm_cli/main_test.py132 # Check if enter (ControlM), c-j (ControlJ), esc+enter, c-c (ControlC).COMMENT
LOWpython/litert_lm_builder/litertlm_peek_test.py131 # Check if files were dumped in the specified directory.COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpython/litert_lm_builder/litertlm_builder_cli.py50# Section 1: SP_Tokenizer (you can also use HF_Tokenizer)COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpython/litert_lm_builder/__init__.py29__all__ = [CODE