微信扫码
添加专属顾问
我要投稿
olmOCR-7B:文档提取的革命性突破,实现PDF和图像到纯文本的高效转换。 核心内容: 1. olmOCR-7B模型在250,000页数据集上的微调细节 2. 性能、成本效益和Markdown输出的优势 3. olmOCR与其他文档提取工具的比较分析
olmOCR在250,000页的数据集上微调了Qwen2-VL-7B-Instruct模型,旨在将PDF和文档图像转换为干净且结构化的纯文本。
从预训练到推理,语言模型(LM)都在处理纯文本数据。无论是处理万亿级别的令牌训练,还是为数据密集型AI应用提供服务,这些文本的质量都至关重要。噪声文本会导致训练不稳定性和更差的模型性能,或在完成用户请求时产生较差的输出。
然而,并非所有LM使用的数据都以易于解析的格式(如网页)存在。事实上,在许多领域中,有价值的信息存储在电子文档文件(如PDF)中。这些格式由于设计用于在固定大小的页面上渲染内容而不是保留逻辑文本结构,因此带来了独特的挑战。以PDF为例:该格式将文本存储为字符编码序列,连同其在页面上的位置和格式化信息。虽然这种格式非常高效,但它使得恢复所有文本单元(如标题、段落、表格和方程)并按正确的顺序排列变得具有挑战性。
为了帮助处理电子文档,我们推出了olmOCR,这是一款高性能工具包,旨在将PDF和文档图像转换为干净且结构化的纯文本。olmOCR有何不同之处?
查看olmOCR如何与比较其他领先的文档提取工具,并了解我们如何构建它。准备好试用后,请访问我们的GitHub仓库以在自己的项目中使用olmOCR。
比较olmOCR与其他领先文档提取工具在样本文档上的表现。使用下面的标签查看不同的输出,并查看处理质量的关键差异。
olmOCR
Executive Mansion,
Washington City,
January 15th, 1864
Major General Hitchcock, Commissioner of Exchanges, is authorized and directed to offer Brigadier General Trimble, now a prisoner of war in Fort McHenry, in exchange for Major White, who is held as a prisoner at Richmond. He is also directed to send forward the offer of exchange by Henry M. Warfield, Esq. of Baltimore, under a flag of truce, and give him a pass to City Point.
Abraham Lincoln
Marker
necuhve Mansion Vastington amany layor Seneral Hitchcocks Commissioner of Cachanges, is anthonged and directed to offer Bingadier General Trin prisoner of war in Fort Inctienny, in exchange now w Major White, who is held as a preises at Richmond Ite is also directed to vand forwards the offer of exchange by Stenny in. Warfield, Eag. of Baltimore, under aflag 11 mice, and give him apass to tity Point. Abrakan Sincolus
GOT OCR 2.0
43571
Bachington City
January 10th 1864.
Major General Architect, Commissioner of aivachangera
is authorized and directed by ffeed Bngader General Trelmble,
new a firemen of war in Fert nchery in exchange for
Mayor White, who held a a firemen at Hillmannd.
He is aker conducted by end forward the offer of exchange
by Henry in. Warfield, Lag. of Balthmore, under a flag
of three, and five him afaies to City Bink.
Abraham Lincoln
MinerU
No text detected.
一本包含方程式的微积分教科书。
olmOCR
3.4 EXERCISES
For the following exercises, the given functions represent the position of a particle traveling along a horizontal line.
a. Find the velocity and acceleration functions.
b. Determine the time intervals when the object is slowing down or speeding up.
150. ( s(t) = 2t^3 - 3t^2 - 12t + 8 )
151. ( s(t) = 2t^3 - 15t^2 + 36t - 10 )
152. ( s(t) = rac{t}{1 + t^2} )
153. A rocket is fired vertically upward from the ground. The distance ( s ) in feet that the rocket travels from the ground after ( t ) seconds is given by ( s(t) = -16t^2 + 560t ).
a. Find the velocity of the rocket 3 seconds after being fired.
b. Find the acceleration of the rocket 3 seconds after being fired.
154. A ball is thrown downward with a speed of 8 ft/s from the top of a 64-foot-tall building. After ( t ) seconds, its height above the ground is given by ( s(t) = -16t^2 - 8t + 64 ).
a. Determine how long it takes for the ball to hit the ground.
b. Determine the velocity of the ball when it hits the ground.
155. The position function ( s(t) = t^2 - 3t - 4 ) represents the position of the back of a car backing out of a driveway and then driving in a straight line, where ( s ) is in feet and ( t ) is in seconds. In this case, ( s(t) = 0 ) represents the time at which the back of the car is at the garage door, so ( s(0) = -4 ) is the starting position of the car, 4 feet inside the garage.
a. Determine the velocity of the car when ( s(t) = 0 ).
b. Determine the velocity of the car when ( s(t) = 14 ).
156. The position of a hummingbird flying along a straight line in ( t ) seconds is given by ( s(t) = 3t^3 - 7t ) meters.
a. Determine the velocity of the bird at ( t = 1 ) sec.
b. Determine the acceleration of the bird at ( t = 1 ) sec.
c. Determine the acceleration of the bird when the velocity equals 0.
157. A potato is launched vertically upward with an initial velocity of 100 ft/s from a potato gun at the top of an 85-foot-tall building. The distance in feet that the potato travels from the ground after ( t ) seconds is given by ( s(t) = -16t^2 + 100t + 85 ).
a. Find the velocity of the potato after 0.5 s and 5.75 s.
b. Find the speed of the potato at 0.5 s and 5.75 s.
c. Determine when the potato reaches its maximum height.
d. Find the acceleration of the potato at 0.5 s and 1.5 s.
e. Determine how long the potato is in the air.
f. Determine the velocity of the potato upon hitting the ground.
158. The position function ( s(t) = t^3 - 8t ) gives the position in miles of a freight train where east is the positive direction and ( t ) is measured in hours.
a. Determine the direction the train is traveling when ( s(t) = 0 ).
b. Determine the direction the train is traveling when ( a(t) = 0 ).
c. Determine the time intervals when the train is slowing down or speeding up.
159. The following graph shows the position ( y = s(t) ) of an object moving along a straight line.
a. Use the graph of the position function to determine the time intervals when the velocity is positive, negative, or zero.
b. Sketch the graph of the velocity function.
c. Use the graph of the velocity function to determine the time intervals when the acceleration is positive, negative, or zero.
d. Determine the time intervals when the object is speeding up or slowing down.
Marker:
- a. Determine the direction the train is traveling when *s*(*t*) = 0.
- b. Determine the direction the train is traveling when *a*(*t*) = 0.
- c. Determine the time intervals when the train is slowing down or speeding up.
159. The following graph shows the position *y* = *s*(*t*) of an object moving along a straight line.

