{
  "audit_target": "attention + Qwen3Attn",
  "timestamp": "2026-06-07",
  "attn_init_signature": {
    "params": [
      "self",
      "num_heads",
      "head_dim",
      "num_kv_heads",
      "is_causal"
    ],
    "defaults": {
      "is_causal": "True"
    }
  },
  "qwen3attn_attn_calls": [
    {
      "num_heads": "self.num_heads",
      "head_dim": "self.head_dim",
      "num_kv_heads": "self.kv_heads",
      "is_causal": "True"
    }
  ],
  "parameter_mismatch": [
    {
      "called_with": {
        "num_heads": "self.num_heads",
        "head_dim": "self.head_dim",
        "num_kv_heads": "self.kv_heads",
        "is_causal": "True"
      },
      "attn_accepts": [
        "self",
        "num_heads",
        "head_dim",
        "num_kv_heads",
        "is_causal"
      ],
      "extra_params_in_call": [],
      "missing_params_in_call": [
        "self"
      ]
    }
  ],
  "parameter_mismatch_verdict": "BLOCKER: Qwen3Attn passes 'S' and 'is_decode' to Attn(), which does not accept them.",
  "qwen3ffn_act_fn": {
    "act_fn_assignment": "SiluAndMul()",
    "forward_calls_act_fn": true
  },
  "qwen3ffn_verdict": "OK",
  "causal_mask": {
    "exists": true,
    "params": [
      "seq_q",
      "seq_k",
      "device"
    ],
    "hardcoded_query_start_0": true
  },
  "gqa_implementation": "repeat_kv() in attention.py (naive expand, no optimization)",
  "paged_attention_keywords_in_attention_files": {
    "attention.py": {
      "block_table": 0,
      "slot_mapping": 0,
      "paged": 0,
      "page_table": 0
    },
    "qwen3.py": {
      "block_table": 0,
      "slot_mapping": 0,
      "paged": 0,
      "page_table": 0
    }
  },
  "paged_attention_keywords_in_engine": {
    "utils/context.py": {
      "block_table": 3,
      "slot_mapping": 3,
      "paged": 0,
      "page_table": 0
    }
  },
  "conclusion": "attention 基本实现正确（Attn + GQA + causal mask），但存在致命构造参数不匹配（B1）和 Qwen3FFN act_fn=None（B2）。Paged attention 相关关键词在 attention.py/qwen3.py 中完全不存在。"
}