"vscode:/vscode.git/clone" did not exist on "68d37809b9b52f4d012fa0dfbb187f0fe978bdbc"
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,14 +291,14 @@ 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 "
"to discuss this feature.".format(
config.max_window_layers,
config.num_hidden_layers,
))
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,
))
self.config = config
self.quant_config = quant_config
......
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