Skip to content

Commit bf157e2

Browse files
committed
Swap CI vision test image to author-licensed (MIT) Commons file
The previous default (Red_Apple.jpg) was CC-BY 2.0, not CC0 / public domain as the surrounding comments claimed - it requires attribution that the test scaffold did not supply. Replace with File:20200601_135745_Flowers_and_Bees.jpg from Wikimedia Commons by Bernard Ladenthin (the project copyright holder), which the same author additionally grants under MIT for use in this project. Fetch via Special:FilePath?width=640 so CI pulls a ~80 KB thumbnail instead of the multi-MB original phone photo. Updates - publish.yml VISION_IMAGE_URL / _NAME swapped; the comment block above the env vars now records the original Commons file, the author, the Commons license (CC-BY-4.0), and the MIT grant to this project. - All four 'Download CC0 / public-domain test image' step names renamed to 'Download MIT-granted test image (by project author, see env block)'. - validate-models.sh OPTIONAL_IMAGES entry updated to the new filename. - MultimodalIntegrationTest javadoc adds an Image source section recording the Commons URL + author + CC-BY-4.0 / MIT dual grant. - docs/history/49be664_open_issues.md recommended-sequencing entry no longer calls the image CC0 / PD. Verified - mvn test -Dtest='ContentPartTest,MultimodalMessagesTest,MultimodalIntegrationTest' BUILD SUCCESS: 25 unit tests pass, integration test self-skips (no -D system properties locally).
1 parent 594c26c commit bf157e2

4 files changed

Lines changed: 30 additions & 17 deletions

File tree

.github/validate-models.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ OPTIONAL_MODELS=(
2626
)
2727

2828
OPTIONAL_IMAGES=(
29-
"models/Red_Apple.jpg"
29+
"models/20200601_135745_Flowers_and_Bees.jpg"
3030
)
3131

