Skip to content

Refactor GGUF to speed-up inference - #47779

Open
SunMarc wants to merge 5 commits into
mainfrom
poc-gguf
Open

Refactor GGUF to speed-up inference#47779
SunMarc wants to merge 5 commits into
mainfrom
poc-gguf

Conversation

@SunMarc

@SunMarc SunMarc commented Aug 4, 2026

Copy link
Copy Markdown
Member

CI

What does this PR do?

This PR updates the GGUF in transformers in order to take advantages of some features that landed for the past few months and are now stable:

  • conversion using WeightConverter, instead of our custom tensor processor.
  • Support for loading quantized models. Before we were dequantizing by default.
  • Add support llamacpp kernels to speed up inference for quantized models (e.g q4, q6) on CUDA and MacOS with kernels

For now, I'm restricting myself to add support only qwen3.5 with this new API but I will add the rest once this lands and remove the old API. Right now, it will fallback to the old one if the arch is not supported.

Todo:

  • Publish CUDA/Metal kernels and add kernels.py file
  • Add some benchmarks
  • Common tests for GGUF integration

@LysandreJik

LysandreJik commented Aug 5, 2026

Copy link
Copy Markdown
Member

Thanks! cc @ArthurZucker fyi (still actively wip, no need to review 馃)

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: ggml

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 30941170812:1
Result: failure | Jobs: 2 | Tests: 7 | Failures: 1 | Duration: 17s

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