Skip to content

fix(server): align llama-server b10621 aliases and defaults #1430

Closed

Description

@inureyes

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, and LLAMA_ARG_ENDPOINT_SLOTS; mlxcel either uses stale names or has no env binding.
  • LLAMA_ARG_CACHE_REUSE is an integer minimum reuse chunk size upstream, but mlxcel currently parses it as a boolean alias for enabling the whole prompt cache. Values such as 0 therefore produce the opposite operational result.
  • Upstream b10621 defaults to top_p=0.95, min_p=0.05, and dry_penalty_last_n=64; mlxcel currently defaults to 0.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, and reasoning_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 -1 as random; mlxcel currently requires an array and an unsigned seed.
  • Safe route aliases are missing: GET /v1/health, POST /reranking, and POST /v1/reranking can use existing handlers without adding new inference behavior.
  • --temperature is a llama-server alias for --temp but 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_REUSE as a boolean prompt-cache enable switch. Accept 0 as 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 /props reporting with b10621.
  • Add request deserialization aliases, one-or-many stop parsing, and negative-seed normalization without changing the inference algorithms.
  • Map repeat_last_n to the existing repetition_context_size request 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 by docs/benchmarks.md.
  • Add the three route aliases and include /v1/health in 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 serve and mlxcel-server accept canonical environment variable names with CLI-over-env precedence and preserve explicitly documented legacy aliases at lower precedence.
  • LLAMA_ARG_CACHE_REUSE=0 leaves 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 /props report top_p=0.95, min_p=0.05, and dry_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 -1 resolves to nondeterministic sampling, and seeds below -1 are 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, and POST /v1/reranking reach the existing handlers, with /v1/health public under API-key authentication.
  • --temperature and --temp resolve identically on both server entry points.
  • Focused CLI, request-schema, route, auth, and config-default tests pass; cargo fmt --check passes.

Reference

Activity

  1. added
    type:bugBug fixes, error corrections, or issue resolutions
    area:docsUser and developer documentation
    area:inferenceGeneration, sampling, decoding (incl. speculative, DRY)
    area:cliCommand-line interface / CLI flags
    and removed on Aug 26, 2026
  2. inureyes commented on Aug 26, 2026

    @inureyes
    MemberAuthor

    Additional audited requirement: b10621 spells the unquantized KV type as f16, while mlxcel currently accepts only fp16 / float16 on --cache-type-k and --cache-type-v. Add f16 as an exact FP16 alias with focused parser tests. Do not map q8_0, q4_0, or other GGML quantizers onto mathematically different mlxcel modes in this issue.

  3. added a commit that references this issue on Aug 26, 2026
  4. added 3 commits that reference this issue on Aug 26, 2026
    a74bf75
    948306d
    e5b3ca8
  5. self-assigned this
    on Aug 31, 2026
  6. added 3 commits that reference this issue on Oct 27, 2026
    8bee495
    2da3ba4
    6dd9021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cliCommand-line interface / CLI flagsarea:docsUser and developer documentationarea:inferenceGeneration, sampling, decoding (incl. speculative, DRY)priority:highHigh prioritystatus:doneCompletedtype:bugBug fixes, error corrections, or issue resolutions

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions