Skip to content

Conversation

@gustawdaniel
Copy link

This PR resolves critical runtime errors during inference and upgrades the project dependencies to support modern CUDA environments.

Key Changes

  • Fix Illegal Memory Access: Disabled torch.compile for block mask creation in
    bytelatent/model/blt.py. This serves as a workaround for the CUDA error: an illegal memory access was encountered and device-side assert triggered errors observed in the flex attention mechanism.
  • Dependency Upgrade: Updated pyproject.toml and lock file to use PyTorch 2.5.1+ and xformers with CUDA 12.4 support. This addresses build failures experienced by users with newer CUDA toolkits.
  • Documentation: Added instructions for Hugging Face CLI login to the README, ensuring users can easily access the gated models required for the demo.

Issues Resolved

Verification

  • Verified that demo.py now runs successfully without CUDA errors.
  • Confirmed that dependency installation completes successfully with the updated lock file.

…fix).

- Update PyTorch and xformers to cu124,
- refresh dependency lock
- disable block mask compilation.
- hugging face login mentioned in README
@meta-cla
Copy link

meta-cla bot commented Jan 4, 2026

Hi @gustawdaniel!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 4, 2026
@meta-cla
Copy link

meta-cla bot commented Jan 4, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cuda 13 support demo.py RuntimeError: CUDA error: an illegal memory access was encountered

1 participant