AI Slop Code RIsk Monitor

huggingface/tokenizers

💥 Fast State-of-the-Art Tokenizers optimized for Research and Production

5.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for huggingface/tokenizers, a Rust project with 11,166 GitHub stars. SynthScan examined 46,721 lines of code across 277 source files, recording 199 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 5.8 (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.

5.8
Adjusted Signal
5.8
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
11.2K
Stars
Rust
Language
46.7K
Lines of Code
277
Files
199
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 18.1/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.5/100 · LOW

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

Agent Over-Engineering Ratio 12.6/100 · LOW

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

PR Review Velocity Impact 23.1/100 · LOW

Which changes need focused human review? 199 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

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

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 0HIGH 0MEDIUM 23LOW 176

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 199 distinct pattern matches across 8 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 Block129 hits · 129 pts
SeverityFileLineSnippetContext
LOWtokenizers/tk-encode/src/lib.rs1#![cfg_attr(docsrs, feature(doc_cfg))]COMMENT
LOWtokenizers/tk-encode/src/lib.rs21//! splitting text is simply on whitespace.COMMENT
LOWtokenizers/tk-encode/src/lib.rs41//! today — so a parser that converts numbers to floats its own way moves them, and being moreCOMMENT
LOWtokenizers/tk-encode/src/lib.rs61//! **_Please note this behavior may evolve in the future_**COMMENT
LOWtokenizers/tk-encode/src/lib.rs81//! - **unicode-scripts**: the `UnicodeScripts` pre-tokenizer. Its script table is a 64 KiBCOMMENT
LOWtokenizers/tk-encode/src/lib.rs101//!COMMENT
LOWtokenizers/tk-encode/src/normalizers/metaspace.rs1//! Writes SentencePiece's `▁` into the text, where the spaces used to be.COMMENT
LOWtokenizers/tk-encode/src/normalizers/mod.rs21#[cfg(feature = "normalizers")]COMMENT
LOWtokenizers/tk-encode/src/normalizers/bert.rs61 )COMMENT
LOWtokenizers/tk-encode/src/normalizers/precompiled.rs1use std::borrow::Cow;COMMENT
LOWtokenizers/tk-encode/src/tokenizer/mod.rs41/// Defines the expected behavior for the delimiter of a Split PatternCOMMENT
LOWtokenizers/tk-encode/src/tokenizer/pipeline/mod.rs121/// Splits `input` into [`Segment`]s, in order: runs of ordinary textCOMMENT
LOWtokenizers/tk-encode/src/tokenizer/pipeline/mod.rs221 post_processor: PipelinePostProcessor,COMMENT
LOWtokenizers/tk-encode/src/tokenizer/pipeline/mod.rs841 out.extend_from_slice(encoding.ids());COMMENT
LOW…enizers/tk-encode/src/tokenizer/pipeline/normalizer.rs41 #[cfg(feature = "normalizers")]COMMENT
LOW…zers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs21///COMMENT
LOW…zers/tk-encode/src/tokenizer/pipeline/pre_tokenizer.rs41}COMMENT
LOWtokenizers/tk-encode/src/utils/cache.rs1#[cfg(feature = "unigram")]COMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs1//! A table that remembers which token ids a word encodes to, so the tokenizationCOMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs21//! └─────┴─────┴─────┴─────┴────COMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs41//!COMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs121 }COMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs261/// ## inline: 3 or fewer ids to cacheCOMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs381/// There are two variants depending on the word's length in bytes:COMMENT
LOWtokenizers/tk-encode/src/utils/word_cache.rs401/// ```textCOMMENT
LOWtokenizers/tk-encode/src/utils/byte_level.rs1use crate::{Result, vocab::bucket_vocab_store::BucketVocabStore};COMMENT
LOWtokenizers/tk-encode/src/utils/parallelism.rs21pub const ENV_VARIABLE: &str = "TOKENIZERS_PARALLELISM";COMMENT
LOWtokenizers/tk-encode/src/utils/mod.rs1pub(crate) mod cache;COMMENT
LOWtokenizers/tk-encode/src/utils/progress.rs1/// Progress output format for training operations.COMMENT
LOWtokenizers/tk-encode/src/utils/unrolled_regex.rs1//! Recognize a known GPT pre-tokenization regex and route it to the byte-exact native `bitcannon`COMMENT
LOWtokenizers/tk-encode/src/utils/search.rs1//! Looking for a pattern in a string, for the components spelled as `{pattern, content}`.COMMENT
LOWtokenizers/tk-encode/src/models/unigram/model.rs221 /// ```COMMENT
LOWtokenizers/tk-encode/src/models/bpe/merge_multipass.rs1//! Multipass merging, for short words (pretokens)COMMENT
LOWtokenizers/tk-encode/src/models/bpe/merge_multipass.rs21//!COMMENT
LOWtokenizers/tk-encode/src/models/bpe/merge_multipass.rs41//!COMMENT
LOWtokenizers/tk-encode/src/models/bpe/merge_multipass.rs61//! ^r both l; rank the newly written pair (e,ll): not a mergeCOMMENT
LOWtokenizers/tk-encode/src/models/bpe/merge_multipass.rs81//!COMMENT
LOW…izers/tk-encode/src/models/bpe/merge_hot_cold_queue.rs1//! The hot/cold queue: the merge engine for longer words.COMMENT
LOWtokenizers/tk-encode/src/models/bpe/serialization.rs21 /// The merge list in rank order.COMMENT
LOWtokenizers/tk-encode/src/models/bpe/mod.rs21/// Merge pairs as token strings, highest priority first.COMMENT
LOWtokenizers/tk-encode/src/models/bpe/mod.rs41 BadVocabulary,COMMENT
LOWtokenizers/tk-encode/src/models/bpe/tables.rs1//! The lookup tables the merge engines run on, built once at load time from the vocab and merges.COMMENT
LOWtokenizers/tk-encode/src/models/bpe/tables.rs21//! └──────────────────────────────────┴──────┴────┴──────────────────────────────┘COMMENT
LOWtokenizers/tk-encode/src/models/bpe/tables.rs221 fold,COMMENT
LOWtokenizers/tk-encode/src/models/bpe/model.rs301 // `reserve` may have moved the buffer.COMMENT
LOWtokenizers/tk-encode/src/models/bpe/fold/byte_level.rs1//! Which characters a byte-level vocab can emit as one token instead of as their individual bytes.COMMENT
LOWtokenizers/tk-encode/src/models/bpe/fold/mod.rs1//! Which characters convert straight to one internal symbol (they "fold"), and the compactCOMMENT
LOWtokenizers/tk-encode/src/models/bpe/fold/mod.rs21///COMMENT
LOWtokenizers/tk-encode/src/vocab/buckets.rs21/// 3. We check the prefix interpreted as a u64 (so we take the first 8 bytes). This is a fast &COMMENT
LOWtokenizers/tk-encode/src/vocab/buckets.rs221 lo[l] |= bit[h];COMMENT
LOWtokenizers/tk-encode/src/vocab/bucket_vocab_store.rs41/// # SafetyCOMMENT
LOWtokenizers/tk-encode/src/vocab/bucket_vocab_store.rs141fn digest_of(hash: u64) -> u32 {COMMENT
LOWtokenizers/tk-encode/src/vocab/bucket_vocab_store.rs161/// let vocab = BucketVocabStore::build(vec![COMMENT
LOW…enizers/tk-encode/src/vocab/bucket_added_vocabulary.rs141// AddedTokens can be updated if value changedCOMMENT
LOWtokenizers/tk-encode/src/processors/mod.rs1// Re-export these as processorsCOMMENT
LOWtokenizers/tk-encode/src/pre_tokenizers/sequence.rs41 };COMMENT
LOWtokenizers/tk-encode/src/pre_tokenizers/byte_level.rs1use crate::utils::byte_level::BYTES_CHAR_LOOKUP;COMMENT
LOWtokenizers/tk-encode/src/pre_tokenizers/split.rs41}COMMENT
LOWtokenizers/tk-convert/tests/oracle.rs1//! The pipeline must encode and decode exactly like the latest *released* `tokenizers`.COMMENT
LOWtokenizers/tk-convert/src/lib.rs1#![cfg_attr(docsrs, feature(doc_cfg))]COMMENT
69 more matches not shown…
Decorative Section Separators19 hits · 75 pts
SeverityFileLineSnippetContext
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs19//! ┌─────┬─────┬─────┬─────┬────COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs21//! └─────┴─────┴─────┴─────┴────COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs22//! ┌─────┬─────┬─────┬─────┬────COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs24//! └─────┴─────┴─────┴─────┴────COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs265/// ┌────────────────────────┬────────────┬────────────┬────────────┬─────────┬─────────┐COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs268/// └────────────────────────┴────────────┴────────────┴────────────┴─────────┴─────────┘COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs277/// ┌────────────────────────┬────────────┬────────────┬────────────┬─────────┬─────────┐COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs280/// └────────────────────────┴────────────┴────────────┴────────────┴─────────┴─────────┘COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs389/// ┌───┬──────────────┬───────────────────────────────────────────────────────────────────────┐COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs392/// └───┴──────────────┴───────────────────────────────────────────────────────────────────────┘COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs402/// ┌───┬───────────────────────────────────────────┬────────────────────────────────────────────┐COMMENT
MEDIUM⚡tokenizers/tk-encode/src/utils/word_cache.rs405/// └───┴───────────────────────────────────────────┴────────────────────────────────────────────┘COMMENT
MEDIUMtokenizers/tk-encode/src/models/bpe/tables.rs17//! ┌──────────────────────────────────┬──────┬────┬──────────────────────────────┐COMMENT
MEDIUMtokenizers/tk-encode/src/models/bpe/tables.rs21//! └──────────────────────────────────┴──────┴────┴──────────────────────────────┘COMMENT
MEDIUMtokenizers/bitcannon/src/lib.rs389// ── bitstream primitives ────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokenizers/bitcannon/src/lib.rs661// ── emit ────────────────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokenizers/bitcannon/src/models/cl100k.rs69 // ── run starts ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokenizers/bitcannon/src/models/cl100k.rs115 // ── carries ────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokenizers/bitcannon/src/models/deepseek.rs201 // ── carries ───────────────────────────────────────────────────────────────────────COMMENT
Hyper-Verbose Identifiers39 hits · 47 pts
SeverityFileLineSnippetContext
LOWbindings/python/tests/test_from_pretrained.py25def test_downloads_tokenizer_json_from_the_model_repo(recorded_download, wiki):CODE
LOWbindings/python/tests/test_from_pretrained.py44def test_forwards_every_download_option(recorded_download, tmp_path, token):CODE
LOWbindings/python/tests/test_from_pretrained.py63def test_refuses_a_token_that_is_neither_str_nor_bool(recorded_download):CODE
LOWbindings/python/tests/test_from_pretrained.py68def test_reads_the_hub_cache_without_network(tmp_path, wiki):CODE
LOWbindings/python/tests/test_from_pretrained.py83def test_reports_a_repo_missing_from_the_cache(tmp_path):CODE
LOWbindings/python/tests/test_from_pretrained.py89def test_honours_the_revision():CODE
LOWbindings/python/tests/test_truncation.py17def test_strategy_round_trips(strategy):CODE
LOWbindings/python/tests/test_truncation.py22def test_direction_round_trips(direction):CODE
LOWbindings/python/tests/test_truncation.py36def test_max_length_is_required():CODE
LOWbindings/python/tests/test_truncation.py59def test_encode_error_is_a_value_error(gpt2):CODE
LOWbindings/python/tests/test_truncation.py66def test_truncation_from_file(truncated_wiki):CODE
LOW⚡bindings/python/tests/test_truncation.py85def test_encode_truncation_override(gpt2):CODE
LOW⚡bindings/python/tests/test_truncation.py90def test_encode_truncation_off(gpt2):CODE
LOW⚡bindings/python/tests/test_truncation.py98def test_encode_truncation_override_replaces_config(gpt2):CODE
LOW⚡bindings/python/tests/test_truncation.py105def test_encode_batch_truncation_override(gpt2):CODE
LOW⚡bindings/python/tests/test_truncation.py110def test_encode_batch_truncation_off(gpt2):CODE
LOWbindings/python/tests/test_decode.py27def test_decode_skip_special_tokens(llama3):CODE
LOW⚡bindings/python/tests/test_decode.py39def test_decode_tokens_takes_arrays(gpt2):CODE
LOW⚡bindings/python/tests/test_decode.py47def test_decode_tokens_skip_special_tokens(llama3):CODE
LOW⚡bindings/python/tests/test_decode.py55def test_decode_takes_an_encoding(llama3):CODE
LOW⚡bindings/python/tests/test_decode.py62def test_decode_tokens_takes_an_encoding(llama3):CODE
LOWbindings/python/tests/test_encoding.py8def test_array_list_equivalence(bert):CODE
LOWbindings/python/tests/test_encoding.py27def test_array_write_leaves_encoding_unchanged(bert):CODE
LOWbindings/python/tests/test_encoding.py37def test_array_outlives_encoding(bert):CODE
LOW⚡bindings/python/tests/test_tokenize.py9def test_tokenize_is_encode_then_decode_tokens(gpt2, llama3, bert, text):CODE
LOW⚡bindings/python/tests/test_tokenize.py14def test_tokenize_forwards_add_special_tokens(llama3):CODE
LOW⚡bindings/python/tests/test_tokenize.py21def test_tokenize_forwards_padding(wiki):CODE
LOW⚡bindings/python/tests/test_tokenize.py29def test_tokenize_forwards_truncation(gpt2):CODE
LOWbindings/python/tests/test_encode.py75def test_encode_batch_special_tokens(bert):CODE
LOWbindings/python/tests/test_threads.py30def test_set_padding_while_encoding(gpt2):CODE
LOWbindings/python/tests/test_threads.py51def test_read_array_while_decoding_it(gpt2):CODE
LOWbindings/python/tests/test_padding_and_truncation.py67def test_overrides_resolve_independently(gpt2, configured, overrides, effective):CODE
LOWbindings/python/tests/test_padding.py20def test_getters_return_the_arguments():CODE
LOWbindings/python/tests/test_padding.py102def test_encode_padding_override(gpt2):CODE
LOW⚡bindings/python/tests/test_padding.py115def test_encode_padding_override_replaces_config(gpt2):CODE
LOW⚡bindings/python/tests/test_padding.py122def test_encode_batch_padding_override(gpt2):CODE
LOW⚡bindings/python/tests/test_padding.py129def test_encode_batch_padding_off(gpt2):CODE
LOWbindings/python/tests/test_workers.py15def test_pickle_tokenizer_padding(padded_wiki):CODE
LOWbindings/python/tests/test_workers.py25def test_pickle_tokenizer_truncation(truncated_wiki):CODE
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtokenizers/tk-encode/src/lib.rs58//! - tokenizers is designed to leverage CPU parallelism when possible. The level of parallelism is determinedCOMMENT
MEDIUMtokenizers/bitcannon/src/classify/neon.rs115/// This is the key classification function. We built the ATOM_TABLES, and here we leverage them.COMMENT
MEDIUMtokenizers/tk-train/src/trainers/bpe/mod.rs808 // this is the more robust version that only tests max length of learned tokensCOMMENT
Unused Imports5 hits · 5 pts
SeverityFileLineSnippetContext
LOWbindings/python/python/tokenizers/__init__.py7CODE
LOWbindings/python/python/tokenizers/__init__.py7CODE
LOWbindings/python/python/tokenizers/__init__.py7CODE
LOWbindings/python/python/tokenizers/__init__.py7CODE
LOWbindings/python/python/tokenizers/__init__.py7CODE
Excessive Try-Catch Wrapping2 hits · 3 pts
SeverityFileLineSnippetContext
LOWbindings/python/tests/test_threads.py38 except Exception as e:CODE
MEDIUMbindings/python/tests/test_threads.py34def encode_repeatedly():CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtokenizers/scripts/verify_bindings.sh13# Usage:COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbindings/python/python/tokenizers/__init__.py9__all__ = ["Encoding", "Padding", "Tokenizer", "Truncation", "__version__"]CODE