Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
fix: transformers 4.54.0 adaptation
myhloli4aef8fd16853
diff --git a/mineru/model/mfr/unimernet/unimernet_hf/unimer_mbart/modeling_unimer_mbart.py b/mineru/model/mfr/unimernet/unimernet_hf/unimer_mbart/modeling_unimer_mbart.pyindex 0f5fffed..232c1260 100644--- a/mineru/model/mfr/unimernet/unimernet_hf/unimer_mbart/modeling_unimer_mbart.py+++ b/mineru/model/mfr/unimernet/unimernet_hf/unimer_mbart/modeling_unimer_mbart.py@@ -1506,10 +1506,11 @@ class UnimerMBartDecoder(UnimerMBartPreTrainedModel):continue# past_key_value = past_key_values[idx] if past_key_values is not None else None- past_key_value = None- if past_key_values is not None and len(past_key_values) > idx:- if isinstance(past_key_values, (list, tuple)):- past_key_value = past_key_values[idx]+ past_key_value = past_key_values[idx] if (+ past_key_values is not None and+ isinstance(past_key_values, (list, tuple)) and+ idx < len(past_key_values)+ ) else Noneif self.gradient_checkpointing and self.training:layer_outputs = self._gradient_checkpointing_func(