@echo off setlocal rem Ember quick launcher: put this next to ember-serve.exe, Ember-2-Mini.gguf and dflash2-Inkling-2-Mini-IQ4_NL.gguf. rem Usage: ember.bat [context] (default 131072; fits a 16 GB card on Windows) cd /d "%~dp0" set "CTX=%~1" if "%CTX%"=="" set "CTX=131072" set "EMBER_SPEC_ADAPT=0" if not exist "Ember-2-Mini.gguf" ( echo Ember-2-Mini.gguf not found next to this script. Download it from the Ember-2-Mini-GGUF repo. pause & exit /b 1 ) rem Prefer IQ4_NL drafter (259 MiB VRAM); fall back to Q8_0 if present. set "DRAFT=" if exist "dflash2-Inkling-2-Mini-IQ4_NL.gguf" set "DRAFT=dflash2-Inkling-2-Mini-IQ4_NL.gguf" if "%DRAFT%"=="" if exist "dflash2-Inkling-2-Mini-Q8_0.gguf" set "DRAFT=dflash2-Inkling-2-Mini-Q8_0.gguf" if "%DRAFT%"=="" ( echo dflash2-Inkling-2-Mini-IQ4_NL.gguf not found next to this script. Download it from the Ember-2-Mini-GGUF repo. pause & exit /b 1 ) set "DRAFT_ARGS=--draft %DRAFT% --draft-k 7" rem Optional vision encoder (0 MiB permanent VRAM; ~0.3s per image on GPU via pinned RAM). set "MMPROJ_ARGS=" if exist "mmproj-Inkling-2-Mini-Q8_0.gguf" set "MMPROJ_ARGS=--mmproj mmproj-Inkling-2-Mini-Q8_0.gguf" if "%MMPROJ_ARGS%"=="" if exist "mmproj-Inkling-2-Mini-BF16.gguf" set "MMPROJ_ARGS=--mmproj mmproj-Inkling-2-Mini-BF16.gguf" rem Prefill chunk width: 512 up to 64K, 256 at 128K (exact output at any width; fits 16 GB Windows with zero spill). set "WIDTH=512" if %CTX% GTR 65536 set "WIDTH=256" echo Starting Ember on http://127.0.0.1:19124/v1 (context %CTX%, prefill width %WIDTH%, draft %DRAFT%) ... ember-serve.exe --model Ember-2-Mini.gguf %DRAFT_ARGS% %MMPROJ_ARGS% --max-context %CTX% --prefill-width %WIDTH% serve --port 19124 --bind 127.0.0.1