Repository Analysis

qualcomm/aimet

AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.

25.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of qualcomm/aimet, a Python project with 2,663 GitHub stars. SynthScan v2.0 examined 297,826 lines of code across 1090 source files, recording 4811 pattern matches distributed across 24 syntactic categories. The overall adjusted score of 25.5 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).

25.5
Adjusted Score
25.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
2.7K
Stars
Python
Language
297.8K
Lines of Code
1.1K
Files
4.8K
Pattern Hits
2026-07-14
Scan Date
0.38
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 8HIGH 411MEDIUM 588LOW 3804

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 4811 distinct pattern matches across 24 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 Identifiers2444 hits · 2212 pts
SeverityFileLineSnippetContext
LOWpackaging/dependencies.py46def _get_pip_reqs_for_framework(CODE
LOWGenAILab/bench/metrics.py103 def _compute_loss_from_logits(CODE
LOWGenAILab/bench/yaml_config_parser.py269 def get_required_export_adaptations(cls, model_type: str) -> list[str]:CODE
LOWGenAILab/bench/recipe_cache.py587def _serialize_dataset_config(dataset_config: dict) -> dict:CODE
LOWGenAILab/bench/datasets.py256 def _format_question_and_answer(CODE
LOWGenAILab/bench/datasets.py395 def _format_question_and_answer(CODE
LOWGenAILab/bench/datasets.py471 def assemble_fewshot_question(formatted_question: str, subject: str):CODE
LOWGenAILab/bench/profiler.py44def convert_gpu_meter_to_dict(CODE
LOWGenAILab/bench/profiler.py145def _aggregate_resource_utilization(CODE
LOWGenAILab/bench/profiler.py172def _serialize_component_stats(CODE
LOWGenAILab/bench/profiler.py246 def dict_to_postgres_csv_json_field(d):CODE
LOWGenAILab/bench/torch/test_genai.py286 def _last_calibration_for_onnx(steps):CODE
LOWGenAILab/tests/unit/conftest.py29 def _permissive_register_model(cls, model_type):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py19 def test_cuda_device_with_index(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py27 def test_cuda_device_without_index(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py35 def test_sets_and_restores_attribute(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py46 def test_creates_and_removes_new_attribute(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py58 def test_restores_class_level_attribute(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py72 def test_ties_past_key_value_quantizers(self, tmp_path):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py121 def test_disables_activation_quantizers(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py143 def test_float_precision_skips_tying(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py154 def test_int_precision_ties_and_sets_symmetric(self):CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py17 def test_fp_mode_removes_quant_nodes(self):CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py49 def test_handles_visual_model(self):CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py96 def test_wraps_backbone_in_torch_onnx_interface(self):CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py127 def test_vlm_wraps_both_models(self):CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py186 def test_reassembles_list_outputs(self):CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py208 def test_no_list_outputs_passthrough(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py61 def test_default_precision_when_none(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py68 def test_calls_set_lm_head_precision(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py74 def test_calls_resolve_kv_cache(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py80 def test_calls_block_granularity(self):CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py95 def test_returns_sim_collection_with_config(self):CODE
LOWGenAILab/tests/unit/torch/test_quantsim_utils.py20 def test_lpbq_calls_grouped_blockwise(self):CODE
LOWGenAILab/tests/unit/torch/test_quantsim_utils.py65 def test_pcq_does_not_call_block_functions(self):CODE
LOWGenAILab/tests/unit/torch/test_quantsim_utils.py87 def test_lpbq_calls_grouped_blockwise(self):CODE
LOWGenAILab/tests/unit/torch/test_quantsim_utils.py117 def test_pcq_sets_bitwidth_directly(self):CODE
LOWGenAILab/tests/unit/torch/test_generator_utils.py52 def test_fp_mode_disables_quantizers(self):CODE
LOWGenAILab/tests/unit/torch/test_generator_utils.py77 def test_handles_visual_model(self):CODE
LOWGenAILab/tests/unit/torch/test_generator_utils.py111 def test_on_device_places_models(self):CODE
LOWGenAILab/tests/unit/torch/test_generator_utils.py139 def test_creates_generator_for_llm(self):CODE
LOWGenAILab/tests/unit/torch/test_generator_utils.py163 def test_creates_vlm_generator_for_vlm(self):CODE
LOW…nAILab/tests/unit/torch/test_quantsim_instantiation.py51 def test_default_precision_used_when_none(self):CODE
LOW…nAILab/tests/unit/torch/test_quantsim_instantiation.py190 def test_returns_sim_collection(self):CODE
LOW…Lab/tests/unit/models/test_hub_compatible_generator.py75 def test_prepare_inputs_adds_rope(self, hub_gen, llama_config):CODE
LOW…Lab/tests/unit/models/test_hub_compatible_generator.py93 def test_prepare_inputs_kv_permutation(self, hub_gen, llama_config):CODE
LOW…Lab/tests/unit/models/test_hub_compatible_generator.py125 def test_extra_kwargs_accepted_as_tensors(self, hub_gen, llama_config):CODE
LOW…Lab/tests/unit/models/test_hub_compatible_generator.py137 def test_combine_outputs_kv_back_to_hf(self, hub_gen, llama_config):CODE
LOWGenAILab/tests/unit/models/test_generator.py432 def test_returns_causal_lm_output(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py437 def test_logits_strip_padding(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py464 def test_long_input_multi_slice(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py470 def test_creates_default_attention_mask(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py475 def test_both_ids_and_embeds_raises(self, gen, cfg):CODE
LOWGenAILab/tests/unit/models/test_generator.py489 def test_yields_prepared_inputs(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py503 def test_multi_slice_yields_multiple(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py515 def test_first_call_no_stripping(self, gen):CODE
LOWGenAILab/tests/unit/models/test_generator.py524 def test_strips_consumed_tokens(self, gen, cfg):CODE
LOWGenAILab/tests/unit/models/test_generator.py569 def test_logits_strip_padding(self, gen, cfg):CODE
LOWGenAILab/tests/unit/models/test_generator.py650 def test_linear_layer_state_replaced_not_concatenated(self):CODE
LOWGenAILab/tests/unit/models/test_generator.py702def _make_sliding_descriptors(window_size=32):CODE
2384 more matches not shown…
Cross-File Repetition373 hits · 1865 pts
SeverityFileLineSnippetContext
HIGHModelOptimizations/PyModelOptimizations/_quant_enums.py0shared quantization enums used by cython modules. this module provides intenum classes that are shared between _libpymo STRING
HIGH…gExtensions/onnx/src/python/aimet_onnx/_quant_enums.py0shared quantization enums used by cython modules. this module provides intenum classes that are shared between _libpymo STRING
HIGH…nsions/common/src/python/_aimet_common/_quant_enums.py0shared quantization enums used by cython modules. this module provides intenum classes that are shared between _libpymo STRING
HIGHGenAILab/qai_hub_lm/backends/onnx/internvl.py0export (or load) the raw float backbone/visual onnx models + embedding. separated from :meth:`instantiate_quantsim` so tSTRING
HIGHGenAILab/qai_hub_lm/backends/onnx/qwen2_vl.py0export (or load) the raw float backbone/visual onnx models + embedding. separated from :meth:`instantiate_quantsim` so tSTRING
HIGHGenAILab/qai_hub_lm/backends/onnx/qwen3_vl.py0export (or load) the raw float backbone/visual onnx models + embedding. separated from :meth:`instantiate_quantsim` so tSTRING
HIGHGenAILab/qai_hub_lm/backends/onnx/gemma4.py0export (or load) the raw float backbone/visual onnx models + embedding. separated from :meth:`instantiate_quantsim` so tSTRING
HIGHGenAILab/qai_hub_lm/backends/onnx/gemma3.py0export (or load) the raw float backbone/visual onnx models + embedding. separated from :meth:`instantiate_quantsim` so tSTRING
HIGHGenAILab/qai_hub_lm/backends/onnx/internvl.py0export the torch model to onnx and return a :class:`modelcacheentry`.STRING
HIGHGenAILab/qai_hub_lm/backends/onnx/qwen2_vl.py0export the torch model to onnx and return a :class:`modelcacheentry`.STRING
HIGHGenAILab/qai_hub_lm/backends/onnx/qwen3_vl.py0export the torch model to onnx and return a :class:`modelcacheentry`.STRING
HIGHGenAILab/qai_hub_lm/backends/onnx/gemma4.py0export the torch model to onnx and return a :class:`modelcacheentry`.STRING
HIGHGenAILab/qai_hub_lm/backends/onnx/gemma3.py0export the torch model to onnx and return a :class:`modelcacheentry`.STRING
HIGHDocs/snippets/onnx/apply_litemp.py0returns calibration and evaluation data-loader for imagenet dataset from provided pathSTRING
HIGHDocs/snippets/onnx/apply_quantsim.py0returns calibration and evaluation data-loader for imagenet dataset from provided pathSTRING
HIGHDocs/snippets/torch/apply_quantsim.py0returns calibration and evaluation data-loader for imagenet dataset from provided pathSTRING
HIGH…acy/torch_code_examples/model_preparer_code_example.py0model that uses functional modules instead of nn.modules. expects input of shape (1, 3, 32, 32)STRING
HIGH…Extensions/onnx/test/python/models/models_for_tests.py0model that uses functional modules instead of nn.modules. expects input of shape (1, 3, 32, 32)STRING
HIGH…ningExtensions/torch/test/python/models/test_models.py0model that uses functional modules instead of nn.modules. expects input of shape (1, 3, 32, 32)STRING
HIGH…Extensions/torch/test/python/v2/models_/test_models.py0model that uses functional modules instead of nn.modules. expects input of shape (1, 3, 32, 32)STRING
HIGH…s/torch/src/python/aimet_torch/examples/test_models.py0model that uses functional modules instead of nn.modules. expects input of shape (1, 3, 32, 32)STRING
HIGH…ngExtensions/torch/test/python/test_model_validator.py0model that uses functional modules instead of nn.modules. expects input of shape (1, 3, 32, 32)STRING
HIGH…acy/torch_code_examples/model_preparer_code_example.py0model that uses single relu instances multiple times in the forward. expects input of shape (1, 3, 32, 32)STRING
HIGH…Extensions/onnx/test/python/models/models_for_tests.py0model that uses single relu instances multiple times in the forward. expects input of shape (1, 3, 32, 32)STRING
HIGH…ningExtensions/torch/test/python/models/test_models.py0model that uses single relu instances multiple times in the forward. expects input of shape (1, 3, 32, 32)STRING
HIGH…Extensions/torch/test/python/v2/models_/test_models.py0model that uses single relu instances multiple times in the forward. expects input of shape (1, 3, 32, 32)STRING
HIGH…s/torch/src/python/aimet_torch/examples/test_models.py0model that uses single relu instances multiple times in the forward. expects input of shape (1, 3, 32, 32)STRING
HIGH…cy/torch_code_examples/model_validator_code_example.py0model that reuses a relu module. expects input of shape (1, 3, 32, 32)STRING
HIGH…Extensions/onnx/test/python/models/models_for_tests.py0model that reuses a relu module. expects input of shape (1, 3, 32, 32)STRING
HIGH…ningExtensions/torch/test/python/models/test_models.py0model that reuses a relu module. expects input of shape (1, 3, 32, 32)STRING
HIGH…Extensions/torch/test/python/v2/models_/test_models.py0model that reuses a relu module. expects input of shape (1, 3, 32, 32)STRING
HIGH…s/torch/src/python/aimet_torch/examples/test_models.py0model that reuses a relu module. expects input of shape (1, 3, 32, 32)STRING
HIGHExamples/onnx/utils/image_net_evaluator.py0:param images_dir: the path to the data directory :param image_size: the length of the image :param batch_size: the batcSTRING
HIGHExamples/torch/utils/image_net_trainer.py0:param images_dir: the path to the data directory :param image_size: the length of the image :param batch_size: the batcSTRING
HIGHExamples/torch/utils/image_net_evaluator.py0:param images_dir: the path to the data directory :param image_size: the length of the image :param batch_size: the batcSTRING
HIGHExamples/torch/utils/image_net_evaluator.py0evaluate the specified model using the specified number of samples from the validation set. :param model: the model to bSTRING
HIGHExamples/torch/quantization/range_learning.py0evaluate the specified model using the specified number of samples from the validation set. :param model: the model to bSTRING
HIGH…ples/torch/quantization/quantization_aware_training.py0evaluate the specified model using the specified number of samples from the validation set. :param model: the model to bSTRING
HIGHExamples/torch/quantization/adaround.py0evaluate the specified model using the specified number of samples from the validation set. :param model: the model to bSTRING
HIGHExamples/torch/quantization/range_learning.py0provides apis for model quantization using evaluation and finetuning.STRING
HIGH…ples/torch/quantization/quantization_aware_training.py0provides apis for model quantization using evaluation and finetuning.STRING
HIGHExamples/torch/quantization/adaround.py0provides apis for model quantization using evaluation and finetuning.STRING
HIGHExamples/torch/quantization/range_learning.py0finetunes the model. the implemtation provided here is just an example, provide your own implementation if needed. :paraSTRING
HIGHExamples/torch/compression/weight_svd.py0finetunes the model. the implemtation provided here is just an example, provide your own implementation if needed. :paraSTRING
HIGHExamples/torch/compression/channel_pruning.py0finetunes the model. the implemtation provided here is just an example, provide your own implementation if needed. :paraSTRING
HIGHExamples/torch/compression/spatial_svd_cp.py0finetunes the model. the implemtation provided here is just an example, provide your own implementation if needed. :paraSTRING
HIGHExamples/torch/compression/spatial_svd.py0finetunes the model. the implemtation provided here is just an example, provide your own implementation if needed. :paraSTRING
HIGHExamples/torch/compression/channel_pruning.py0provides apis for model compression using aimet weight svd, evaluation and finetuning.STRING
HIGHExamples/torch/compression/weight_svd.py0provides apis for model compression using aimet weight svd, evaluation and finetuning.STRING
HIGHExamples/torch/compression/spatial_svd_cp.py0provides apis for model compression using aimet weight svd, evaluation and finetuning.STRING
HIGHExamples/torch/compression/spatial_svd.py0provides apis for model compression using aimet weight svd, evaluation and finetuning.STRING
HIGHExamples/torch/compression/channel_pruning.py0evaluate the specified model using the specified number of samples from the validation set. aimet's compress_model() expSTRING
HIGHExamples/torch/compression/weight_svd.py0evaluate the specified model using the specified number of samples from the validation set. aimet's compress_model() expSTRING
HIGHExamples/torch/compression/spatial_svd_cp.py0evaluate the specified model using the specified number of samples from the validation set. aimet's compress_model() expSTRING
HIGHExamples/torch/compression/spatial_svd.py0evaluate the specified model using the specified number of samples from the validation set. aimet's compress_model() expSTRING
HIGHExamples/torch/compression/channel_pruning.py01. instantiate data pipeline for evaluation and training 2. load the pretrained resnet18 model 3. calculate floating poiSTRING
HIGHExamples/torch/compression/weight_svd.py01. instantiate data pipeline for evaluation and training 2. load the pretrained resnet18 model 3. calculate floating poiSTRING
HIGHExamples/torch/compression/spatial_svd_cp.py01. instantiate data pipeline for evaluation and training 2. load the pretrained resnet18 model 3. calculate floating poiSTRING
HIGHExamples/torch/compression/spatial_svd.py01. instantiate data pipeline for evaluation and training 2. load the pretrained resnet18 model 3. calculate floating poiSTRING
HIGHAIMETRegression/features/onnx/quantsim_runner.py0extract numeric bitwidth from various formats (int8, "int8", 8, "8").STRING
313 more matches not shown…
Decorative Section Separators470 hits · 1474 pts
SeverityFileLineSnippetContext
MEDIUMCMakeLists.txt122# -------------------------------COMMENT
MEDIUMCMakeLists.txt124# -------------------------------COMMENT
MEDIUMCMakeLists.txt176# -------------------------------COMMENT
MEDIUMCMakeLists.txt178# -------------------------------COMMENT
MEDIUMCMakeLists.txt209# -------------------------------COMMENT
MEDIUMCMakeLists.txt211# -------------------------------COMMENT
MEDIUMCMakeLists.txt247# -------------------------------COMMENT
MEDIUMCMakeLists.txt249# -------------------------------COMMENT
MEDIUMpackaging/INSTALL.txt1# ==================================================================================COMMENT
MEDIUMpackaging/INSTALL.txt3# ==================================================================================COMMENT
MEDIUMpackaging/envsetup.sh7#====================================COMMENT
MEDIUMpackaging/envsetup.sh9#===================================COMMENT
MEDIUMGenAILab/__main__.py173# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/__main__.py175# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/__main__.py283# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/__main__.py285# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/__main__.py392# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/__main__.py394# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py317# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py319# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py388# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py390# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py456# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py458# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py584# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/metrics.py586# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py37 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py39 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py76 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py78 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py120 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py122 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py152 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py154 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py171 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py173 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py200 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py202 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py321 # ========================COMMENT
MEDIUMGenAILab/bench/yaml_config_parser.py323 # ========================COMMENT
MEDIUMGenAILab/bench/eval_context.py34 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/eval_context.py36 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/eval_context.py56 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/eval_context.py58 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/fp_cache.py35 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/fp_cache.py37 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/fp_cache.py104 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/fp_cache.py106 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/model_cache.py62 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/model_cache.py64 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/model_cache.py251 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/bench/model_cache.py253 # ------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py13# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py15# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py38# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py40# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py81# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py83# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py98# ---------------------------------------------------------------------------COMMENT
MEDIUMGenAILab/tests/conftest.py100# ---------------------------------------------------------------------------COMMENT
410 more matches not shown…
Unused Imports519 hits · 502 pts
SeverityFileLineSnippetContext
LOWpackaging/plugins/local/aimet.py4CODE
LOWGenAILab/bench/onnx/quant_recipes.py23CODE
LOWGenAILab/bench/onnx/test_genai.py33CODE
LOWGenAILab/bench/onnx/test_genai.py34CODE
LOWGenAILab/bench/onnx/test_genai.py35CODE
LOWGenAILab/bench/torch/test_genai.py34CODE
LOWGenAILab/bench/torch/test_genai.py35CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py6CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_utils.py8CODE
LOWGenAILab/tests/unit/onnx/test_generator_utils.py8CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py10CODE
LOWGenAILab/tests/unit/onnx/test_quantsim_instantiation.py12CODE
LOWGenAILab/tests/unit/torch/test_quantsim_utils.py6CODE
LOWGenAILab/tests/unit/torch/test_quantsim_utils.py8CODE
LOWGenAILab/tests/unit/torch/test_generator_utils.py8CODE
LOW…nAILab/tests/unit/torch/test_quantsim_instantiation.py12CODE
LOW…nAILab/tests/unit/torch/test_quantsim_instantiation.py15CODE
LOW…Lab/tests/unit/models/test_hub_compatible_generator.py7CODE
LOW…Lab/tests/unit/models/test_hub_compatible_generator.py8CODE
LOWGenAILab/tests/unit/models/test_generator.py6CODE
LOWGenAILab/tests/unit/models/test_vlm_generator.py11CODE
LOWGenAILab/tests/unit/models/test_layer_cache.py8CODE
LOWGenAILab/tests/unit/models/test_adaptations.py6CODE
LOWGenAILab/tests/unit/models/test_base.py8CODE
LOWGenAILab/tests/unit/infrastructure/test_main.py6CODE
LOWGenAILab/tests/unit/infrastructure/test_main.py9CODE
LOWGenAILab/tests/unit/helpers/test_model_cache.py6CODE
LOWGenAILab/tests/unit/helpers/test_yaml_config_parser.py6CODE
LOWGenAILab/tests/unit/helpers/test_yaml_config_parser.py7CODE
LOWGenAILab/tests/unit/helpers/test_yaml_config_parser.py11CODE
LOWGenAILab/tests/unit/helpers/test_precision_config.py8CODE
LOWGenAILab/qai_hub_lm/precision.py6CODE
LOWGenAILab/qai_hub_lm/precision.py11CODE
LOWGenAILab/qai_hub_lm/precision.py22CODE
LOWGenAILab/qai_hub_lm/backends/onnx/internvl.py6CODE
LOWGenAILab/qai_hub_lm/backends/onnx/internvl.py26CODE
LOWGenAILab/qai_hub_lm/backends/onnx/qwen2_vl.py6CODE
LOWGenAILab/qai_hub_lm/backends/onnx/qwen3_vl.py6CODE
LOWGenAILab/qai_hub_lm/backends/onnx/gemma4.py6CODE
LOWGenAILab/qai_hub_lm/backends/onnx/gemma4.py10CODE
LOWGenAILab/qai_hub_lm/backends/onnx/gemma4.py28CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py9CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py12CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py15CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py18CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py21CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py28CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py33CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py38CODE
LOWGenAILab/qai_hub_lm/backends/onnx/__init__.py44CODE
LOWGenAILab/qai_hub_lm/backends/onnx/llm.py6CODE
LOWGenAILab/qai_hub_lm/backends/onnx/gemma3.py6CODE
LOW…AILab/qai_hub_lm/backends/onnx/adaptations/__init__.py4CODE
LOW…Lab/qai_hub_lm/backends/onnx/adaptations/hub_models.py40CODE
LOWGenAILab/qai_hub_lm/backends/torch/internvl.py6CODE
LOWGenAILab/qai_hub_lm/backends/torch/internvl.py8CODE
LOWGenAILab/qai_hub_lm/backends/torch/qwen2_vl.py6CODE
LOWGenAILab/qai_hub_lm/backends/torch/qwen2_vl.py8CODE
LOWGenAILab/qai_hub_lm/backends/torch/qwen3_vl.py6CODE
LOWGenAILab/qai_hub_lm/backends/torch/qwen3_vl.py8CODE
459 more matches not shown…
Self-Referential Comments109 hits · 342 pts
SeverityFileLineSnippetContext
MEDIUMGenAILab/bench/torch/example_custom_script.py90 # Create a generator object to accurately simulate inference with static graph constraints while maintaining theCOMMENT
MEDIUM…nAILab/tests/unit/torch/test_quantsim_instantiation.py27 # Create a module hierarchy that mimics a real modelCOMMENT
MEDIUMGenAILab/qai_hub_lm/backends/onnx/export_utils.py188 # Create the checkpoint directory if it does not exist.COMMENT
MEDIUMDocs/snippets/onnx/apply_seqmse.py74# Create the QuantizationSimModelCOMMENT
MEDIUMDocs/snippets/torch/apply_qwlora.py135# Create a QuantizationSimModelCOMMENT
MEDIUMExamples/onnx/quantize.py208 # Create a generator object to accurately simulate inference with static graph constraints while maintaining theCOMMENT
MEDIUMExamples/torch/quantize.py215 # Create a generator object to accurately simulate inference with static graph constraints while maintaining theCOMMENT
MEDIUMExamples/torch/evaluate.py210 # Create a generator object to accurately simulate inference with static graph constraints while maintaining theCOMMENT
MEDIUM…ples/torch/quantization/qat_range_learning_ddp_eval.py179 # Create an instance of DDP in order to perform distributed evalCOMMENT
MEDIUM…tization/qat_range_learning_ddp_training_lightining.py217 # Define the trainer here.COMMENT
MEDIUMExamples/torch/v2/quickstart_guide.py108# Create a modelCOMMENT
MEDIUM.github/actions/start-gpu-runner/action.yml118 # Create the Kubernetes secret that the pod is polling forCOMMENT
MEDIUMAIMETRegression/configs/_defaults.yaml3# This file defines default settings inherited by all tests.COMMENT
MEDIUMTrainingExtensions/onnx/test/python/test_quantsim.py1485 # Create a new quantsim modelCOMMENT
MEDIUMTrainingExtensions/onnx/test/python/test_quantsim.py1924 # Create a model with very high total activation memory usageCOMMENT
MEDIUMTrainingExtensions/onnx/test/python/test_quantsim.py3588 # Create an identical QuantizationSimModelCOMMENT
MEDIUM…ingExtensions/onnx/test/python/test_mixed_precision.py498 # Create an accuracy listCOMMENT
MEDIUM…ingExtensions/onnx/test/python/test_mixed_precision.py592 # Create an accuracy listCOMMENT
MEDIUM…ningExtensions/onnx/test/python/test_qc_quantize_op.py1948 # Create a new per-tensor quantizerCOMMENT
MEDIUM…iningExtensions/onnx/test/python/test_libquant_info.py98 # Create a BlockTensorQuantizerCOMMENT
MEDIUMTrainingExtensions/onnx/test/python/test_adascale.py856 # Create a copy of the weights before applying AdaScaleCOMMENT
MEDIUM…Extensions/onnx/test/python/models/test_models_onnx.py50 # Create the initializer tensor for the weights.COMMENT
MEDIUM…Extensions/onnx/test/python/models/test_models_onnx.py99 # Create the initializer tensor for the weights.COMMENT
MEDIUM…Extensions/onnx/test/python/models/test_models_onnx.py158 # Create the model (ModelProto)COMMENT
MEDIUM…Extensions/onnx/test/python/models/test_models_onnx.py195 # Create the initializer tensor for the weights.COMMENT
MEDIUM…Extensions/onnx/test/python/models/test_models_onnx.py244 # Create the initializer tensor for the weights.COMMENT
MEDIUM…Extensions/onnx/test/python/models/test_models_onnx.py307 # Create the model (ModelProto)COMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py2952 # Define the fixed shape input tensorCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py2960 # Define the constant 1D vector to be added to the inputCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py2966 # Define the weights for both matmulsCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py2974 # Define the Add nodeCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py2982 # Define the MatMul nodesCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py2997 # Define the output tensorsCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py3005 # Create the graphCOMMENT
MEDIUM…Extensions/onnx/test/python/models/models_for_tests.py3014 # Create the modelCOMMENT
MEDIUM…rc/python/aimet_onnx/experimental/lora/prepare_lora.py1359 # Create a new initializer with unique name (use full module_pathCOMMENT
MEDIUM…aimet_onnx/experimental/adascale/adascale_optimizer.py388 ] # Create a new tensorCODE
MEDIUM…aimet_onnx/experimental/adascale/adascale_optimizer.py451 ] # Create a new tensorCODE
MEDIUM…onnx/src/python/aimet_onnx/sequential_mse/transform.py138 # Create a new input tensor with symbolic dimensions and same nameCOMMENT
MEDIUMTrainingExtensions/torch/test/python/test_utils.py539 # Create a model with a layer with multi-outputsCOMMENT
MEDIUM…Extensions/torch/test/python/test_comp_ratio_select.py197 # Create a layer databaseCOMMENT
MEDIUMTrainingExtensions/torch/test/python/test_weight_svd.py219 # Create a layer databaseCOMMENT
MEDIUM…ainingExtensions/torch/test/python/test_spatial_svd.py152 # Create a layer databaseCOMMENT
MEDIUM…ainingExtensions/torch/test/python/test_spatial_svd.py198 # Create a layer databaseCOMMENT
MEDIUM…ngExtensions/torch/test/python/test_channel_pruning.py784 # Create a layer databaseCOMMENT
MEDIUM…ngExtensions/torch/test/python/test_channel_pruning.py831 # Create a layer databaseCOMMENT
MEDIUM…ngExtensions/torch/test/python/test_channel_pruning.py895 # Create a layer databaseCOMMENT
MEDIUM…ngExtensions/torch/test/python/test_channel_pruning.py952 # Create a layer databaseCOMMENT
MEDIUM…ngExtensions/torch/test/python/test_cost_calculator.py323 # Create a list of tuples of (layer, comp_ratio)COMMENT
MEDIUM…ngExtensions/torch/test/python/test_cost_calculator.py348 # Create a list of tuples of (layer, comp_ratio)COMMENT
MEDIUM…ngExtensions/torch/test/python/test_cost_calculator.py364 # Create a list of tuples of (layer, comp_ratio)COMMENT
MEDIUM…ngExtensions/torch/test/python/test_cost_calculator.py435 # Create a list of tuples of (layer, comp_ratio)COMMENT
MEDIUM…ngExtensions/torch/test/python/test_cost_calculator.py464 # Create a list of tuples of (layer, comp_ratio)COMMENT
MEDIUM…ngExtensions/torch/test/python/test_cost_calculator.py474 # Create the Input channel prunerCOMMENT
MEDIUM…ions/torch/test/python/experimental/test_transforms.py50 # Create a diagonal matrix with positive singular valuesCOMMENT
MEDIUM…ions/torch/test/python/experimental/test_transforms.py172 # Create a matrix transform opCOMMENT
MEDIUM…ions/torch/test/python/experimental/test_transforms.py272 # Create a matrix transform opCOMMENT
MEDIUM…xtensions/torch/test/python/v2/test_mixed_precision.py414 # Create an accuracy listCOMMENT
MEDIUM…xtensions/torch/test/python/v2/test_mixed_precision.py454 # Create an accuracy listCOMMENT
MEDIUM…xtensions/torch/test/python/v2/test_mixed_precision.py1423 # Create an accuracy listCOMMENT
49 more matches not shown…
Deep Nesting379 hits · 324 pts
SeverityFileLineSnippetContext
LOWpackaging/plugins/local/aimet.py87CODE
LOWGenAILab/__main__.py339CODE
LOWGenAILab/bench/yaml_config_parser.py220CODE
LOWGenAILab/bench/yaml_config_parser.py340CODE
LOWGenAILab/bench/yaml_config_parser.py521CODE
LOWGenAILab/bench/recipe_cache.py70CODE
LOWGenAILab/bench/recipe_cache.py384CODE
LOWGenAILab/bench/recipe_cache.py413CODE
LOWGenAILab/bench/recipe_chain.py28CODE
LOWGenAILab/bench/onnx/quant_recipes.py26CODE
LOWGenAILab/bench/onnx/test_genai.py56CODE
LOWGenAILab/bench/torch/test_genai.py41CODE
LOWGenAILab/qai_hub_lm/precision.py177CODE
LOWGenAILab/qai_hub_lm/backends/onnx/export_utils.py159CODE
LOWGenAILab/qai_hub_lm/backends/onnx/quantsim_utils.py204CODE
LOW…AILab/qai_hub_lm/backends/onnx/torch_onnx_interface.py63CODE
LOWGenAILab/qai_hub_lm/backends/torch/generator_utils.py58CODE
LOWGenAILab/qai_hub_lm/backends/torch/generator_utils.py42CODE
LOWGenAILab/qai_hub_lm/models/qwen3_vl.py373CODE
LOWGenAILab/qai_hub_lm/models/generator.py424CODE
LOWGenAILab/qai_hub_lm/models/generator.py1041CODE
LOWscripts/all/build_and_test.py1240CODE
LOWscripts/all/build_and_test.py247CODE
LOWscripts/all/build_and_test.py356CODE
LOWAIMETRegression/suite_runner.py103CODE
LOWAIMETRegression/baseline_comparison.py996CODE
LOWAIMETRegression/baseline_comparison.py376CODE
LOWAIMETRegression/runner.py125CODE
LOWAIMETRegression/runner.py332CODE
LOWAIMETRegression/runner.py734CODE
LOWAIMETRegression/features/onnx/_common.py287CODE
LOWAIMETRegression/features/onnx/mixed_precision_runner.py62CODE
LOW…METRegression/features/torch/mixed_precision_runner.py99CODE
LOWAIMETRegression/features/torch/utils.py91CODE
LOWAIMETRegression/features/torch/utils.py158CODE
LOWAIMETRegression/workflow/summary.py83CODE
LOWAIMETRegression/workflow/utils.py87CODE
LOWAIMETRegression/workflow/utils.py166CODE
LOWAIMETRegression/evaluation/eval_qnn.py171CODE
LOWAIMETRegression/evaluation/eval_qnn.py246CODE
LOWAIMETRegression/evaluation/eval_torch.py64CODE
LOWAIMETRegression/evaluation/metrics_utils.py216CODE
LOWAIMETRegression/evaluation/metrics_utils.py319CODE
LOWAIMETRegression/evaluation/metrics_utils.py217CODE
LOWAIMETRegression/evaluation/metrics_utils.py348CODE
LOWNightlyTests/onnx/test_mixed_precision.py157CODE
LOWNightlyTests/torch/dependencies.py116CODE
LOWNightlyTests/torch/models/mobilenet.py206CODE
LOWNightlyTests/torch/models/mobilenet.py279CODE
LOW…sts/torch/models/supervised_classification_pipeline.py48CODE
LOWNightlyTests/torch/models/mnist_torch_model.py168CODE
LOWNightlyTests/torch/models/mnist_torch_model.py216CODE
LOWTrainingExtensions/onnx/test/python/test_enpu_config.py299CODE
LOWTrainingExtensions/onnx/test/python/test_quantsim.py7553CODE
LOWTrainingExtensions/onnx/test/python/test_quantsim.py7769CODE
LOWTrainingExtensions/onnx/test/python/test_quantsim.py1143CODE
LOWTrainingExtensions/onnx/test/python/test_quantsim.py1239CODE
LOWTrainingExtensions/onnx/test/python/test_spinquant.py189CODE
LOWTrainingExtensions/onnx/test/python/test_spinquant.py2040CODE
LOWTrainingExtensions/onnx/test/python/test_spinquant.py2095CODE
319 more matches not shown…
Over-Commented Block133 hits · 128 pts
SeverityFileLineSnippetContext
LOWpackaging/INSTALL.txt1# ==================================================================================COMMENT
LOWpackaging/NOTICE.txt61COMMENT
LOWpackaging/NOTICE.txt81// distribution.COMMENT
LOWpackaging/NOTICE.txt101#COMMENT
LOWpackaging/NOTICE.txt121# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTCOMMENT
LOWpackaging/NOTICE.txt141// in the documentation and/or other materials provided with theCOMMENT
LOWpackaging/NOTICE.txt161// Copyright 2008, Google Inc.COMMENT
LOWpackaging/NOTICE.txt181// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWpackaging/NOTICE.txt201// * Redistributions in binary form must reproduce the aboveCOMMENT
LOWpackaging/NOTICE.txt221=================================================================================COMMENT
LOWpackaging/NOTICE.txt281//COMMENT
LOWpackaging/NOTICE.txt301// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTCOMMENT
LOWpackaging/convert_wheel_format.sh1#!/bin/bashCOMMENT
LOW…ions/DlQuantization/test/TestQuantizationFunctions.cpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…izations/DlQuantization/test/test_quantization_lib.hpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…ions/DlQuantization/src/PercentileEncodingAnalyzer.cpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…delOptimizations/DlQuantization/src/math_functions.cpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…delOptimizations/DlQuantization/src/trim_functions.hpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…delOptimizations/DlQuantization/src/trim_functions.cpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…izations/DlQuantization/src/MinMaxEncodingAnalyzer.cpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOW…ptimizations/DlQuantization/src/quantization_utils.cpp1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/bench/onnx/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/bench/utils/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/bench/prompts/multimodal_prompts.yaml1# Prompts for evaluating quantized VLM generation quality.COMMENT
LOWGenAILab/tests/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/tests/integration/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/qai_hub_lm/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/qai_hub_lm/models/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/qai_hub_lm/models/qwen3_5.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/qai_hub_lm/models/utils/compat.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWGenAILab/qai_hub_lm/models/utils/__init__.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWDocs/conf.py1# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.COMMENT
LOWDocs/conf.py81# The language for content autogenerated by Sphinx. Refer to documentationCOMMENT
LOWDocs/conf.py101# The theme to use for HTML and HTML Help pages. See the documentation forCOMMENT
LOWDocs/conf.py181# -- Options for LaTeX output ------------------------------------------------COMMENT
LOWDocs/snippets/onnx/apply_quantsim.py121# Export the modelCOMMENT
LOW…mples/torch/quantization/zero_bit_quantization_demo.py1# -*- coding: utf-8 -*-COMMENT
LOWExamples/torch/quantization/adaround.py41# Scenario parameters:COMMENT
LOWExamples/torch/v2/quickstart_guide.py141# 1) Model preparationCOMMENT
LOWExamples/torch/v2/quickstart_guide.py161# Note how the prepared model now contains distinct modules for the :func:`relu` and :func:`softmax` operations.COMMENT
LOWExamples/torch/v2/quickstart_guide.py181#COMMENT
LOWExamples/torch/v2/quickstart_guide.py221COMMENT
LOWExamples/torch/v2/quickstart_guide.py281# This export method will save the model with quantization nodes removed, along with an encodings file containingCOMMENT
LOWExamples/torch/compression/spatial_svd_cp.py41# how AIMET APIs can be invoked.COMMENT
LOWscripts/all/download_genai_checkpoint.sh1#!/bin/bashCOMMENT
LOWscripts/all/resolve_genai_config.sh1#!/bin/bashCOMMENT
LOWscripts/environment/setup_genai.sh1#!/bin/bashCOMMENT
LOWscripts/environment/build_aimet.sh1#!/bin/bashCOMMENT
LOWscripts/environment/build_aimet.sh21#COMMENT
LOWscripts/kube/stop_pod.sh1#!/bin/bashCOMMENT
LOWscripts/kube/launch_pod.sh1#!/bin/bashCOMMENT
LOW.github/workflows/genai-scorecard.yaml1################################################################################COMMENT
LOW.github/actions/genai-test/action.yml1################################################################################COMMENT
LOW.github/actions/stop-gpu-runner/action.yml1################################################################################COMMENT
LOW.github/actions/start-gpu-runner/action.yml1################################################################################COMMENT
LOWAIMETRegression/configs/_defaults.yaml1# Base Configuration for AIMET ONNX RegressionCOMMENT
LOWAIMETRegression/configs/_defaults.yaml21COMMENT
LOWAIMETRegression/configs/models/resnet50.yaml1# ResNet50 Model ConfigurationCOMMENT
LOWAIMETRegression/configs/_profiles/nightly.yaml1# Nightly Profile - Daily Regression TestingCOMMENT
LOWAIMETRegression/configs/_profiles/weekly.yaml1# Weekly Profile - Comprehensive Regression TestingCOMMENT
73 more matches not shown…
Redundant / Tautological Comments81 hits · 125 pts
SeverityFileLineSnippetContext
LOWpackaging/plugins/local/aimet.py61 # Check if ARM64 is specified in CMAKE_ARGS or if running natively on ARM64COMMENT
LOWGenAILab/bench/profiler.py344 # Check if the file existsCOMMENT
LOWGenAILab/bench/profiler.py346 # Open the file and load the existing dataCOMMENT
LOWDocs/legacy/torch_code_examples/mixed_precision.py87# Set clean_start to False to start from an existing cacheCOMMENT
LOWDocs/legacy/torch_code_examples/mixed_precision.py88# Set allowed_accuracy_drop to 0.9 to export the 90% drop point in pareto listCOMMENT
LOWscripts/posix/install_macos_deps.sh18# Check if Homebrew is installedCOMMENT
LOWscripts/all/build_and_test.py357 # Check if we can skip the buildCOMMENT
LOWscripts/all/build_and_test.py617 # Check if we can skip wheel installationCOMMENT
LOWscripts/kube/dev.sh85 # Check if it's a pod name or a workflow nameCOMMENT
LOWscripts/kube/launch_pod.sh109 # Check if workflow has failedCOMMENT
LOW.github/workflows/dco.yml34 # Check if author is indeed signing off commitCOMMENT
LOWAIMETRegression/features/onnx/lite_mp_runner.py102 # Check if already a valid symbolCOMMENT
LOW…METRegression/features/torch/mixed_precision_runner.py198 # Check if user requested unsupported candidatesCOMMENT
LOWAIMETRegression/features/torch/utils.py110 # Check if already patched by another mechanismCOMMENT
LOWAIMETRegression/models/ai_hub_loader.py77 # Check if it's a class and subclass of BaseModelCOMMENT
LOWNightlyTests/torch/dependencies.py31# Check if we need to generate the .pth for CPU or GPU. If not, returnCOMMENT
LOWTrainingExtensions/onnx/test/python/test_quantsim.py235 # Check if qc quantize op node is correctly connect to the corresponding onnx nodeCOMMENT
LOWTrainingExtensions/onnx/test/python/test_quantsim.py242 # Check if op_mode is set correctly for each qc quantize op nodeCOMMENT
LOW…ingExtensions/onnx/test/python/test_mixed_precision.py253 # Check if quantizer group is set to maximum bitwidthCOMMENT
LOW…ingExtensions/onnx/test/python/test_mixed_precision.py320 # Check if accuracy list is in descending orderCOMMENT
LOW…ningExtensions/onnx/test/python/test_quant_analyzer.py194 # Check if it is exported to correct html file.COMMENT
LOW…ningExtensions/onnx/test/python/test_quant_analyzer.py231 # Check if it is exported to correct html file.COMMENT
LOW…ningExtensions/onnx/test/python/test_quant_analyzer.py438 # Check if it is exported to correct html file.COMMENT
LOW…ons/onnx/test/python/test_graph_passes/test_rmsnorm.py43 # Check if quantization is disabled for RMSNormalization intermediate op outputsCOMMENT
LOW…ons/onnx/test/python/test_graph_passes/test_rmsnorm.py45 # Check if quantization is enabled for last op of RMSNormalization sub-graphCOMMENT
LOW…ons/onnx/test/python/test_graph_passes/test_rmsnorm.py48 # Check if quantization is disabled for RMSNormalization sub-graph constant ops except weightCOMMENT
LOW…s/onnx/test/python/test_graph_passes/test_layernorm.py35 # Check if quantization is disabled for LayerNormalization intermediate op outputsCOMMENT
LOW…s/onnx/test/python/test_graph_passes/test_layernorm.py37 # Check if quantization is enabled for last op of LayerNormalization sub-graphCOMMENT
LOW…s/onnx/test/python/test_graph_passes/test_layernorm.py40 # Check if quantization is disabled for LayerNormalization sub-graph constant ops except layernorm.weightCOMMENT
LOW…s/onnx/test/python/test_graph_passes/test_layernorm.py68 # Check if quantization is disabled for LayerNormalization intermediate op outputsCOMMENT
LOW…s/onnx/test/python/test_graph_passes/test_layernorm.py70 # Check if quantization is enabled for last op of LayerNormalization sub-graphCOMMENT
LOW…s/onnx/test/python/test_graph_passes/test_layernorm.py72 # Check if quantization is disabled for LayerNormalization sub-graph constant ops except layernorm.weightCOMMENT
LOW…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py792 # Check if the tensor is param to certain ops (eg: Resize)STRING
LOW…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py812 # Check if the tensor is output of certain opsSTRING
LOW…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py1080 # Check if weights are constantSTRING
LOW…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py3527 # Check if encoding corresponds to non-quantizable tensor typeSTRING
LOWTrainingExtensions/onnx/src/python/aimet_onnx/utils.py173 # Check if other node takes input from removed nodeCOMMENT
LOWTrainingExtensions/onnx/src/python/aimet_onnx/utils.py430 # Check if the weight is transposed before entering the nodeCOMMENT
LOW…tensions/onnx/src/python/aimet_onnx/batch_norm_fold.py219 # Check if this is actually a fully connected layer or a dynamic matmulCOMMENT
LOW…x/src/python/aimet_onnx/adaround/adaround_optimizer.py96 # Check if we can cache intermediate activation data.COMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py430 # Check if input comes from an Identity whose input is an initializerCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py470 # Check if this Mul's inputs include a scale (Constant or init)COMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py1502 # Check if scale is already a named initializerCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/peft_to_onnx.py805 # Check if this input comes from a Constant nodeCOMMENT
LOW…/python/aimet_onnx/experimental/lora/lora_configure.py631 # Check if this input comes from a Constant nodeCOMMENT
LOW…x/src/python/aimet_onnx/graph_passes/passes/rmsnorm.py68 # Check if weights are present, skipping any Cast ops (e.g. fromCOMMENT
LOW…src/python/aimet_onnx/graph_passes/passes/layernorm.py93 # Check if affine_transform is set.COMMENT
LOW…nnx/graph_passes/cleanup/remove_duplicate_qdq_pairs.py121 # Check if Q1/DQ1 params match Q2/DQ2 paramsCOMMENT
LOW…onnx/src/python/aimet_onnx/sequential_mse/transform.py476 # Check if this is a Transpose opCOMMENT
LOW…onnx/src/python/aimet_onnx/sequential_mse/transform.py492 # Check if input is a leaf initializer (unquantized case)COMMENT
LOW…xtensions/torch/test/python/test_layer_output_utils.py168 # Check if every layer-name has corresponding onnx layer-output-nameCOMMENT
LOW…tensions/torch/test/python/v1/test_quantizer_groups.py39 # Check if there is one parent and one childCOMMENT
LOW…/torch/test/python/experimental/test_let_quantizers.py244 # Set scale to 2COMMENT
LOW…sions/torch/test/python/experimental/test_omniquant.py342 # Set model to lora modelCOMMENT
LOW…xtensions/torch/test/python/v2/test_mixed_precision.py397 # Check if accuracy list is in descending orderCOMMENT
LOW…xtensions/torch/test/python/v2/test_mixed_precision.py435 # Check if parsed list is sortedCOMMENT
LOW…xtensions/torch/test/python/v2/test_mixed_precision.py287 # Check if quantizer group is set to maximum bitwidthCOMMENT
LOW…xtensions/torch/test/python/v2/test_mixed_precision.py327 # Check if accuracy list is in descending orderCOMMENT
LOW…xtensions/torch/test/python/v2/test_mixed_precision.py357 # Check if quantizer group is set to maximum bitwidthCOMMENT
LOW…xtensions/torch/test/python/v2/test_mixed_precision.py476 # Check if parsed list is sortedCOMMENT
21 more matches not shown…
Hallucination Indicators8 hits · 105 pts
SeverityFileLineSnippetContext
CRITICAL…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py1461 self.model.model.graph.node.extend(sim_nodes)STRING
CRITICAL…ensions/torch/test/python/v2/ab_test/test_quantizer.py1036 grad_single_gpu = sim.model.conv1.weight.grad.clone().detach()CODE
CRITICAL…ensions/torch/test/python/v2/ab_test/test_quantizer.py1041 weight_multi_gpu = sim.model.module.conv1.weight.clone().detach()CODE
CRITICAL…ensions/torch/test/python/v2/ab_test/test_quantizer.py1045 grad_multi_gpu = sim.model.module.conv1.weight.grad.clone().detach()CODE
CRITICAL…ensions/torch/test/python/v2/ab_test/test_quantizer.py2994 grad_single_gpu = sim.model.conv1.weight.grad.clone().detach()CODE
CRITICAL…ensions/torch/test/python/v2/ab_test/test_quantizer.py2999 weight_multi_gpu = sim.model.module.conv1.weight.clone().detach()CODE
CRITICAL…ensions/torch/test/python/v2/ab_test/test_quantizer.py3003 grad_multi_gpu = sim.model.module.conv1.weight.grad.clone().detach()CODE
CRITICAL…et_torch/experimental/spinquant/spinquant_optimizer.py644 visual_encoder.patch_embed.proj.weight.data.clone()CODE
Docstring Block Structure18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHAIMETRegression/suite_runner.py54 Load and validate a suite configuration file. Suite files define: - profile: Which runtime profile to use STRING
HIGHAIMETRegression/config_loader.py42 Load and merge configuration from multiple sources. This is the main entry point for config loading. It mergesSTRING
HIGHAIMETRegression/config_loader.py171 List all test names defined in a model configuration. This is useful for: - Discovering what tests exist iSTRING
HIGHAIMETRegression/features/onnx/quantsim_runner.py65 Apply AIMET QuantSim to simulate INT8 quantization on an FP32 ONNX model. QuantSim creates a simulation model STRING
HIGHAIMETRegression/features/onnx/_common.py58 Select available ORT execution providers from a preference list. This function ensures explicit provider selecSTRING
HIGHAIMETRegression/features/onnx/_common.py136 Convert various bitwidth representations to integer. This function provides flexibility in configuration filesSTRING
HIGHAIMETRegression/features/onnx/_common.py191 Construct an AIMET QuantizationSimModel from an ONNX file. CRITICAL DESIGN DECISION: This function loads tSTRING
HIGHAIMETRegression/features/onnx/adaround_runner.py149 Apply AdaRound optimization for improved weight quantization. AdaRound optimizes the rounding of weights durinSTRING
HIGHAIMETRegression/features/onnx/mixed_precision_runner.py147 Apply automatic mixed-precision optimization using AIMET's search algorithm. This technique uses AIMET's choosSTRING
HIGHAIMETRegression/features/onnx/lite_mp_runner.py83 Convert configuration value to AIMET's required precision symbol. AIMET's flip_layers_to_higher_precision API STRING
HIGHAIMETRegression/features/onnx/lite_mp_runner.py141 Apply Lite Mixed-Precision quantization to an FP32 ONNX model. This technique provides an optimal accuracy-perSTRING
HIGHAIMETRegression/features/torch/_common.py71 Map configuration string to AIMET QuantScheme enum. Args: scheme_str: Scheme name from config (e.g., "STRING
HIGHAIMETRegression/features/torch/adaround_runner.py66 Apply AdaRound optimization for improved weight quantization on PyTorch models. AdaRound optimizes the roundinSTRING
HIGHAIMETRegression/models/ai_hub_loader.py39 Find and return the appropriate model class from a module. QAI Hub Models modules may contain the model class STRING
HIGHAIMETRegression/models/ai_hub_loader.py96 Resolve the dataset class a model should be quantized and evaluated on. QAI Hub Models expose their datasets aSTRING
HIGHAIMETRegression/models/ai_hub_loader.py141 Load a model from QAI Hub Models with its associated dataset and specifications. This is the main entry point STRING
HIGHAIMETRegression/evaluation/metrics_utils.py71 Format duration with automatic unit selection for readability. This function chooses the most appropriate formSTRING
HIGH…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py2986 Returns graph path from a tensor to the "effective" quantizer associated with it (if any). Node Q is tSTRING
Cross-Language Confusion18 hits · 82 pts
SeverityFileLineSnippetContext
HIGHGenAILab/bench/metrics.py394 """KL divergence KL(P_fp || P_quant) over answer choice distributions."""STRING
HIGHGenAILab/bench/metrics.py404 """Reverse KL divergence KL(P_quant || P_fp) over answer choice distributions."""STRING
HIGHGenAILab/bench/metrics.py438 """KL divergence KL(P_fp || P_quant) over MMLU answer choice distributions."""STRING
HIGHGenAILab/bench/metrics.py443 """Reverse KL divergence KL(P_quant || P_fp) over MMLU answer choice distributions."""STRING
HIGHGenAILab/bench/metrics.py651 """KL divergence KL(P_fp || P_quant) over MMMU answer choice distributions."""STRING
HIGHGenAILab/bench/metrics.py656 """Reverse KL divergence KL(P_quant || P_fp) over MMMU answer choice distributions."""STRING
HIGH…mples/torch/quantization/zero_bit_quantization_demo.py56 - Compression ratio: infinity (original_size / 0 = undefined, but trust us)STRING
HIGH…h/src/python/aimet_torch/quantization/affine/_utils.py69 undefined, & \text{otherwise}CODE
HIGH…h/src/python/aimet_torch/quantization/affine/_utils.py130 undefined, & \text{otherwise}CODE
HIGH…torch/visualization_tools/quant_stats_visualization.py843 if (Math.abs(value) < 1e-3 || Math.abs(value) > 1e5) {CODE
HIGH…torch/visualization_tools/quant_stats_visualization.py871 if (Math.abs(value) < 1e-3 || Math.abs(value) > 1e5) {CODE
HIGH…ningExtensions/common/src/python/_aimet_common/defs.py360 param_dtype: QuantizationDataType = QuantizationDataType.undefined,CODE
HIGH…ensions/common/src/python/_aimet_common/winnow/mask.py750 :param is_null_connectivity: True if op is null connectivity, False otherwiseSTRING
HIGH…common/src/python/_aimet_common/winnow/winnow_utils.py58 "Conv": ConnectivityType.null,CODE
HIGH…common/src/python/_aimet_common/winnow/winnow_utils.py59 "ConvTranspose": ConnectivityType.null,CODE
HIGH…common/src/python/_aimet_common/winnow/winnow_utils.py60 "Linear": ConnectivityType.null,CODE
HIGH…common/src/python/_aimet_common/winnow/winnow_utils.py61 "Gemm": ConnectivityType.null,CODE
HIGH…common/src/python/_aimet_common/winnow/winnow_utils.py91 "index_select": ConnectivityType.null,CODE
Structural Annotation Overuse44 hits · 74 pts
SeverityFileLineSnippetContext
LOWGenAILab/bench/onnx/quant_recipes.py228 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/onnx/quant_recipes.py231 # Step 2: Pre-compute param encodings with a real input so thatCOMMENT
LOWGenAILab/bench/onnx/quant_recipes.py238 # Step 3: Optimize weight quantization parameters to minimize layer-wise MSE.COMMENT
LOWGenAILab/bench/onnx/quant_recipes.py268 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/onnx/quant_recipes.py271 # Step 2: Pre-compute param encodings with a real input (sameCOMMENT
LOWGenAILab/bench/onnx/quant_recipes.py275 # Step 3: Optimize quantization parameters using AdaScale.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py201 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py204 # Step 2: Optimize weight quantization parameters to minimize layer-wise MSE.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py226 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py231 # Step 2: Optimize quantization parameters using AdaScale.COMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py68 # Step 1: get the expert at the given indexCOMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py70 # Step 2: Fetch the hidden states for all the tokens and not just the tokens that correspond to/ attend COMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py72 # Step 3: Pass all the token hidden states to expert layerCOMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py75 # Step 4: Accumulate the expert outputs based on the sparse weightsCOMMENT
LOWscripts/README.md76# Step 1: Set up environment without installing AIMETCOMMENT
LOWscripts/README.md79# Step 2: Build from source (interactive — prompts for variant selection)COMMENT
LOWAIMETRegression/config_loader.py82 # Step 1: Load defaults (foundation for all configs)COMMENT
LOWAIMETRegression/config_loader.py96 # Step 2: Merge profile (if specified)COMMENT
LOWAIMETRegression/config_loader.py119 # Step 3: Load model configurationCOMMENT
LOWAIMETRegression/config_loader.py150 # Step 4: Find and merge specific test configurationCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py107 # Step 1: Find LoRA patterns via topology-based graph traversalCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py115 # Step 2: Validate against adapter config target_modulesCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py136 # Step 3: Split shared initializers (dynamo=False shares zero-init tensors)COMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py139 # Step 4: Rename inits to PEFT convention + insert Transpose for shape compatCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py175 # Step 5: Convert scale Constants to named initializersCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py178 # Step 6: Trace LoRA activationsCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py181 # Step 7: Build lora_names structureCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py946 # Step 3: Set quantizer encodingsCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py949 # Step 4: Set bitwidthsCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py952 # Step 5: Rebuild session to pick up new initializer dataCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py514 # Step 1: Multi-adapter name insertion (lora_A.weight → lora_A.{adapter}.weight)COMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py528 # Step 2: If ONNX param names provided, match by suffix for anyCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py573 # Step 3: Transpose PEFT-convention weights to MatMul conventionCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py904 # Step 1: Remap safetensors keys → ONNX init names (with transposition)COMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py915 # Step 2: Update initializer dataCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py163 # Step 1: Identify the "Add" nodes where the 1st adapter branches merge back into the main graphCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py177 # Step 2: Identify all LoRA adapter chainsCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py188 # Step 3: Create a dictionary of Add nodes in the chain to the full chain for quick lookupCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py196 # Step 4: Create a map of attach point to the corresponding adapter chainsCOMMENT
LOW…ensions/torch/test/python/v2/quantsim/test_quantsim.py1267 # NOTE: This module will ALWAYS fail when forward is called,COMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py715 # # Step 1: get a list of conversion costs in phase 2 solutionCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py724 # Step 2: sort the conversion costs listCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py728 # Step 3: compute cumulative sums for the sorted conversion costs and determine the thresholdCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py739 # Step 4: Enforce the constraintCOMMENT
Verbosity Indicators41 hits · 70 pts
SeverityFileLineSnippetContext
LOWGenAILab/bench/onnx/quant_recipes.py228 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/onnx/quant_recipes.py231 # Step 2: Pre-compute param encodings with a real input so thatCOMMENT
LOWGenAILab/bench/onnx/quant_recipes.py238 # Step 3: Optimize weight quantization parameters to minimize layer-wise MSE.COMMENT
LOWGenAILab/bench/onnx/quant_recipes.py268 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/onnx/quant_recipes.py271 # Step 2: Pre-compute param encodings with a real input (sameCOMMENT
LOWGenAILab/bench/onnx/quant_recipes.py275 # Step 3: Optimize quantization parameters using AdaScale.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py201 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py204 # Step 2: Optimize weight quantization parameters to minimize layer-wise MSE.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py226 # Step 1: Collect calibration inputs in FP mode.COMMENT
LOWGenAILab/bench/torch/quant_recipes.py231 # Step 2: Optimize quantization parameters using AdaScale.COMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py68 # Step 1: get the expert at the given indexCOMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py70 # Step 2: Fetch the hidden states for all the tokens and not just the tokens that correspond to/ attend COMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py72 # Step 3: Pass all the token hidden states to expert layerCOMMENT
LOWGenAILab/qai_hub_lm/transforms/moe.py75 # Step 4: Accumulate the expert outputs based on the sparse weightsCOMMENT
LOWAIMETRegression/config_loader.py82 # Step 1: Load defaults (foundation for all configs)COMMENT
LOWAIMETRegression/config_loader.py96 # Step 2: Merge profile (if specified)COMMENT
LOWAIMETRegression/config_loader.py119 # Step 3: Load model configurationCOMMENT
LOWAIMETRegression/config_loader.py150 # Step 4: Find and merge specific test configurationCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py107 # Step 1: Find LoRA patterns via topology-based graph traversalCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py115 # Step 2: Validate against adapter config target_modulesCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py136 # Step 3: Split shared initializers (dynamo=False shares zero-init tensors)COMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py139 # Step 4: Rename inits to PEFT convention + insert Transpose for shape compatCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py175 # Step 5: Convert scale Constants to named initializersCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py178 # Step 6: Trace LoRA activationsCOMMENT
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py181 # Step 7: Build lora_names structureCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py946 # Step 3: Set quantizer encodingsCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py949 # Step 4: Set bitwidthsCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py952 # Step 5: Rebuild session to pick up new initializer dataCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py514 # Step 1: Multi-adapter name insertion (lora_A.weight → lora_A.{adapter}.weight)COMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py528 # Step 2: If ONNX param names provided, match by suffix for anyCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py573 # Step 3: Transpose PEFT-convention weights to MatMul conventionCOMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py904 # Step 1: Remap safetensors keys → ONNX init names (with transposition)COMMENT
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py915 # Step 2: Update initializer dataCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py163 # Step 1: Identify the "Add" nodes where the 1st adapter branches merge back into the main graphCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py177 # Step 2: Identify all LoRA adapter chainsCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py188 # Step 3: Create a dictionary of Add nodes in the chain to the full chain for quick lookupCOMMENT
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py196 # Step 4: Create a map of attach point to the corresponding adapter chainsCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py715 # # Step 1: get a list of conversion costs in phase 2 solutionCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py724 # Step 2: sort the conversion costs listCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py728 # Step 3: compute cumulative sums for the sorted conversion costs and determine the thresholdCOMMENT
LOW…/src/python/_aimet_common/amp/convert_ops_reduction.py739 # Step 4: Enforce the constraintCOMMENT
Excessive Try-Catch Wrapping66 hits · 64 pts
SeverityFileLineSnippetContext
LOWpackaging/plugins/local/aimet.py186 except Exception:CODE
LOWGenAILab/bench/yaml_config_parser.py193 except Exception as e:CODE
LOWGenAILab/bench/model_cache.py101 except Exception:CODE
LOWGenAILab/bench/model_cache.py210 except Exception:CODE
LOWGenAILab/qai_hub_lm/backends/onnx/export_utils.py24 except Exception:CODE
LOWscripts/all/build_and_test.py349 except Exception:CODE
LOWscripts/all/build_and_test.py351 except Exception as e:CODE
LOWscripts/all/build_and_test.py281 except Exception:CODE
LOWscripts/all/build_and_test.py283 except Exception as e:CODE
LOWscripts/all/build_and_test.py316 except Exception:CODE
LOWscripts/all/build_and_test.py318 except Exception as e:CODE
LOWscripts/all/build_and_test.py1334 except Exception as e:CODE
LOWscripts/all/util.py47 except Exception:CODE
LOWscripts/all/util.py69 except Exception:CODE
LOWscripts/all/util.py101 except Exception:CODE
LOWscripts/all/util.py117 except Exception:CODE
LOWAIMETRegression/suite_runner.py269 except Exception as e:STRING
LOWAIMETRegression/suite_runner.py276 except Exception as e:STRING
LOWAIMETRegression/suite_runner.py374 except Exception as e:STRING
LOWAIMETRegression/runner.py103 except Exception as e:CODE
LOWAIMETRegression/runner.py186 except Exception as e:CODE
LOWAIMETRegression/runner.py206 except Exception as e2:CODE
LOWAIMETRegression/runner.py222 except Exception as e:CODE
LOWAIMETRegression/runner.py555 except Exception as e:CODE
LOWAIMETRegression/runner.py632 except Exception as e:CODE
LOWAIMETRegression/runner.py665 except Exception as e:CODE
LOWAIMETRegression/runner.py801 except Exception as e:CODE
LOW…METRegression/features/torch/mixed_precision_runner.py148 except Exception as e:CODE
LOW…METRegression/features/torch/mixed_precision_runner.py313 except Exception as e:CODE
LOWAIMETRegression/features/torch/utils.py144 except Exception:CODE
LOWAIMETRegression/features/torch/utils.py181 except Exception:CODE
LOWAIMETRegression/workflow/utils.py228 except Exception as e:STRING
LOWAIMETRegression/workflow/artifacts.py528 except Exception as e:CODE
LOWAIMETRegression/workflow/artifacts.py592 except Exception as e:CODE
LOWAIMETRegression/evaluation/eval_qnn.py52 except Exception:CODE
LOWAIMETRegression/evaluation/eval_qnn.py67 except Exception:CODE
LOWAIMETRegression/evaluation/eval_qnn.py88 except Exception:CODE
LOWAIMETRegression/evaluation/eval_qnn.py226 except Exception:CODE
LOWAIMETRegression/evaluation/eval_qnn.py236 except Exception:CODE
LOWAIMETRegression/evaluation/eval_qnn.py287 except Exception as e:CODE
LOWAIMETRegression/evaluation/eval_qnn.py299 except Exception as e:CODE
LOWAIMETRegression/evaluation/metrics_utils.py128 except Exception:CODE
LOWAIMETRegression/evaluation/metrics_utils.py159 except Exception:CODE
LOWAIMETRegression/evaluation/metrics_utils.py166 except Exception:CODE
LOWAIMETRegression/evaluation/metrics_utils.py249 except Exception:CODE
LOWAIMETRegression/evaluation/metrics_utils.py339 except Exception:CODE
LOWAIMETRegression/evaluation/metrics_utils.py381 except Exception:CODE
LOWAIMETRegression/evaluation/metrics_utils.py412 except Exception:CODE
LOWAIMETRegression/report/report_writer.py114 except Exception:CODE
LOWTrainingExtensions/onnx/test/python/test_lora.py1788 except Exception:CODE
LOWTrainingExtensions/onnx/src/python/aimet_onnx/utils.py663 except Exception as e: # pylint: disable=broad-exceptCODE
LOWTrainingExtensions/onnx/src/python/aimet_onnx/utils.py773 except Exception as e: # pylint: disable=broad-exceptCODE
LOW…on/aimet_onnx/experimental/adascale/model_converter.py35 except Exception:CODE
LOW…nsions/torch/src/python/aimet_torch/deepspeed_utils.py67except Exception as e:CODE
LOWTrainingExtensions/torch/src/python/aimet_torch/onnx.py165 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOW…ainingExtensions/torch/src/python/aimet_torch/utils.py1311 except Exception:CODE
LOW…ions/torch/src/python/aimet_torch/blockwise_sampler.py86 except Exception as e:CODE
LOW…ningExtensions/torch/src/python/aimet_torch/nn/base.py1095 except Exception:CODE
LOW…rch/src/python/aimet_torch/nn/transformers/__init__.py48 except Exception as e2:CODE
LOW…ions/torch/src/python/aimet_torch/quantsim/quantsim.py733 except Exception: # pylint: disable=broad-exception-caughtCODE
6 more matches not shown…
Modern Structural Boilerplate35 hits · 35 pts
SeverityFileLineSnippetContext
LOWpackaging/plugins/local/aimet.py14__all__ = ["dynamic_metadata"]CODE
LOWscripts/all/build_and_test.py71logger = logging.getLogger(__name__)CODE
LOWAIMETRegression/features/onnx/_common.py45__all__ = [CODE
LOWAIMETRegression/features/torch/_common.py47__all__ = [CODE
LOWAIMETRegression/workflow/__init__.py16__all__ = [CODE
LOWAIMETRegression/workflow/artifacts.py533 def _set_github_output(name: str, value: str) -> None:CODE
LOW…onnx/experimental/llm_configurator/llm_configurator.py9logger = logging.getLogger(__name__)CODE
LOW…c/python/aimet_onnx/experimental/spinquant/__init__.py13__all__ = [CODE
LOW…n/aimet_onnx/experimental/spinquant/passes/__init__.py27__all__ = [CODE
LOW…met_onnx/experimental/spinquant/transforms/__init__.py28__all__ = [CODE
LOW…rimental/spinquant/model_analysis/attention_anchors.py422__all__ = ["BlockR3Anchors", "find_r3_anchors"]CODE
LOW…onnx/experimental/spinquant/model_analysis/__init__.py28__all__ = [CODE
LOW…rc/python/aimet_onnx/experimental/lora/prepare_lora.py50logger = logging.getLogger(__name__)CODE
LOW…rc/python/aimet_onnx/experimental/lora/peft_to_onnx.py18logger = logging.getLogger(__name__)CODE
LOW…nx/src/python/aimet_onnx/experimental/lora/__init__.py94__all__ = [CODE
LOW…et_onnx/experimental/lora/lora_adapter_quantization.py22logger = logging.getLogger(__name__)CODE
LOW…/python/aimet_onnx/experimental/lora/lora_configure.py23logger = logging.getLogger(__name__)CODE
LOW…thon/aimet_onnx/experimental/lora/lora_graph_passes.py21logger = logging.getLogger(__name__)CODE
LOW…ningExtensions/torch/src/python/aimet_torch/seq_mse.py33__all__ = [CODE
LOW…nsions/torch/src/python/aimet_torch/batch_norm_fold.py19__all__ = [CODE
LOW…rch/src/python/aimet_torch/adaround/adaround_weight.py25__all__ = [CODE
LOW…sions/torch/src/python/aimet_torch/experimental/pgs.py7__all__ = [CODE
LOW…h/src/python/aimet_torch/experimental/export/export.py24__all__ = ["export"]CODE
LOW…ningExtensions/torch/src/python/aimet_torch/nn/lora.py10__all__ = ["QuantizedLinear"]CODE
LOW…ions/torch/src/python/aimet_torch/quantsim/quantsim.py76__all__ = [CODE
LOW…ns/torch/src/python/aimet_torch/quantization/tensor.py20__all__ = [CODE
LOW…src/python/aimet_torch/quantization/affine/encoding.py30__all__ = ["AffineEncoding", "VectorEncoding", "GroupedBlockEncoding"]CODE
LOW…rc/python/aimet_torch/quantization/affine/quantizer.py61__all__ = [CODE
LOW…thon/aimet_torch/quantization/affine/backends/utils.py117__all__ = ["set_backend", "get_backend", "add_backend"]CODE
LOW…/src/python/aimet_torch/quantization/float/encoding.py21__all__ = ["FloatEncoding"]CODE
LOW…src/python/aimet_torch/quantization/float/quantizer.py37__all__ = ["QuantizeDequantize", "FloatQuantizeDequantize"]CODE
LOW…h/src/python/aimet_torch/quantization/base/encoding.py18__all__ = ["EncodingBase"]CODE
LOW…/src/python/aimet_torch/quantization/base/quantizer.py27__all__ = ["QuantizerBase"]CODE
LOW…rch/src/python/aimet_torch/_base/nn/modules/_spconv.py10__all__ = [CODE
LOW…s/common/src/python/_aimet_common/hadamard/__init__.py17__all__ = [CODE
AI Slop Vocabulary15 hits · 34 pts
SeverityFileLineSnippetContext
LOWpackaging/plugins/local/aimet.py199 # For PyPi releases, just return the version without appending the variant stringCOMMENT
MEDIUM…Lab/bench/prompts/text_prompts_autograder_harness.yaml1# Autograder harness configuration for scoring LLM prompt responses.COMMENT
MEDIUM…nch/prompts/multimodal_prompts_autograder_harness.yaml1# Autograder harness configuration for scoring VLM prompt responses.COMMENT
LOWGenAILab/qai_hub_lm/backends/onnx/export_utils.py35 # user has passed in a local path, verify that .onnx file and .config files exist and just return the pathCOMMENT
LOWDocs/snippets/onnx/apply_litemp.py114# If CUDA acceleration is not available, simply use providers = ["CPUExecutionProvider"]COMMENT
MEDIUMExamples/torch/compression/channel_pruning.py36# This script utilize AIMET to perform channel pruning compression (0.5% ratio) on a resnet18COMMENT
MEDIUMExamples/torch/compression/weight_svd.py35# This script utilize AIMET do perform weight svd compression (50% ratio) on a resnet18COMMENT
MEDIUMExamples/torch/compression/spatial_svd_cp.py39# This script utilize AIMET do perform spatial svd and channel pruning compression on a resnet18COMMENT
MEDIUMExamples/torch/compression/spatial_svd.py35# This script utilize AIMET do perform spatial svd compression (50% compression ratio) on aCOMMENT
MEDIUM…rc/python/aimet_onnx/experimental/lora/peft_to_onnx.py106 # Build suffix → PEFT key index for robust matching.COMMENT
MEDIUM…sions/torch/test/python/experimental/test_spinquant.py160) # hidden_size 192 will utilize hadamard matrix size 12 with factor 16CODE
LOW…nsions/torch/src/python/aimet_torch/data_subsampler.py158 # just return the input and output data as it is. No sub sampling neededCOMMENT
MEDIUM…ions/torch/src/python/aimet_torch/blockwise_sampler.py307 """Exception raised in order to stop forward execution through the model. Holds module input data."""STRING
LOW…gExtensions/torch/src/python/aimet_torch/onnx_utils.py204 # 2) If the next token don't have "." then simply add current token to the updated_tokens list.COMMENT
LOW…s/common/src/python/_aimet_common/comp_ratio_select.py210 # If the user already passed in a previously saved eval scores dict, we just use thatCOMMENT
AI Structural Patterns34 hits · 33 pts
SeverityFileLineSnippetContext
LOWGenAILab/qai_hub_lm/backends/onnx/export_utils.py159CODE
LOWGenAILab/qai_hub_lm/models/internvl.py173CODE
LOWGenAILab/qai_hub_lm/models/gemma4.py208CODE
LOWGenAILab/qai_hub_lm/models/gemma4.py236CODE
LOWGenAILab/qai_hub_lm/models/generator.py1249CODE
LOWGenAILab/qai_hub_lm/models/gemma3.py108CODE
LOWGenAILab/qai_hub_lm/models/gemma3.py135CODE
LOWscripts/all/build_and_test.py214CODE
LOWTrainingExtensions/onnx/test/python/test_lora.py1989CODE
LOW…tensions/onnx/test/python/models/transformer_blocks.py496CODE
LOW…tensions/onnx/test/python/models/transformer_blocks.py552CODE
LOW…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py199CODE
LOW…iningExtensions/onnx/src/python/aimet_onnx/quantsim.py382CODE
LOW…c/python/aimet_onnx/experimental/adascale/quantizer.py236CODE
LOW…/src/python/aimet_onnx/graph_passes/fusions/rmsnorm.py139CODE
LOW…/src/python/aimet_onnx/graph_passes/fusions/rmsnorm.py255CODE
LOW…rc/python/aimet_onnx/graph_passes/fusions/layernorm.py166CODE
LOW…c/python/aimet_onnx/graph_passes/fusions/matmul_add.py126CODE
LOW…Extensions/torch/test/python/test_blockwise_sampler.py33CODE
LOW…sions/torch/test/python/experimental/test_omniquant.py173CODE
LOW…ningExtensions/torch/test/python/models/test_models.py1196CODE
LOW…ningExtensions/torch/test/python/models/test_models.py1220CODE
LOW…Extensions/torch/test/python/v2/models_/test_models.py1077CODE
LOW…Extensions/torch/test/python/v2/models_/test_models.py1101CODE
LOWTrainingExtensions/torch/src/python/aimet_torch/peft.py92CODE
LOW…tensions/torch/src/python/aimet_torch/nn/true_quant.py1269CODE
LOW…tensions/torch/src/python/aimet_torch/nn/true_quant.py1312CODE
LOW…c/python/aimet_torch/quantization/encoding_analyzer.py921CODE
LOW…src/python/aimet_torch/quantization/float/quantizer.py101CODE
LOW…orch/src/python/aimet_torch/_base/nn/modules/custom.py329CODE
LOW…orch/src/python/aimet_torch/_base/nn/modules/custom.py350CODE
LOW…orch/src/python/aimet_torch/_base/nn/modules/custom.py666CODE
LOW…rch/src/python/aimet_torch/_base/nn/modules/_spconv.py103CODE
LOW…rch/src/python/aimet_torch/_base/nn/modules/_spconv.py194CODE
Example Usage Blocks8 hits · 11 pts
SeverityFileLineSnippetContext
LOWpackaging/convert_wheel_format.sh9# Usage:COMMENT
LOWscripts/all/download_genai_checkpoint.sh7# Usage:COMMENT
LOWscripts/all/resolve_genai_config.sh10# Usage:COMMENT
LOWscripts/environment/setup_genai.sh8# Usage:COMMENT
LOWscripts/environment/build_aimet.sh7# Usage:COMMENT
LOW.github/actions/genai-test/action.yml13# Usage:COMMENT
LOW.github/actions/stop-gpu-runner/action.yml9# Usage:COMMENT
LOW.github/actions/start-gpu-runner/action.yml11# Usage:COMMENT
Fake / Example Data10 hits · 10 pts
SeverityFileLineSnippetContext
LOW…gacy/onnx_code_examples/quant_analyzer_code_example.py77 dummy_data = np.random.randn(*input_shape).astype(np.float32)CODE
LOW…gacy/onnx_code_examples/quant_analyzer_code_example.py78 dummy_input = {'input': dummy_data}CODE
LOWTrainingExtensions/onnx/test/python/test_quantsim.py6095 name="placeholder",CODE
LOW…sions/torch/test/python/v2/experimental/test_export.py171 assert inp_node.op == "placeholder"CODE
LOW…on/aimet_torch/experimental/export/exported_program.py261 if node.op != "placeholder":CODE
LOW…h/src/python/aimet_torch/experimental/export/export.py345 and q_dq_node.all_input_nodes[1].op != "placeholder"CODE
LOW…h/src/python/aimet_torch/experimental/export/export.py359 and q_dq_node.all_input_nodes[2].op != "placeholder"CODE
LOW…h/src/python/aimet_torch/experimental/export/_utils.py136 for input_node in ep.graph.find_nodes(op="placeholder", sort=False)CODE
LOW…h/src/python/aimet_torch/experimental/export/_utils.py164 op="placeholder",CODE
LOW…h/src/python/aimet_torch/experimental/export/_utils.py204 if node.op == "placeholder":CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…ns/torch/src/python/aimet_torch/meta/connectedgraph.py1575 # In this version of the Winnower, the Product class represents the following entities in a model.COMMENT
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWTrainingExtensions/onnx/test/python/test_quantsim.py5453 # TODO: Add tests with GroupNormalizationCOMMENT
LOW…hon/aimet_torch/experimental/quantsim/_export_utils.py20# TODO: implement direct 1.0.0 export for v1 quantsim so this function can be removed.COMMENT
Synthetic Comment Markers1 hit · 2 pts
SeverityFileLineSnippetContext
HIGH…Lab/qai_hub_lm/backends/onnx/adaptations/hub_models.py4"""ONNX-specific model adaptations to use checkpoints generated by AI Hub Models."""STRING
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…ions/torch/src/python/aimet_torch/quantsim/quantsim.py734 # In case of any exception, make sure to restoreCOMMENT
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOW…ingExtensions/common/src/python/_aimet_common/utils.py396 >>> def do_something():STRING