A concise but complete full-attention transformer with a set of promising experimental features from various papers
This report summarizes scanner evidence for lucidrains/x-transformers, a Python project with 5,955 GitHub stars. SynthScan examined 22,611 lines of code across 46 source files, recording 222 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 9.2 (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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 119 finding(s).
Are imports declared and package/API names verified? 103 finding(s).
Are wrappers, guards, and repeated structures necessary? 97 finding(s).
Which changes need focused human review? 222 finding(s).
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.
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.
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.
The scanner identified 222 distinct pattern matches across 6 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_with_muon.py | 17 | CODE | |
| LOW | train_enwik8.py | 20 | CODE | |
| LOW | train_path_star.py | 24 | CODE | |
| LOW | train_self_masked_repr.py | 12 | CODE | |
| LOW | train_self_masked_repr.py | 26 | CODE | |
| LOW | train_entropy_tokenizer.py | 22 | CODE | |
| LOW | train_xl_enwik8.py | 20 | CODE | |
| LOW | train_parity.py | 3 | CODE | |
| LOW | train_gpt_vae.py | 13 | CODE | |
| LOW | train_length_extrapolate.py | 18 | CODE | |
| LOW | train_free.py | 19 | CODE | |
| LOW | train_free.py | 20 | CODE | |
| LOW | train_belief_state.py | 2 | CODE | |
| LOW | train_belief_state.py | 10 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 1 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 2 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 13 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 15 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 7 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 12 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 13 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 21 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 6 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 18 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 19 | CODE | |
| LOW | x_transformers/neo_mlp.py | 1 | CODE | |
| LOW | x_transformers/neo_mlp.py | 4 | CODE | |
| LOW | x_transformers/neo_mlp.py | 4 | CODE | |
| LOW | x_transformers/neo_mlp.py | 5 | CODE | |
| LOW | x_transformers/neo_mlp.py | 6 | CODE | |
| LOW | x_transformers/recirculation.py | 4 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 1 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 8 | CODE | |
| LOW | x_transformers/x_transformers.py | 1 | CODE | |
| LOW | x_transformers/x_transformers.py | 9 | CODE | |
| LOW | x_transformers/x_transformers.py | 12 | CODE | |
| LOW | x_transformers/x_transformers.py | 23 | CODE | |
| LOW | x_transformers/x_transformers.py | 23 | CODE | |
| LOW | x_transformers/x_transformers.py | 23 | CODE | |
| LOW | x_transformers/xm_latent_decoder.py | 1 | CODE | |
| LOW | x_transformers/multi_input.py | 1 | CODE | |
| LOW | x_transformers/multi_input.py | 8 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 19 | CODE | |
| LOW | x_transformers/__init__.py | 20 | CODE | |
| LOW | x_transformers/__init__.py | 21 | CODE | |
| 43 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_enwik8_lejepa_style.py | 37 | CODE | |
| LOW | train_enwik8.py | 45 | CODE | |
| LOW | train_discover_reversal.py | 54 | CODE | |
| LOW | train_path_star.py | 113 | CODE | |
| LOW | train_self_masked_repr.py | 424 | CODE | |
| LOW | train_self_masked_repr.py | 72 | CODE | |
| LOW | train_self_masked_repr.py | 223 | CODE | |
| LOW | train_entropy_tokenizer.py | 53 | CODE | |
| LOW | train_xl_enwik8.py | 48 | CODE | |
| LOW | train_enwik8_xm.py | 100 | CODE | |
| LOW | train_full_bandwidth_parity.py | 164 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 312 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 84 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 69 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 160 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 201 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 377 | CODE | |
| LOW | x_transformers/x_transformers.py | 1646 | CODE | |
| LOW | x_transformers/x_transformers.py | 1753 | CODE | |
| LOW | x_transformers/x_transformers.py | 1842 | CODE | |
| LOW | x_transformers/x_transformers.py | 2276 | CODE | |
| LOW | x_transformers/x_transformers.py | 2741 | CODE | |
| LOW | x_transformers/x_transformers.py | 3330 | CODE | |
| LOW | x_transformers/x_transformers.py | 3803 | CODE | |
| LOW | x_transformers/x_transformers.py | 3954 | CODE | |
| LOW | x_transformers/x_transformers.py | 4196 | CODE | |
| LOW | x_transformers/x_transformers.py | 4753 | CODE | |
| LOW | x_transformers/xm_latent_decoder.py | 44 | CODE | |
| LOW | x_transformers/xm_latent_decoder.py | 195 | CODE | |
| LOW | x_transformers/multi_input.py | 40 | CODE | |
| LOW | x_transformers/multi_input.py | 113 | CODE | |
| LOW | x_transformers/next_latent_wrapper.py | 164 | CODE | |
| LOW | x_transformers/attend.py | 191 | CODE | |
| LOW | x_transformers/up_wrapper.py | 146 | CODE | |
| LOW | x_transformers/gpt_vae.py | 33 | CODE | |
| LOW | x_transformers/continuous.py | 64 | CODE | |
| LOW | x_transformers/continuous.py | 139 | CODE | |
| LOW | x_transformers/nonautoregressive_wrapper.py | 105 | CODE | |
| LOW | x_transformers/full_bandwidth.py | 218 | CODE | |
| LOW | x_transformers/full_bandwidth.py | 311 | CODE | |
| LOW | x_transformers/full_bandwidth.py | 395 | CODE | |
| LOW | x_transformers/xval.py | 51 | CODE | |
| LOW | x_transformers/xval.py | 111 | CODE | |
| LOW | x_transformers/continuous_autoencoder.py | 80 | CODE | |
| LOW | x_transformers/free_transformer.py | 133 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | x_transformers/belief_state_wrapper.py | 177 | def generate_with_suffix_cond( | CODE |
| LOW | x_transformers/recirculation.py | 159 | def can_cache_kv_outside_max_seq_len(self): | CODE |
| LOW | x_transformers/x_transformers.py | 179 | def resolve_repeat_blocks_to_layer_execute_order( | CODE |
| LOW | x_transformers/x_transformers.py | 476 | def _relative_position_bucket(relative_position, causal = True, num_buckets = 32, max_distance = 128): | CODE |
| LOW | x_transformers/xm_latent_decoder.py | 135 | def generate_with_candidate_latents( | CODE |
| LOW | x_transformers/entropy_based_tokenizer.py | 29 | def get_accumulated_threshold_mask( | CODE |
| LOW | x_transformers/next_latent_wrapper.py | 28 | def dynamic_rollout_loss_weights( | CODE |
| LOW | x_transformers/attend.py | 91 | def log_prob_from_hard_attend(intermeds: Intermediates): | CODE |
| LOW | x_transformers/up_wrapper.py | 206 | def get_rand_sequences_from_buffer(self, size = None): | CODE |
| LOW | x_transformers/continuous.py | 36 | def sample_from_mean_variance( | CODE |
| LOW | x_transformers/full_bandwidth.py | 62 | def dynamic_rollout_loss_weights( | CODE |
| LOW | x_transformers/dpo.py | 20 | def log_prob_from_model_and_seq(model, seq): | CODE |
| LOW | tests/test_x_transformers.py | 37 | def test_disable_autocast_uses_tensor_device(): | CODE |
| LOW | tests/test_x_transformers.py | 53 | def test_flash_attention_on_xpu(): | CODE |
| LOW | tests/test_x_transformers.py | 166 | def test_attn_softclamp_logits(): | CODE |
| LOW | tests/test_x_transformers.py | 183 | def test_multiple_input_embeds(): | CODE |
| LOW | tests/test_x_transformers.py | 256 | def test_squeeze_logit_dim_one(): | CODE |
| LOW | tests/test_x_transformers.py | 399 | def test_forgetting_transformer( | CODE |
| LOW | tests/test_x_transformers.py | 456 | def test_custom_rotary_pos_emb(rotary_xpos): | CODE |
| LOW | tests/test_x_transformers.py | 480 | def test_custom_alibi_across_heads(flash: bool): | CODE |
| LOW | tests/test_x_transformers.py | 659 | def test_gated_multi_residual(qkv_receive_diff_residuals): | CODE |
| LOW | tests/test_x_transformers.py | 750 | def test_caching_when_inputs_not_include_past(): | CODE |
| LOW | tests/test_x_transformers.py | 782 | def test_caching_when_inputs_not_include_past_continuous(): | CODE |
| LOW | tests/test_x_transformers.py | 815 | def test_multi_latent_attention(): | CODE |
| LOW | tests/test_x_transformers.py | 862 | def test_belief_state_wrapper( | CODE |
| LOW | tests/test_x_transformers.py | 934 | def test_entropy_based_tokenizer( | CODE |
| LOW | tests/test_x_transformers.py | 964 | def test_entropy_based_tokenizer_max_token_len(): | CODE |
| LOW | tests/test_x_transformers.py | 992 | def test_custom_ff_activation(): | CODE |
| LOW | tests/test_x_transformers.py | 1079 | def test_autoregressive_wrapper( | CODE |
| LOW | tests/test_x_transformers.py | 1219 | def test_beam_search_kv_cache_parity(): | CODE |
| LOW | tests/test_x_transformers.py | 1269 | def test_beam_search_variable_prompt_lens(cache_kv): | CODE |
| LOW | tests/test_x_transformers.py | 1315 | def test_generate_unrestricted_max_seq_len(): | CODE |
| LOW | tests/test_x_transformers.py | 1338 | def test_contrastive_decoding(wrap_amateur): | CODE |
| LOW | tests/test_x_transformers.py | 1397 | def test_prompts_given_as_list_tensor(): | CODE |
| LOW | tests/test_x_transformers.py | 1451 | def test_learned_head_attn_sink(): | CODE |
| LOW | tests/test_x_transformers.py | 1468 | def test_accept_layer_intermediates(): | CODE |
| LOW | tests/test_x_transformers.py | 1630 | def test_attn_negative_weights( | CODE |
| LOW | tests/test_x_transformers.py | 1769 | def test_seq_start_pos_parity(): | CODE |
| LOW | tests/test_x_transformers.py | 1854 | def test_continuous_transformer_external_projects(): | CODE |
| LOW | tests/test_x_transformers.py | 1877 | def test_attn_aggregated_residuals( | CODE |
| LOW | tests/test_x_transformers.py | 1898 | def test_attn_aggregated_residual_query_conditioned_on_latest_hidden( | CODE |
| LOW | tests/test_x_transformers.py | 1931 | def test_repeat_blocks_multiple(): | CODE |
| LOW | tests/test_x_transformers.py | 2080 | def test_continuous_autoencoder( | CODE |
| LOW | tests/test_x_transformers.py | 2350 | def test_ttt_source_target_mapping(): | CODE |
| LOW | tests/test_x_transformers.py | 2403 | def test_ttt_custom_loss_optimization(): | CODE |
| LOW | tests/test_x_transformers.py | 2483 | def test_ttt_write_batch_size_independent(batch_size): | CODE |
| LOW | tests/test_x_transformers.py | 2639 | def test_relative_proj_positional_bias(): | CODE |
| LOW | tests/test_x_transformers.py | 2766 | def test_xm_factorized_latent_decoder(): | CODE |
| LOW | tests/test_x_transformers.py | 2839 | def test_xm_flexible_slot_latents(): | CODE |
| LOW | tests/test_x_transformers.py | 3096 | def test_depth_scale_residual(depth_scale_residual): | CODE |
| LOW | tests/test_x_transformers.py | 3177 | def test_full_bandwidth_recirculation(): | CODE |
| LOW | tests/test_x_transformers.py | 3219 | def test_xval_full_length_padding_mask(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_enwik8_lejepa_style.py | 37 | CODE | |
| LOW | train_enwik8.py | 45 | CODE | |
| LOW | train_path_star.py | 113 | CODE | |
| LOW | train_self_masked_repr.py | 424 | CODE | |
| LOW | train_xl_enwik8.py | 48 | CODE | |
| LOW | train_enwik8_xm.py | 100 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 660 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 287 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 164 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 377 | CODE | |
| LOW | x_transformers/x_transformers.py | 1753 | CODE | |
| LOW | x_transformers/x_transformers.py | 2276 | CODE | |
| LOW | x_transformers/x_transformers.py | 2741 | CODE | |
| LOW | x_transformers/x_transformers.py | 3330 | CODE | |
| LOW | x_transformers/x_transformers.py | 4196 | CODE | |
| LOW | x_transformers/discover_wrapper.py | 37 | CODE | |
| LOW | x_transformers/next_latent_wrapper.py | 164 | CODE | |
| LOW | x_transformers/attend.py | 191 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_discover_reversal.py | 1 | # /// script | COMMENT |
| LOW | train_path_star.py | 1 | # /// script | COMMENT |
| LOW | train_full_bandwidth_parity.py | 1 | # /// script | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | x_transformers/autoregressive_wrapper.py | 179 | # paper shows masking (MLM) in conjunction with autoregressive decoder-only training leads to big improvements h | COMMENT |