What gravity adds over llama.cpp¶
Everything below is built and tested. Full server docs: tools/server/README.md.
- File hash pins (
--model-sha256,--lora-sha256). The server hashes the files at startup. On a mismatch it printssha256 mismatch for ...: expected X, actual Yand exits before it loads anything. Why: a result is only tied to an adapter if the file is the one you think it is. Pins do not cover split models or router mode. Without pins the server warnsnot pinnedand starts as before. - Strict per-request
lora. Malformed lists return HTTP 400 (not an array, entry not an object, missing or non-integerid,idoutside the loaded adapters, missing or non-numericscale, unknown key, duplicateid). The same check runs onPOST /lora-adapters. Why: upstream silently ignores a bad entry, so an adapter you thought was on could be off. - Eval mode (
--eval-mode). One slot, no prompt cache, no continuous batching, every global adapter scale starts at 0. On/completion,/completions,/v1/completionsand/v1/chat/completions, each absent field is filled with a fixed default (seed0,temperature0,samplers["top_k","temperature"],top_k1,lora= every adapter at scale 0) and its name is listed in the response.cache_prompt: trueis forced tofalse. Routes that could run the model without these defaults (for examplePOST /lora-adapters,/infill,/v1/messages, embeddings) return HTTP 400. Why: both arms of a comparison run under the same fixed settings, and the arm is always explicit. gravityprovenance object. In eval mode every response from the four routes above carriesgravity(in the final chunk when streaming). Fields:eval_mode,version(gravity release),build(upstream llama.cpp build),devices_available,devices_used,device_info,layers_on_device,output_device,model_sha256,lora(id,scale,sha256per adapter),seed,temperature,samplers,filled,overridden. Outside eval mode responses stay exactly as upstream;GET /propsalways has the object. Why: the answer itself says which files, which strengths and which settings made it.- Device info.
devices_used(device names the model's layers run on),layers_on_device(layer count per device),output_device, anddevice_info(ggml description and total memory in MiB per used device, so you can tell which card ran). Why:devices_availablealone does not show where the model ran. - Slot cache clear on global lora change. A request without
loraafter one withlorano longer reuses a prompt cache computed under the other adapter setting. This is upstream's fix (llama.cpp #30367, commit 58a4a6b49), cherry-picked onto v1.0.0. --lora-init-without-applyscale fix. On v1.0.0 the flag left every adapter scale at 1.0. In gravity the global scales really start at 0, so a request withoutloraruns the base model.