fix: temporarily pin NuExtract to working revision (#2588)

* fix: temporarily pin NuExtract revision

NuExtract rev 489efed was causing MPS errors

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>

* Revise revision comment for NuExtract transformer

Updated revision comment for NU_EXTRACT_2B_TRANSFORMERS.

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>

* pass revision to model download

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
This commit is contained in:
Panos Vagenas
2025-11-05 21:23:12 +01:00
committed by GitHub
parent 6a04e27352
commit fa925741b6
2 changed files with 5 additions and 1 deletions

View File

@@ -287,6 +287,7 @@ DOLPHIN_TRANSFORMERS = InlineVlmOptions(
# NuExtract # NuExtract
NU_EXTRACT_2B_TRANSFORMERS = InlineVlmOptions( NU_EXTRACT_2B_TRANSFORMERS = InlineVlmOptions(
repo_id="numind/NuExtract-2.0-2B", repo_id="numind/NuExtract-2.0-2B",
revision="fe5b2f0b63b81150721435a3ca1129a75c59c74e", # 489efed leads to MPS issues
prompt="", # This won't be used, template is passed separately prompt="", # This won't be used, template is passed separately
torch_dtype="bfloat16", torch_dtype="bfloat16",
inference_framework=InferenceFramework.TRANSFORMERS, inference_framework=InferenceFramework.TRANSFORMERS,

View File

@@ -131,7 +131,10 @@ class NuExtractTransformersModel(BaseVlmModel, HuggingFaceModelDownloadMixin):
repo_cache_folder = vlm_options.repo_id.replace("/", "--") repo_cache_folder = vlm_options.repo_id.replace("/", "--")
if artifacts_path is None: if artifacts_path is None:
artifacts_path = self.download_models(self.vlm_options.repo_id) artifacts_path = self.download_models(
repo_id=self.vlm_options.repo_id,
revision=self.vlm_options.revision,
)
elif (artifacts_path / repo_cache_folder).exists(): elif (artifacts_path / repo_cache_folder).exists():
artifacts_path = artifacts_path / repo_cache_folder artifacts_path = artifacts_path / repo_cache_folder