diff --git a/src/python/py/models/builder.py b/src/python/py/models/builder.py index 4b9cc46b4..740c7ca40 100644 --- a/src/python/py/models/builder.py +++ b/src/python/py/models/builder.py @@ -1471,7 +1471,7 @@ def __init__(self, config, io_dtype, onnx_dtype, ep, cache_dir, extra_options): # self.input_shapes["position_ids"] = [1] # Note: This is optional and only needed if you want position_ids to be an int instead of a 2D tensor self.layernorm_attrs["simple"] = False self.rotemb_attrs["num_heads"] = self.num_attn_heads - self.rotemb_attrs["rotary_embedding_dim"] = self.head_size * self.rotemb_attrs["partial_rotary_factor"] + self.rotemb_attrs["rotary_embedding_dim"] = int(self.head_size * self.rotemb_attrs["partial_rotary_factor"]) def make_rotary_embedding(self, rotemb, name, root_input, **kwargs): super().make_rotary_embedding(rotemb, name, root_input, num_heads=self.rotemb_attrs["num_heads"], rotary_embedding_dim=self.rotemb_attrs["rotary_embedding_dim"], **kwargs)