5962 Commits
Author SHA1 Message Date
Daniel Hiltgen c1db5f9ef2 openai: don't override model sampler defaults (#19432)
The OpenAI-compatible endpoints filled in sampler options the client
left out: temperature and top_p fell back to 1.0, and /v1/completions
always sent frequency_penalty and presence_penalty as 0. Request
options are applied last, so these values replaced the model's packaged
defaults. /api/chat honored those defaults; /v1 did not.

Omitted options are now left unset on /v1/chat/completions,
/v1/completions and /v1/responses, so the model's parameters apply, the
same as on /api/chat. Values the client sends still win, including an
explicit 0. On /v1/completions, top_p and the penalties are now
pointers so "omitted" and "0" can be told apart.

Clients that send no sampler options now get the model's defaults
instead of 1.0/1.0. A model with no sampler parameters gets Ollama's
defaults (temperature 0.8, top_p 0.9), as on /api/chat.

Fixes #17744
Fixes #18690
2026-10-31 15:46:17 -07:00
Parth Sareen f9323416f0 feat(launch): use model output limits for Claude Code (#19410) 2026-10-30 14:34:54 -07:00
Eva H 174cb1dcca app: make ChatGPT disconnect failures retryable (#19336) 2026-10-30 17:34:24 -04:00
Daniel Hiltgen 4d22e65d49 mlx: sort long top-k rows in chunks (#19392)
MLX's argpartition sorts the whole row, and a row longer than one block
of the GPU sort takes a multi-pass merge sort. TopKIndices sorts each
2048-value chunk in a single block, then only the chunks' top k, and
returns the same indices in the same order.

The sampler's top_k and top_logprobs and the DFlash2 candidate selector
use it in place of a full-vocabulary argpartition.
2026-10-29 18:53:49 -07:00
Eva H 8861adaa77 openai: preserve readable Responses input content (#19192) 2026-10-28 23:46:40 -04:00
Daniel Hiltgen 6db7be24cc ci: pin buildx to workaround deadlock (#19373)
Recent buildx updates are causing frequent deadlocks in our CI builds.
Until this is resolved upstream, pin to an older version.
2026-10-28 16:44:29 -07:00
Daniel Hiltgen 04088e7c9d llama.cpp: workaround Metal unary crash (#19372)
This temporary patch works around a regression on older versions of MacOS
ggml_metal_library_compile_all: failed to build 'unary' library
v0.40.13-rc1 v0.40.13
2026-10-28 15:20:04 -07:00
Eva H c31a690bc2 cmd: show help when running ollama without arguments (#19248) 2026-10-28 16:58:14 -04:00
Daniel Hiltgen 46d2e4e8fb llama.cpp: version bump b11963 (#19360) v0.40.13-rc0 2026-10-28 10:37:56 -07:00
Daniel Hiltgen 3fbc609be4 llm: LFM3 GGUF fixes and llama-server speech (#19344)
Fixes for running LFM3 GGUFs on the llama-server runner, plus GGUF
text-to-speech that turns on once llama.cpp is bumped past b11901.

- BOS: honor an explicit tokenizer.ggml.add_bos_token. LFM3 GGUFs (and
  lfm2:24b) set it to false and expect the template's BOS, which the
  lfm2 default was stripping. The lfm2 default still applies when the
  key is absent. On lfm2:24b, WikiText PPL goes from 81.3 to 72.0.
- repeat_last_n -1 now maps to the context size; llama-server rejects
  negative values.
- Audio-only projectors (LFM3-Audio) no longer advertise vision, so
  clients don't send images the model can't take.
- /v1/audio/speech on GGUF models calls llama-server /tts chunk by
  chunk. Renderers opt in through a new SpeechPrompter (voices,
  voice parsing, chunking), so other speech models can add their own.
  The LFM3 voice and chunking helpers move from the MLX runner into
  model/renderers and are shared by both runners.
2026-10-27 18:56:22 -07:00
Daniel Hiltgen f067033f91 mlx: add LFM3 and d1 models (#19333) v0.40.12-rc1 v0.40.12 2026-10-27 08:47:18 -07:00
Eva Hand0d00ciallo0721 8ec9ecdf69 cmd/launch: fix OpenCode v2 launch and config parsing (#19310)
Co-authored-by: 0d00ciallo0721 <[email protected]>
2026-10-26 22:18:30 -04:00
J Berg b2137a1435 Fix kimi cli tool-only assistant turns (#19312)
* Fix kimi cli

* just interpret [] same as empty string actually

* dont gate on role
2026-10-26 17:31:31 -07:00
Daniel Hiltgen 6c15b26ba0 llama.cpp: version bump b11901 (#19311) v0.40.12-rc0 2026-10-26 16:10:42 -07:00
Daniel Hiltgen 2506f851e4 dflash: add the DFlash2 draft model (#19149)
DFlash2 adds block-local dynamic convolutions and a candidate selector
to DFlash. The selector proposes each token conditioned on its
predecessor and returns each position's candidate distribution, which
verification uses to keep the output exact. Like the reference, the
draft samples with the request's temperature only.

A DFlash2 session drafts seven tokens every round on the existing
snapshot verify path instead of following the depth controller, whose
shallower picks lose more accepted tokens than they save in verify time.

qwen3.5-family targets now expose the layer taps, token embeddings and
raw logits a DFlash draft needs.
2026-10-26 16:04:43 -07:00
Daniel Hiltgen 66ab8482e0 MLX, MLX-C: version bump - prompt speed up for gemma/flint/laguna (#19291)
* MLX, MLX-C: version bump

The MLX-C pin now provides its own bindings for gather_qmm global_scale
and fast::gated_delta_update, so those two carried patches drop out.
Carry 0001-mlx-c-sdpa-window-size instead: sliding-window attention
added a window_size argument to fast::scaled_dot_product_attention
(ml-explore/mlx#4734) that MLX-C has not bound yet, to be regenerated
from MLX-C once the upstream binding PR merges. The SDPA wrappers gain
a window size argument; all call sites default to the full context.

* mlxrunner: dispatch sliding-window prefills to the native SDPA window

Sliding layers no longer materialize a causal∩sliding mask for prefill
chunks past the window: resolve() dispatches {causal, window} natively
when the rotating cache's L>1 concat has linearized the ring and the
mask is otherwise pure causal, via a new MaskApplier.NativeWindow hint.
Vision relaxations, padding, model arrays, and decode keep the
materialized path. No model changes; sinks compose natively.
2026-10-25 21:25:58 -07:00
Daniel Hiltgen d44c258190 mlx: preserve small-image detail for compact Gemma 4 vision towers (#19247)
Dynamic sizing can floor the smallest image grid below its intended 70-token budget, losing detail in small images. Round that grid up for the compact tower, capped at the next supported budget.

Keep explicit budgets and the existing sizing for larger and unified towers. Update geometry and media-expansion tests.
2026-10-24 11:03:30 -07:00
Jeffrey Morgan 675150d6ad voice: add voice catalog for Phonon (#19242)
* mlxrunner: import and list Phonon catalog voices

* docs: document Phonon voices
v0.40.11-rc0 v0.40.11
2026-10-23 16:15:08 -07:00
Jeffrey Morgan 547b98ea13 mlxrunner: spell out symbols, numbers and links for Phonon (#19234)
* mlxrunner: spell out symbols, numbers and links for Phonon

* docs: describe speech text normalization

* mlxrunner: fix Phonon misreadings inherited from xn-ptts

* mlxrunner: fix remaining Phonon misreadings

* mlxrunner: fold Phonon letters from the vocab, read #, _ and lists

* mlxrunner: add xn-ptts license notice for Phonon

* mlxrunner: move the xn-ptts license notice into normalize.go

* mlxrunner: fix remaining Phonon readings and port elongations

* docs: speech reads times and numeric dates

* mlxrunner: fix Phonon readings found in a listening pass

* docs: speech reads times and dates as written
2026-10-23 16:12:15 -07:00
Daniel Hiltgen a5e91d792d llama.cpp: version bump b11845 (#19250) 2026-10-23 14:53:13 -07:00
SynapShiftandPatrick Devine f763dc70d2 decision: allow empty state for vllm-d3 (#19173)
* decision: allow empty state for vllm-d3

* server: reuse decoded state in System One tests

---------

Co-authored-by: Patrick Devine <[email protected]>
2026-10-23 14:13:14 -07:00
Eva H 1472203c47 launch: use allocated context for OpenCode (#19193) 2026-10-23 11:45:15 -07:00
Eva H 64a901e713 qwen3coder: preserve literal function closing tags in parameters (#19228) 2026-10-23 10:13:26 -07:00
Daniel Hiltgen f52b9e742d Update gemma renderers (#19241)
* renderers: add gemma4-nemotron renderer

Add a Gemma 4 renderer variant that renders assistant content before
its tool calls rather than after the tool responses. Models opt in with
RENDERER gemma4-nemotron; gemma4 auto-detection is unchanged.

Adds the corresponding chat template as a test fixture for Jinja parity
checks.

* mlx: support Gemma 4 targets with DFlash drafts

Load a draft-owned output head when its config requires one, while preserving the target-head path used by existing DFlash models.

Expose Gemma 4 hidden-state taps and raw logits for speculative decoding. Report safetensors target precision independently of quantized draft weights.
v0.40.10 v0.40.10-rc0
2026-10-23 07:12:11 -07:00
Daniel Hiltgen 5e31438d5d Support GA Gradium Phonon checkpoints (#19227)
Replace the prerelease checkpoint path with Gradium's GA format, including default-voice import and speech conditioning. Set the 0.40.9 minimum, update the speech docs, and test import, inference setup, and rejection of the old checkpoint.
v0.40.9 v0.40.9-rc3
2026-10-22 15:51:43 -07:00
J Berg 4568674810 Make sure all launchers know about cloud model metadata (#19223) 2026-10-22 15:41:36 -07:00
Eva H 816c36ac3e openai: preserve failures in Responses streams (#19225) 2026-10-22 15:37:57 -07:00
Eva H a79f7d7455 anthropic: reuse resolved thinking for web search (#19098) 2026-10-22 15:23:42 -07:00
Daniel Hiltgen 3295b3e96b flint: fix replies with thinking disabled (#19216)
* flint: fix replies with thinking disabled

Close the thinking section when think:false so Flint answers directly. Default and think:true prompts are unchanged.

* update template
v0.40.9-rc2
2026-10-22 11:38:27 -07:00
Jeffrey MorganandDaniel Hiltgen 6ef847b8fe mlxrunner: add Phonon text-to-speech support (#19166)
* mlxrunner: add Phonon text-to-speech support

Add Phonon text-to-speech through the existing MLX runner, with an
OpenAI-compatible speech endpoint and CLI playback.

Include model loading, text preprocessing, streaming audio, and
regression tests.

* docs: add speech models

* fix min version

---------

Co-authored-by: Daniel Hiltgen <[email protected]>
2026-10-22 11:36:42 -07:00
Patrick Devine f26b6a5f48 build: update jsonparser to v1.1.2 (#19220) 2026-10-22 11:15:33 -07:00
Parth Sareen 8886afcd80 launch: use cloud model context in Claude Code (#19119) 2026-10-22 11:04:30 -07:00
Patrick Devine 8dce29aa1b build: update Go toolchain and dependencies (#19200) 2026-10-22 09:23:35 -07:00
Daniel Hiltgen f20eb3b312 mlx: add d3 decision model support (#19196)
* mlx: add d3 decision model support

* bench: report loaded VRAM for decision runs
2026-10-22 08:50:14 -07:00
Eva H efabf6bc45 anthropic: surface errors after streaming starts (#19188) 2026-10-21 19:00:18 -07:00
Daniel Hiltgen de25dd526f llama.cpp update (#19194) v0.40.9-rc1 2026-10-21 17:13:25 -07:00
Daniel Hiltgen 8cc68d24aa ci: switch to released WoA CTK (#19185)
We were still using a pre-release, and the download site is flaky, so lets
get current on the latest CUDA Toolkit for WoA support.
v0.40.9-rc0
2026-10-21 13:12:06 -07:00
Daniel Hiltgen f580b5484a mlx: add Flint model support (#19181)
Preserve source tool JSON alongside decoded API values so Flint can retain
numeric types and schema order in prompts. Existing API marshaling is unchanged.

Assemble ModelOpt expert banks during safetensors import, and reject direct
Flint NVFP4 creation before conversion. Other models retain their existing
import and quantization paths.

Add optional learned sinks and device causal masks to shared MLX attention.
Existing callers retain the no-sink and host-mask paths; Flint opts into the
new behavior.
v0.40.8 v0.40.8-rc0
2026-10-21 07:45:50 -07:00
Daniel Hiltgen 2cd63f7a15 mlx: deduplicate CUDA runtime payloads (#17956)
* Deduplicate MLX CUDA runtime payloads

Move CUDA libraries shared by the GGML and MLX backends into the sibling CUDA payload, and teach in-process and subprocess MLX loading to resolve that packaged dependency directory.

Keep MLX-private libraries and JIT headers in the MLX overlay, include the full OpenBLAS Fortran runtime closure, and verify those dependencies in release packaging.

* address comments
v0.40.7 v0.40.7-rc1
2026-10-20 14:15:15 -07:00
Daniel Hiltgen 52f168120e server: read loaded runner models without refMu (#19070)
* server: read loaded runner models without refMu

Concurrent lookups of a warm model failed TryLock against each other and
fell back to a manifest reload, defeating the cache and making
TestLoadedModelLookupConcurrent flaky. Make runnerRef.model an
atomic.Pointer so lookups never take refMu.

* address comments
2026-10-20 12:19:18 -07:00
Daniel Hiltgen 3aa41cbdc3 llama.cpp: version bump b11738 (#19143) 2026-10-20 09:56:18 -07:00
Eva H e61ba8b470 openai: finish reasoning before client tool calls (#19146) 2026-10-19 18:51:48 -07:00
J Berg f1a33879b5 Merge pull request #19150 from ollama/cap-cc-auto-compact
Clamp CLAUDE_CODE_AUTO_COMPACT_WINDOW between allowed values
2026-10-19 16:13:57 -07:00
Jonathan Berg b5c4e9058a avoid scary claude warning about auto compact window being too big 2026-10-19 15:06:12 -07:00
Eva H 4ed3ba13cf server: cancel remote inference when clients disconnect (#19144) 2026-10-19 17:37:10 -04:00
Eva H 678722224b openai: accept foreign compaction in Responses history (#19003) 2026-10-19 08:25:35 -04:00
Daniel Hiltgen 36a6e994d2 api: populate show renderer/parser fields and add template_source (#19095)
ShowResponse's renderer and parser fields existed but the server never
set them; they now carry the effective values (renderer resolves the
gemma4 legacy alias by model size). A new template_source names what
actually renders chat prompts: the configured renderer/parser (leaving
any packaged template inert), a Go template layer, the GGUF's embedded
jinja, harmony, or none.

The CLI prints renderer/parser/template source rows only when set, so
ollama show output is unchanged for models without rendering config.
2026-10-17 17:31:52 -07:00
Daniel Hiltgen 8be580ad09 mlx: add PPLX Decider v1.2 support (#19072)
Implement the Qwen3.5-backed decision scorer with noncausal attention,
the publisher readout, image handling, and System One prompt encoding.
v0.40.7-rc0
2026-10-17 14:45:55 -07:00
Daniel Hiltgen e51196fe8c llama-server: let llama-server infer the draft speculative type (#19064)
llama-server can auto-detect most drafting models, so only pass the --spec-type
for drafting models it can't autodetect today: MTP sidecars detected by
Ollama's existing markers, and Eagle3.
2026-10-17 13:22:16 -07:00
Eva H d1ed3fd13a openai: allow Responses effort on non-thinking models (#19010) 2026-10-16 18:45:46 -07:00