[Fix] LLM: Fix condition check error for speculative decoding on CPU (#10402)
Fix condition check error for speculative decoding on CPU
This commit is contained in:
parent
f158b49835
commit
e10de2c42d
1 changed files with 13 additions and 10 deletions
|
|
@ -609,8 +609,11 @@ def speculative_generate(self,
|
|||
draft_current_input_ids = current_input_ids
|
||||
# Target model KV cache to draft model
|
||||
|
||||
if self.device.type == 'cpu' and (not _enable_ipex):
|
||||
if self.device.type == 'cpu':
|
||||
# init past_key_values_storage and assign initial fp32 value
|
||||
if _enable_ipex:
|
||||
draft_past_key_values = past_key_values
|
||||
else:
|
||||
if step == 1:
|
||||
past_key_values_storage = \
|
||||
_prepare_past_key_values_storage_cpu(self, past_key_values,
|
||||
|
|
|
|||
Loading…
Reference in a new issue