Unverified Commit dd2a9459 authored by inkcherry's avatar inkcherry Committed by GitHub
Browse files

[Model] Allow the use of sliding window in Qwen2 (#17772)


Signed-off-by: default avatarinkcherry <mingzhi.liu@intel.com>
parent 420caf75
......@@ -291,10 +291,10 @@ class Qwen2Model(nn.Module):
# TODO (@robertgshaw2): see if this can be moved out
if (cache_config.sliding_window is not None
and hasattr(config, "max_window_layers")):
raise ValueError("Sliding window for some but all layers is not "
"supported. This model uses sliding window "
"but `max_window_layers` = {} is less than "
"`num_hidden_layers` = {}. Please open an issue "
assert config.max_window_layers == config.num_hidden_layers, (
"Sliding window for some but all layers is not supported. "
"This model uses sliding window but `max_window_layers` = {} "
"is less than `num_hidden_layers` = {}. Please open an issue "
"to discuss this feature.".format(
config.max_window_layers,
config.num_hidden_layers,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment