Skip to content

QVAC-23075 test[skiplog]: DO NOT MERGE, overlay-pinned CI proof for VisionPsy Nano - #3726

Closed
yingying0906 wants to merge 3 commits into
mainfrom
bench/QVAC-23075-visionpsy-vlm
Closed

QVAC-23075 test[skiplog]: DO NOT MERGE, overlay-pinned CI proof for VisionPsy Nano#3726
yingying0906 wants to merge 3 commits into
mainfrom
bench/QVAC-23075-visionpsy-vlm

Conversation

@yingying0906

@yingying0906 yingying0906 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

  • The VisionPsy addon and SDK work cannot compile against the published qvac-fabric, because the key it forwards, mtmd_context_params.image_no_upscale, only exists on a fabric branch. So the real PR's own CI is red for a reason that has nothing to do with whether the code is correct.
  • Reviewers need to see the stack actually build and run on devices before the registry publish, not after.

📝 How does it solve it?

  • Carries the same commits as the companion PR, plus one that adds a vcpkg overlay port pinning qvac-fabric to the VisionPsy fabric branch HEAD.
  • With the overlay in place all 9 prebuild platforms compile the branch, including android-arm64, so the mobile legs run branch-built native code on real phones.

The overlapping diff is deliberate. on-pr-*.yml triggers only on branches: [main], so a PR based on the companion branch would run no CI at all and prove nothing.

🧪 How was it tested?

Run 31189679101, visionpsy-q4 at smoke on an S25 Ultra and a Linux GPU runner:

leg encode ms TTFT ms decode tps tiles
linux GPU Vulkan 141.5 244 386.2 13
s25 CPU 6088.1 7991 105.5 13
s25 GPU Adreno OpenCL 3002.9 4288 79.7 13

The Adreno leg is the interesting one. It used to abort during model load and was absent from the report entirely; it now passes with the same 13 tiles its CPU leg reports, so the OpenCL path is doing the same work rather than skipping it.

Broader matrix, run #325, cognitive preset, 175 samples, 0 errors: quality flat at 70.9 to 71.4 across Vulkan on RTX 4000 Ada, Metal and CPU on iPhone 17, Mali Vulkan and CPU on Pixel 9, and CPU on S25.

This PR must never be merged. The overlay pins a branch SHA, and a branch SHA must not reach main. It exists only as CI evidence and will be closed unmerged once the fabric tag is published to the vcpkg registry, which makes the overlay unnecessary.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

License compliance — clean

No new dependency license findings in this PR.

Warn-only (shadow) mode — this check does not block merges yet.

Updated automatically by the canonical license compliance workflow.

NOTICE presence (advisory)

Missing NOTICE (advisory, does not block):

  • ./.github/actions/release-merge-guard
  • ./packages/vla-ggml/sim/server
  • ./packages/asr-ggml/benchmarks/server
  • ./packages/embed-llamacpp/benchmarks/performance
  • ./packages/embed-llamacpp/benchmarks/server
  • ./packages/llm-llamacpp/benchmarks/performance
  • ./packages/llm-llamacpp/benchmarks/server
  • ./packages/ggml-coload-smoke
  • ./packages/sdk/e2e
  • ./packages/inference
  • ./packages/fabric/test/integration
  • ./docs/website

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Workflow security (shadow mode)

zizmor found 1117 finding(s) in .github/ (highest severity: high). This check is warn-only and does not block the merge.

Findings are annotated inline on the changed files and listed in the job summary.

Reproduce locally:

pipx run zizmor==1.27.0 --offline .github/

@yingying0906

Copy link
Copy Markdown
Contributor Author

CI evidence for #3725. Not for merging: the overlay pins a fabric branch SHA. Closes unmerged once tetherto/qvac-fabric-llm.cpp#205 is tagged and published to the vcpkg registry.

… benchmark

The native CLI can select VisionPsy Flash's preprocessing rule with a flag, but the
addon could not, so every addon leg, which is what the phones run, measured Flash
weights under base preprocessing. Nothing in the published Flash mmproj distinguishes
it from the base one, so there is no way to infer it.

Add image-no-upscale / image_no_upscale to the addon load-config handlers, forward it
into mtmd_context_params, and declare it in the SDK config schema. The handler only
ever writes 0 or 1. Leaving the key out keeps fabric's -1 model-default sentinel, so
no existing caller changes behaviour; there is a unit test for exactly that. Needs the
fabric side released first, since the key does not compile without
mtmd_context_params.image_no_upscale.

Pin the VisionPsy blobs in models.manifest.json and add catalog entries for q4_0,
q8_0 and iq3_m across both checkpoints. Select the preprocessing rule on both engines,
cliArgs for the native CLI and a new per-model addonConfig field for the addon.

