Skip to content

Add flop calculation for custom Qwen 3 model#3759

Merged
copybara-service[bot] merged 1 commit intomainfrom
gagik-qwen-flops
Apr 28, 2026
Merged

Add flop calculation for custom Qwen 3 model#3759
copybara-service[bot] merged 1 commit intomainfrom
gagik-qwen-flops

Conversation

@gagika
Copy link
Copy Markdown
Collaborator

@gagika gagika commented Apr 28, 2026

Description

Adds a QWEN3_CUSTOM_MOE branch to the FLOPs calculator that accounts for the compressed moe_expert_input_dim / attention_output_dim (768) used by the FFN/gate and attention projection, plus the per-layer up-projection back to emb_dim.

Tests

  • test_qwen3_custom_30b_a3b_flops validates against the 6·N·D
    heuristic (~2.86B active params)

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@copybara-service copybara-service Bot merged commit 142bcf1 into main Apr 28, 2026
56 of 58 checks passed
@copybara-service copybara-service Bot deleted the gagik-qwen-flops branch April 28, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants