Unverified Commit d0cfec7a authored by youkaichao's avatar youkaichao Committed by GitHub
Browse files

[bugfix] fix inductor cache on max_position_embeddings (#15436)


Signed-off-by: default avataryoukaichao <youkaichao@gmail.com>
parent a6081600
......@@ -221,6 +221,9 @@ class ModelConfig:
factors.append(self.trust_remote_code)
factors.append(self.rope_scaling)
factors.append(self.rope_theta)
# rope cos/sin cache depends on the max_position_embeddings
factors.append(
getattr(self.hf_config, "max_position_embeddings", "None"))
return hashlib.sha256(str(factors).encode()).hexdigest()
def __init__(
......
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