Update README.md
Browse files
README.md
CHANGED
|
@@ -9,9 +9,9 @@ library_name: transformers
|
|
| 9 |
|
| 10 |
<img alt="olmOCR Logo" src="https://huggingface.co/datasets/allenai/blog-images/resolve/main/olmocr/olmocr.png" width="242px" style="margin-left:'auto' margin-right:'auto' display:'block'">
|
| 11 |
|
| 12 |
-
# olmOCR-7B-1025
|
| 13 |
|
| 14 |
-
Full BF16 version of [olmOCR-7B-1025-FP8](https://huggingface.co/allenai/olmOCR-7B-1025-FP8).
|
| 15 |
We recommend using the FP8 version for all practical purposes except further fine tuning.
|
| 16 |
|
| 17 |
This is a release of the olmOCR model that's fine tuned from Qwen2.5-VL-7B-Instruct using the
|
|
@@ -51,7 +51,7 @@ This model scores the following scores on [olmOCR-bench](https://huggingface.co/
|
|
| 51 |
</thead>
|
| 52 |
<tbody>
|
| 53 |
<tr>
|
| 54 |
-
<td align="left">olmOCR pipeline v0.4.0 with olmOCR-7B-1025</td>
|
| 55 |
<td align="center">82.9</td>
|
| 56 |
<td align="center">82.1</td>
|
| 57 |
<td align="center">84.3</td>
|
|
@@ -63,7 +63,7 @@ This model scores the following scores on [olmOCR-bench](https://huggingface.co/
|
|
| 63 |
<td align="center">82.3 ± 1.1</td>
|
| 64 |
</tr>
|
| 65 |
<tr>
|
| 66 |
-
<td align="left">olmOCR pipeline v0.4.0 with olmOCR-7B-1025-FP8</td>
|
| 67 |
<td align="center">83.0</td>
|
| 68 |
<td align="center">82.3</td>
|
| 69 |
<td align="center">84.9</td>
|
|
@@ -112,7 +112,7 @@ from olmocr.data.renderpdf import render_pdf_to_base64png
|
|
| 112 |
from olmocr.prompts import build_no_anchoring_v4_yaml_prompt
|
| 113 |
|
| 114 |
# Initialize the model
|
| 115 |
-
model = Qwen2_5_VLForConditionalGeneration.from_pretrained("allenai/olmOCR-7B-1025", torch_dtype=torch.bfloat16).eval()
|
| 116 |
processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct")
|
| 117 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 118 |
model.to(device)
|
|
|
|
| 9 |
|
| 10 |
<img alt="olmOCR Logo" src="https://huggingface.co/datasets/allenai/blog-images/resolve/main/olmocr/olmocr.png" width="242px" style="margin-left:'auto' margin-right:'auto' display:'block'">
|
| 11 |
|
| 12 |
+
# olmOCR-2-7B-1025
|
| 13 |
|
| 14 |
+
Full BF16 version of [olmOCR-2-7B-1025-FP8](https://huggingface.co/allenai/olmOCR-2-7B-1025-FP8).
|
| 15 |
We recommend using the FP8 version for all practical purposes except further fine tuning.
|
| 16 |
|
| 17 |
This is a release of the olmOCR model that's fine tuned from Qwen2.5-VL-7B-Instruct using the
|
|
|
|
| 51 |
</thead>
|
| 52 |
<tbody>
|
| 53 |
<tr>
|
| 54 |
+
<td align="left">olmOCR pipeline v0.4.0 with olmOCR-2-7B-1025</td>
|
| 55 |
<td align="center">82.9</td>
|
| 56 |
<td align="center">82.1</td>
|
| 57 |
<td align="center">84.3</td>
|
|
|
|
| 63 |
<td align="center">82.3 ± 1.1</td>
|
| 64 |
</tr>
|
| 65 |
<tr>
|
| 66 |
+
<td align="left">olmOCR pipeline v0.4.0 with olmOCR-2-7B-1025-FP8</td>
|
| 67 |
<td align="center">83.0</td>
|
| 68 |
<td align="center">82.3</td>
|
| 69 |
<td align="center">84.9</td>
|
|
|
|
| 112 |
from olmocr.prompts import build_no_anchoring_v4_yaml_prompt
|
| 113 |
|
| 114 |
# Initialize the model
|
| 115 |
+
model = Qwen2_5_VLForConditionalGeneration.from_pretrained("allenai/olmOCR-2-7B-1025", torch_dtype=torch.bfloat16).eval()
|
| 116 |
processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct")
|
| 117 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 118 |
model.to(device)
|