Skip to content

9082 educate users on mat mul precision #9103

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

Open
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

yaoshiang
Copy link
Collaborator

@yaoshiang yaoshiang commented May 6, 2025

Adds runnable tutorial to teach users about mat mul precision.

Also includes new manual build instructions for runnable tutorials.

@yaoshiang
Copy link
Collaborator Author

# |
# | ![bits](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/tf32-bf16-fp16-fp32.png)

# | ## Higher precision math on lower precision hardware
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we can just point readers to BFloat16: The secret to high peformance on Cloud TPUs instead of duplicating that content here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you'd rather keep this section, let me know and I can clean it up. My preference would be to use the existing documentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that doc doesn't share the math of how the 3 and 6 pass methods work, and we have had customer questions, so I think it's important we keep this description.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, sounds good. Let me take another pass at it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Any ETA on your review Mike? Maybe I could merge it as is and add another one later to address any comments?

@yaoshiang yaoshiang changed the base branch from 9080-expose-mat_mul_precision to master May 9, 2025 22:58
Copy link
Collaborator

@tengyifei tengyifei left a comment

Choose a reason for hiding this comment

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

Thanks! I really enjoyed reading it.

@yaoshiang
Copy link
Collaborator Author

Added logger.warning, added issue on examples I saw of logging.warning instead of logging.get_logger.warning, added unit test to assert the warning message, and consumed the warning message in all other unit tests to avoid polluting the unit test harness stdout.

@yaoshiang yaoshiang linked an issue May 12, 2025 that may be closed by this pull request
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.

Educate users on mat mul precision
5 participants