fix: syntax/style tweak

This commit is contained in:
drbh 2024-08-08 14:10:51 +00:00
parent d7c5ef6cd2
commit e1268596bc

View File

@ -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 (