Skip to content

Add complete vision benchmark support - #2869

Open
ckuethe wants to merge 1 commit into
lemonade-sdk:mainfrom
ckuethe:bench_vision
Open

Add complete vision benchmark support#2869
ckuethe wants to merge 1 commit into
lemonade-sdk:mainfrom
ckuethe:bench_vision

Conversation

@ckuethe

@ckuethe ckuethe commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

feat(bench): add vision benchmark support for image-capable models
Add ability to benchmark vision (multimodal) models by embedding images
into chat messages during text generation benchmarks. Vision scenarios
specify an image_path and messages; the CLI loads and base64-encodes the
image, then injects it into user message content arrays using the OpenAI
multimodal format before sending to the server.

Only allow vision-capable models to run vision scenarios

Only load image files from the scenario file directory for security

Source images for the tests taken from public domain sources:

Lots of challenging formatting, interesting fonts, and poor image quality.
The scan of a fax of a photocopy of a microfiche of a mimeograph image path
can really challenge the transcription models.

Co-authored-by: opencode, North-Mini-Code (512k)
Co-authored-by: opencode, Qwen3.6-35B-A3B (256k)

@github-actions github-actions Bot added the enhancement New feature or request label Aug 1, 2026
@ckuethe

ckuethe commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

The vision benchmarks are in their own file to make review easier.

GFX1152

Benchmark: ATH-MaaS_OvisOCR2
====================================================================================================

Backend: llamacpp/rocm (ctx=10319)
----------------------------------------------------------------------------------------------------
Scenario                      TTFT     min      max      TPS      min      max      VRAM (GB)
----------------------------------------------------------------------------------------------------
the-corona-story              3780.7   3780.7   3780.7   61.0     61.0     61.0     3.1     
declaration-of-independence   16932.2  16932.2  16932.2  56.7     56.7     56.7     3.3     
formulas-of-sputnik-1         2687.0   2687.0   2687.0   60.1     60.1     60.1     3.0     
formulas-of-sputnik-2         3029.5   3029.5   3029.5   60.8     60.8     60.8     2.9     
hexagon_1                     1906.7   1906.7   1906.7   61.3     61.3     61.3     3.0     
hexagon_3                     1911.3   1911.3   1911.3   61.5     61.5     61.5     3.0     
pamd_akm_0                    3372.2   3372.2   3372.2   58.8     58.8     58.8     3.1     
pamd_akm_4                    3512.5   3512.5   3512.5   60.8     60.8     60.8     3.1     
pamd_akm_6                    3491.4   3491.4   3491.4   61.0     61.0     61.0     3.1     
pamd_akm_7                    2639.0   2639.0   2639.0   61.2     61.2     61.2     3.1     
tiros                         3013.3   3013.3   3013.3   61.2     61.2     61.2     3.1     

Backend: llamacpp/vulkan (ctx=10319)
----------------------------------------------------------------------------------------------------
Scenario                      TTFT     min      max      TPS      min      max      VRAM (GB)
----------------------------------------------------------------------------------------------------
the-corona-story              4238.6   4238.6   4238.6   65.6     65.6     65.6     3.1     
declaration-of-independence   9116.4   9116.4   9116.4   63.6     63.6     63.6     3.2     
formulas-of-sputnik-1         2950.5   2950.5   2950.5   66.3     66.3     66.3     3.0     
formulas-of-sputnik-2         3365.8   3365.8   3365.8   66.7     66.7     66.7     3.0     
hexagon_1                     2093.6   2093.6   2093.6   66.6     66.6     66.6     3.0     
hexagon_3                     2125.4   2125.4   2125.4   67.3     67.3     67.3     3.0     
pamd_akm_0                    3646.4   3646.4   3646.4   67.2     67.2     67.2     3.0     
pamd_akm_4                    3787.1   3787.1   3787.1   66.5     66.5     66.5     3.1     
pamd_akm_6                    3867.8   3867.8   3867.8   66.4     66.4     66.4     3.1     
pamd_akm_7                    2145.1   2145.1   2145.1   67.1     67.1     67.1     3.0     
tiros                         3505.1   3505.1   3505.1   66.8     66.8     66.8     3.0     

GFX1151

Benchmark: ATH-MaaS_OvisOCR2
====================================================================================================

Backend: llamacpp/rocm (ctx=16384)
----------------------------------------------------------------------------------------------------
Scenario                      TTFT     min      max      TPS      min      max      VRAM (GB)
----------------------------------------------------------------------------------------------------
the-corona-story              863.1    863.1    863.1    143.7    143.7    143.7    1.9     
declaration-of-independence   2623.3   2623.3   2623.3   142.2    142.2    142.2    2.2     
formulas-of-sputnik-1         571.6    571.6    571.6    144.0    144.0    144.0    1.9     
formulas-of-sputnik-2         636.4    636.4    636.4    144.5    144.5    144.5    1.9     
hexagon_1                     432.4    432.4    432.4    144.5    144.5    144.5    1.9     
hexagon_3                     441.4    441.4    441.4    145.1    145.1    145.1    1.9     
pamd_akm_0                    691.3    691.3    691.3    145.9    145.9    145.9    1.9     
pamd_akm_4                    720.9    720.9    720.9    145.3    145.3    145.3    1.9     
pamd_akm_6                    729.0    729.0    729.0    144.5    144.5    144.5    1.9     
pamd_akm_7                    561.3    561.3    561.3    146.0    146.0    146.0    1.9     
tiros                         646.9    646.9    646.9    143.8    143.8    143.8    1.9     

