Skip to content

Add onStageComplete#2074

Open
apsonawane wants to merge 1 commit intomainfrom
asonawane/vitis-fara
Open

Add onStageComplete#2074
apsonawane wants to merge 1 commit intomainfrom
asonawane/vitis-fara

Conversation

@apsonawane
Copy link
Copy Markdown
Contributor

This pull request introduces a mechanism for derived classes to hook into the pipeline after a stage completes. The main change is a call to a virtual method that allows subclasses to perform additional actions, such as injecting vision embeddings, after the embeddings stage.

Pipeline extensibility:

  • Added a call to OnStageComplete at the end of a pipeline stage in DecoderOnlyPipelineState::RunPipeline, allowing derived classes to inject custom logic (e.g., vision embeddings for Qwen VL) after the embeddings stage.

Copilot AI review requested due to automatic review settings April 8, 2026 05:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a post-stage extensibility hook to the decoder-only pipeline so derived pipeline states can run custom logic immediately after each pipeline stage completes (e.g., injecting vision embeddings after the embeddings stage).

Changes:

  • Invoke OnStageComplete(stage_id, next_tokens) at the end of each executed stage inside DecoderOnlyPipelineState::RunPipeline.

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