()
| 38 | |
| 39 | |
| 40 | def get_ngram_processor_str(): |
| 41 | global NO_REPEAT_NGRAM_PROCESSOR_STR |
| 42 | if NO_REPEAT_NGRAM_PROCESSOR_STR is None: |
| 43 | from sglang.srt.sampling.custom_logit_processor import ( |
| 44 | DeepseekOCRNoRepeatNGramLogitProcessor, |
| 45 | ) |
| 46 | NO_REPEAT_NGRAM_PROCESSOR_STR = DeepseekOCRNoRepeatNGramLogitProcessor.to_str() |
| 47 | return NO_REPEAT_NGRAM_PROCESSOR_STR |
| 48 | |
| 49 | |
| 50 | def pdf_to_images(pdf_path: str, dpi: int = 300) -> list[str]: |