Three benchmark bugs are fixed along the way, all independent of VisionPsy:

  several-sources ignored matrix_models and always ran config.sourcesModel, so a
  dispatch asking for another model measured qwen and stayed green. A CLI-source
  dispatch also forced an addon leg, which then failed on a projector type that only
  exists on a fabric branch, before the CLI step ran.

  Encode-ms parsing only matched "image slice encoded in N ms" from
  mtmd_helper_eval_chunks, which llama-mtmd-cli never calls; it logs "mtmd batch
  encoding done in N ms" instead, so ttft_ms was empty on every CLI leg.

  The report's own mmproj-enc and tiles columns hold a second copy of that regex in
  aggregate.js, so they stayed blank after the parser fix. Fix both, and surface
  rss_mb, which was read from /usr/bin/time -v and then thrown away.

Measured over run #325, cognitive preset, 175 samples, 0 errors: quality is flat at
70.9 to 71.4 across Vulkan on RTX 4000 Ada, Metal and CPU on iPhone 17, Mali Vulkan
and CPU on Pixel 9, and CPU on S25. The addon key is proven live on device, not only
in unit tests: image-no-upscale: on appears in the addon config in logcat, and
vision_enc_tiles is 3 for a 2x1 slice grid and 5 for a 2x2, where base preprocessing
gives 13 to 17.
#3195 made models.manifest.json the only source of model URLs, keyed by modelName, but
the vlm-benchmark catalog kept its own reg-* names, and those are not manifest keys, so
resolveModelEntry throws before an addon leg reaches the disk. CLI legs never hit it
because the workflow curls those blobs itself, which is why it stayed green.

Three of the five blobs are byte-identical to manifest entries that already exist under
other keys, so repointing modelName migrates them with no new pins. The two mmprojs
need real entries, both warm: false so they stay out of every cache-models warm step.

Only the qwen and gemma entries are affected. The VisionPsy entries were pinned
correctly when they were added.
…isionPsy mobile

Points the addon's vcpkg dependency at the VisionPsy fabric branch HEAD so mobile
legs, which build the addon rather than a native CLI, compile against
PROJECTOR_TYPE_VISIONPSY, mtmd_context_params.image_no_upscale and the Adreno q8_0
transpose guard. The published qvac-fabric version has none of them.

Never merge this. The REF is a branch SHA, and it dies with the registry publish.
@yingying0906
yingying0906 force-pushed the bench/QVAC-23075-visionpsy-vlm branch from 6f10d2e to ebde13e Compare August 7, 2026 17:14
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

VLM Matrix Benchmark

Run #331full report

