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
perf(inference): adjust batch ratio for high GPU memory
myhloli0b05dff74fdb
diff --git a/magic_pdf/model/doc_analyze_by_custom_model.py b/magic_pdf/model/doc_analyze_by_custom_model.pyindex 3ca2f9b4..de65d2b6 100644--- a/magic_pdf/model/doc_analyze_by_custom_model.py+++ b/magic_pdf/model/doc_analyze_by_custom_model.py@@ -170,7 +170,9 @@ def doc_analyze(gpu_memory = int(os.getenv("VIRTUAL_VRAM_SIZE", round(get_vram(device))))if gpu_memory is not None and gpu_memory >= 8:- if gpu_memory >= 10:+ if gpu_memory >= 16:+ batch_ratio = 8+ elif gpu_memory >= 10:batch_ratio = 4else:batch_ratio = 2