3232
validate_gguf() {

.github/workflows/publish.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ env:
3030
VISION_MODEL_NAME: "SmolVLM-500M-Instruct-Q8_0.gguf"
3131
VISION_MMPROJ_URL: "https://huggingface.co/ggml-org/SmolVLM-500M-Instruct-GGUF/resolve/main/mmproj-SmolVLM-500M-Instruct-Q8_0.gguf"
3232
VISION_MMPROJ_NAME: "mmproj-SmolVLM-500M-Instruct-Q8_0.gguf"
33-
# Small CC0 / public-domain test image from Wikimedia Commons. A simple
34-
# subject (red apple, ~12 KB) so a 500M vision model has a fair chance of
35-
# producing recognisable output; the test only asserts a non-empty reply
36-
# so model accuracy is not the gating signal.
37-
VISION_IMAGE_URL: "https://upload.wikimedia.org/wikipedia/commons/1/15/Red_Apple.jpg"
38-
VISION_IMAGE_NAME: "Red_Apple.jpg"
33+
# Small test image used by MultimodalIntegrationTest. The original photo is
34+
# File:20200601_135745_Flowers_and_Bees.jpg on Wikimedia Commons by
35+
# Bernard Ladenthin (the project copyright holder), licensed there as
36+
# CC-BY-4.0 but granted MIT for use in this project by the same author
37+
# (see commit message + SPDX header on .github/workflows/publish.yml).
38+
# We fetch a 640px-wide thumbnail via Special:FilePath (~80 KB) so CI
39+
# bandwidth stays bounded; the on-disk filename keeps the original stem
40+
# for traceability back to the Commons file.
41+
VISION_IMAGE_URL: "https://commons.wikimedia.org/wiki/Special:FilePath/20200601_135745_Flowers_and_Bees.jpg?width=640"
42+
VISION_IMAGE_NAME: "20200601_135745_Flowers_and_Bees.jpg"
3943
permissions:
4044
contents: read
4145
jobs:
@@ -411,7 +415,7 @@ jobs:
411415
run: curl -L --fail ${VISION_MODEL_URL} --create-dirs -o models/${VISION_MODEL_NAME}
412416
- name: Download vision mmproj
413417
run: curl -L --fail ${VISION_MMPROJ_URL} --create-dirs -o models/${VISION_MMPROJ_NAME}
414-
- name: Download CC0 / public-domain test image
418+
- name: Download MIT-granted test image (by project author, see env block)
415419
run: curl -L --fail -A "java-llama.cpp-ci/1.0" "${VISION_IMAGE_URL}" --create-dirs -o models/${VISION_IMAGE_NAME}
416420
- name: List files in models directory
417421
run: ls -l models/
@@ -484,7 +488,7 @@ jobs:
484488
run: curl -L --fail ${VISION_MODEL_URL} --create-dirs -o models/${VISION_MODEL_NAME}
485489
- name: Download vision mmproj
486490
run: curl -L --fail ${VISION_MMPROJ_URL} --create-dirs -o models/${VISION_MMPROJ_NAME}
487-
- name: Download CC0 / public-domain test image
491+
- name: Download MIT-granted test image (by project author, see env block)
488492
run: curl -L --fail -A "java-llama.cpp-ci/1.0" "${VISION_IMAGE_URL}" --create-dirs -o models/${VISION_IMAGE_NAME}
489493
- name: List files in models directory
490494
run: ls -l models/
@@ -547,7 +551,7 @@ jobs:
547551
run: curl -L --fail ${VISION_MODEL_URL} --create-dirs -o models/${VISION_MODEL_NAME}
548552
- name: Download vision mmproj
549553
run: curl -L --fail ${VISION_MMPROJ_URL} --create-dirs -o models/${VISION_MMPROJ_NAME}
550-
- name: Download CC0 / public-domain test image
554+
- name: Download MIT-granted test image (by project author, see env block)
551555
run: curl -L --fail -A "java-llama.cpp-ci/1.0" "${VISION_IMAGE_URL}" --create-dirs -o models/${VISION_IMAGE_NAME}
552556
- name: List files in models directory
553557
run: ls -l models/
@@ -613,7 +617,7 @@ jobs:
613617
run: curl -L --fail $env:VISION_MODEL_URL --create-dirs -o models/$env:VISION_MODEL_NAME
614618
- name: Download vision mmproj
615619
run: curl -L --fail $env:VISION_MMPROJ_URL --create-dirs -o models/$env:VISION_MMPROJ_NAME
616-
- name: Download CC0 / public-domain test image
620+
- name: Download MIT-granted test image (by project author, see env block)
617621
run: curl -L --fail -A "java-llama.cpp-ci/1.0" $env:VISION_IMAGE_URL --create-dirs -o models/$env:VISION_IMAGE_NAME
618622
- name: List files in models directory
619623
run: ls -l models/

docs/history/49be664_open_issues.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,9 @@ the same pattern as the existing CodeLlama / Jina-Reranker model downloads.
939939
`InferenceParameters.setMessages(List<ChatMessage>)`) plus a
940940
`MultimodalIntegrationTest` gated on `net.ladenthin.llama.vision.model`,
941941
`.vision.mmproj`, and `.vision.image` system properties. CI in
942-
`publish.yml` downloads a small vision model + mmproj + a CC0 / PD
943-
image and passes the paths on the `mvn test` command line.
942+
`publish.yml` downloads a small vision model + mmproj + an author-
943+
licensed (MIT-granted) test image from Wikimedia Commons and passes
944+
the paths on the `mvn test` command line.
944945
4. **Fourth PR (CI):** add an Android emulator job to formally close #121 and
945946
#50.
946947

src/test/java/net/ladenthin/llama/MultimodalIntegrationTest.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,21 @@
3737
* files explicitly). See {@code .github/workflows/publish.yml} env vars
3838
* {@code VISION_MODEL_URL} / {@code VISION_MMPROJ_URL} / {@code VISION_IMAGE_URL}.</p>
3939
*
40+
* <p><b>Image source:</b> the CI default is
41+
* <a href="https://commons.wikimedia.org/wiki/File:20200601_135745_Flowers_and_Bees.jpg">
42+
* {@code File:20200601_135745_Flowers_and_Bees.jpg}</a> on Wikimedia Commons
43+
* by Bernard Ladenthin (the project copyright holder); published there under
44+
* CC-BY-4.0 and additionally granted under MIT to this project by the same
45+
* author. Any image the test machine can reach works at runtime &#x2014; the
46+
* URL is just an env var.</p>
47+
*
4048
* <p>Closes issues #103 and #34.</p>
4149
*/
4250
@ClaudeGenerated(
43-
purpose = "End-to-end vision regression: real vision GGUF + mmproj + CC0 image fed through " +
44-
"the typed ChatMessage(role, List<ContentPart>) API; asserts non-empty reply to "
45-
+ "prove the OAI multipart content round-trips through the upstream mtmd pipeline. "
46-
+ "Closes #103 / #34."
51+
purpose = "End-to-end vision regression: real vision GGUF + mmproj + author-licensed (MIT) "
52+
+ "test image fed through the typed ChatMessage(role, List<ContentPart>) API; "
53+
+ "asserts non-empty reply to prove the OAI multipart content round-trips through "
54+
+ "the upstream mtmd pipeline. Closes #103 / #34."
4755
)
4856
public class MultimodalIntegrationTest {
4957

0 commit comments

Comments
 (0)