Verify determinism using model qwen2.5#6476
Open
gongweibao wants to merge 8 commits intoPaddlePaddle:developfrom
Open
Verify determinism using model qwen2.5#6476gongweibao wants to merge 8 commits intoPaddlePaddle:developfrom
gongweibao wants to merge 8 commits intoPaddlePaddle:developfrom
Conversation
|
|
|
Thanks for your contribution! |
…manager Add comprehensive determinism tests for Paddle attention layer and refactor resource manager for deterministic mode support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
[Feature] Add Deterministic Inference Support
Motivation
Implement deterministic inference support for FastDeploy to ensure reproducible results across multiple runs. Deterministic inference is critical for:
The implementation addresses non-determinism sources in:
Modifications
Core Implementation
fastdeploy/envs.pyFD_DETERMINISTIC_MODEenvironment variablefastdeploy/__init__.pyfastdeploy/distributed/communication.pyfastdeploy/engine/common_engine.pyfastdeploy/engine/sampling_params.pydeterministicparameter for samplingfastdeploy/engine/sched/resource_manager_v1.pyfastdeploy/model_executor/layers/attention/flash_attn_backend.pyfastdeploy/model_executor/layers/batch_invariant_ops/batch_invariant_ops.pyfastdeploy/model_executor/models/qwen2.pyfastdeploy/scheduler/splitwise_scheduler.pyfastdeploy/worker/gpu_model_runner.pyKey Features
Usage or Command
Enable Deterministic Mode
export FD_DETERMINISTIC_MODE=1Run Inference with Determinism
Run Tests
Accuracy Tests
All unit tests pass:
Determinism Verification Results
Checklist
pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch first.