Backend: llamacpp/vulkan (ctx=16384)
----------------------------------------------------------------------------------------------------
Scenario                      TTFT     min      max      TPS      min      max      VRAM (GB)
----------------------------------------------------------------------------------------------------
the-corona-story              968.7    968.7    968.7    148.0    148.0    148.0    2.0     
declaration-of-independence   2262.1   2262.1   2262.1   142.8    142.8    142.8    2.2     
formulas-of-sputnik-1         670.3    670.3    670.3    147.1    147.1    147.1    2.0     
formulas-of-sputnik-2         749.5    749.5    749.5    146.4    146.4    146.4    2.0     
hexagon_1                     463.1    463.1    463.1    147.6    147.6    147.6    2.0     
hexagon_3                     462.9    462.9    462.9    151.2    151.2    151.2    2.0     
pamd_akm_0                    804.4    804.4    804.4    151.7    151.7    151.7    2.0     
pamd_akm_4                    819.4    819.4    819.4    150.5    150.5    150.5    2.0     
pamd_akm_6                    844.9    844.9    844.9    149.4    149.4    149.4    2.0     
pamd_akm_7                    576.7    576.7    576.7    151.4    151.4    151.4    2.0     
tiros                         754.8    754.8    754.8    145.6    145.6    145.6    2.0     

GFX1100 RX7900

Benchmark: ATH-MaaS_OvisOCR2
====================================================================================================

Backend: llamacpp/rocm (ctx=262144)
----------------------------------------------------------------------------------------------------
Scenario                      TTFT     min      max      TPS      min      max      VRAM (GB)
----------------------------------------------------------------------------------------------------
the-corona-story              631.8    631.8    631.8    207.6    207.6    207.6    5.2     
declaration-of-independence   1483.2   1483.2   1483.2   200.7    200.7    200.7    5.4     
formulas-of-sputnik-1         527.6    527.6    527.6    208.2    208.2    208.2    5.1     
formulas-of-sputnik-2         570.5    570.5    570.5    202.8    202.8    202.8    5.1     
hexagon_1                     449.3    449.3    449.3    204.6    204.6    204.6    5.1     
hexagon_3                     446.5    446.5    446.5    207.2    207.2    207.2    5.1     
pamd_akm_0                    592.2    592.2    592.2    203.7    203.7    203.7    5.1     
pamd_akm_4                    605.8    605.8    605.8    202.1    202.1    202.1    5.1     
pamd_akm_6                    605.6    605.6    605.6    206.7    206.7    206.7    5.1     
pamd_akm_7                    515.6    515.6    515.6    210.8    210.8    210.8    5.1     
tiros                         574.1    574.1    574.1    202.8    202.8    202.8    5.1     

Backend: llamacpp/vulkan (ctx=262144)
----------------------------------------------------------------------------------------------------
Scenario                      TTFT     min      max      TPS      min      max      VRAM (GB)
----------------------------------------------------------------------------------------------------
the-corona-story              498.0    498.0    498.0    285.8    285.8    285.8    4.0     
declaration-of-independence   1040.8   1040.8   1040.8   281.7    281.7    281.7    4.2     
formulas-of-sputnik-1         312.3    312.3    312.3    286.2    286.2    286.2    4.0     
formulas-of-sputnik-2         327.3    327.3    327.3    286.1    286.1    286.1    4.0     
hexagon_1                     216.1    216.1    216.1    288.1    288.1    288.1    4.0     
hexagon_3                     217.1    217.1    217.1    287.9    287.9    287.9    4.0     
pamd_akm_0                    351.8    351.8    351.8    286.5    286.5    286.5    4.0     
pamd_akm_4                    360.9    360.9    360.9    287.0    287.0    287.0    4.0     
pamd_akm_6                    366.4    366.4    366.4    285.4    285.4    285.4    4.0     
pamd_akm_7                    254.1    254.1    254.1    286.3    286.3    286.3    4.0     
tiros                         333.5    333.5    333.5    285.9    285.9    285.9    4.0     

@bitgamma bitgamma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! This will need to be rebased off #2866 before it can be reviewed and merged, as significant refactoring has been performed.

@ckuethe

ckuethe commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

review/feedback can begin sooner than that. there's not much point in my rebasing to a pr that hasn't been merged or approved, especially if it changes parts my pr relies on.

Add ability to benchmark vision (multimodal) models by embedding images
into chat messages during text generation benchmarks. Vision scenarios
specify an image_path and messages; the CLI loads and base64-encodes the
image, then injects it into user message content arrays using the OpenAI
multimodal format before sending to the server.

Only allow vision-capable models to run vision scenarios

Only load image files from the scenario file directory for security

Source images for the tests taken from public domain sources:
- https://en.wikipedia.org/wiki/United_States_Declaration_of_Independence
- https://www.nro.gov/foia-home/
- https://ntrs.nasa.gov/
- https://www.cia.gov/readingroom/

Lots of challenging formatting, interesting fonts, and poor image quality.
The scan of a fax of a photocopy of a microfiche of a mimeograph image path
can really challenge the transcription models.

Co-authored-by: opencode, North-Mini-Code (512k)
Co-authored-by: opencode, Qwen3.6-35B-A3B (256k)
@ckuethe

ckuethe commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants