Repository navigation
Triton finegrained fp8/fp4 - #46407
Conversation
|
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. |
|
CI Dashboard: View test results in Grafana |
ArthurZucker
left a comment
There was a problem hiding this comment.
Ty! Can you add a compile test if that is suppose to fixe it? 🤗
| # Post-mask sentinel rows: kernel left them uninitialized, so zero them out | ||
| # before the reduction below (uninit may be NaN; NaN * 0 = NaN). |
There was a problem hiding this comment.
eh nice catch if we were not doing this before when that was fixed on other ops
There was a problem hiding this comment.
i took the time to add sentinel support/skipping in batched_mm impls in huggingface/kernels-community#923, before we used to clamp so the batched_mm projected sentinels on the last expert, now it just skips their computations (like grouped_mm)
| prompt_len = inputs.input_ids.size(1) | ||
| # `deepgemm` experts impl is excluded — DeepGEMM kernels race in single-process | ||
| # multi-GPU runs (which `device_map="auto"` always is for a model this size). | ||
| for impl in ("eager", "batched_mm", "grouped_mm"): |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: deepseek_v4 |
|
@ArthurZucker fixed compilation, our triton kernels compile well now, deepgemm compile is still broken upstream (cpu-gpu sync in a function assert), will fix that in kernels-community |
* finegrained fp8/fp4 * drop pref * order * full testing * remove errors * better ep + batched_mm * add batched as well * add ability to disable deepgemm linear fp8 * compilable * torch compile tests and cold cache hack
* finegrained fp8/fp4 * drop pref * order * full testing * remove errors * better ep + batched_mm * add batched as well * add ability to disable deepgemm linear fp8 * compilable * torch compile tests and cold cache hack
* finegrained fp8/fp4 * drop pref * order * full testing * remove errors * better ep + batched_mm * add batched as well * add ability to disable deepgemm linear fp8 * compilable * torch compile tests and cold cache hack
* finegrained fp8/fp4 * drop pref * order * full testing * remove errors * better ep + batched_mm * add batched as well * add ability to disable deepgemm linear fp8 * compilable * torch compile tests and cold cache hack

What does this PR do?
Fixes # (issue)
Code Agent Policy
The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result,
we ask that new users do not submit pure code agent PRs at this time.
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.
PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously.
This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result,
this policy is likely to be updated regularly in the near future. For more information, please read
CONTRIBUTING.md.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.