unsloth/unsloth
Daniel Han 7254d47da1 Handle broken causal_conv1d at import time (#4047)
* Handle broken causal_conv1d import at runtime

Add a startup import-time probe for causal_conv1d and disable the fast path when the shared library is ABI broken. This keeps Falcon H1/model loading resilient without requiring env flags.

- Add disable_broken_causal_conv1d in import_fixes.
- Invoke it early from unsloth/__init__ during package init.
- Make Falcon H1 optional imports in loader and models/__init__ soft-fail instead of failing hard.

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

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

* Enforce unavailable semantics for broken causal_conv1d

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

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

* Remove Falcon H1 import swallowing

* Restore optional Falcon H1 import guard

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

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

* Remove causal_conv1d regression tests

* Trim FA2 fallback messaging

---------

Co-authored-by: Daniel Hanchen <danielhanchen@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-13 21:20:25 -08:00
..
dataprep [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-01-08 11:35:21 +00:00
kernels fix for tma (#4023) 2026-02-10 17:50:33 -08:00
models Handle broken causal_conv1d at import time (#4047) 2026-02-13 21:20:25 -08:00
registry Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" 2025-12-01 07:24:58 -08:00
utils Refactor Ollama template wiring and harden packing helpers (#3890) 2026-02-09 04:04:48 -08:00
__init__.py Handle broken causal_conv1d at import time (#4047) 2026-02-13 21:20:25 -08:00
_auto_install.py Add PyTorch 2.10 and xformers 0.0.34 support (#3985) 2026-02-05 05:56:26 -08:00
chat_templates.py Refactor Ollama template wiring and harden packing helpers (#3890) 2026-02-09 04:04:48 -08:00
device_type.py Add missing import of inspect (#3778) 2025-12-25 18:43:59 -08:00
import_fixes.py Handle broken causal_conv1d at import time (#4047) 2026-02-13 21:20:25 -08:00
ollama_template_mappers.py Refactor Ollama template wiring and harden packing helpers (#3890) 2026-02-09 04:04:48 -08:00
save.py add llama.cpp prefix to gguf conversion help messages (#4016) 2026-02-10 01:59:05 -08:00
tokenizer_utils.py Fix notebook compatibility for transformers 4.57.6 and TRL 0.22-0.27 (#3998) 2026-02-09 05:11:50 -08:00
trainer.py Fix notebook compatibility for transformers 4.57.6 and TRL 0.22-0.27 (#3998) 2026-02-09 05:11:50 -08:00