From c4901fd8946ef886a615a8cd3c627728e3b68f56 Mon Sep 17 00:00:00 2001 From: DoubleMathew Date: Wed, 9 Jul 2025 16:05:41 -0500 Subject: [PATCH] silienty skip falcon h1 import is transformers_version < 4.53.0 (#2912) --- unsloth/models/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unsloth/models/__init__.py b/unsloth/models/__init__.py index 3378049014..89d3fd7630 100644 --- a/unsloth/models/__init__.py +++ b/unsloth/models/__init__.py @@ -19,7 +19,11 @@ from .qwen2 import FastQwen2Model from .qwen3 import FastQwen3Model from .qwen3_moe import FastQwen3MoeModel from .granite import FastGraniteModel -from .falcon_h1 import FastFalconH1Model +try: + from .falcon_h1 import FastFalconH1Model +except: + # transformers_version < 4.53.0 does not have falcon_h1 so silenty skip it for now + pass from .dpo import PatchDPOTrainer, PatchKTOTrainer from ._utils import is_bfloat16_supported, is_vLLM_available, __version__ from .rl import PatchFastRL, vLLMSamplingParams \ No newline at end of file