Skip to content

Commit

Permalink
[NPU] Remove hard code (#12479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscilloscope98 authored Dec 2, 2024
1 parent b2e56a2 commit 26adb82
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions python/llm/src/ipex_llm/transformers/npu_models/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@ def generate(
new_tokens = new_generate_kwargs['max_new_tokens']
invalidInputError(input_length + new_tokens <= self.kv_len + 1,
"Input plus output tokens should not exceed max_context_len.")
# TODO: may optimize this part later
invalidInputError(new_tokens < 1024,
f"Generated tokens ({new_tokens}) exceed named pipeline limitation.")

if "eos_token_id" not in new_generate_kwargs:
generation_config = GenerationConfig.from_model_config(self.config)
Expand Down

0 comments on commit 26adb82

Please sign in to comment.