PKG-INFO 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. Metadata-Version: 2.4
  2. Name: olmocr
  3. Version: 0.1.67
  4. Author-email: Allen Institute for Artificial Intelligence <jakep@allenai.org>
  5. License: Apache License
  6. Version 2.0, January 2004
  7. https://www.apache.org/licenses/
  8. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  9. 1. Definitions.
  10. "License" shall mean the terms and conditions for use, reproduction,
  11. and distribution as defined by Sections 1 through 9 of this document.
  12. "Licensor" shall mean the copyright owner or entity authorized by
  13. the copyright owner that is granting the License.
  14. "Legal Entity" shall mean the union of the acting entity and all
  15. other entities that control, are controlled by, or are under common
  16. control with that entity. For the purposes of this definition,
  17. "control" means (i) the power, direct or indirect, to cause the
  18. direction or management of such entity, whether by contract or
  19. otherwise, or (ii) ownership of fifty percent (50%) or more of the
  20. outstanding shares, or (iii) beneficial ownership of such entity.
  21. "You" (or "Your") shall mean an individual or Legal Entity
  22. exercising permissions granted by this License.
  23. "Source" form shall mean the preferred form for making modifications,
  24. including but not limited to software source code, documentation
  25. source, and configuration files.
  26. "Object" form shall mean any form resulting from mechanical
  27. transformation or translation of a Source form, including but
  28. not limited to compiled object code, generated documentation,
  29. and conversions to other media types.
  30. "Work" shall mean the work of authorship, whether in Source or
  31. Object form, made available under the License, as indicated by a
  32. copyright notice that is included in or attached to the work
  33. (an example is provided in the Appendix below).
  34. "Derivative Works" shall mean any work, whether in Source or Object
  35. form, that is based on (or derived from) the Work and for which the
  36. editorial revisions, annotations, elaborations, or other modifications
  37. represent, as a whole, an original work of authorship. For the purposes
  38. of this License, Derivative Works shall not include works that remain
  39. separable from, or merely link (or bind by name) to the interfaces of,
  40. the Work and Derivative Works thereof.
  41. "Contribution" shall mean any work of authorship, including
  42. the original version of the Work and any modifications or additions
  43. to that Work or Derivative Works thereof, that is intentionally
  44. submitted to Licensor for inclusion in the Work by the copyright owner
  45. or by an individual or Legal Entity authorized to submit on behalf of
  46. the copyright owner. For the purposes of this definition, "submitted"
  47. means any form of electronic, verbal, or written communication sent
  48. to the Licensor or its representatives, including but not limited to
  49. communication on electronic mailing lists, source code control systems,
  50. and issue tracking systems that are managed by, or on behalf of, the
  51. Licensor for the purpose of discussing and improving the Work, but
  52. excluding communication that is conspicuously marked or otherwise
  53. designated in writing by the copyright owner as "Not a Contribution."
  54. "Contributor" shall mean Licensor and any individual or Legal Entity
  55. on behalf of whom a Contribution has been received by Licensor and
  56. subsequently incorporated within the Work.
  57. 2. Grant of Copyright License. Subject to the terms and conditions of
  58. this License, each Contributor hereby grants to You a perpetual,
  59. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  60. copyright license to reproduce, prepare Derivative Works of,
  61. publicly display, publicly perform, sublicense, and distribute the
  62. Work and such Derivative Works in Source or Object form.
  63. 3. Grant of Patent License. Subject to the terms and conditions of
  64. this License, each Contributor hereby grants to You a perpetual,
  65. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  66. (except as stated in this section) patent license to make, have made,
  67. use, offer to sell, sell, import, and otherwise transfer the Work,
  68. where such license applies only to those patent claims licensable
  69. by such Contributor that are necessarily infringed by their
  70. Contribution(s) alone or by combination of their Contribution(s)
  71. with the Work to which such Contribution(s) was submitted. If You
  72. institute patent litigation against any entity (including a
  73. cross-claim or counterclaim in a lawsuit) alleging that the Work
  74. or a Contribution incorporated within the Work constitutes direct
  75. or contributory patent infringement, then any patent licenses
  76. granted to You under this License for that Work shall terminate
  77. as of the date such litigation is filed.
  78. 4. Redistribution. You may reproduce and distribute copies of the
  79. Work or Derivative Works thereof in any medium, with or without
  80. modifications, and in Source or Object form, provided that You
  81. meet the following conditions:
  82. (a) You must give any other recipients of the Work or
  83. Derivative Works a copy of this License; and
  84. (b) You must cause any modified files to carry prominent notices
  85. stating that You changed the files; and
  86. (c) You must retain, in the Source form of any Derivative Works
  87. that You distribute, all copyright, patent, trademark, and
  88. attribution notices from the Source form of the Work,
  89. excluding those notices that do not pertain to any part of
  90. the Derivative Works; and
  91. (d) If the Work includes a "NOTICE" text file as part of its
  92. distribution, then any Derivative Works that You distribute must
  93. include a readable copy of the attribution notices contained
  94. within such NOTICE file, excluding those notices that do not
  95. pertain to any part of the Derivative Works, in at least one
  96. of the following places: within a NOTICE text file distributed
  97. as part of the Derivative Works; within the Source form or
  98. documentation, if provided along with the Derivative Works; or,
  99. within a display generated by the Derivative Works, if and
  100. wherever such third-party notices normally appear. The contents
  101. of the NOTICE file are for informational purposes only and
  102. do not modify the License. You may add Your own attribution
  103. notices within Derivative Works that You distribute, alongside
  104. or as an addendum to the NOTICE text from the Work, provided
  105. that such additional attribution notices cannot be construed
  106. as modifying the License.
  107. You may add Your own copyright statement to Your modifications and
  108. may provide additional or different license terms and conditions
  109. for use, reproduction, or distribution of Your modifications, or
  110. for any such Derivative Works as a whole, provided Your use,
  111. reproduction, and distribution of the Work otherwise complies with
  112. the conditions stated in this License.
  113. 5. Submission of Contributions. Unless You explicitly state otherwise,
  114. any Contribution intentionally submitted for inclusion in the Work
  115. by You to the Licensor shall be under the terms and conditions of
  116. this License, without any additional terms or conditions.
  117. Notwithstanding the above, nothing herein shall supersede or modify
  118. the terms of any separate license agreement you may have executed
  119. with Licensor regarding such Contributions.
  120. 6. Trademarks. This License does not grant permission to use the trade
  121. names, trademarks, service marks, or product names of the Licensor,
  122. except as required for reasonable and customary use in describing the
  123. origin of the Work and reproducing the content of the NOTICE file.
  124. 7. Disclaimer of Warranty. Unless required by applicable law or
  125. agreed to in writing, Licensor provides the Work (and each
  126. Contributor provides its Contributions) on an "AS IS" BASIS,
  127. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  128. implied, including, without limitation, any warranties or conditions
  129. of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  130. PARTICULAR PURPOSE. You are solely responsible for determining the
  131. appropriateness of using or redistributing the Work and assume any
  132. risks associated with Your exercise of permissions under this License.
  133. 8. Limitation of Liability. In no event and under no legal theory,
  134. whether in tort (including negligence), contract, or otherwise,
  135. unless required by applicable law (such as deliberate and grossly
  136. negligent acts) or agreed to in writing, shall any Contributor be
  137. liable to You for damages, including any direct, indirect, special,
  138. incidental, or consequential damages of any character arising as a
  139. result of this License or out of the use or inability to use the
  140. Work (including but not limited to damages for loss of goodwill,
  141. work stoppage, computer failure or malfunction, or any and all
  142. other commercial damages or losses), even if such Contributor
  143. has been advised of the possibility of such damages.
  144. 9. Accepting Warranty or Additional Liability. While redistributing
  145. the Work or Derivative Works thereof, You may choose to offer,
  146. and charge a fee for, acceptance of support, warranty, indemnity,
  147. or other liability obligations and/or rights consistent with this
  148. License. However, in accepting such obligations, You may act only
  149. on Your own behalf and on Your sole responsibility, not on behalf
  150. of any other Contributor, and only if You agree to indemnify,
  151. defend, and hold each Contributor harmless for any liability
  152. incurred by, or claims asserted against, such Contributor by reason
  153. of your accepting any such warranty or additional liability.
  154. END OF TERMS AND CONDITIONS
  155. APPENDIX: How to apply the Apache License to your work.
  156. To apply the Apache License to your work, attach the following
  157. boilerplate notice, with the fields enclosed by brackets "{}"
  158. replaced with your own identifying information. (Don't include
  159. the brackets!) The text should be enclosed in the appropriate
  160. comment syntax for the file format. We also recommend that a
  161. file or class name and description of purpose be included on the
  162. same "printed page" as the copyright notice for easier
  163. identification within third-party archives.
  164. Copyright {yyyy} {name of copyright owner}
  165. Licensed under the Apache License, Version 2.0 (the "License");
  166. you may not use this file except in compliance with the License.
  167. You may obtain a copy of the License at
  168. https://www.apache.org/licenses/LICENSE-2.0
  169. Unless required by applicable law or agreed to in writing, software
  170. distributed under the License is distributed on an "AS IS" BASIS,
  171. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  172. See the License for the specific language governing permissions and
  173. limitations under the License.
  174. Project-URL: Homepage, https://github.com/allenai/olmocr
  175. Project-URL: Repository, https://github.com/allenai/olmocr
  176. Project-URL: Changelog, https://github.com/allenai/olmocr/blob/main/CHANGELOG.md
  177. Classifier: Intended Audience :: Science/Research
  178. Classifier: Development Status :: 3 - Alpha
  179. Classifier: License :: OSI Approved :: Apache Software License
  180. Classifier: Programming Language :: Python :: 3
  181. Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
  182. Requires-Python: >=3.11
  183. Description-Content-Type: text/markdown
  184. License-File: LICENSE
  185. Requires-Dist: cached-path
  186. Requires-Dist: smart_open
  187. Requires-Dist: pypdf>=5.2.0
  188. Requires-Dist: pypdfium2
  189. Requires-Dist: cryptography
  190. Requires-Dist: lingua-language-detector
  191. Requires-Dist: Pillow
  192. Requires-Dist: ftfy
  193. Requires-Dist: bleach
  194. Requires-Dist: markdown2
  195. Requires-Dist: filelock
  196. Requires-Dist: orjson
  197. Requires-Dist: requests
  198. Requires-Dist: zstandard
  199. Requires-Dist: boto3
  200. Requires-Dist: httpx
  201. Requires-Dist: torch>=2.5.1
  202. Requires-Dist: transformers==4.46.2
  203. Requires-Dist: img2pdf
  204. Requires-Dist: beaker-py
  205. Provides-Extra: gpu
  206. Requires-Dist: sgl-kernel==0.0.3.post1; extra == "gpu"
  207. Requires-Dist: sglang[all]==0.4.2; extra == "gpu"
  208. Provides-Extra: dev
  209. Requires-Dist: ruff; extra == "dev"
  210. Requires-Dist: mypy; extra == "dev"
  211. Requires-Dist: black; extra == "dev"
  212. Requires-Dist: isort; extra == "dev"
  213. Requires-Dist: pytest; extra == "dev"
  214. Requires-Dist: pytest-sphinx; extra == "dev"
  215. Requires-Dist: pytest-cov; extra == "dev"
  216. Requires-Dist: twine>=1.11.0; extra == "dev"
  217. Requires-Dist: build; extra == "dev"
  218. Requires-Dist: setuptools; extra == "dev"
  219. Requires-Dist: wheel; extra == "dev"
  220. Requires-Dist: Sphinx<7.1.0,>=4.3.0; extra == "dev"
  221. Requires-Dist: furo==2023.7.26; extra == "dev"
  222. Requires-Dist: myst-parser<2.1,>=1.0; extra == "dev"
  223. Requires-Dist: sphinx-copybutton==0.5.2; extra == "dev"
  224. Requires-Dist: sphinx-autobuild==2021.3.14; extra == "dev"
  225. Requires-Dist: sphinx-autodoc-typehints==1.23.3; extra == "dev"
  226. Requires-Dist: packaging; extra == "dev"
  227. Requires-Dist: necessary; extra == "dev"
  228. Requires-Dist: peft; extra == "dev"
  229. Requires-Dist: datasets; extra == "dev"
  230. Requires-Dist: omegaconf; extra == "dev"
  231. Requires-Dist: spacy; extra == "dev"
  232. Provides-Extra: bench
  233. Requires-Dist: tinyhost; extra == "bench"
  234. Requires-Dist: fuzzysearch; extra == "bench"
  235. Requires-Dist: rapidfuzz; extra == "bench"
  236. Requires-Dist: sequence_align; extra == "bench"
  237. Requires-Dist: syntok; extra == "bench"
  238. Requires-Dist: openai; extra == "bench"
  239. Requires-Dist: google-genai; extra == "bench"
  240. Requires-Dist: playwright; extra == "bench"
  241. Requires-Dist: mistralai; extra == "bench"
  242. Requires-Dist: lxml; extra == "bench"
  243. Requires-Dist: flask; extra == "bench"
  244. Provides-Extra: train
  245. Requires-Dist: torch; extra == "train"
  246. Requires-Dist: torchvision; extra == "train"
  247. Requires-Dist: accelerate; extra == "train"
  248. Requires-Dist: datasets; extra == "train"
  249. Requires-Dist: peft; extra == "train"
  250. Requires-Dist: wandb; extra == "train"
  251. Requires-Dist: omegaconf; extra == "train"
  252. Requires-Dist: s3fs; extra == "train"
  253. Requires-Dist: necessary; extra == "train"
  254. Requires-Dist: einops; extra == "train"
  255. Requires-Dist: transformers>=4.45.1; extra == "train"
  256. Provides-Extra: elo
  257. Requires-Dist: numpy; extra == "elo"
  258. Requires-Dist: scipy; extra == "elo"
  259. Requires-Dist: pandas; extra == "elo"
  260. Requires-Dist: matplotlib; extra == "elo"
  261. Dynamic: license-file
  262. <div align="center">
  263. <!-- <img src="https://github.com/allenai/OLMo/assets/8812459/774ac485-a535-4768-8f7c-db7be20f5cc3" width="300"/> -->
  264. <img src="https://github.com/user-attachments/assets/d70c8644-3e64-4230-98c3-c52fddaeccb6" alt="olmOCR Logo" width="300"/>
  265. <br/>
  266. <br>
  267. <h1>olmOCR</h1>
  268. </div>
  269. <p align="center">
  270. <a href="https://github.com/allenai/OLMo/blob/main/LICENSE">
  271. <img alt="GitHub License" src="https://img.shields.io/github/license/allenai/OLMo">
  272. </a>
  273. <a href="https://github.com/allenai/olmocr/releases">
  274. <img alt="GitHub release" src="https://img.shields.io/github/release/allenai/olmocr.svg">
  275. </a>
  276. <a href="https://olmocr.allenai.org/papers/olmocr.pdf">
  277. <img alt="Tech Report" src="https://img.shields.io/badge/Paper-olmOCR-blue">
  278. </a>
  279. <a href="https://olmocr.allenai.org">
  280. <img alt="Demo" src="https://img.shields.io/badge/Ai2-Demo-F0529C">
  281. </a>
  282. <a href="https://discord.gg/sZq3jTNVNG">
  283. <img alt="Discord" src="https://img.shields.io/badge/Discord%20-%20blue?style=flat&logo=discord&label=Ai2&color=%235B65E9">
  284. </a>
  285. </p>
  286. A toolkit for training language models to work with PDF documents in the wild.
  287. Try the online demo: [https://olmocr.allenai.org/](https://olmocr.allenai.org/)
  288. What is included:
  289. - A prompting strategy to get really good natural text parsing using ChatGPT 4o - [buildsilver.py](https://github.com/allenai/olmocr/blob/main/olmocr/data/buildsilver.py)
  290. - An side-by-side eval toolkit for comparing different pipeline versions - [runeval.py](https://github.com/allenai/olmocr/blob/main/olmocr/eval/runeval.py)
  291. - Basic filtering by language and SEO spam removal - [filter.py](https://github.com/allenai/olmocr/blob/main/olmocr/filter/filter.py)
  292. - Finetuning code for Qwen2-VL and Molmo-O - [train.py](https://github.com/allenai/olmocr/blob/main/olmocr/train/train.py)
  293. - Processing millions of PDFs through a finetuned model using Sglang - [pipeline.py](https://github.com/allenai/olmocr/blob/main/olmocr/pipeline.py)
  294. - Viewing [Dolma docs](https://github.com/allenai/dolma) created from PDFs - [dolmaviewer.py](https://github.com/allenai/olmocr/blob/main/olmocr/viewer/dolmaviewer.py)
  295. ### Installation
  296. Requirements:
  297. - Recent NVIDIA GPU (tested on RTX 4090, L40S, A100, H100) with at least 20 GB of GPU RAM
  298. - 30GB of free disk space
  299. You will need to install poppler-utils and additional fonts for rendering PDF images.
  300. Install dependencies (Ubuntu/Debian)
  301. ```bash
  302. sudo apt-get update
  303. sudo apt-get install poppler-utils ttf-mscorefonts-installer msttcorefonts fonts-crosextra-caladea fonts-crosextra-carlito gsfonts lcdf-typetools
  304. ```
  305. Set up a conda environment and install olmocr
  306. ```bash
  307. conda create -n olmocr python=3.11
  308. conda activate olmocr
  309. git clone https://github.com/allenai/olmocr.git
  310. cd olmocr
  311. # For CPU-only operations, ex. running benchmarks
  312. pip install -e .
  313. # For actually converting the files with your own GPU
  314. pip install -e .[gpu] --find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/
  315. ```
  316. ### Local Usage Example
  317. For quick testing, try the [web demo](https://olmocr.allen.ai/). To run locally, a GPU is required, as inference is powered by [sglang](https://github.com/sgl-project/sglang) under the hood.
  318. Convert a Single PDF:
  319. ```bash
  320. python -m olmocr.pipeline ./localworkspace --pdfs tests/gnarly_pdfs/horribleocr.pdf
  321. ```
  322. Convert an Image file:
  323. ```bash
  324. python -m olmocr.pipeline ./localworkspace --pdfs random_page.png
  325. ```
  326. Convert Multiple PDFs:
  327. ```bash
  328. python -m olmocr.pipeline ./localworkspace --pdfs tests/gnarly_pdfs/*.pdf
  329. ```
  330. Results will be stored as JSON in `./localworkspace`.
  331. #### Viewing Results
  332. Extracted text is stored as [Dolma](https://github.com/allenai/dolma)-style JSONL inside of the `./localworkspace/results` directory.
  333. ```bash
  334. cat localworkspace/results/output_*.jsonl
  335. ```
  336. View results side-by-side with the original PDFs (uses `dolmaviewer` command):
  337. ```bash
  338. python -m olmocr.viewer.dolmaviewer localworkspace/results/output_*.jsonl
  339. ```
  340. Now open `./dolma_previews/tests_gnarly_pdfs_horribleocr_pdf.html` in your favorite browser.
  341. ![image](https://github.com/user-attachments/assets/128922d1-63e6-4d34-84f2-d7901237da1f)
  342. ### Multi-node / Cluster Usage
  343. If you want to convert millions of PDFs, using multiple nodes running in parallel, then olmOCR supports
  344. reading your PDFs from AWS S3, and coordinating work using an AWS S3 output bucket.
  345. For example, you can start this command on your first worker node, and it will set up
  346. a simple work queue in your AWS bucket and start converting PDFs.
  347. ```bash
  348. python -m olmocr.pipeline s3://my_s3_bucket/pdfworkspaces/exampleworkspace --pdfs s3://my_s3_bucket/jakep/gnarly_pdfs/*.pdf
  349. ```
  350. Now on any subsequent nodes, just run this and they will start grabbing items from the same workspace queue.
  351. ```bash
  352. python -m olmocr.pipeline s3://my_s3_bucket/pdfworkspaces/exampleworkspace
  353. ```
  354. If you are at Ai2 and want to linearize millions of PDFs efficiently using [beaker](https://www.beaker.org), just add the `--beaker`
  355. flag. This will prepare the workspace on your local machine, and then launch N GPU workers in the cluster to start
  356. converting PDFs.
  357. For example:
  358. ```bash
  359. python -m olmocr.pipeline s3://my_s3_bucket/pdfworkspaces/exampleworkspace --pdfs s3://my_s3_bucket/jakep/gnarly_pdfs/*.pdf --beaker --beaker_gpus 4
  360. ```
  361. ### Full documentation for the pipeline
  362. ```bash
  363. python -m olmocr.pipeline --help
  364. usage: pipeline.py [-h] [--pdfs PDFS] [--workspace_profile WORKSPACE_PROFILE] [--pdf_profile PDF_PROFILE] [--pages_per_group PAGES_PER_GROUP]
  365. [--max_page_retries MAX_PAGE_RETRIES] [--max_page_error_rate MAX_PAGE_ERROR_RATE] [--workers WORKERS] [--apply_filter] [--stats] [--model MODEL]
  366. [--model_max_context MODEL_MAX_CONTEXT] [--model_chat_template MODEL_CHAT_TEMPLATE] [--target_longest_image_dim TARGET_LONGEST_IMAGE_DIM]
  367. [--target_anchor_text_len TARGET_ANCHOR_TEXT_LEN] [--beaker] [--beaker_workspace BEAKER_WORKSPACE] [--beaker_cluster BEAKER_CLUSTER]
  368. [--beaker_gpus BEAKER_GPUS] [--beaker_priority BEAKER_PRIORITY]
  369. workspace
  370. Manager for running millions of PDFs through a batch inference pipeline
  371. positional arguments:
  372. workspace The filesystem path where work will be stored, can be a local folder, or an s3 path if coordinating work with many workers, s3://bucket/prefix/
  373. options:
  374. -h, --help show this help message and exit
  375. --pdfs PDFS Path to add pdfs stored in s3 to the workspace, can be a glob path s3://bucket/prefix/*.pdf or path to file containing list of pdf paths
  376. --workspace_profile WORKSPACE_PROFILE
  377. S3 configuration profile for accessing the workspace
  378. --pdf_profile PDF_PROFILE
  379. S3 configuration profile for accessing the raw pdf documents
  380. --pages_per_group PAGES_PER_GROUP
  381. Aiming for this many pdf pages per work item group
  382. --max_page_retries MAX_PAGE_RETRIES
  383. Max number of times we will retry rendering a page
  384. --max_page_error_rate MAX_PAGE_ERROR_RATE
  385. Rate of allowable failed pages in a document, 1/250 by default
  386. --workers WORKERS Number of workers to run at a time
  387. --apply_filter Apply basic filtering to English pdfs which are not forms, and not likely seo spam
  388. --stats Instead of running any job, reports some statistics about the current workspace
  389. --model MODEL List of paths where you can find the model to convert this pdf. You can specify several different paths here, and the script will try to use the
  390. one which is fastest to access
  391. --model_max_context MODEL_MAX_CONTEXT
  392. Maximum context length that the model was fine tuned under
  393. --model_chat_template MODEL_CHAT_TEMPLATE
  394. Chat template to pass to sglang server
  395. --target_longest_image_dim TARGET_LONGEST_IMAGE_DIM
  396. Dimension on longest side to use for rendering the pdf pages
  397. --target_anchor_text_len TARGET_ANCHOR_TEXT_LEN
  398. Maximum amount of anchor text to use (characters)
  399. --beaker Submit this job to beaker instead of running locally
  400. --beaker_workspace BEAKER_WORKSPACE
  401. Beaker workspace to submit to
  402. --beaker_cluster BEAKER_CLUSTER
  403. Beaker clusters you want to run on
  404. --beaker_gpus BEAKER_GPUS
  405. Number of gpu replicas to run
  406. --beaker_priority BEAKER_PRIORITY
  407. Beaker priority level for the job
  408. ```
  409. ## Team
  410. <!-- start team -->
  411. **olmOCR** is developed and maintained by the AllenNLP team, backed by [the Allen Institute for Artificial Intelligence (AI2)](https://allenai.org/).
  412. AI2 is a non-profit institute with the mission to contribute to humanity through high-impact AI research and engineering.
  413. To learn more about who specifically contributed to this codebase, see [our contributors](https://github.com/allenai/olmocr/graphs/contributors) page.
  414. <!-- end team -->
  415. ## License
  416. <!-- start license -->
  417. **olmOCR** is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
  418. A full copy of the license can be found [on GitHub](https://github.com/allenai/olmocr/blob/main/LICENSE).
  419. <!-- end license -->
  420. ## Citing
  421. ```bibtex
  422. @misc{olmocr,
  423. title={{olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models}},
  424. author={Jake Poznanski and Jon Borchardt and Jason Dunkelberger and Regan Huff and Daniel Lin and Aman Rangapur and Christopher Wilhelm and Kyle Lo and Luca Soldaini},
  425. year={2025},
  426. eprint={2502.18443},
  427. archivePrefix={arXiv},
  428. primaryClass={cs.CL},
  429. url={https://arxiv.org/abs/2502.18443},
  430. }
  431. ```