feat: add AICB workload generator with Qwen3/Qwen3.5 training mocks#289
Open
yanzhenghao wants to merge 1 commit into
Open
feat: add AICB workload generator with Qwen3/Qwen3.5 training mocks#289yanzhenghao wants to merge 1 commit into
yanzhenghao wants to merge 1 commit into
Conversation
|
|
43aa2d0 to
964bb94
Compare
964bb94 to
314e272
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Flattens the AICB submodule into the main repo and adds Qwen3/Qwen3.5 training workload mocks. One clean commit on top of origin/master.
MockedQwen3.py -- Qwen3 dense training workloads (461 lines)
Supports all 6 Qwen3 dense model sizes: 0.6B, 1.7B, 4B, 8B, 14B, 32B.
Architectural correctness vs LLaMA/Megatron:
num_key_value_headsfor K/V projections (Megatron hardcodes MHA)head_dim=128instead ofhidden_size // num_attention_heads. Correctly handles expansion models wherehead_dim * num_heads > hidden_size(Qwen3-0.6B: 2.00x, Qwen3-4B: 1.60x, Qwen3-32B: 1.60x)modeling_qwen3.pylines 248-249)intermediate_size, not2 * intermediate_size(unlike MegatronMlp which overcounts params by 2x)tie_word_embeddings=true(0.6B, 1.7B, 4B). Communication unchanged.MOEMLPfrom MockedMegatron (128 experts, top-8, no shared experts)Reuses
MegatronColumnLinear,MegatronRowLinear,MOEMLPfrom MockedMegatron.py -- zero duplication of TP communication primitives.MockedQwen3_5.py -- Qwen3.5 dense/MoE training workloads (823 lines)
Supports Qwen3.5 dense (0.8B, 2B, 4B, 9B, 27B) and MoE (35B-A3B, 122B-A10B, 397B-A17B).
Hybrid architecture:
full_attention_interval=4)head_dim=256,partial_rotary_factor=0.25,attn_output_gate=true, MRoPEBug fixes (also benefit Megatron and DeepSeek)
MOEMLP.backward()was missingworkloads.extend()on the return values ofself.permutation()andself.unpermutation(). This caused all MoE models (Megatron, Qwen3, Qwen3.5, DeepSeek) to report ~43-57% of correct backward communication. Fixed inMockedMegatron.py(2 lines).ep_size, fixing a conservative overestimate. Applied to bothMockedMegatron.pyandMockedDeepSeek.py.\i/\descape sequences inaicb/utils/utils.pydocstring.Supporting changes
aicb/utils/utils.py: addedQwen3/Qwen3.5to--framechoices,get_qwen3_params()with--head_dimand--num_key_value_headsCLI argsaicb/workload_generator/generate_megatron_workload.py: Qwen3/Qwen3.5 dispatch in__main__aicb/workload_generator/CLAUDE.md: comprehensive architecture docs, verified configs, design patternsaicb/tuning/: scaler, variability, wrapper (previously missing from AICB)Tests: 73 total (58 new in
test_mocked_qwen3.py), all green2 x seq x batch x hiddenfor ColumnLinear, correct A2A sizingFull test suite: 79 server tests + 73 aicb tests + TypeScript type check -- all green, zero new warnings.