Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply bettertransformer by default for causallm #605

Merged

Conversation

eaidova
Copy link
Collaborator

@eaidova eaidova commented Mar 14, 2024

What does this PR do?

align stateful and stateless IRs for causallm

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@echarlaix echarlaix merged commit 948f99d into huggingface:main Mar 15, 2024
10 checks passed
@@ -299,7 +299,7 @@ def export_pytorch(
logger.info(f"Using framework PyTorch: {torch.__version__}")
output = Path(output)

if stateful:
if ensure_export_task_support_stateful(config.task):
# Trigger bettertransformer together with stateful model because OpenVINO HW-dependent transformations expect
# both of them are applied to demonstrate the best performance.
# TODO: Consider applying bettertransformer regardless of stateful flag -- requires additional validation.

Choose a reason for hiding this comment

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

do we need to fix these comments?

@eaidova
Copy link
Collaborator Author

eaidova commented Mar 17, 2024

@echarlaix sorry, I forgot to mark this as draft there were no intention to merge it right now, we wanted validate these changes internally to make decision that it does not affect stateless models and it is anyway works incorrectly (here proper enabling #610 - draft until we are validating it on large models scope), pr with revert these changes #612

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.

4 participants