AI Slop Code Risk Monitor

OpenNMT/CTranslate2

SlopCodeMonitor badge for OpenNMT/CTranslate2 Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Fast inference engine for Transformer models

6.1 Moderate pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for OpenNMT/CTranslate2, a C++ project with 4,729 GitHub stars. SynthScan examined 76,358 lines of code across 303 source files, recording 543 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 6.1 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

6.1
Adjusted Signal
6.1
Raw Pattern Score
100%
Time Factor
2026-11-01
Last Push
4.7K
Stars
C++
Language
76.4K
Lines of Code
303
Files
543
Pattern Hits
2026-10-31
Scan Date
0.02
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 20.9/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 463 finding(s).

Hallucinated Dependency & Supply Chain Risk 5.0/100 · LOW

Are imports declared and package/API names verified? 72 finding(s).

Agent Over-Engineering Ratio 11.8/100 · LOW

Are wrappers, guards, and repeated structures necessary? 165 finding(s).

PR Review Velocity Impact 31.8/100 · MEDIUM

Which changes need focused human review? 543 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

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

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 1HIGH 6MEDIUM 1LOW 535

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 543 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block287 hits · 181 pts
SeverityFileLineSnippetContext
LOWtools/ruy_shutdown_repro/repro.cpp1// Minimal repro for the Windows Ruy shutdown deadlock (ctranslate2-rs#64 / #2076).COMMENT
LOWdocker/build_all.sh1#!/bin/bashCOMMENT
LOWpython/tests/test_transformers.py1281 # UMT5 has a distinct table per layer: the values must not be copied from layer 0.COMMENT
LOWpython/cpp/utils.h1#pragma onceCOMMENT
LOWinclude/half_float/half.hpp1// half - IEEE 754-based half-precision floating-point library.COMMENT
LOWinclude/half_float/half.hpp21COMMENT
LOWinclude/half_float/half.hpp41 #endifCOMMENT
LOWinclude/half_float/half.hpp61 #if HALF_ICC_VERSION >= 1500 && !defined(HALF_ENABLE_CPP11_USER_LITERALS)COMMENT
LOWinclude/half_float/half.hpp81 #if HALF_GCC_VERSION >= 407 && !defined(HALF_ENABLE_CPP11_USER_LITERALS)COMMENT
LOWinclude/half_float/half.hpp101 #endifCOMMENT
LOWinclude/half_float/half.hpp121#endifCOMMENT
LOWinclude/half_float/half.hpp141 #endifCOMMENT
LOWinclude/half_float/half.hpp161 #elseCOMMENT
LOWinclude/half_float/half.hpp181 #define HALF_ENABLE_CPP11_TYPE_TRAITS 1COMMENT
LOWinclude/half_float/half.hpp201#define HALF_ERRHANDLING_THROWS 1COMMENT
LOWinclude/half_float/half.hpp221 #endifCOMMENT
LOWinclude/half_float/half.hpp241 #define HALF_THREAD_LOCAL staticCOMMENT
LOWinclude/half_float/half.hpp261 #include <cerrno>COMMENT
LOWinclude/half_float/half.hpp281 #include <immintrin.h>COMMENT
LOWinclude/half_float/half.hpp301/// [ERANGE](https://en.cppreference.com/w/cpp/error/errno_macros). Inexact errors won't be propagated.COMMENT
LOWinclude/half_float/half.hpp321COMMENT
LOWinclude/half_float/half.hpp341/// These will be raised after any possible handling of the underflow exception.COMMENT
LOWinclude/half_float/half.hpp361///COMMENT
LOWinclude/half_float/half.hpp381/// **See also:** Documentation for [HUGE_VAL](https://en.cppreference.com/w/cpp/numeric/math/HUGE_VAL)COMMENT
LOWinclude/half_float/half.hpp401#ifndef FP_ILOGBNANCOMMENT
LOWinclude/half_float/half.hpp421 #define FE_INVALID 0x10COMMENT
LOWinclude/half_float/half.hpp521 #elseCOMMENT
LOWinclude/half_float/half.hpp541 /// Check for infinity.COMMENT
LOWinclude/half_float/half.hpp561 /// \retval false elseCOMMENT
LOWinclude/half_float/half.hpp601 /// Platform-independent arithmetic right shift.COMMENT
LOWinclude/half_float/half.hpp661 #endifCOMMENT
LOWinclude/half_float/half.hpp701 /// \param y second half-precision value to checkCOMMENT
LOWinclude/half_float/half.hpp761 }COMMENT
LOWinclude/half_float/half.hpp801 {COMMENT
LOWinclude/half_float/half.hpp861 return (abs>0x7C00) ? signal(value) : value;COMMENT
LOWinclude/half_float/half.hpp981 fbits &= 0x7FFFFF;COMMENT
LOWinclude/half_float/half.hpp1301 /// \param value half-precision value to convertCOMMENT
LOWinclude/half_float/half.hpp1361COMMENT
LOWinclude/half_float/half.hpp1701 return sign | (((exp+=15)>0) ? (exp<<10) : check_underflow(0x200>>-exp));COMMENT
LOWinclude/half_float/half.hpp2041 /// expressions and functions with mixed-type operands to be of the most precise operand type.COMMENT
LOWinclude/half_float/half.hpp2061 /// Default constructor.COMMENT
LOWinclude/half_float/half.hpp2081 /// \}COMMENT
LOWinclude/half_float/half.hpp2101 /// \param rhs half expression to multiply withCOMMENT
LOWinclude/half_float/half.hpp2121 /// \return reference to this halfCOMMENT
LOWinclude/half_float/half.hpp2141 /// Prefix increment.COMMENT
LOWinclude/half_float/half.hpp2261 friend struct std::hash<half>;COMMENT
LOWinclude/half_float/half.hpp2461 /// \param x first operandCOMMENT
LOWinclude/half_float/half.hpp2481COMMENT
LOWinclude/half_float/half.hpp2521 /// \retval true if \a x greater equal \a yCOMMENT
LOWinclude/half_float/half.hpp2541 /// \param arg operandCOMMENT
LOWinclude/half_float/half.hpp2601 /// \exception FE_OVERFLOW, ...UNDERFLOW, ...INEXACT according to roundingCOMMENT
LOWinclude/half_float/half.hpp2681 /// \anchor streamingCOMMENT
LOWinclude/half_float/half.hpp2701 /// point numbers (unless overridden with [HALF_ARITHMETIC_TYPE](\ref HALF_ARITHMETIC_TYPE)). So the input string is fiCOMMENT
LOWinclude/half_float/half.hpp2721 /// \anchor basicCOMMENT
LOWinclude/half_float/half.hpp2801 ///COMMENT
LOWinclude/half_float/half.hpp2881 (y.data_^(0x8000|(0x8000-(y.data_>>15)))))) ? detail::select(y.data_, x.data_) : detail::select(x.data_, y.data_));COMMENT
LOWinclude/half_float/half.hpp2921 }COMMENT
LOWinclude/half_float/half.hpp2981 if(abs >= 0x4E40)COMMENT
LOWinclude/half_float/half.hpp3041 /// Natural logarithm.COMMENT
LOWinclude/half_float/half.hpp3061 return (abs==0x7C00) ? arg : half(detail::binary, detail::signal(arg.data_));COMMENT
227 more matches not shown…
Hyper-Verbose Identifiers147 hits · 148 pts
SeverityFileLineSnippetContext
LOWtools/tune_inter_intra.py35def performance_with_parameters(inter_threads, intra_threads):CODE
LOWpython/tests/test_translator.py26def _get_model_path_with_vmap(tmp_dir, tokens):CODE
LOWpython/tests/test_translator.py55def test_invalid_device_settings():CODE
LOWpython/tests/test_translator.py73def test_get_supported_compute_types():CODE
LOWpython/tests/test_translator.py80def test_translator_properties():CODE
LOWpython/tests/test_translator.py137def test_batch_translation_async():CODE
LOWpython/tests/test_translator.py150def test_iterable_translation():CODE
LOWpython/tests/test_translator.py208def test_token_streaming_exception():CODE
LOWpython/tests/test_translator.py219def test_callback_hypothesis_id():CODE
LOWpython/tests/test_translator.py294def test_raw_file_translation(tmp_dir):CODE
LOWpython/tests/test_translator.py329def test_file_translation_with_prefix(tmp_dir):CODE
LOWpython/tests/test_translator.py366def test_raw_file_translation_with_prefix(tmp_dir):CODE
LOWpython/tests/test_translator.py415def test_invalid_translation_options():CODE
LOWpython/tests/test_translator.py425def test_invalid_translation_options_async():CODE
LOWpython/tests/test_translator.py452def test_hard_target_prefix_with_vmap(tmp_dir, beam_size):CODE
LOWpython/tests/test_translator.py465def test_strongly_biased_target_prefix(beam_size):CODE
LOWpython/tests/test_translator.py478def test_weakly_biased_target_prefix(beam_size):CODE
LOWpython/tests/test_translator.py510def test_repetition_penalty_with_vmap(tmp_dir, beam_size):CODE
LOWpython/tests/test_translator.py525def test_no_repeat_ngram_size_with_vmap(tmp_dir, beam_size):CODE
LOWpython/tests/test_translator.py544def test_suppress_sequences_with_vmap(tmp_dir, beam_size):CODE
LOWpython/tests/test_translator.py583def test_min_decoding_length_with_vmap(tmp_dir, beam_size):CODE
LOWpython/tests/test_translator.py628def test_return_alternatives_with_vmap(tmp_dir):CODE
LOWpython/tests/test_translator.py773def test_model_unload_while_async_translation():CODE
LOWpython/tests/test_translator.py784def test_load_model_from_memory(as_file_object):CODE
LOWpython/tests/test_translator.py867def test_shutdown_does_not_deadlock():CODE
LOWpython/tests/test_translator.py953def test_model_load_does_not_leak_threads():CODE
LOWpython/tests/test_fairseq.py10def test_fairseq_model_conversion(tmp_dir):CODE
LOWpython/tests/test_fairseq.py45def test_fairseq_user_start_token(tmp_dir):CODE
LOWpython/tests/test_opennmt_py.py10def test_opennmt_py_model_conversion(tmp_dir):CODE
LOWpython/tests/test_opennmt_py.py27def test_opennmt_py_relative_transformer(tmp_dir):CODE
LOWpython/tests/test_opennmt_py.py47def test_opennmt_py_relative_transformer_return_alternatives(tmp_dir):CODE
LOWpython/tests/test_opennmt_py.py73def test_opennmt_py_source_features(tmp_dir, filename):CODE
LOWpython/tests/test_opennmt_py.py127def test_opennmt_py_transformer_lm(tmp_dir):CODE
LOWpython/tests/test_alias_buckets.py96def test_grouping_matches_original_numpy_and_torch_aliases():CODE
LOWpython/tests/test_alias_buckets.py110def test_empty_arrays_keep_original_identity_and_error_behavior(same_object):CODE
LOWpython/tests/test_alias_buckets.py129def test_distinct_first_values_avoid_quadratic_exact_comparisons():CODE
LOWpython/tests/test_alias_buckets.py152def test_matching_eight_value_prefix_still_checks_full_arrays():CODE
LOWpython/tests/test_alias_buckets.py165def test_other_models_keep_cross_quantization_aliases():CODE
LOWpython/tests/test_drama3_model_conversion.py46 def test_explicit_backbone_and_tower_names(self):CODE
LOWpython/tests/test_drama3_model_conversion.py144 def test_missing_or_wrong_source_scale_rejected(self):CODE
LOWpython/tests/test_drama3_model_conversion.py170 def test_depthwise_convolution_preserves_rank_and_flat_chunk_contents(self):CODE
LOWpython/tests/test_drama3_model_conversion.py185 def test_index_exact_coverage_and_path_guards(self):CODE
LOWpython/tests/test_drama3_model_conversion.py201 def test_orphan_scales_and_nonfinite_vectors_rejected(self):CODE
LOWpython/tests/test_misc.py26def test_import_does_not_load_conversion_dependencies(module_name):CODE
LOWpython/tests/test_misc.py41def test_wildcard_import_still_exposes_lazy_submodules():CODE
LOWpython/tests/test_drama3_weights.py78 def test_block_scales_tail_blocks_and_crossing_row_chunks(self):CODE
LOWpython/tests/test_drama3_weights.py134 def test_invalid_scales_and_arguments(self):CODE
LOWpython/tests/test_drama3_weights.py163 def test_rejects_bad_ranges_and_headers(self):CODE
LOWpython/tests/test_drama3_weights.py183 def test_detects_file_change_before_mapping(self):CODE
LOWpython/tests/test_drama3_weights.py198 def test_cross_shard_matrix_scales(self):CODE
LOWpython/tests/test_spec.py43def test_layer_spec_validate_unset():CODE
LOWpython/tests/test_spec.py266def test_smooth_activation_torch():CODE
LOWpython/tests/test_storage_view.py50def test_storageview_to_device():CODE
LOWpython/tests/test_storage_view.py89def test_storageview_cuda_to_device():CODE
LOWpython/tests/test_storage_view.py103def test_storageview_conversion():CODE
LOWpython/tests/test_storage_view.py122def test_storageview_readonly():CODE
LOWpython/tests/test_storage_view.py129def test_storageview_reference():CODE
LOWpython/tests/test_drama3_runtime.py206 def test_reference_encoding_requires_encoder_weights(self):CODE
LOWpython/tests/test_drama3_runtime.py212 def test_reference_encoding_rejects_invalid_arrays(self):CODE
LOWpython/tests/test_drama3_runtime.py223 def test_resolved_execution_properties(self):CODE
87 more matches not shown…
Unused Imports71 hits · 68 pts
SeverityFileLineSnippetContext
LOWtools/tune_inter_intra.py6CODE
LOWpython/tests/test_opennmt_tf.py7CODE
LOWpython/tests/test_opennmt_tf.py12CODE
LOWpython/ctranslate2/__init__.py66CODE
LOWpython/ctranslate2/__init__.py67CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py32CODE
LOWpython/ctranslate2/__init__.py55CODE
LOWpython/ctranslate2/__init__.py55CODE
LOWpython/ctranslate2/specs/__init__.py1CODE
LOWpython/ctranslate2/specs/__init__.py2CODE
LOWpython/ctranslate2/specs/__init__.py2CODE
LOWpython/ctranslate2/specs/__init__.py3CODE
LOWpython/ctranslate2/specs/__init__.py4CODE
LOWpython/ctranslate2/specs/__init__.py4CODE
LOWpython/ctranslate2/specs/__init__.py4CODE
LOWpython/ctranslate2/specs/__init__.py4CODE
LOWpython/ctranslate2/specs/__init__.py10CODE
LOWpython/ctranslate2/specs/__init__.py10CODE
LOWpython/ctranslate2/specs/__init__.py10CODE
LOWpython/ctranslate2/specs/__init__.py10CODE
LOWpython/ctranslate2/specs/__init__.py10CODE
LOWpython/ctranslate2/specs/__init__.py17CODE
LOWpython/ctranslate2/specs/__init__.py18CODE
LOWpython/ctranslate2/specs/__init__.py19CODE
LOWpython/ctranslate2/specs/wav2vec2_spec.py1CODE
LOWpython/ctranslate2/specs/wav2vec2_spec.py1CODE
LOWpython/ctranslate2/specs/wav2vec2_spec.py1CODE
LOWpython/ctranslate2/converters/fairseq.py145CODE
LOWpython/ctranslate2/converters/transformers.py24CODE
LOWpython/ctranslate2/converters/converter.py8CODE
LOWpython/ctranslate2/converters/__init__.py1CODE
LOWpython/ctranslate2/converters/__init__.py2CODE
LOWpython/ctranslate2/converters/__init__.py3CODE
LOWpython/ctranslate2/converters/__init__.py4CODE
LOWpython/ctranslate2/converters/__init__.py5CODE
LOWpython/ctranslate2/converters/__init__.py6CODE
LOWpython/ctranslate2/converters/__init__.py7CODE
LOWpython/ctranslate2/converters/__init__.py8CODE
LOWpython/ctranslate2/converters/eole_ct2.py164CODE
LOWpython/ctranslate2/converters/openai_gpt2.py6CODE
LOWpython/ctranslate2/models/__init__.py6CODE
11 more matches not shown…
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtools/benchmark/benchmark.py41except:CODE
HIGHpython/ctranslate2/__init__.py25except OSError:CODE
HIGHpython/ctranslate2/converters/transformers.py19except ImportError:CODE
HIGHpython/ctranslate2/converters/eole_ct2.py321except KeyError:CODE
HIGHpython/ctranslate2/converters/opennmt_py.py332except KeyError:CODE
HIGHdocs/conf.py81except ValueError:CODE
Deep Nesting17 hits · 16 pts
SeverityFileLineSnippetContext
LOWtools/benchmark_tensor_parallel/benchmark.py61CODE
LOWpython/tests/test_translator.py784CODE
LOWpython/tests/test_transformers.py1218CODE
LOWpython/tests/test_drama3_standard_conversion.py178CODE
LOWpython/ctranslate2/extensions.py557CODE
LOWpython/ctranslate2/specs/model_spec.py101CODE
LOWpython/ctranslate2/specs/model_spec.py191CODE
LOWpython/ctranslate2/specs/model_spec.py109CODE
LOWpython/ctranslate2/specs/model_spec.py199CODE
LOWpython/ctranslate2/specs/drama3_spec.py44CODE
LOWpython/ctranslate2/specs/attention_spec.py18CODE
LOWpython/ctranslate2/converters/drama3_codec.py25CODE
LOWpython/ctranslate2/converters/opennmt_tf.py92CODE
LOWpython/ctranslate2/converters/transformers.py723CODE
LOWpython/ctranslate2/converters/marian.py118CODE
LOWpython/ctranslate2/converters/drama3_weights.py96CODE
LOWdocs/generate.py98CODE
AI Structural Patterns10 hits · 10 pts
SeverityFileLineSnippetContext
LOWpython/ctranslate2/extensions.py204CODE
LOWpython/ctranslate2/extensions.py270CODE
LOWpython/ctranslate2/extensions.py351CODE
LOWpython/ctranslate2/specs/transformer_spec.py11CODE
LOWpython/ctranslate2/specs/transformer_spec.py118CODE
LOWpython/ctranslate2/specs/transformer_spec.py296CODE
LOWpython/ctranslate2/specs/transformer_spec.py347CODE
LOWpython/ctranslate2/specs/transformer_spec.py499CODE
LOWpython/ctranslate2/specs/transformer_spec.py629CODE
LOWpython/ctranslate2/specs/attention_spec.py18CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALpython/ctranslate2/converters/transformers.py1651 encoder.pos_conv_embed.conv.weight.data.float()CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtools/benchmark_tensor_parallel/benchmark.py157 # Open the file in read modeCOMMENT
LOWpython/ctranslate2/converters/transformers.py2803 # Set it to 0 so the decoder processes all tokens at once; per-layer sliding_windowCOMMENT
Excessive Try-Catch Wrapping2 hits · 3 pts
SeverityFileLineSnippetContext
LOWpython/ctranslate2/extensions.py501 except Exception as e:CODE
MEDIUMpython/ctranslate2/extensions.py497def _catch_exception():CODE