unsloth/unsloth/utils
Daniel Han 36785caf80 Cache packed sequence metadata to reduce D2H syncs across layers (#4243)
* packing optimziation with cache to reduce D2H copy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cache per device to avoid race condition for multi-gpu

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add cache freeing up func

---------

Co-authored-by: ruixiangw <ruixiangw@nvidia.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: ruixiang <wangruixiang07@outlook.com>
2026-03-12 03:37:49 -07:00
..
__init__.py Auto-enable padding-free SFT (#3672) 2025-12-10 03:07:29 -08:00
attention_dispatch.py Fix/pr 3699 leftpad prefill main (#4100) 2026-02-25 07:21:04 -08:00
hf_hub.py Fix correctness bugs across multiple model files (#3813) 2026-01-01 02:36:33 -08:00
packing.py Cache packed sequence metadata to reduce D2H syncs across layers (#4243) 2026-03-12 03:37:49 -07:00