Deploy live MiniCPM-V vision defaults
Browse files- README.md +12 -13
- docs/DEVELOPMENT_STATUS.md +25 -8
- docs/MODEL_CARD.md +6 -6
- docs/RUNTIME.md +15 -5
- docs/SUBMISSION_GUIDE.md +3 -1
- pyproject.toml +2 -2
- scripts/check_space_vlm.py +3 -3
- tests/test_space_vlm_tooling.py +6 -2
README.md
CHANGED
|
@@ -23,13 +23,13 @@ Upload a photo of any everyday object. The app wakes it up, gives it a secret pe
|
|
| 23 |
|
| 24 |
## Current Status
|
| 25 |
|
| 26 |
-
Stable mock-safe
|
| 27 |
|
| 28 |
-
By default,
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
`OBJECTVERSE_TEXT_BACKEND=llama-cpp` can use a local GGUF model through optional `llama-cpp-python` when `TEXT_MODEL_PATH` is configured. The Modal-trained LoRA v2 adapter has been merged with `Qwen/Qwen2.5-1.5B-Instruct`, quantized to Q4_K_M, uploaded to the same model repo, and smoke-tested locally through llama.cpp. No GGUF file is committed in Git, and the public Space
|
| 33 |
|
| 34 |
`scripts/check_llama_cpp_smoke.py` passed locally on June 8, 2026 with `models/objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`. The published GGUF is available in `qqyule/objectverse-diary-qwen15b-lora` as `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`.
|
| 35 |
|
|
@@ -60,8 +60,8 @@ The interface is English-first and Chinese-second.
|
|
| 60 |
- [x] Off-Brand — archive-style Gradio UI, English-first with Chinese helper text.
|
| 61 |
- [x] Sharing is Caring — public mock traces, JSONL export, prompt templates, and failure notes.
|
| 62 |
- [x] Field Notes — article draft in `docs/FIELD_NOTES.md`.
|
| 63 |
-
- [x] OpenBMB Special — MiniCPM-V 2.6 wiring exists
|
| 64 |
-
- [x] Llama Champion — local llama.cpp GGUF runtime passed with the published LoRA v2 Q4_K_M model; Space text runtime remains mock
|
| 65 |
- [x] Well-Tuned — synthetic curated v2 SFT dataset and Qwen 1.5B LoRA v2 adapter are published.
|
| 66 |
- [ ] Off the Grid — no commercial AI APIs are used; final badge eligibility depends on hackathon review.
|
| 67 |
|
|
@@ -76,15 +76,14 @@ The interface is English-first and Chinese-second.
|
|
| 76 |
|
| 77 |
The hackathon budget is <= 32B total model parameters.
|
| 78 |
|
| 79 |
-
|
| 80 |
|
| 81 |
-
-
|
| 82 |
-
-
|
| 83 |
-
- optional wired vision model: MiniCPM-V 2.6, about 8B parameters when enabled
|
| 84 |
- optional text base for published LoRA v2 adapter: Qwen/Qwen2.5-1.5B-Instruct, about 1.5B parameters
|
| 85 |
- optional text GGUF: published `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`, about 1.5B base parameters plus a small merged LoRA delta; not committed to Git
|
| 86 |
|
| 87 |
-
The
|
| 88 |
|
| 89 |
## Run Locally
|
| 90 |
|
|
@@ -147,7 +146,7 @@ The stable submission baseline supports:
|
|
| 147 |
|
| 148 |
## Stable Submission Evidence
|
| 149 |
|
| 150 |
-
-
|
| 151 |
- Initial acceptance report: `docs/INITIAL_STAGE_REPORT.md`
|
| 152 |
- Runtime notes: `docs/RUNTIME.md`
|
| 153 |
- Dataset preview notes: `docs/DATASET.md`
|
|
@@ -203,7 +202,7 @@ See `docs/02-tech-architecture.md`, `AGENTS.md`, and `.codex/skills/` for the in
|
|
| 203 |
|
| 204 |
## Runtime Notes
|
| 205 |
|
| 206 |
-
The default runtime is mock-only. MiniCPM-V 2.6 vision and optional llama.cpp text generation can be enabled with environment variables while preserving mock fallbacks. See `docs/RUNTIME.md`.
|
| 207 |
|
| 208 |
## HF Space README YAML Header
|
| 209 |
|
|
|
|
| 23 |
|
| 24 |
## Current Status
|
| 25 |
|
| 26 |
+
Stable mock-safe local baseline, live MiniCPM-V Space vision, non-secret hosted vision diagnostics, optional llama.cpp text runtime wiring, a passing local LoRA v2 GGUF smoke test, public mock traces, Space validation evidence, a published curated v2 SFT dataset, a published Qwen 1.5B LoRA v2 adapter, and a published Q4_K_M GGUF are available.
|
| 27 |
|
| 28 |
+
By default, local development uses deterministic mock outputs for object understanding, persona generation, diary writing, chat replies, share card rendering, and trace saving. This keeps the local demo reproducible and avoids commercial AI APIs.
|
| 29 |
|
| 30 |
+
The public Hugging Face Space runs on ZeroGPU with `OBJECTVERSE_VISION_BACKEND=minicpm-v`, `VISION_MODEL_ID=openbmb/MiniCPM-V-2_6`, and `OBJECTVERSE_TEXT_BACKEND=mock`. The Space uses an `HF_TOKEN` secret with access to the gated `openbmb/MiniCPM-V-2_6` model; no token is committed to the repository.
|
| 31 |
|
| 32 |
+
`OBJECTVERSE_TEXT_BACKEND=llama-cpp` can use a local GGUF model through optional `llama-cpp-python` when `TEXT_MODEL_PATH` is configured. The Modal-trained LoRA v2 adapter has been merged with `Qwen/Qwen2.5-1.5B-Instruct`, quantized to Q4_K_M, uploaded to the same model repo, and smoke-tested locally through llama.cpp. No GGUF file is committed in Git, and the public Space intentionally keeps text generation on the mock runtime for this live MiniCPM-V release.
|
| 33 |
|
| 34 |
`scripts/check_llama_cpp_smoke.py` passed locally on June 8, 2026 with `models/objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`. The published GGUF is available in `qqyule/objectverse-diary-qwen15b-lora` as `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`.
|
| 35 |
|
|
|
|
| 60 |
- [x] Off-Brand — archive-style Gradio UI, English-first with Chinese helper text.
|
| 61 |
- [x] Sharing is Caring — public mock traces, JSONL export, prompt templates, and failure notes.
|
| 62 |
- [x] Field Notes — article draft in `docs/FIELD_NOTES.md`.
|
| 63 |
+
- [x] OpenBMB Special — MiniCPM-V 2.6 wiring exists, hosted ZeroGPU validation passed, and the public Space is configured for live MiniCPM-V vision with mock text.
|
| 64 |
+
- [x] Llama Champion — local llama.cpp GGUF runtime passed with the published LoRA v2 Q4_K_M model; Space text runtime remains mock for the live vision release.
|
| 65 |
- [x] Well-Tuned — synthetic curated v2 SFT dataset and Qwen 1.5B LoRA v2 adapter are published.
|
| 66 |
- [ ] Off the Grid — no commercial AI APIs are used; final badge eligibility depends on hackathon review.
|
| 67 |
|
|
|
|
| 76 |
|
| 77 |
The hackathon budget is <= 32B total model parameters.
|
| 78 |
|
| 79 |
+
Current live Space budget:
|
| 80 |
|
| 81 |
+
- live vision backend: MiniCPM-V 2.6, about 8B parameters
|
| 82 |
+
- live text backend: deterministic mock, 0 active model parameters
|
|
|
|
| 83 |
- optional text base for published LoRA v2 adapter: Qwen/Qwen2.5-1.5B-Instruct, about 1.5B parameters
|
| 84 |
- optional text GGUF: published `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`, about 1.5B base parameters plus a small merged LoRA delta; not committed to Git
|
| 85 |
|
| 86 |
+
The live public Space therefore stays within the 32B budget. MiniCPM-V plus the optional Qwen 1.5B text path would remain about 9.5B plus a small LoRA adapter, safely under the 32B budget.
|
| 87 |
|
| 88 |
## Run Locally
|
| 89 |
|
|
|
|
| 146 |
|
| 147 |
## Stable Submission Evidence
|
| 148 |
|
| 149 |
+
- Live MiniCPM-V Space: https://huggingface.co/spaces/build-small-hackathon/ObjectverseDiary
|
| 150 |
- Initial acceptance report: `docs/INITIAL_STAGE_REPORT.md`
|
| 151 |
- Runtime notes: `docs/RUNTIME.md`
|
| 152 |
- Dataset preview notes: `docs/DATASET.md`
|
|
|
|
| 202 |
|
| 203 |
## Runtime Notes
|
| 204 |
|
| 205 |
+
The local default runtime is mock-only. The public Space is configured for live MiniCPM-V 2.6 vision with mock text generation, and optional llama.cpp text generation can be enabled separately with environment variables while preserving mock fallbacks. See `docs/RUNTIME.md`.
|
| 206 |
|
| 207 |
## HF Space README YAML Header
|
| 208 |
|
docs/DEVELOPMENT_STATUS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Development Status
|
| 2 |
|
| 3 |
-
Last updated: 2026-06-
|
| 4 |
|
| 5 |
## Completed
|
| 6 |
|
|
@@ -27,6 +27,12 @@ Last updated: 2026-06-08
|
|
| 27 |
- failed L4 validation report at `docs/SPACE_VLM_REPORT.md`
|
| 28 |
- optional `--trace-output-dir` evidence export for validation traces
|
| 29 |
- Hosted MiniCPM-V 2.6 ZeroGPU validation passed on 2026-06-08 for public mug, keyboard, and shoe images after adding an `HF_TOKEN` Space secret for gated model access.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
- Real VLM trace evidence from the hosted validation is available under `data/traces/space-vlm/`; text generation remained mock by design.
|
| 31 |
- ZeroGPU compatibility:
|
| 32 |
- optional `src/utils/zero_gpu.py`
|
|
@@ -52,22 +58,32 @@ Last updated: 2026-06-08
|
|
| 52 |
|
| 53 |
## Not Completed
|
| 54 |
|
| 55 |
-
- Hosted Space text runtime validation with the published GGUF. The public Space still uses mock
|
| 56 |
- Real text model traces from the hosted non-mock text runtime.
|
| 57 |
- Published Field Notes URL, recorded demo video URL, social post URL, and final public submission.
|
| 58 |
|
| 59 |
-
## Current
|
|
|
|
|
|
|
| 60 |
|
| 61 |
- `OBJECTVERSE_VISION_BACKEND=mock`
|
| 62 |
- `OBJECTVERSE_TEXT_BACKEND=mock`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
- No commercial model API is used.
|
| 64 |
- GGUF files, tokens, credentials, and private images should not be committed.
|
| 65 |
|
| 66 |
## Next Recommended Gate
|
| 67 |
|
| 68 |
-
For
|
| 69 |
|
| 70 |
-
Next model gate:
|
| 71 |
|
| 72 |
Download or mount the published GGUF on the target runtime, set:
|
| 73 |
|
|
@@ -78,13 +94,12 @@ TEXT_MODEL_PATH=/absolute/path/to/objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf
|
|
| 78 |
|
| 79 |
Then rerun the local or Space smoke path before claiming live text runtime.
|
| 80 |
|
| 81 |
-
|
| 82 |
|
| 83 |
```bash
|
| 84 |
.venv/bin/python -B scripts/check_space_vlm.py \
|
| 85 |
--configure-space \
|
| 86 |
--hardware zero-a10g \
|
| 87 |
-
--rollback-to-mock \
|
| 88 |
--space-url https://huggingface.co/spaces/build-small-hackathon/ObjectverseDiary \
|
| 89 |
--output docs/SPACE_VLM_REPORT.md \
|
| 90 |
--json-output docs/SPACE_VLM_REPORT.json \
|
|
@@ -92,11 +107,13 @@ Optional rerun gate if Space variables, secrets, or dependencies change:
|
|
| 92 |
--timeout-seconds 1200
|
| 93 |
```
|
| 94 |
|
| 95 |
-
If
|
| 96 |
|
| 97 |
```bash
|
| 98 |
.venv/bin/python -B scripts/check_space_vlm.py \
|
| 99 |
--space-url https://huggingface.co/spaces/build-small-hackathon/ObjectverseDiary \
|
|
|
|
|
|
|
| 100 |
--skip-validation \
|
| 101 |
--rollback-to-mock
|
| 102 |
```
|
|
|
|
| 1 |
# Development Status
|
| 2 |
|
| 3 |
+
Last updated: 2026-06-09
|
| 4 |
|
| 5 |
## Completed
|
| 6 |
|
|
|
|
| 27 |
- failed L4 validation report at `docs/SPACE_VLM_REPORT.md`
|
| 28 |
- optional `--trace-output-dir` evidence export for validation traces
|
| 29 |
- Hosted MiniCPM-V 2.6 ZeroGPU validation passed on 2026-06-08 for public mug, keyboard, and shoe images after adding an `HF_TOKEN` Space secret for gated model access.
|
| 30 |
+
- Public Space live vision target:
|
| 31 |
+
- hardware: `zero-a10g`
|
| 32 |
+
- `OBJECTVERSE_VISION_BACKEND=minicpm-v`
|
| 33 |
+
- `VISION_MODEL_ID=openbmb/MiniCPM-V-2_6`
|
| 34 |
+
- `OBJECTVERSE_TEXT_BACKEND=mock`
|
| 35 |
+
- text generation intentionally remains mock for this release
|
| 36 |
- Real VLM trace evidence from the hosted validation is available under `data/traces/space-vlm/`; text generation remained mock by design.
|
| 37 |
- ZeroGPU compatibility:
|
| 38 |
- optional `src/utils/zero_gpu.py`
|
|
|
|
| 58 |
|
| 59 |
## Not Completed
|
| 60 |
|
| 61 |
+
- Hosted Space text runtime validation with the published GGUF. The public Space still uses mock text until this passes.
|
| 62 |
- Real text model traces from the hosted non-mock text runtime.
|
| 63 |
- Published Field Notes URL, recorded demo video URL, social post URL, and final public submission.
|
| 64 |
|
| 65 |
+
## Current Runtime Defaults
|
| 66 |
+
|
| 67 |
+
Local development:
|
| 68 |
|
| 69 |
- `OBJECTVERSE_VISION_BACKEND=mock`
|
| 70 |
- `OBJECTVERSE_TEXT_BACKEND=mock`
|
| 71 |
+
|
| 72 |
+
Live Space:
|
| 73 |
+
|
| 74 |
+
- `OBJECTVERSE_VISION_BACKEND=minicpm-v`
|
| 75 |
+
- `VISION_MODEL_ID=openbmb/MiniCPM-V-2_6`
|
| 76 |
+
- `OBJECTVERSE_TEXT_BACKEND=mock`
|
| 77 |
+
- hardware: `zero-a10g`
|
| 78 |
+
|
| 79 |
- No commercial model API is used.
|
| 80 |
- GGUF files, tokens, credentials, and private images should not be committed.
|
| 81 |
|
| 82 |
## Next Recommended Gate
|
| 83 |
|
| 84 |
+
For live vision, keep the Space on ZeroGPU with MiniCPM-V and rerun hosted validation after dependency, Space variable, or deploy changes.
|
| 85 |
|
| 86 |
+
Next text model gate:
|
| 87 |
|
| 88 |
Download or mount the published GGUF on the target runtime, set:
|
| 89 |
|
|
|
|
| 94 |
|
| 95 |
Then rerun the local or Space smoke path before claiming live text runtime.
|
| 96 |
|
| 97 |
+
Live VLM validation gate:
|
| 98 |
|
| 99 |
```bash
|
| 100 |
.venv/bin/python -B scripts/check_space_vlm.py \
|
| 101 |
--configure-space \
|
| 102 |
--hardware zero-a10g \
|
|
|
|
| 103 |
--space-url https://huggingface.co/spaces/build-small-hackathon/ObjectverseDiary \
|
| 104 |
--output docs/SPACE_VLM_REPORT.md \
|
| 105 |
--json-output docs/SPACE_VLM_REPORT.json \
|
|
|
|
| 107 |
--timeout-seconds 1200
|
| 108 |
```
|
| 109 |
|
| 110 |
+
If rollback is needed, use:
|
| 111 |
|
| 112 |
```bash
|
| 113 |
.venv/bin/python -B scripts/check_space_vlm.py \
|
| 114 |
--space-url https://huggingface.co/spaces/build-small-hackathon/ObjectverseDiary \
|
| 115 |
+
--configure-space \
|
| 116 |
+
--hardware zero-a10g \
|
| 117 |
--skip-validation \
|
| 118 |
--rollback-to-mock
|
| 119 |
```
|
docs/MODEL_CARD.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
|
| 3 |
## Status
|
| 4 |
|
| 5 |
-
Stable
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
-
Hosted MiniCPM-V validation passed
|
| 10 |
|
| 11 |
## Planned Components
|
| 12 |
|
|
@@ -18,8 +18,8 @@ Hosted MiniCPM-V validation passed on June 8, 2026 after adding an `HF_TOKEN` Sp
|
|
| 18 |
|
| 19 |
| Component | Candidate | Notes |
|
| 20 |
| --- | --- | --- |
|
| 21 |
-
| Vision | `openbmb/MiniCPM-V-2_6` or mock fallback |
|
| 22 |
-
| Text | deterministic mock text by default; published `Qwen/Qwen2.5-1.5B-Instruct` LoRA v2 Q4_K_M GGUF for local runtime | Adapter and GGUF published; Space text runtime remains mock
|
| 23 |
| Runtime | optional GGUF through llama.cpp / llama-cpp-python | Wired with mock fallback; local GGUF smoke passed on 2026-06-08. |
|
| 24 |
| UI | Gradio Blocks | Required by the hackathon and project rules. |
|
| 25 |
|
|
@@ -36,7 +36,7 @@ Record final numbers here before submission:
|
|
| 36 |
| Optional text base | `Qwen/Qwen2.5-1.5B-Instruct` | ~1.5B | yes, when enabled |
|
| 37 |
| Published LoRA v2 GGUF | `qqyule/objectverse-diary-qwen15b-lora` / `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf` | ~1.5B base, quantized file | yes, if enabled |
|
| 38 |
| Published LoRA adapter | `qqyule/objectverse-diary-qwen15b-lora` | small adapter over base model | yes, when enabled |
|
| 39 |
-
|
|
| 40 |
|
| 41 |
If the optional MiniCPM-V 2.6 vision path and planned Qwen 1.5B text base are both enabled, the expected total remains about 9.5B plus a small LoRA adapter, safely under the 32B project budget.
|
| 42 |
|
|
|
|
| 2 |
|
| 3 |
## Status
|
| 4 |
|
| 5 |
+
Stable local baseline plus live MiniCPM-V Space vision, one published text LoRA v2 adapter, and one published Q4_K_M GGUF. The public Gradio Space defaults to real MiniCPM-V object understanding with deterministic mock text; the GGUF has passed local llama.cpp smoke, but it has not been switched into the live Space runtime.
|
| 6 |
|
| 7 |
+
Local development defaults to deterministic mock backends. The hosted Space runs MiniCPM-V 2.6 vision on ZeroGPU with a hidden non-secret probe for diagnostics. Text generation has optional llama.cpp wiring for an externally configured GGUF model via `TEXT_MODEL_PATH`, but the live Space keeps text on the mock runtime for this release. A Modal LoRA v2 run completed, the adapter is published at `https://huggingface.co/qqyule/objectverse-diary-qwen15b-lora`, and the merged Q4_K_M GGUF is published in the same repo.
|
| 8 |
|
| 9 |
+
Hosted MiniCPM-V validation passed after adding an `HF_TOKEN` Space secret with access to the gated `openbmb/MiniCPM-V-2_6` model. The validation uses public mug, keyboard, and shoe images on ZeroGPU, while text generation intentionally remains mock. See `docs/SPACE_VLM_REPORT.md`.
|
| 10 |
|
| 11 |
## Planned Components
|
| 12 |
|
|
|
|
| 18 |
|
| 19 |
| Component | Candidate | Notes |
|
| 20 |
| --- | --- | --- |
|
| 21 |
+
| Vision | `openbmb/MiniCPM-V-2_6` or mock fallback | Live Space uses MiniCPM-V on ZeroGPU; local runtime can still default to mock. |
|
| 22 |
+
| Text | deterministic mock text by default; published `Qwen/Qwen2.5-1.5B-Instruct` LoRA v2 Q4_K_M GGUF for local runtime | Adapter and GGUF published; Space text runtime remains mock for the live vision release. |
|
| 23 |
| Runtime | optional GGUF through llama.cpp / llama-cpp-python | Wired with mock fallback; local GGUF smoke passed on 2026-06-08. |
|
| 24 |
| UI | Gradio Blocks | Required by the hackathon and project rules. |
|
| 25 |
|
|
|
|
| 36 |
| Optional text base | `Qwen/Qwen2.5-1.5B-Instruct` | ~1.5B | yes, when enabled |
|
| 37 |
| Published LoRA v2 GGUF | `qqyule/objectverse-diary-qwen15b-lora` / `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf` | ~1.5B base, quantized file | yes, if enabled |
|
| 38 |
| Published LoRA adapter | `qqyule/objectverse-diary-qwen15b-lora` | small adapter over base model | yes, when enabled |
|
| 39 |
+
| Live Space total | MiniCPM-V vision + mock text | ~8B active model parameters | <= 32B |
|
| 40 |
|
| 41 |
If the optional MiniCPM-V 2.6 vision path and planned Qwen 1.5B text base are both enabled, the expected total remains about 9.5B plus a small LoRA adapter, safely under the 32B project budget.
|
| 42 |
|
docs/RUNTIME.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
| 2 |
|
| 3 |
## Current Runtime
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
- `OBJECTVERSE_VISION_BACKEND=mock`
|
| 8 |
- `OBJECTVERSE_TEXT_BACKEND=mock`
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
- object understanding is generated by `src/models/vision_runner.py`
|
| 13 |
- persona, diary, and chat are generated by `src/models/llama_cpp_runner.py`
|
|
@@ -15,6 +15,16 @@ This means:
|
|
| 15 |
|
| 16 |
No commercial cloud AI APIs are used.
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
MiniCPM-V 2.6 vision can be enabled without changing the UI:
|
| 19 |
|
| 20 |
```bash
|
|
@@ -54,7 +64,7 @@ Local LoRA v2 GGUF status:
|
|
| 54 |
- Adapter / GGUF repo: `qqyule/objectverse-diary-qwen15b-lora`
|
| 55 |
- Published GGUF: `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`
|
| 56 |
- Local smoke: passed on 2026-06-08 with `llama-cpp text generation` and no `text-fallback-to-mock`
|
| 57 |
-
- Space runtime: not switched to llama.cpp
|
| 58 |
|
| 59 |
## Runtime Diagnostics
|
| 60 |
|
|
@@ -99,7 +109,7 @@ TEXT_MODEL_REVISION=
|
|
| 99 |
TRACE_OUTPUT_DIR=data/traces
|
| 100 |
```
|
| 101 |
|
| 102 |
-
For the hosted Space, set these Variables:
|
| 103 |
|
| 104 |
```bash
|
| 105 |
OBJECTVERSE_VISION_BACKEND=minicpm-v
|
|
@@ -107,7 +117,7 @@ VISION_MODEL_ID=openbmb/MiniCPM-V-2_6
|
|
| 107 |
OBJECTVERSE_TEXT_BACKEND=mock
|
| 108 |
```
|
| 109 |
|
| 110 |
-
Recommended Space hardware for this path is
|
| 111 |
|
| 112 |
For a Space or local runtime with a separately provided GGUF text model, set:
|
| 113 |
|
|
|
|
| 2 |
|
| 3 |
## Current Runtime
|
| 4 |
|
| 5 |
+
Local development defaults to deterministic mock paths:
|
| 6 |
|
| 7 |
- `OBJECTVERSE_VISION_BACKEND=mock`
|
| 8 |
- `OBJECTVERSE_TEXT_BACKEND=mock`
|
| 9 |
|
| 10 |
+
For local runs, this means:
|
| 11 |
|
| 12 |
- object understanding is generated by `src/models/vision_runner.py`
|
| 13 |
- persona, diary, and chat are generated by `src/models/llama_cpp_runner.py`
|
|
|
|
| 15 |
|
| 16 |
No commercial cloud AI APIs are used.
|
| 17 |
|
| 18 |
+
The public Hugging Face Space is configured differently for the live demo:
|
| 19 |
+
|
| 20 |
+
```bash
|
| 21 |
+
OBJECTVERSE_VISION_BACKEND=minicpm-v
|
| 22 |
+
VISION_MODEL_ID=openbmb/MiniCPM-V-2_6
|
| 23 |
+
OBJECTVERSE_TEXT_BACKEND=mock
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
The Space should run on `zero-a10g` so `@spaces.GPU` can allocate GPU time for MiniCPM-V requests. The required `HF_TOKEN` for gated `openbmb/MiniCPM-V-2_6` access is stored as a Space Secret and must not be committed.
|
| 27 |
+
|
| 28 |
MiniCPM-V 2.6 vision can be enabled without changing the UI:
|
| 29 |
|
| 30 |
```bash
|
|
|
|
| 64 |
- Adapter / GGUF repo: `qqyule/objectverse-diary-qwen15b-lora`
|
| 65 |
- Published GGUF: `objectverse-diary-qwen15b-lora-v2-q4_k_m.gguf`
|
| 66 |
- Local smoke: passed on 2026-06-08 with `llama-cpp text generation` and no `text-fallback-to-mock`
|
| 67 |
+
- Space runtime: live MiniCPM-V vision with mock text; not switched to llama.cpp text until a separate Space validation passes
|
| 68 |
|
| 69 |
## Runtime Diagnostics
|
| 70 |
|
|
|
|
| 109 |
TRACE_OUTPUT_DIR=data/traces
|
| 110 |
```
|
| 111 |
|
| 112 |
+
For the live hosted Space, set these Variables:
|
| 113 |
|
| 114 |
```bash
|
| 115 |
OBJECTVERSE_VISION_BACKEND=minicpm-v
|
|
|
|
| 117 |
OBJECTVERSE_TEXT_BACKEND=mock
|
| 118 |
```
|
| 119 |
|
| 120 |
+
Recommended Space hardware for this path is ZeroGPU `zero-a10g`. If live validation fails, use the rollback command in `docs/DEVELOPMENT_STATUS.md` to switch `OBJECTVERSE_VISION_BACKEND` back to `mock` and request `cpu-basic`.
|
| 121 |
|
| 122 |
For a Space or local runtime with a separately provided GGUF text model, set:
|
| 123 |
|
docs/SUBMISSION_GUIDE.md
CHANGED
|
@@ -20,6 +20,7 @@
|
|
| 20 |
- External setup checklist: `docs/EXTERNAL_SETUP.md`
|
| 21 |
- Space VLM validation report: `docs/SPACE_VLM_REPORT.md` currently passes for public mug, keyboard, and shoe images on ZeroGPU with `OBJECTVERSE_VISION_BACKEND=minicpm-v`.
|
| 22 |
- Space VLM diagnostics: hidden `/vision_runtime_probe` API confirms Torch/Transformers, CUDA, and MiniCPM-V model load status.
|
|
|
|
| 23 |
- Space VLM trace evidence: `data/traces/space-vlm/`
|
| 24 |
- Public mock traces: `data/traces/samples/`
|
| 25 |
- Stable demo baseline: Gradio example buttons replay committed sample traces first, then fall back to the live generation pipeline if a cached trace is missing.
|
|
@@ -42,7 +43,7 @@
|
|
| 42 |
|
| 43 |
## Not Completed Yet
|
| 44 |
|
| 45 |
-
- Hosted Space text runtime validation with the published GGUF. The local runtime passed, but the public Space
|
| 46 |
- Real text-model traces from the hosted Space.
|
| 47 |
- Field Notes publication URL, recorded demo video URL, social post URL, and final public submission.
|
| 48 |
|
|
@@ -50,6 +51,7 @@
|
|
| 50 |
|
| 51 |
- [x] Space is under the official organization.
|
| 52 |
- [x] Space MiniCPM-V validation passes for mug, keyboard, and shoe.
|
|
|
|
| 53 |
- [x] Space MiniCPM-V non-secret diagnostic probe is implemented locally.
|
| 54 |
- [x] Demo video script targets under 2 minutes.
|
| 55 |
- [x] README includes stable-baseline parameter budget and links to the model card.
|
|
|
|
| 20 |
- External setup checklist: `docs/EXTERNAL_SETUP.md`
|
| 21 |
- Space VLM validation report: `docs/SPACE_VLM_REPORT.md` currently passes for public mug, keyboard, and shoe images on ZeroGPU with `OBJECTVERSE_VISION_BACKEND=minicpm-v`.
|
| 22 |
- Space VLM diagnostics: hidden `/vision_runtime_probe` API confirms Torch/Transformers, CUDA, and MiniCPM-V model load status.
|
| 23 |
+
- Live Space runtime: ZeroGPU `zero-a10g` with `OBJECTVERSE_VISION_BACKEND=minicpm-v`, `VISION_MODEL_ID=openbmb/MiniCPM-V-2_6`, and `OBJECTVERSE_TEXT_BACKEND=mock`.
|
| 24 |
- Space VLM trace evidence: `data/traces/space-vlm/`
|
| 25 |
- Public mock traces: `data/traces/samples/`
|
| 26 |
- Stable demo baseline: Gradio example buttons replay committed sample traces first, then fall back to the live generation pipeline if a cached trace is missing.
|
|
|
|
| 43 |
|
| 44 |
## Not Completed Yet
|
| 45 |
|
| 46 |
+
- Hosted Space text runtime validation with the published GGUF. The local runtime passed, but the public Space intentionally remains on mock text for the live MiniCPM-V vision release.
|
| 47 |
- Real text-model traces from the hosted Space.
|
| 48 |
- Field Notes publication URL, recorded demo video URL, social post URL, and final public submission.
|
| 49 |
|
|
|
|
| 51 |
|
| 52 |
- [x] Space is under the official organization.
|
| 53 |
- [x] Space MiniCPM-V validation passes for mug, keyboard, and shoe.
|
| 54 |
+
- [x] Space is configured for live MiniCPM-V vision on ZeroGPU with mock text.
|
| 55 |
- [x] Space MiniCPM-V non-secret diagnostic probe is implemented locally.
|
| 56 |
- [x] Demo video script targets under 2 minutes.
|
| 57 |
- [x] README includes stable-baseline parameter budget and links to the model card.
|
pyproject.toml
CHANGED
|
@@ -16,5 +16,5 @@ dependencies = [
|
|
| 16 |
]
|
| 17 |
|
| 18 |
[tool.objectverse-diary]
|
| 19 |
-
status = "vlm-
|
| 20 |
-
implementation = "minicpm-v-
|
|
|
|
| 16 |
]
|
| 17 |
|
| 18 |
[tool.objectverse-diary]
|
| 19 |
+
status = "space-vlm-live-mock-text"
|
| 20 |
+
implementation = "minicpm-v-live-space-with-mock-text"
|
scripts/check_space_vlm.py
CHANGED
|
@@ -26,7 +26,7 @@ DEFAULT_OUTPUT_PATH = Path("docs/SPACE_VLM_REPORT.md")
|
|
| 26 |
DEFAULT_JSON_OUTPUT_PATH = Path("docs/SPACE_VLM_REPORT.json")
|
| 27 |
DEFAULT_ASSET_DIR = Path(".tmp/space-vlm-assets")
|
| 28 |
DEFAULT_FAILURE_NOTES_PATH = Path("docs/FAILURES.md")
|
| 29 |
-
DEFAULT_HARDWARE = "
|
| 30 |
MOCK_SAFE_HARDWARE = "cpu-basic"
|
| 31 |
GENERATE_API_NAME = "/generate_object_file"
|
| 32 |
PROBE_API_NAME = "/vision_runtime_probe"
|
|
@@ -385,7 +385,7 @@ def render_report(
|
|
| 385 |
if rollback:
|
| 386 |
lines.extend(["", *_config_lines("Rollback configuration", rollback)])
|
| 387 |
else:
|
| 388 |
-
lines.append("- Rollback configuration: not applied by this run.")
|
| 389 |
if configuration_error:
|
| 390 |
lines.extend(["", "## Configuration Error", "", f"- Error: `{configuration_error}`"])
|
| 391 |
|
|
@@ -422,7 +422,7 @@ def render_report(
|
|
| 422 |
"",
|
| 423 |
"- Test images are temporary public Wikimedia Commons assets and are not committed.",
|
| 424 |
"- No tokens, secrets, or private file paths should be recorded in this report.",
|
| 425 |
-
"- If validation fails, switch `OBJECTVERSE_VISION_BACKEND` back to `mock`
|
| 426 |
]
|
| 427 |
)
|
| 428 |
return "\n".join(lines) + "\n"
|
|
|
|
| 26 |
DEFAULT_JSON_OUTPUT_PATH = Path("docs/SPACE_VLM_REPORT.json")
|
| 27 |
DEFAULT_ASSET_DIR = Path(".tmp/space-vlm-assets")
|
| 28 |
DEFAULT_FAILURE_NOTES_PATH = Path("docs/FAILURES.md")
|
| 29 |
+
DEFAULT_HARDWARE = "zero-a10g"
|
| 30 |
MOCK_SAFE_HARDWARE = "cpu-basic"
|
| 31 |
GENERATE_API_NAME = "/generate_object_file"
|
| 32 |
PROBE_API_NAME = "/vision_runtime_probe"
|
|
|
|
| 385 |
if rollback:
|
| 386 |
lines.extend(["", *_config_lines("Rollback configuration", rollback)])
|
| 387 |
else:
|
| 388 |
+
lines.append("- Rollback configuration: not applied by this run; live MiniCPM-V configuration remains active.")
|
| 389 |
if configuration_error:
|
| 390 |
lines.extend(["", "## Configuration Error", "", f"- Error: `{configuration_error}`"])
|
| 391 |
|
|
|
|
| 422 |
"",
|
| 423 |
"- Test images are temporary public Wikimedia Commons assets and are not committed.",
|
| 424 |
"- No tokens, secrets, or private file paths should be recorded in this report.",
|
| 425 |
+
"- If live validation fails, run the documented rollback command to switch `OBJECTVERSE_VISION_BACKEND` back to `mock`.",
|
| 426 |
]
|
| 427 |
)
|
| 428 |
return "\n".join(lines) + "\n"
|
tests/test_space_vlm_tooling.py
CHANGED
|
@@ -8,6 +8,7 @@ from datetime import datetime, timezone
|
|
| 8 |
from pathlib import Path
|
| 9 |
|
| 10 |
from scripts.check_space_vlm import (
|
|
|
|
| 11 |
TEST_ASSETS,
|
| 12 |
ValidationResult,
|
| 13 |
extract_trace_record,
|
|
@@ -41,6 +42,9 @@ class SpaceVlmToolingTest(unittest.TestCase):
|
|
| 41 |
|
| 42 |
self.assertEqual(client_url, "https://build-small-hackathon-objectversediary.hf.space")
|
| 43 |
|
|
|
|
|
|
|
|
|
|
| 44 |
def test_zero_gpu_decorator_is_noop_without_spaces_package(self) -> None:
|
| 45 |
def sample(value: int) -> int:
|
| 46 |
return value + 1
|
|
@@ -149,8 +153,7 @@ class SpaceVlmToolingTest(unittest.TestCase):
|
|
| 149 |
repo_id="build-small-hackathon/ObjectverseDiary",
|
| 150 |
results=[result],
|
| 151 |
probe_result=_probe_result(minicpm_load_ok=True),
|
| 152 |
-
configured={"hardware": "
|
| 153 |
-
rollback={"hardware": "cpu-basic", "OBJECTVERSE_VISION_BACKEND": "mock"},
|
| 154 |
)
|
| 155 |
|
| 156 |
self.assertIn("Overall status: PASS", report)
|
|
@@ -158,6 +161,7 @@ class SpaceVlmToolingTest(unittest.TestCase):
|
|
| 158 |
self.assertIn("minicpm_load_ok", report)
|
| 159 |
self.assertIn("Running shoe", report)
|
| 160 |
self.assertIn("OBJECTVERSE_VISION_BACKEND", report)
|
|
|
|
| 161 |
self.assertNotIn("hf_", report.lower())
|
| 162 |
self.assertNotIn("HUGGINGFACE_TOKEN", report)
|
| 163 |
|
|
|
|
| 8 |
from pathlib import Path
|
| 9 |
|
| 10 |
from scripts.check_space_vlm import (
|
| 11 |
+
DEFAULT_HARDWARE,
|
| 12 |
TEST_ASSETS,
|
| 13 |
ValidationResult,
|
| 14 |
extract_trace_record,
|
|
|
|
| 42 |
|
| 43 |
self.assertEqual(client_url, "https://build-small-hackathon-objectversediary.hf.space")
|
| 44 |
|
| 45 |
+
def test_default_hardware_targets_zero_gpu_live_space(self) -> None:
|
| 46 |
+
self.assertEqual(DEFAULT_HARDWARE, "zero-a10g")
|
| 47 |
+
|
| 48 |
def test_zero_gpu_decorator_is_noop_without_spaces_package(self) -> None:
|
| 49 |
def sample(value: int) -> int:
|
| 50 |
return value + 1
|
|
|
|
| 153 |
repo_id="build-small-hackathon/ObjectverseDiary",
|
| 154 |
results=[result],
|
| 155 |
probe_result=_probe_result(minicpm_load_ok=True),
|
| 156 |
+
configured={"hardware": "zero-a10g", "OBJECTVERSE_VISION_BACKEND": "minicpm-v"},
|
|
|
|
| 157 |
)
|
| 158 |
|
| 159 |
self.assertIn("Overall status: PASS", report)
|
|
|
|
| 161 |
self.assertIn("minicpm_load_ok", report)
|
| 162 |
self.assertIn("Running shoe", report)
|
| 163 |
self.assertIn("OBJECTVERSE_VISION_BACKEND", report)
|
| 164 |
+
self.assertIn("live MiniCPM-V configuration remains active", report)
|
| 165 |
self.assertNotIn("hf_", report.lower())
|
| 166 |
self.assertNotIn("HUGGINGFACE_TOKEN", report)
|
| 167 |
|