PyPI / transformers / 5.20.2

transformers 5.20.2

Source
https://github.com/huggingface/transformers
Artifact scanned
transformers-5.20.2-py3-none-any.whl (wheel · 12.2 MB · SHA-256 7ae75dbc1fb3…)
Compared with
transformers-5.20.1-py3-none-any.whl (0 signals introduced since)
Files
2766 scanned, 5 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 60 info
Scan time
20.0 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 11 of 11 warn and critical signals; 11 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 10:21

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. line length 862 characters (raw pass, confidence 0.50)

            vocab += [("ar_AR", 0.0), ("cs_CZ", 0.0), ("de_DE", 0.0), ("en_XX", 0.0), ("es_XX", 0.0), ("et_EE", 0.0), ("fi_FI", 0.0), ("fr_XX", 0.0), ("gu_IN", 0.0), ("hi_IN", 0.0), ("it_IT", 0.0), ("ja_XX", 0.0), ("kk_KZ", 0.0), ("ko_KR", 0.0), ("lt_LT", 0.0), ("lv_LV", 0.0), ("my_MM", 0.0), ("ne_NP", 0.0), ("nl_XX", 0.0)
  2. info whitespace-anomaly transformers/generation/utils.py:32:1

    file mixes tab and space indentation (2 tab-indented and 3906 space-indented lines) (raw pass, confidence 0.40)

    from ..cache_utils import (
        Cache,
        DynamicCache,
        EncoderDecoderCache,
  3. info warn → info by review dynamic-attribute transformers/hf_argparser.py:325:39

    reach-by-name through `vars.get` (ast pass, confidence 0.60)

                    cfg, args = args_file_parser.parse_known_args(args=args)
                    cmd_args_file_paths = vars(cfg).get(args_file_flag.lstrip("-"), None)
    
                    if cmd_args_file_paths:
    likely benign LLM, confidence 0.90 Reads an argparse namespace attribute by name to find args-file paths.
    Reasoning

    vars(cfg).get(name) reads a parsed argparse namespace attribute by name; this is ordinary dataclass/argparse handling of args-file flags, not hidden execution.

  4. info warn → info by review decoder-decompress-payload transformers/image_utils.py:502:23

    file imports decoder module(s) base64 and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

                try:
                    b64 = base64.decodebytes(image.encode())
                    image = PIL.Image.open(BytesIO(b64))
                except Exception as e:
    likely benign LLM, confidence 0.90 Base64-decodes an image string and opens it with PIL.
    Reasoning

    base64 decoding of an image string passed by the user is a standard data-URL/image loading path; the decoded bytes are opened as an image with PIL, not executed.

  5. info warn → info by review dynamic-attribute transformers/initialization.py:244:52

    reach-by-name through `globals` (ast pass, confidence 0.60)

                            originals[module][func_name] = getattr(module, func_name)
                            setattr(module, func_name, globals()[func_name])
            yield
        finally:
    likely benign LLM, confidence 0.85 Temporarily swaps module init functions with same-module globals inside a context manager.
    Reasoning

    globals()[func_name] looks up a function defined in the same module for a context manager that temporarily patches torch init functions and restores originals in finally; it is a bounded, internal lookup.

  6. identifier `Σ_h` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            The scoring logic computes:
                index_score[b,s,t] = Σ_h (weight[b,s,h] · softmax_scale · q[b,s,h,:] · k[b,t,:])
    
            Args:
  7. identifier `Σ_h` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            The scoring logic computes:
                index_score[b,s,t] = Σ_h (weight[b,s,h] · softmax_scale · q[b,s,h,:] · k[b,t,:])
    
            Args:
  8. identifier `Σ_h` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            The scoring logic computes:
                index_score[b,s,t] = Σ_h (weight[b,s,h] · softmax_scale · q[b,s,h,:] · k[b,t,:])
    
            Args:
  9. identifier `θ_i` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

        Gemma3's per-layer-type buffers), specialised for V4's *interleaved* RoPE.
        Interleaved RoPE: one `θ_i` per pair (`rope_head_dim // 2` entries),
        DIFF no end-to-end duplication. Same shape as `inv_freq @ position_ids`.
  10. identifier `θ_i` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

        Gemma3's per-layer-type buffers), specialised for V4's *interleaved* RoPE.
        Interleaved RoPE: one `θ_i` per pair (`rope_head_dim // 2` entries),
        DIFF no end-to-end duplication. Same shape as `inv_freq @ position_ids`.
  11. identifier `K1ᵀ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

    
        Computes ``(softmax(Q1 K1ᵀ) - λ · softmax(Q2 K2ᵀ)) · V`` as two standard attention calls
        sharing Q and K over the two halves of V. The two-call structure is ~30% faster than the
        V-doubling shortcut at production shapes, since asymmetric V (``head_dim_v != head_dim_q``)
  12. identifier `K2ᵀ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

    
        Computes ``(softmax(Q1 K1ᵀ) - λ · softmax(Q2 K2ᵀ)) · V`` as two standard attention calls
        sharing Q and K over the two halves of V. The two-call structure is ~30% faster than the
        V-doubling shortcut at production shapes, since asymmetric V (``head_dim_v != head_dim_q``)
  13. identifier `K1ᵀ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

    
        Computes ``(softmax(Q1 K1ᵀ) - λ · softmax(Q2 K2ᵀ)) · V`` as two standard attention calls
        sharing Q and K over the two halves of V. The two-call structure is ~30% faster than the
        V-doubling shortcut at production shapes, since asymmetric V (``head_dim_v != head_dim_q``)
  14. identifier `K2ᵀ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

    
        Computes ``(softmax(Q1 K1ᵀ) - λ · softmax(Q2 K2ᵀ)) · V`` as two standard attention calls
        sharing Q and K over the two halves of V. The two-call structure is ~30% faster than the
        V-doubling shortcut at production shapes, since asymmetric V (``head_dim_v != head_dim_q``)
  15. identifier `Cβ` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)

            distogram_atom_idx (`torch.Tensor` of shape `(batch_size, num_tokens)`):
                Index of the representative atom (Cβ, or Cα for glycine) of each token. Used by the
                confidence head; the trunk does not need it.
            num_diffusion_samples (`int`, *optional*):
  16. identifier `Cα` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

            distogram_atom_idx (`torch.Tensor` of shape `(batch_size, num_tokens)`):
                Index of the representative atom (Cβ, or Cα for glycine) of each token. Used by the
                confidence head; the trunk does not need it.
            num_diffusion_samples (`int`, *optional*):
  17. identifier `Cα` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)

            distogram_atom_idx (`torch.Tensor` of shape `(batch_size, num_tokens)`):
                Index of the representative atom (Cβ, or Cα for glycine) of each token. Used by the
                confidence head; the trunk does not need it.
            num_diffusion_samples (`int`, *optional*):
  18. identifier `Cα` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

        plddt_ca (`torch.FloatTensor` of shape `(num_diffusion_samples, num_tokens)`):
            Predicted lDDT at the representative (Cα) atom of each token.
        complex_plddt (`torch.FloatTensor` of shape `(num_diffusion_samples,)`):
            Mean pLDDT over all atoms of the complex.
  19. identifier `Cα` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)

        plddt_ca (`torch.FloatTensor` of shape `(num_diffusion_samples, num_tokens)`):
            Predicted lDDT at the representative (Cα) atom of each token.
        complex_plddt (`torch.FloatTensor` of shape `(num_diffusion_samples,)`):
            Mean pLDDT over all atoms of the complex.
  20. identifier `Cα` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

        plddt_ca (`torch.FloatTensor` of shape `(num_diffusion_samples, num_tokens)`):
            Predicted lDDT at the representative (Cα) atom of each token.
        complex_plddt (`torch.FloatTensor` of shape `(num_diffusion_samples,)`):
            Mean pLDDT over all atoms of the complex.
  21. identifier `Cα` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)

        plddt_ca (`torch.FloatTensor` of shape `(num_diffusion_samples, num_tokens)`):
            Predicted lDDT at the representative (Cα) atom of each token.
        complex_plddt (`torch.FloatTensor` of shape `(num_diffusion_samples,)`):
            Mean pLDDT over all atoms of the complex.
  22. identifier `Σ_h` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            The scoring logic computes:
                index_score[b,s,t] = Σ_h (weight[b,s,h] · softmax_scale · q[b,s,h,:] · k[b,t,:])
    
            Args:
  23. line length 520 characters (raw pass, confidence 0.50)

        image_grid_pinpoints = [[384, 384], [384, 768], [384, 1152], [384, 1536], [384, 1920], [384, 2304], [768, 384], [768, 768], [768, 1152], [768, 1536], [768, 1920], [768, 2304], [1152, 384], [1152, 768], [1152, 1152], [1152, 1536], [1152, 1920], [1152, 2304], [1536, 384], [1536, 768], [1536, 1152], [1536, 1536], [153
  24. line length 520 characters (raw pass, confidence 0.50)

        image_grid_pinpoints = [[384, 384], [384, 768], [384, 1152], [384, 1536], [384, 1920], [384, 2304], [768, 384], [768, 768], [768, 1152], [768, 1536], [768, 1920], [768, 2304], [1152, 384], [1152, 768], [1152, 1152], [1152, 1536], [1152, 1920], [1152, 2304], [1536, 384], [1536, 768], [1536, 1152], [1536, 1536], [153
  25. line length 520 characters (raw pass, confidence 0.50)

        image_grid_pinpoints = [[384, 384], [384, 768], [384, 1152], [384, 1536], [384, 1920], [384, 2304], [768, 384], [768, 768], [768, 1152], [768, 1536], [768, 1920], [768, 2304], [1152, 384], [1152, 768], [1152, 1152], [1152, 1536], [1152, 1920], [1152, 2304], [1536, 384], [1536, 768], [1536, 1152], [1536, 1536], [153
  26. line length 520 characters (raw pass, confidence 0.50)

        image_grid_pinpoints = [[384, 384], [384, 768], [384, 1152], [384, 1536], [384, 1920], [384, 2304], [768, 384], [768, 768], [768, 1152], [768, 1536], [768, 1920], [768, 2304], [1152, 384], [1152, 768], [1152, 1152], [1152, 1536], [1152, 1920], [1152, 2304], [1536, 384], [1536, 768], [1536, 1152], [1536, 1536], [153
  27. line length 618 characters (raw pass, confidence 0.50)

        "m2m100": ["af", "am", "ar", "ast", "az", "ba", "be", "bg", "bn", "br", "bs", "ca", "ceb", "cs", "cy", "da", "de", "el", "en", "es", "et", "fa", "ff", "fi", "fr", "fy", "ga", "gd", "gl", "gu", "ha", "he", "hi", "hr", "ht", "hu", "hy", "id", "ig", "ilo", "is", "it", "ja", "jv", "ka", "kk", "km", "kn", "ko", "lb", "l
  28. line length 506 characters (raw pass, confidence 0.50)

    FAIRSEQ_LANGUAGE_CODES = ["ar_AR", "cs_CZ", "de_DE", "en_XX", "es_XX", "et_EE", "fi_FI", "fr_XX", "gu_IN", "hi_IN", "it_IT", "ja_XX", "kk_KZ", "ko_KR", "lt_LT", "lv_LV", "my_MM", "ne_NP", "nl_XX", "ro_RO", "ru_RU", "si_LK", "tr_TR", "vi_VN", "zh_CN", "af_ZA", "az_AZ", "bn_IN", "fa_IR", "he_IL", "hr_HR", "id_ID", "ka_GE
  29. identifier `βkk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  30. identifier `βvk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  31. base64-like blob (64 bytes, compression ratio 1.17) (in comment) (raw pass, confidence 0.36)

    
            # https://github.com/lyuwenyu/RT-DETR/blob/94f5e16708329d2f2716426868ec89aa774af016/PPDocLayoutV2_pytorch/src/zoo/PPDocLayoutV2/PPDocLayoutV2_decoder.py#L252
            for idx, decoder_layer in enumerate(self.layers):
                reference_points_input = reference_points.unsqueeze(2)
  32. base64-like blob (64 bytes, compression ratio 1.17) (in comment) (raw pass, confidence 0.36)

            # Create encoder input projection layers
            # https://github.com/lyuwenyu/RT-DETR/blob/94f5e16708329d2f2716426868ec89aa774af016/PPDocLayoutV2_pytorch/src/zoo/PPDocLayoutV2/hybrid_encoder.py#L212
            num_backbone_outs = len(intermediate_channel_sizes)
            encoder_input_proj_list = []
  33. base64-like blob (64 bytes, compression ratio 1.17) (in comment) (raw pass, confidence 0.36)

            # Create decoder input projection layers
            # https://github.com/lyuwenyu/RT-DETR/blob/94f5e16708329d2f2716426868ec89aa774af016/PPDocLayoutV2_pytorch/src/zoo/PPDocLayoutV2/PPDocLayoutV2_decoder.py#L412
            num_backbone_outs = len(config.decoder_in_channels)
            decoder_input_proj_list = []
  34. base64-like blob (64 bytes, compression ratio 1.17) (in comment) (raw pass, confidence 0.36)

            # Equivalent to def _get_encoder_input
            # https://github.com/lyuwenyu/RT-DETR/blob/94f5e16708329d2f2716426868ec89aa774af016/PPDocLayoutV2_pytorch/src/zoo/PPDocLayoutV2/PPDocLayoutV2_decoder.py#L412
            sources = []
            for level, source in enumerate(encoder_outputs.last_hidden_state):
  35. base64-like blob (64 bytes, compression ratio 1.17) (in comment) (raw pass, confidence 0.36)

            # Create encoder input projection layers
            # https://github.com/lyuwenyu/RT-DETR/blob/94f5e16708329d2f2716426868ec89aa774af016/PPDocLayoutV3_pytorch/src/zoo/PPDocLayoutV3/hybrid_encoder.py#L212
            num_backbone_outs = len(intermediate_channel_sizes)
  36. base64-like blob (64 bytes, compression ratio 1.17) (in comment) (raw pass, confidence 0.36)

            # Create decoder input projection layers
            # https://github.com/lyuwenyu/RT-DETR/blob/94f5e16708329d2f2716426868ec89aa774af016/PPDocLayoutV3_pytorch/src/zoo/PPDocLayoutV3/PPDocLayoutV3_decoder.py#L412
            num_backbone_outs = len(config.decoder_in_channels)
            decoder_input_proj_list = []
  37. identifier `βkk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  38. identifier `βvk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  39. identifier `βkk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  40. identifier `βvk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  41. identifier `βkk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  42. identifier `βvk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  43. identifier `βkk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  44. identifier `βvk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  45. identifier `βkk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  46. identifier `βvk` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            # Update the recurrent state: new recurrent state (S_t+1) = decayed old state (S_t * (I-βkk^T)) + update (βvk^T)
            last_recurrent_state = last_recurrent_state * chunk_decay[:, :, i] + key[:, :, i].transpose(-1, -2) @ v_new
  47. identifier `θd` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            sin, cos = sinusoidal_pos.chunk(2, dim=-1)
            # sin [θ0,θ1,θ2......θd/2-1] -> sin_pos [θ0,θ0,θ1,θ1,θ2,θ2......θd/2-1,θd/2-1]
            sin_pos = torch.stack([sin, sin], dim=-1).reshape_as(sinusoidal_pos)
  48. identifier `θd` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            sin, cos = sinusoidal_pos.chunk(2, dim=-1)
            # sin [θ0,θ1,θ2......θd/2-1] -> sin_pos [θ0,θ0,θ1,θ1,θ2,θ2......θd/2-1,θd/2-1]
            sin_pos = torch.stack([sin, sin], dim=-1).reshape_as(sinusoidal_pos)
  49. identifier `θd` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            sin, cos = sinusoidal_pos.chunk(2, dim=-1)
            # sin [θ0,θ1,θ2......θd/2-1] -> sin_pos [θ0,θ0,θ1,θ1,θ2,θ2......θd/2-1,θd/2-1]
            sin_pos = torch.stack([sin, sin], dim=-1).reshape_as(sinusoidal_pos)
  50. identifier `θd` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            sin_pos = torch.stack([sin, sin], dim=-1).reshape_as(sinusoidal_pos)
            # cos [θ0,θ1,θ2......θd/2-1] -> cos_pos [θ0,θ0,θ1,θ1,θ2,θ2......θd/2-1,θd/2-1]
            cos_pos = torch.stack([cos, cos], dim=-1).reshape_as(sinusoidal_pos)
            # rotate_half_query_layer [-q1,q0,-q3,q2......,-qd-1,qd-2]
  51. identifier `θd` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            sin_pos = torch.stack([sin, sin], dim=-1).reshape_as(sinusoidal_pos)
            # cos [θ0,θ1,θ2......θd/2-1] -> cos_pos [θ0,θ0,θ1,θ1,θ2,θ2......θd/2-1,θd/2-1]
            cos_pos = torch.stack([cos, cos], dim=-1).reshape_as(sinusoidal_pos)
            # rotate_half_query_layer [-q1,q0,-q3,q2......,-qd-1,qd-2]
  52. identifier `θd` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

            sin_pos = torch.stack([sin, sin], dim=-1).reshape_as(sinusoidal_pos)
            # cos [θ0,θ1,θ2......θd/2-1] -> cos_pos [θ0,θ0,θ1,θ1,θ2,θ2......θd/2-1,θd/2-1]
            cos_pos = torch.stack([cos, cos], dim=-1).reshape_as(sinusoidal_pos)
            # rotate_half_query_layer [-q1,q0,-q3,q2......,-qd-1,qd-2]
  53. info critical → info by review dynamic-import transformers/processing_utils.py:117:18

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            module_name, attr_name = self._MAPPING_NAMES[key]
            module = __import__(module_name, fromlist=[attr_name])
            return getattr(module, attr_name)
    likely benign LLM, confidence 0.80 Lazy-loads a class by importing a module name from an internal mapping.
    Reasoning

    Lazy import via a module name from a fixed class-level mapping (_MAPPING_NAMES) is a common lazy-loading pattern in transformers; the flagged non-literal is internal, though the finding is critical severity and the source of key is not shown.

  54. info warn → info by review frame-introspection transformers/testing_utils.py:1926:22

    `inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)

        # this function caller's __file__
        caller__file__ = inspect.stack()[1][1]
        tests_dir = os.path.abspath(os.path.dirname(caller__file__))
    likely benign LLM, confidence 0.90 Uses the caller's frame to find the test directory.
    Reasoning

    inspect.stack()[1] is used to locate the calling test file's directory, a standard testing helper pattern with no malicious effect.

  55. info warn → info by review frame-introspection transformers/testing_utils.py:3856:26

    `inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)

        # from the most recent frame to the top frame
        stack_from_inspect = inspect.stack()
        # but visit from the top frame to the most recent frame
    likely benign LLM, confidence 0.90 Walks the call stack in a testing utility.
    Reasoning

    inspect.stack() is used to walk call frames for test reporting or debugging; no sensitive or networked action is involved.

  56. info warn → info by review dynamic-attribute transformers/tokenization_utils_base.py:1316:28

    reach-by-name through `vars` (ast pass, confidence 0.60)

                    if key in vars(cls):
                        return vars(cls)[key]
                raise AttributeError(f"{self.__class__.__name__} has no attribute {key}")
            return object.__getattribute__(self, key)
    likely benign LLM, confidence 0.85 Implements a __getattr__ fallback that looks up class attributes by name.
    Reasoning

    vars(cls)[key] and object.__getattribute__ implement attribute fallback lookup on the class, a normal Python attribute-resolution pattern for tokenizer attributes.

  57. info warn → info by review frame-introspection transformers/trainer_utils.py:673:18

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

            """derives the stage/caller name automatically"""
            caller = inspect.currentframe().f_back.f_back.f_code.co_name
            if caller in self.stages:
                return self.stages[caller]
    likely benign LLM, confidence 0.90 Derives a stage name from the calling function's name.
    Reasoning

    currentframe().f_back used to derive a stage name from the caller's function name; benign introspection for logging or stage naming.

  58. info warn → info by review payload-bytes-literal transformers/utils/sentencepiece_model_pb2.py:35:9

    concatenated bytes literal contains 566 `\xNN` escapes (56% of content) — binary payload shape (ast pass, confidence 0.85)

        serialized_pb=(
            b'\n\x19sentencepiece_model.proto\x12\rsentencepiece"\xa1\n\n\x0bTrainerSpec\x12\r\n\x05input\x18\x01'
            b" \x03(\t\x12\x14\n\x0cinput_format\x18\x07 \x01(\t\x12\x14\n\x0cmodel_prefix\x18\x02"
            b" \x01(\t\x12\x41\n\nmodel_type\x18\x03"
    likely benign LLM, confidence 0.90 Generated protobuf serialized descriptor bytes for the SentencePiece model schema.
    Reasoning

    This is a generated protobuf descriptor for sentencepiece_model.proto; the bytes are serialized schema data, and the escape density is typical of protoc output.

  59. info warn → info by review payload-bytes-literal transformers/utils/sentencepiece_model_pb2.py:65:9

    bytes literal contains 44 `\xNN` escapes (71% of content) — binary payload shape (ast pass, confidence 0.85)

            b" \x12+\n\x1ctrain_extremely_large_corpus\x18\x31"
            b' \x01(\x08:\x05\x66\x61lse"5\n\tModelType\x12\x0b\n\x07UNIGRAM\x10\x01\x12\x07\n\x03\x42PE\x10\x02\x12\x08\n\x04WORD\x10\x03\x12\x08\n\x04\x43HAR\x10\x04*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02"\xd1\x01\n\x0eNormalizerSpec\x12\x0c\n\x04name\x18\x01'
    likely benign LLM, confidence 0.90 Generated protobuf serialized descriptor bytes for SentencePiece enums and fields.
    Reasoning

    Generated protobuf descriptor data with schema field names and enum values; the byte shape is expected for protoc output and is not executed as code.

  60. info warn → info by review payload-bytes-literal transformers/utils/sentencepiece_model_pb2.py:79:9

    bytes literal contains 56 `\xNN` escapes (64% of content) — binary payload shape (ast pass, confidence 0.85)

            b' \x01(\x0e\x32,.sentencepiece.ModelProto.SentencePiece.Type:\x06NORMAL"T\n\x04Type\x12\n\n\x06NORMAL\x10\x01\x12\x0b\n\x07UNKNOWN\x10\x02\x12\x0b\n\x07\x43ONTROL\x10\x03\x12\x10\n\x0cUSER_DEFINED\x10\x04\x12\x08\n\x04\x42YTE\x10\x06\x12\n\n\x06UNUSED\x10\x05*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02*\t\x08\xc8\x
    likely benign LLM, confidence 0.90 Generated protobuf serialized descriptor bytes for SentencePiece types.
    Reasoning

    Same generated protobuf descriptor pattern; the escapes encode schema text and enum definitions, consistent with a standard _pb2 file.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
curl -fsSL -o transformers-5.20.2-py3-none-any.whl https://files.pythonhosted.org/packages/96/b6/724faefed06913dd3e42e0476fe2c42448675c42f687a12bf810aa098005/transformers-5.20.2-py3-none-any.whl
printf '%s  %s\n' 7ae75dbc1fb3922aff1b6c97b9e5479d6cf26fd86a8866bfb71324190479f807 transformers-5.20.2-py3-none-any.whl | shasum -a 256 -c -
unzip -q transformers-5.20.2-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg