Skip to content

Fix packed sample count derivation - #181

Closed
taking-lying-flat wants to merge 1 commit into
modelscope:mainfrom
taking-lying-flat:fix/packed-seq-num-samples
Closed

Fix packed sample count derivation#181
taking-lying-flat wants to merge 1 commit into
modelscope:mainfrom
taking-lying-flat:fix/packed-seq-num-samples

Conversation

@taking-lying-flat

Copy link
Copy Markdown
Contributor

Summary

  • derive the packed sample count from cu_seqlens_q instead of the nonexistent PackedSeqParams.num_samples field
  • fix the fallback Qwen3-Next and Qwen3.5 GDN packed paths
  • fix the Qwen3.8 PLE THD unpack path and keep max_seqlen_q compatible with Megatron-Core 0.16.x

This is a minimal follow-up to #175. It does not change packed offsets or add inter-sequence padding behavior.

Checks

  • pre-commit run --files src/mcore_bridge/model/gpts/qwen3_next.py src/mcore_bridge/model/mm_gpts/qwen3_5.py src/mcore_bridge/model/modules/ple.py

@tastelikefeet

Copy link
Copy Markdown
Collaborator

Thanks. Fixed by #186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants