Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogunowicz committed Oct 18, 2023
1 parent 697752f commit 94f53e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/deepsparse/transformers/pipelines/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,15 @@ def __init__(
if "WAND_OPT_FLAGS" not in os.environ:
os.environ["WAND_OPT_FLAGS"] = "default,~pyramids"

# the current requirement on the deepsparse engine
# is that prompt_sequence_length
# must be a multiple of four.
# for simplicity let's extend this requirement to all engines
if prompt_sequence_length % 4 != 0:
raise ValueError(
f"prompt_sequence_length must be a multiple of 4. "
f"prompt_sequence_length is {prompt_sequence_length}"
)
self.prompt_sequence_length = prompt_sequence_length
self.force_max_tokens = force_max_tokens
self.internal_kv_cache = internal_kv_cache
Expand Down

0 comments on commit 94f53e5

Please sign in to comment.