Repository navigation
fix(server): align llama-server b10621 aliases and defaults #1430
Copy link
Copy link
Closed
Labels
area:cliCommand-line interface / CLI flagsCommand-line interface / CLI flagsarea:docsUser and developer documentationUser and developer documentationarea:inferenceGeneration, sampling, decoding (incl. speculative, DRY)Generation, sampling, decoding (incl. speculative, DRY)priority:highHigh priorityHigh prioritystatus:doneCompletedCompletedtype:bugBug fixes, error corrections, or issue resolutionsBug fixes, error corrections, or issue resolutions
Description
Background
The official llama.cpp nightly pointer resolved to b10621 on 2026-08-26. The macOS arm64 distribution reports build 10621 at commit c1d0e7a00; its archive SHA-256 is 429c8270608600188035e5e92f7d78dffb7900904fe7dd7e6a84f48068cd13cf. Comparing that binary's actual llama-server --help and route registration against mlxcel main found several low-risk compatibility defects that do not require new inference features.
Problems
- Canonical environment variables have drifted: upstream uses
LLAMA_ARG_BATCH,LLAMA_ARG_UBATCH,LLAMA_ARG_SPEC_DRAFT_MODEL,LLAMA_ARG_THINK_BUDGET,LLAMA_ARG_LOG_FILE,LLAMA_ARG_CHAT_TEMPLATE,LLAMA_ARG_CHAT_TEMPLATE_FILE,LLAMA_ARG_ENDPOINT_METRICS,LLAMA_ARG_ENDPOINT_PROPS, andLLAMA_ARG_ENDPOINT_SLOTS; mlxcel either uses stale names or has no env binding. LLAMA_ARG_CACHE_REUSEis an integer minimum reuse chunk size upstream, but mlxcel currently parses it as a boolean alias for enabling the whole prompt cache. Values such as0therefore produce the opposite operational result.- Upstream b10621 defaults to
top_p=0.95,min_p=0.05, anddry_penalty_last_n=64; mlxcel currently defaults to0.9,0.1, and an all-history sentinel. - The same request fields are spelled differently: llama-server accepts
n_predict/max_completion_tokens,repeat_penalty,repeat_last_n, andreasoning_budget_tokens; mlxcel's OpenAI-shaped routes currently accept only their native spellings and silently ignore the llama-server names. - llama-server accepts either one stop string or an array and accepts seed
-1as random; mlxcel currently requires an array and an unsigned seed. - Safe route aliases are missing:
GET /v1/health,POST /reranking, andPOST /v1/rerankingcan use existing handlers without adding new inference behavior. --temperatureis a llama-server alias for--tempbut is not accepted by mlxcel-server.
Scope
- Add canonical b10621 spellings while retaining documented mlxcel legacy spellings as lower-precedence compatibility aliases where doing so is unambiguous.
- Stop interpreting
LLAMA_ARG_CACHE_REUSEas a boolean prompt-cache enable switch. Accept0as the upstream no-extra-reuse default without disabling prompt caching, and fail startup clearly for unsupported positive values rather than silently changing a different setting. - Align the three server sampling defaults and
/propsreporting with b10621. - Add request deserialization aliases, one-or-many stop parsing, and negative-seed normalization without changing the inference algorithms.
- Map
repeat_last_nto the existingrepetition_context_sizerequest field only. Applying that field as a finite penalty-history window changes arithmetic and is explicitly deferred to feat(inference): complete b10621 sampling and grammar semantics #1436 with the numerical validation required bydocs/benchmarks.md. - Add the three route aliases and include
/v1/healthin the unauthenticated health allowlist. - Update CLI consistency tests, request/route tests, environment-variable documentation, and the changelog.
Out of scope
- New sampler algorithms, TLS/CORS transport features, router mode, LoRA hot-swap, native completion response expansion, slot persistence, or support for low-level GGML device flags.
- Changing
--timeout, whose mlxcel meaning is currently a decode hang watchdog rather than llama-server's HTTP read/write timeout; that requires a separate migration issue. - Pretending unsupported hidden flags work by accepting and ignoring values that have observable llama-server semantics.
Acceptance criteria
- Both
mlxcel serveandmlxcel-serveraccept canonical environment variable names with CLI-over-env precedence and preserve explicitly documented legacy aliases at lower precedence. -
LLAMA_ARG_CACHE_REUSE=0leaves prompt caching enabled, positive values fail with an actionable unsupported-setting error, and boolean values are no longer accepted as cache-enable aliases. - Server defaults and
/propsreporttop_p=0.95,min_p=0.05, anddry_penalty_last_n=64. - Chat and OpenAI completion requests deserialize the listed llama-server field aliases into their existing mlxcel request fields; a scalar stop string is equivalent to a one-element array, seed
-1resolves to nondeterministic sampling, and seeds below-1are rejected. - This issue does not make the parsed repetition window affect sampling; that arithmetic change remains tracked by feat(inference): complete b10621 sampling and grammar semantics #1436 and is not claimed as runtime parity here.
-
GET /v1/health,POST /reranking, andPOST /v1/rerankingreach the existing handlers, with/v1/healthpublic under API-key authentication. -
--temperatureand--tempresolve identically on both server entry points. - Focused CLI, request-schema, route, auth, and config-default tests pass;
cargo fmt --checkpasses.
Reference
- Upstream release: https://github.com/ggml-org/llama.cpp/releases/tag/b10621
- Upstream argument definitions: https://github.com/ggml-org/llama.cpp/blob/c1d0e7a004015f23bc0233470b747b596f29b264/common/arg.cpp
- Upstream route registration: https://github.com/ggml-org/llama.cpp/blob/c1d0e7a004015f23bc0233470b747b596f29b264/tools/server/server.cpp
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:cliCommand-line interface / CLI flagsCommand-line interface / CLI flagsarea:docsUser and developer documentationUser and developer documentationarea:inferenceGeneration, sampling, decoding (incl. speculative, DRY)Generation, sampling, decoding (incl. speculative, DRY)priority:highHigh priorityHigh prioritystatus:doneCompletedCompletedtype:bugBug fixes, error corrections, or issue resolutionsBug fixes, error corrections, or issue resolutions
Activity
inureyes commentedon Aug 26, 2026
Additional audited requirement: b10621 spells the unquantized KV type as
f16, while mlxcel currently accepts onlyfp16/float16on--cache-type-kand--cache-type-v. Addf16as an exact FP16 alias with focused parser tests. Do not mapq8_0,q4_0, or other GGML quantizers onto mathematically different mlxcel modes in this issue.fix: restore slots flag ordering
fix: align llama-server b10621 compatibility (#1454)
test(server): add pinned b10621 compatibility manifest and gates
feat(server): implement b10621 prompt-cache and batching semantics (#…
fix: align llama-server b10621 compatibility (lablup#1454)
test(server): add pinned b10621 compatibility manifest and gates
feat(server): implement b10621 prompt-cache and batching semantics (l…