VLM Matrix — several-sources / cognitive (run #331)

Mode: several sources (engine varies; model fixed) · Engine: addon

Preset: cognitive (task set + samples per leg)

one fixed model across inference engines · quality = lmms-eval (VQA / ANLS / relaxed / MC), equal-weight mean across tasks.

1 · Highlights

Inference engines on the same model: addon@candidate.

Quality — overall % per source

Platform · device addon@candidate
linux · GPU 71.4
pixel9 · CPU 71.0
pixel9 · GPU 71.0
s25 · CPU 71.0
s25 · GPU 71.0

Speed — mmproj-encode ms per source (lower = faster)

Platform · device addon@candidate
linux · GPU 44.5
pixel9 · CPU 6807.6
pixel9 · GPU 8027.8
s25 · CPU 2172.2
s25 · GPU 1160.4

2 · Details

Sources — resolved versions

Source Resolved version
addon@candidate git:6f10d2ef2af60c635b5d0b53e77ccc04e01be671
  • addon: @qvac/llm-llamacpp@0.40.0 (published prebuild)
  • benchmark code: 6f10d2ef2af60c635b5d0b53e77ccc04e01be671 (ref bench/QVAC-23075-visionpsy-vlm)
  • engine: @qvac/llm-llamacpp addon (published prebuild)

Models & origins (Source = Registry / HF / S3 / URL · pinned commits)

Cell main model mmproj
addon@candidate HF · qvac/VisionPsy-Nano-460M-Flash-GGUFs@a24fb9cdd1 · q4_0 HF · qvac/VisionPsy-Nano-460M-Flash-GGUFs@a24fb9cdd1 · mmproj-Q8

Provenance — hardware & software

linux · gpu (runner qvac-ubuntu2404-x64-gpu)

  • node: v22.22.3 · bare: v1.31.0
  • os: Ubuntu 24.04.4 LTS x86_64
  • cpu: 13th Gen Intel(R) Core(TM) i5-13500 (20 cores)
  • ram: 62Gi
  • gpu: NVIDIA RTX 4000 SFF Ada Generation

pixel9 — Google Pixel 9 (AWS Device Farm)

  • device: Pixel 9 · Android 15 · arm64-v8a
  • ram: 11.3 GB · gpu: Mali-G715 (Vulkan)

s25 — Samsung Galaxy S25 Ultra (AWS Device Farm)

  • device: SM-S938U1 · Android 15 · arm64-v8a
  • ram: 10.9 GB · gpu: Adreno 830 (Vulkan)

Quality (%)

Config host textvqa vizwiz gqa docvqa ai2d Overall %
addon@candidate · GPU linux 55.0 88.8 73.3 80.0 60.0 71.4
addon@candidate · CPU pixel9 55.0 86.7 73.3 80.0 60.0 71.0
addon@candidate · GPU pixel9 55.0 86.7 73.3 80.0 60.0 71.0
addon@candidate · CPU s25 55.0 86.7 73.3 80.0 60.0 71.0
addon@candidate · GPU s25 55.0 86.7 73.3 80.0 60.0 71.0

Quality by task (% — higher better, mean across platforms; one column per source)

Task addon@candidate
TextVQA — read text in natural photos 55.0
VizWiz — photo questions 87.1
GQA — compositional scene reasoning 73.3
DocVQA — document understanding (ANLS) 80.0
AI2D — science-diagram multiple choice 60.0

Speed

Config host n err mmproj enc (ms) tiles TTFT (ms) encode TPS decode TPS gen (ms) wall (ms)
addon@candidate · GPU linux 25 0 44.5 4.0 82 3867.6 335.3 98 180
addon@candidate · CPU pixel9 25 0 6807.6 4.0 8682 36.4 13.6 387 9069
addon@candidate · GPU pixel9 25 0 8027.8 4.0 10686 29.4 35.9 438 11124
addon@candidate · CPU s25 25 0 2172.2 4.0 2696 116.9 91.2 126 2822
addon@candidate · GPU s25 25 0 1160.4 4.0 1617 197.4 70.9 142 1759

mmproj enc is the pure ViT vision-encode time (and tiles its slice count). CLI legs parse llama.cpp's native stderr (slice encoded in N ms, or mtmd batch encoding done in N ms when the CLI runs its own encode loop); addon legs read the in-process visionEncodeMs/visionEncodeTiles runtime stats (same ViT encode) — so both columns are populated on every platform, including mobile (Device Farm), where the native stderr line is not captured. encode TPS = prompt + image tokens ÷ TTFT (prefill ingest rate); decode TPS is the generation rate; gen (ms) = wall − TTFT (the response-generation/decode phase). encode TPS and gen (ms) are reported on every platform that emits token counts, where it does not.

Peak memory (RSS)

Config host device peak RSS (MB)
addon@candidate linux GPU 634
addon@candidate pixel9 CPU 1128
addon@candidate pixel9 GPU 1773
addon@candidate s25 CPU 1130
addon@candidate s25 GPU 1130

Peak RSS is the process high-water mark (max across measured blocks), from the runtime's getrusage — populated on desktop (Linux / macOS / Windows) and Android. A row shows only where the platform doesn't expose it.

3 · Test Results (per platform)

Platform Metric Count
linux samples run 25
linux passed (inference ok) 25
linux failed 0
pixel9 samples run 50
pixel9 passed (inference ok) 50
pixel9 failed 0
s25 samples run 50
s25 passed (inference ok) 50
s25 failed 0

4 · Image samples

Task Image Resolution (W×H)
ai2d vlmx-ai2d_0.jpg 350×300
ai2d vlmx-ai2d_1.jpg 500×361
ai2d vlmx-ai2d_2.jpg 576×396
ai2d vlmx-ai2d_3.jpg 591×688
ai2d vlmx-ai2d_4.jpg 864×592
docvqa vlmx-docvqa_0.jpg 646×440
docvqa vlmx-docvqa_1.jpg 904×725
docvqa vlmx-docvqa_2.jpg 957×990
docvqa vlmx-docvqa_3.jpg 957×990
docvqa vlmx-docvqa_4.jpg 1024×834
gqa vlmx-gqa_0.jpg 500×331
gqa vlmx-gqa_1.jpg 427×640
gqa vlmx-gqa_2.jpg 640×425
gqa vlmx-gqa_3.jpg 640×428
gqa vlmx-gqa_4.jpg 640×427
textvqa vlmx-textvqa_0.jpg 1024×681
textvqa vlmx-textvqa_1.jpg 1024×768
textvqa vlmx-textvqa_2.jpg 1024×768
textvqa vlmx-textvqa_3.jpg 1024×768
textvqa vlmx-textvqa_4.jpg 1024×765
vizwiz vlmx-vizwiz_0.jpg 360×480
vizwiz vlmx-vizwiz_1.jpg 360×480
vizwiz vlmx-vizwiz_2.jpg 484×648
vizwiz vlmx-vizwiz_3.jpg 768×1024
vizwiz vlmx-vizwiz_4.jpg 768×1024

@yingying0906

Copy link
Copy Markdown
Contributor Author

Closing. This never merges by design, and as a PR it reads as a 21-file duplicate of #3725: it is that branch plus one overlay commit, so GitHub shows the full distance from main.

The branch bench/QVAC-23075-visionpsy-vlm stays pushed and keeps working. CI and benchmark dispatches run off a branch ref and need no PR:

gh workflow run on-pr-llm-llamacpp.yml -R tetherto/qvac --ref bench/QVAC-23075-visionpsy-vlm

Evidence links moved to #3725.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant