@echo off rem ===================================================================== rem MiniCPM-V 4.7 1B VLM (text tower + vision tower) for RK1828. rem Converted 2026-11-03/04 from openbmb/MiniCPM-V-4.7-1B via the rem official rknn3-model-zoo Qwen3_5 pipeline (w4a16 + normal + group32). rem rem Text tower : Qwen3.5-0.8B architecture, vocab 248094, rem tie_word_embeddings=false (independent w6a16 lm_head). rem Vision : fixed 448x448 single image, output [1,196,1024]. rem The 196 tokens are a 8x8 -> 14x14 nearest-neighbor rem resample ADAPTER (runtime demands 14x14); NOT native 4.7. rem Image input: POST /v1/chat/completions with content[] image_url + rem base64 data URI. Do NOT put placeholder tokens in text. rem Limits : no canvas mRoPE / multi-resolution tiling verified; rem complex-image accuracy not calibrated. See docs 21 / 9.9. rem rem IMPORTANT: keep this file pure ASCII + CRLF. rem ===================================================================== setlocal if "%RK_HOST%"=="" set RK_HOST=0.0.0.0 if "%RK_PORT%"=="" set RK_PORT=8899 rem Locate the RKNN3 runtime (repo layout: \rknn\ ; package layout: models\\) set "RT=%~dp0..\runtime\rknn3_110" if not exist "%RT%\bin" set "RT=%~dp0..\..\runtime\rknn3_110" if not exist "%RT%\bin" if not "%RK_RUNTIME%"=="" set "RT=%RK_RUNTIME%" if not exist "%RT%\bin" goto no_runtime set "PATH=%RT%\bin;%RT%\lib;%PATH%" cd /d "%~dp0" goto run :no_runtime echo [start.cmd] RKNN3 runtime not found with rkllm3-server.exe. echo [start.cmd] looked in %~dp0..\runtime\rknn3_110 and ..\..\runtime\rknn3_110 endlocal exit /b 1 :run rkllm3-server -m "MiniCPM-V-4.7-1B-llm.rknn" --weight "MiniCPM-V-4.7-1B-llm.weight" ^ --vocab "MiniCPM-V-4.7-1B-llm.tokenizer.gguf" --embed "MiniCPM-V-4.7-1B-llm.embed.bin" ^ --model2 "MiniCPM-V-4.7-1B-vision.rknn" --weight2 "MiniCPM-V-4.7-1B-vision.weight" ^ --img-start "" --img-end "" --img-content "<|image_pad|>" ^ --img-width 448 --img-height 448 ^ --host "%RK_HOST%" --port "%RK_PORT%" ^ -c 0 --n_predict 512 --top-k 20 --top-p 0.95 --temp 0.7 --repeat-penalty 1.03 endlocal exit /b 0