Views
No views yet
infly/Infinity-Parser2-Flash and quantized to 8-bit (group size 64) using mlx-vlm version 0.5.0. Refer to the original model card for more details on the model.pip install -U mlx-vlm1PROMPT=$(cat <<'EOF'
2- Extract layout information from the provided PDF image.
3- For each layout element, output its bbox, category, and the text content within the bbox.
4- Bbox format: [x1, y1, x2, y2].
5- Allowed layout categories: ['header', 'title', 'text', 'figure', 'table', 'formula', 'figure_caption', 'table_caption', 'formula_caption', 'figure_footnote', 'table_footnote', 'page_footnote', 'footer'].
6- Text extraction and formatting:
7 1) For 'figure', the text field must be an empty string.
8 2) For 'formula', format text as LaTeX.
9 3) For 'table', format text as HTML.
10 4) For all other categories (e.g., text, title), format text as Markdown.
11- The output text must be exactly the original text from the image, with no translation or rewriting.
12- Sort all layout elements in human reading order.
13- Final output must be a single JSON object.
14EOF
15)
16
17python -m mlx_vlm.generate \
18 --model BotResources/Infinity-Parser2-Flash-mlx-q8 \
19 --max-tokens 32768 --temperature 0.0 \
20 --prompt "$PROMPT" \
21 --image <path_to_image>BotResources/Infinity-Parser2-Flash-mlx-bf16.temperature=0, top_p=1. Token count, character count, and final text are strictly equal between the two builds.| Build | On-disk | Peak RAM | Generation |
|---|---|---|---|
| BF16 | 4.43 GB | 5.4 GB | 101 tok/s |
| 8-bit (this build) | 2.48 GB | 3.7 GB | 167 tok/s |
infly/Infinity-Parser2-Flash. All credit for the underlying model goes to the inflyAI team.