- negative, or zero. b. Sketch the graph of the velocity function.
- c. Use the graph of the velocity function to determine the time intervals when the acceleration is positive, negative, or zero.
- d. Determine the time intervals when the object is speeding up or slowing down.
GOT OCR 2.0
Chapter 3 | Derivatives
273
3.4 EXERCISES
For the following exercises, the given functions represent
the position of a particle traveling along a horizontal line.
a.
Find the velocity and acceleration functions.
b.
Determine the time intervals when the object is
slowing down or speeding up.
150.
s(t) = 2t3 −3t2 −12t + 8
151.
s(t) = 2t3 −15t2 + 36t −10
152.
s(t) =
t
1 + t2
153.
A rocket is fired vertically upward from the ground.
The distance
s
in
feet
that
the
rocket
travels
from
the
ground after
t seconds is given by
s(t) = −16t2 + 560t.
a.
Find the velocity of the rocket 3 seconds after being
fired.
b.
Find the acceleration of the rocket 3 seconds after
being fired.
154.
A ball is thrown downward with a speed of 8 ft/
s from the top of a 64-foot-tall building. After t seconds,
its
height
above
the
ground
is
given
by
s(t) = −16t2 −8t + 64.
a.
Determine how long it takes for the ball to hit the
ground.
b.
Determine the velocity of the ball when it hits the
ground.
155.
The position function
s(t) = t2 −3t −4 represents
the position of the back of a car backing out of a driveway
and then driving in a straight line, where
s
is in feet and
t is in seconds. In this case, s(t) = 0 represents the time
at which the back of the car is at the garage door, so
s(0) = −4 is the starting position of the car, 4 feet inside
the garage.
a.
Determine the velocity of the car when
s(t) = 0.
b.
Determine the velocity of the car when
s(t) = 14.
156.
The position of a hummingbird flying along a straight
line in
t seconds is given by
s(t) = 3t3 −7t
2
2
2
...
2
2
2
a.
Use the graph of the position function to determine
the time intervals when the velocity is positive,
negative, or zero.
b.
Sketch the graph of the velocity function.
c.
Use the graph of the velocity function to determine
the time intervals when the acceleration is positive,
negative, or zero.
d.
Determine the time intervals when the object is
speeding up or slowing down.
157.
A potato is launched vertically upward with an initial
velocity of 100 ft/s from a potato gun at the top of an
85-foot-tall building. The distance in feet that the potato
travels from the ground after
t seconds is given by
s(t) = −16t2 + 100t + 85.
a.
Find the velocity of the potato after 0.5 s and
5.75 s.
b.
Find the speed of the potato at 0.5 s and 5.75 s.
c.
Determine when the potato reaches its maximum
height.
d.
Find the acceleration of the potato at 0.5 s and 1.5
s.
e.
Determine how long the potato is in the air.
f.
Determine the velocity of the potato upon hitting
the ground.
158.
The position function
s(t) = t3 −8t gives the
position in miles of a freight train where east is the positive
direction and
t is measured in hours.
a.
Determine the direction the train is traveling when
s(t) = 0.
b.
Determine the direction the train is traveling when
a(t) = 0.
c.
Determine the time intervals when the train is
slowing down or speeding up.
159.
The following graph shows the position
y = s(t) of
an object moving along a straight line.
155.
The position of a hummingbird flying along a straight
line in
t
seconds is given by
s(t) = 3t3 −7t
2
2 3
3
3
.....
125.5
126
126.5
MinerU
a. Determine the direction the train is traveling when $s(t)=0$ .
b. Determine the direction the train is traveling when $a(t)=0$ .
c. Determine the time intervals when the train is slowing down or speeding up.
159. The following graph shows the position $y=s(t)$ of an object moving along a straight line.
a. Use the graph of the position function to determine the time intervals when the velocity is positive, negative, or zero.
b. Sketch the graph of the velocity function.
c. Use the graph of the velocity function to determine the time intervals when the acceleration is positive, negative, or zero.
d. Determine the time intervals when the object is speeding up or slowing down.
olmOCR
Christians behaving themselves like Mahomedans.
4. The natives soon had reason to suspect the viceroy's sincerity in his expressions of regret at the proceedings of which they complained. For about this time the Dominican friars, under pretence of building a convent, erected a fortress on the island of Solor, which, as soon as finished, the viceroy garrisoned with a strong force. The natives very naturally felt indignant at this additional encroachment, and took every opportunity to attack the garrison. The monks, forgetful of their peaceable profession, took an active part in these skirmishes, and many of them fell sword in hand.
The Mahomedan faith has been appropriately entitled, The religion of the sword; and with equal propriety may we so designate the religion of these belligerent friars. The Portuguese writers give an account of one of their missionaries, Fernando Vinagre, who was as prompt in the field of battle as at the baptismal font. This man, though a secular priest, undertook the command of a squadron that was sent to the assistance of the rajah of Tidore, on which occasion he is said to have acted in the twofold capacity of a great commander, and a great apostle, at one time appearing in armour, at another in a surplice; and even occasionally, baptizing the converts of his sword without putting off his armour, but covering it with his ecclesiastical vest. In this crusade he had two
Maker
## **IN INDIA *** BOOK TI. S69
Christians behaving themselves like Ma borne- a. dans.3 . extquotedblleft5/0-
*t>.*
The natives soon had reason to suspect the viceroy, viceroy's sincerity in his expressions of regret at the proceedings of which they complained. extquotedblleft n. extquotedblleft' For about this time the Dominican friars, under pretence of building a. convent, erected a fortress on the island of Sol or, which, as soon as finished, the viceroy garrisoned with a strong force. The natives' very naturally felt indig-S nant at this additional encroachment, and took every opportunity to attack the garrison. The monks, forgetful/ of their peaceable profession, took an active part in these skirmishes, and many of tbg.tr fell sword in hand.
The i'lfinomedan faith has been appropriately entitled., extquoteleft The religion of the sword extquoteright,; and with equal propriety may we so designate the re- . i'gv.m of these belligerent friars. The Portugu writers give an account of one of their extquoteleft missionaries, extquoteright Fernando Vinagre, who was as prompt in the field of battle as at the baptismal font. This man, though a secular priest, undertook the command of a squadron that was I sent to the assistance of the rajah of Tidore,4 on which occasion he is said to have acted in the twofold capacity of a great commander, and a great apostle, at one time appearing in armour, ; at another in a surplice; and even occasionally, baptizing the converts of his sword without putting off his armour, but covering it with his ecclesiastical vest. In this crusade5 he had two
> 3 Geddes History, &c., pp. 24---27. Pudet hae c opprobria nobis Vel dici potuisse.
> 4 Called extquoteleft T a d u ra extquoteright or extquoteleft D a c o, extquoteright an island in the Indian Ocean, one of the Moluccas
> 5 extquoteleft These extquoteleft a la D ra g o o n extquoteright conversions. extquoteright Geddes' History, p. 27.
GOT OCR 2.0
IN INDIA: BOOK U 269 Christians behaving themselves like Mahome- 1670. 4. The natives son had reason to suspect the Viceroy' s vice roy' s sincerity in his expressions of regret in s in e eri ty at the proceedings of which they complained. fl it ars. For about this time the Dominican f mars, under pre ten ce of building a convent, erected a for- tress on the island of Sol or, which, as soon as finished, the vice roy garrisoned with a strong force. The natives very naturally felt indig- nant at this additional encroachment, and took every opportunity to attack the garrison. The monks, forgetful of their peaceable profession, took an active part in these skirmishes, and many of the n fell sword in hand. The Mh on med an faith has been appropriately entitled. The religion of the sword; and with e ral Tropriety may we so designate the re- gian of these belligerent friars. The Port u- gue s writers give an account of one of their mission are s, Fer endo Vina gre, who was as prompt in the fe ld of battle as at the baptismal font. This man, though a secular priest, un- der took the command of a squadron that was sent to the assistance of the rajah of Tidore, on which occasion he is said to have acted in the twofold capacity of a great commander, and a great apostle, at one time appearing in armour, at another in a surplice; and even occasionally, baptizing the converts of his sword without put- ting off his armour, but covering it with his ecclesiastical vest. In this crusade he had two 3 Ged des History, & c. , pp. 24-27. P ude th aec opp rob ria nobis Vel die ipo tui sse. Called Tadur u or Daco, an island in the Indian Ocean, one of the Mol ucc as These a laDra goon conversions. Ged des History, p. 27.
MinerU
ININDIASY BOOKU
Christians bchaving.themselves like Mahome dans.3
4.The natives soon had reason to suspect ihe viceroy's sincerity in his expressions of regret at the proceedings of which they complained. For about this time the Dominican friars,under pretenceof building a convent,erected a for tress on the island of Solorwhich,as soon as finishedthe viceroy garrisoned with a strong force. The natives very naturally felt indig nant at this additional encroachment, and took every pportunity to attack the garrison.The monks,forgetful of their peaceable profession took an activa part in these skirmishes, and many of tbein feil sword in hand.
TheMahornedan faithhas been appropriately ntitled.The religion of the swordand with equal propriety may we so designate the region of these belligerent friars.The Portugueswriters give an account of one of their missionarzes,femando Vinagre,who was as prompt in the field of battle as at the baptismal font. This man, though a secular priest, undertook the command of a squadron that was sent to the assistance of the rajah of Tidore,4 on which occasion he is said to have acted in the twofold capacity of a great commander, and a great apostle, at one time appearing in armour, at another in a surplice;and even occasionally baptizing the converts of his sword without put ting off his armour, but covering it with his ecclesiastical vest.In this crusadehe had two
为了获取高质量的数据来训练olmOCR,我们开发了一种称为“文档锚定”的技术。这种方法利用PDF文件中的任何文本和元数据来提高提取文本的质量。
图1:文档锚定在典型页面上如何工作的示例
这种方法提取相关图像位置和文本块,进行拼接并插入到模型提示中。当提示VLM获取文档的纯文本版本时,会结合已锚定的文本和页面的栅格化图像。
使用文档锚定,我们使用GPT-4o对250,000页进行了标记。我们使用了从网络上爬取的公开可访问PDF以及互联网档案馆扫描的公共领域书籍的组合。数据集多样化,包含60%的学术论文、12%的小册子、11%的法律文件、6%的图表、5%的幻灯片和4%的其他文档类型。
为了训练模型本身,我们微调了一个Qwen2-VL-7B-Instruct检查点。我们精心优化了大规模批处理的推理管道,使用SGLang使olmOCR仅需190美元就能转换一百万页PDF——大约仅为使用GPT-4o API的成本的1/32。我们的结果显示不仅显著节省了成本,而且在人类评估中也优于其他流行的OCR工具。
图2:olmOCR与其它流行工具的ELO评分对比
我们通过将olmOCR的输出与其他流行的PDF提取工具(Marker、MinerU和GOT-OCR 2.0)进行比较来评估olmOCR。我们收集了11名研究人员的成对判断。我们从2,017份PDF中采样并收集了452次有意义的比较,计算ELO评分以量化性能。olmOCR的ELO得分超过1800,显著优于所有竞争对手。在直接比较中,olmOCR在61.3%的比较中优于Marker,58.6%优于GOT-OCR,令人印象深刻的是在71.4%的比较中优于MinerU,展示了其在生成干净、结构良好的文本方面的优越能力。
你可以在此技术报告中查看更多细节和其他评估。
首次发布的olmOCR包括一个演示、模型权重、微调数据集、一份简短的技术报告以及最重要的高效推理管道。
访问我们的GitHub仓库以安装olmOCR并探索文档。然后,在具有GPU的机器上,只需运行:
python -m olmocr.pipeline ./localworkspace --pdfs tests/gnarly_pdfs/horribleocr.pdf
我们希望尽快发布更多的定量基准测试,以帮助开发更好的PDF提取模型并评估它们的性能。
原文链接:https://olmocr.allenai.org/blog
最后,推荐大家关注一下开源项目:LangChat,Java生态下的AIGC大模型产品解决方案。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费场景POC验证,效果验证后签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2025-02-04
2025-02-04
2024-09-18
2024-07-11
2024-07-09
2024-07-11
2024-07-26
2025-02-05
2025-01-27
2025-02-01
2025-03-20
2025-03-16
2025-03-16
2025-03-13
2025-03-13
2025-03-11
2025-03-07
2025-03-05