Add support for max_model_len and gpu_memory_utilization in OrpheusModel#293
Open
BorisFaj wants to merge 1 commit intocanopyai:mainfrom
Open
Add support for max_model_len and gpu_memory_utilization in OrpheusModel#293BorisFaj wants to merge 1 commit intocanopyai:mainfrom
BorisFaj wants to merge 1 commit intocanopyai:mainfrom
Conversation
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
This PR adds support for passing
max_model_lenandgpu_memory_utilizationtoOrpheusModel, matching what the README already documents.These values are now stored in the class and forwarded to
AsyncEngineArgswhen initializing the vLLM engine.Additionally, a small formatting cleanup was applied to
engine_class.pywithout changing any other logic.Motivation
The README examples use:
…but the current implementation of
OrpheusModeldoes not accept these parameters and does not forward them to the underlying vLLM engine. As a result, users cannot control context length or VRAM usage, and the examples fail unless the library is patched locally.This PR brings the implementation in line with the documented API.
Changes
Added
max_model_lenandgpu_memory_utilizationas optional parameters inOrpheusModel.__init__.Passed these parameters into
AsyncEngineArgsinside_setup_engine.Minor formatting adjustments in
engine_class.py(no behavioral changes).Testing
No automated tests were added or modified.
The behavior was verified manually by running Orpheus with custom
max_model_lenandgpu_memory_utilizationvalues and ensuring that vLLM receives and applies them correctly.