-
Notifications
You must be signed in to change notification settings - Fork 222
[Misc] Clean up uesless code for LLM initialize #1373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1373 +/- ##
==========================================
- Coverage 27.39% 27.25% -0.15%
==========================================
Files 56 56
Lines 6191 6220 +29
==========================================
- Hits 1696 1695 -1
- Misses 4495 4525 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6bd5c62
to
e446e63
Compare
if self.drafter: | ||
logger.info("Loading drafter model...") | ||
if self.use_aux_hidden_state_outputs: | ||
self.drafter.load_model(self.model) | ||
else: | ||
self.drafter.load_model() | ||
if self.use_aux_hidden_state_outputs: | ||
self.model.set_aux_hidden_state_layers( | ||
self.model.get_eagle3_aux_hidden_state_layers()) | ||
if self.use_aux_hidden_state_outputs: | ||
self.model.set_aux_hidden_state_layers( | ||
self.model.get_eagle3_aux_hidden_state_layers()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if self.drafter:
logger.info("Loading drafter model...")
if self.use_aux_hidden_state_outputs:
self.drafter.load_model(self.model)
self.model.set_aux_hidden_state_layers(
self.model.get_eagle3_aux_hidden_state_layers())
else:
self.drafter.load_model()
also cc @yuancaoyaoHW
@@ -1851,7 +1808,7 @@ def load_model(self) -> None: | |||
def _get_torchair_lazy_compiled_model(self, batch_size: int): | |||
if batch_size < 0 or batch_size > self.max_num_reqs: | |||
raise ValueError( | |||
f"Bad graph batch size:{batch_size}! max_num_reqs:{self.max_num_reqs}" | |||
f"Bad graph batch size:{batch_size}! max_num_seqs:{self.max_num_reqs}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f"Bad graph batch size:{batch_size}! max_num_seqs:{self.max_num_reqs}" | |
f"Bad graph batch size:{batch_size}! max_num_reqs:{self.max_num_reqs}" |
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
e446e63
to
4e0967a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a refactor, LGTM.
[Misc] Clean up uesless code for LLM initialize (vllm-project#1373)
This PR aims to clean up the useless code for LLM setup. It helps to make the code more clear.
self.xxx
propertyset_random_seed
toseed_everything
set_custom_all_reduce
, it's only used for cudaThis is just a code clean. no change for any code logic.