mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-12 12:54:52 +00:00
fix: syntax/style tweak
This commit is contained in:
parent
d7c5ef6cd2
commit
e1268596bc
@ -490,9 +490,14 @@ def get_model(
|
|||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Sharding is currently not supported with `exl2` quantization"
|
"Sharding is currently not supported with `exl2` quantization"
|
||||||
)
|
)
|
||||||
sliding_window = config_dict.get("sliding_window", -1)
|
|
||||||
|
|
||||||
if max_input_tokens is not None and (sliding_window is None or max_input_tokens <= sliding_window):
|
sliding_window = (
|
||||||
|
config_dict.get("sliding_window")
|
||||||
|
if config_dict.get("sliding_window") is not None
|
||||||
|
else -1
|
||||||
|
)
|
||||||
|
|
||||||
|
if max_input_tokens is not None and max_input_tokens <= sliding_window:
|
||||||
sliding_window = -1
|
sliding_window = -1
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
Loading…
Reference in New Issue
Block a user