Skip to content

[Models] Add forward_meta to VocabParallelEmbedding of all models#5524

Merged
SigureMo merged 1 commit intoPaddlePaddle:developfrom
cattidea:fix_ep_0size_input
Dec 12, 2025
Merged

[Models] Add forward_meta to VocabParallelEmbedding of all models#5524
SigureMo merged 1 commit intoPaddlePaddle:developfrom
cattidea:fix_ep_0size_input

Conversation

@DrRyanHuang
Copy link
Collaborator

Motivation

#5495 ,透传 forward_meta 参数

Modifications

透传 forward_meta 参数

Usage or Command

NO NEED

Accuracy Tests

NO NEED

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link

paddle-bot bot commented Dec 12, 2025

Thanks for your contribution!

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@3c1f7b8). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/model_executor/models/gpt_oss.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #5524   +/-   ##
==========================================
  Coverage           ?   60.34%           
==========================================
  Files              ?      329           
  Lines              ?    41089           
  Branches           ?     6262           
==========================================
  Hits               ?    24794           
  Misses             ?    14404           
  Partials           ?     1891           
Flag Coverage Δ
GPU 60.34% <94.11%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下个 PR 改一下

param[:, shard_weight.shape[1] :].fill_(0)

def forward(self, ids_remove_padding, forward_meta=None) -> paddle.Tensor:
def forward(self, ids_remove_padding: paddle.Tensor = None, forward_meta: ForwardMeta = None) -> paddle.Tensor:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def forward(self, ids_remove_padding: paddle.Tensor = None, forward_meta: ForwardMeta = None) -> paddle.Tensor:
def forward(self, ids_remove_padding: Optional[paddle.Tensor] = None, forward_meta: Optional[ForwardMeta] = None) -> paddle.Tensor:

def get_input_embeddings(self, ids_remove_padding: paddle.Tensor) -> paddle.Tensor:
return self.embed_tokens(ids_remove_padding=ids_remove_padding)
def get_input_embeddings(
self, ids_remove_padding: paddle.Tensor, forward_meta: ForwardMeta = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,如果默认值都是 None 了,类型里不应该没有 None

@SigureMo SigureMo merged commit 4eb5533 into PaddlePaddle:develop Dec 12, 2025
15 of 16 checks passed
@SigureMo SigureMo deleted the fix_ep_0size_input branch December 12, 2025 06:11
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.

4 participants