Skip to content

Conversation

openvino-dev-samples
Copy link
Contributor

No description provided.

return dummy_inputs


class HunyuanDummyPastKeyValuesGenerator(DummyPastKeyValuesGenerator):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use instead MistralDummyPastKeyValuesGenerator and set instead normalized_config.head_dim

self.random_float_tensor(shape, framework=framework, dtype=float_dtype),
)
for _ in range(self.num_layers)
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind adding a test as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I will add it once the release version of transformers support this model.

Copy link
Collaborator

@rkazants rkazants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openvino-dev-samples
Copy link
Contributor Author

please add tests for inference: https://github.com/huggingface/optimum-intel/blob/main/tests/openvino/test_modeling.py

I will add it after this PR

@rkazants
Copy link
Collaborator

I will add it after this PR

Let us anticipate that PR to be merged. Then you can add tests to this PR. No need to have several PRs and separate implementation and tests. We need to make sure that inference works.

Best regards,
Roman

Comment on lines 230 to 234
<<<<<<< HEAD
"ernie4_5": 2,
"hunyuan_v1_dense": 2,
=======
>>>>>>> upstream/main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

artifacts of merge, please fix


@register_in_tasks_manager("hunyuan_v1_dense", *["text-generation", "text-generation-with-past"], library_name="transformers")
class HunyuanOpenVINOConfig(TextDecoderWithPositionIdsOnnxConfig):
MIN_TRANSFORMERS_VERSION = "4.55.0.dev0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure that we need dev0 suffix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since optimum-intel does not support Transformers 4.56, this PR can only work with the commit for Transformers 4.55.

git+https://github.com/huggingface/transformers@4970b23cedaf745f963779b4eae68da281e8c6ca

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests for modelling to test generate() method is needed as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests for modelling to test generate() method is needed as well

its already covered in test_compare_to_transformers i think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants