6062 Commits
Author SHA1 Message Date
Sarah Wu e4db7510a1 add sm120 to preset (#20138) 2026-12-03 15:28:16 -08:00
mintlify[bot] cee14658c8 docs: document licenses field in show api (#20125)
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
2026-12-03 15:07:21 -08:00
Daniel Hiltgen 6d9b5e76be int: log thinking on failure (#20133)
Make sure test failures log thinking traces so we can detect thinking loops.
v0.40.20
2026-12-03 12:59:40 -08:00
Patrick Devine 641fe1b18f server: add molmo3 grounding support (#20131) v0.40.20-rc3 2026-12-03 11:31:14 -08:00
Eva H ce94980ea8 launch: pass fixed local context to Claude Code (#17058) 2026-12-03 12:59:25 -05:00
Patrick Devine b5f0eb268c Add molmo3 model to MLX (#20126) v0.40.20-rc2 2026-12-03 08:46:00 -08:00
Daniel Hiltgen 83931ae4ee ux: show multiple licenses (#20106)
* ux: show multiple licenses

A model can carry several license layers, such as a base model and a
draft model from different publishers. The show API now returns them
separately in licenses, and the CLI prints each one on its own. license
is deprecated but still returned for older clients.

* address comments
2026-12-02 21:22:29 -08:00
Jeffrey Morgan bb0a02c280 app: remove Claude and ChatGPT switches from the macOS menu bar (#20015) 2026-12-02 19:22:11 -08:00
milennalim 0f111826dd Merge pull request #20046 from ollama/gemma4-tool-call-parse-failures
model/parsers: return an error for Gemma 4 tool calls that fail to parse
2026-12-02 16:10:59 -08:00
milennalim 835c1322c6 Merge main into gemma4-tool-call-parse-failures 2026-12-02 15:52:13 -08:00
milennalim a80c70c30c Merge pull request #20105 from ollama/fix/openai-midstream-errors
openai: emit SSE errors when completion streams fail
2026-12-02 14:53:26 -08:00
milennalim f8f043488c Merge pull request #20080 from ollama/refactor/shared-openai-ids
openai: share response ID generators
2026-12-02 12:02:20 -08:00
AnneandDrSkyle c48c0c0864 openai: preserve stream errors with empty messages
Co-authored-by: DrSkyle <86089508+DrSkyle@users.noreply.github.com>
2026-12-02 11:40:59 -08:00
DrSkyle a31008e886 fix(openai): emit SSE error frame and [DONE] on mid-stream errors 2026-12-02 11:33:05 -08:00
milennalim 04d2019c84 Merge pull request #20063 from ollama/docs/cloud-messages-api-key
documentation update for Cloud Messages API key authentication
2026-12-02 10:30:29 -08:00
milennalim c841dc4be5 openai: remove redundant ID generator comments 2026-12-02 10:01:26 -08:00
milennalim 7496bf595f openai: share response ID generators 2026-12-02 10:01:26 -08:00
milennalim bc746630c7 Merge pull request #20077 from ollama/fix/runtime-response-ids
generate unique OpenAI completion response IDs
2026-12-02 09:59:37 -08:00
Anne 0af46ed425 server: ignore completion chunks after a parser error 2026-12-01 23:55:41 -08:00
Daniel Hiltgen abd187bdc5 MLX: version bump (#20088) v0.40.20-rc1 2026-12-01 18:51:56 -08:00
Daniel Hiltgen 9970d8132c llama.cpp: version bump b12910 (#20086) 2026-12-01 18:00:20 -08:00
milennalim 834f7f2ef1 Merge pull request #20049 from ollama/gemma4-repair-unclosed-object-in-array
model/parsers: repair Gemma 4 tool calls missing a "}" in an array
2026-12-01 14:43:11 -08:00
milennalimandPaladugula Phani Chakra f6eacf4077 openai: generate unique compatibility response IDs
Adapt ollama/ollama#19401 and verify IDs through emitted responses and stream events.

Co-authored-by: Paladugula Phani Chakra <178738086+phanipaladugula@users.noreply.github.com>
2026-12-01 13:40:54 -08:00
Eva H ed4347b21f launch: stabilize ChatGPT process timeout tests (#20073) 2026-12-01 16:08:02 -05:00
Anne f2e251d6a0 docs: describe Messages API key fallback 2026-12-01 13:05:11 -08:00
Anne 9a9c84a73c docs: keep Bearer in the Cloud Messages example 2026-12-01 11:16:53 -08:00
Daniel Hiltgen 2a52799af6 mlxrunner: stabilize cache and decoder unit tests (#20053)
Settle prior GPU work before measuring cache allocations, remove the
fixed decoder-test deadline, and test retention policy independently of
host memory pressure. Keep allocation limits and cancellation coverage
intact without changing runtime behavior.

Tests: repeated race runs on Metal v3/v4 and M1; golangci-lint.
2026-12-01 11:13:00 -08:00
milennalim db27a1b957 model/parsers: remove unnecessary Gemma 4 test comment 2026-12-01 11:02:33 -08:00
Daniel Hiltgen 97e8bebfda mlx: speed up batched Inkling target verification on Metal (#20016)
* mlx: speed up batched Inkling target verification on Metal

Reuse expert route metadata across output tiles in wide NVFP4 and MXFP8
gathers. Share the Inkling NVFP4 route plan across gate/up and down, and
use matrix tiles when at least five routes share an expert. Run short
target projections in a single tiled dispatch while preserving per-row
FP32 reduction order and the vocabulary softcap.

Keep the published weights, trained 4-over-6 activation quantizer, and
cache dtypes. Matrix expert tiles accumulate in FP32 with a different
summation order.

* address comments
2026-12-01 07:49:05 -08:00
milennalim 3c3ceecbd4 docs: document Cloud Messages API key authentication 2026-11-30 22:59:41 -08:00
Gaurav Jain 07798c63ed mlxrunner: fake host memory in TestAdmissionReclaimsIdleHistory (#20052)
The test sampled real host memory. On a loaded CI runner a physical
shortfall (FreeMemoryAboveTarget < 0) lets trimHistory evict the
incoming request's matching history, so round 1 found no reuse.
Make batchScheduler.memory a small interface and inject a fixed ample
observation; the workspace reserve alone still drives reclamation.
2026-11-30 18:05:39 -08:00
Gaurav Jain 11149476d2 mlx: honor larger declared image budgets for Gemma 4 (#20054)
Gemma 4 picks each image's soft-token budget dynamically, so small
images can use as few as 70 tokens. A checkpoint that declares a
vision_soft_tokens_per_image above the default 280 was tuned at that
resolution; use it as the minimum budget so small images aren't
downscaled below it. Checkpoints declaring 280 keep the existing
behavior.
2026-11-30 18:04:46 -08:00
milennalim c4a634c167 model/parsers: cover quoted brackets in Gemma 4 regression 2026-11-30 17:44:35 -08:00
milennalim edf205031a model/parsers: trim Gemma 4 repair comment and tests 2026-11-30 17:36:18 -08:00
AnneandClaude Opus 5.5 4e25f3b70e model/parsers: repair Gemma 4 tool calls missing a "}" in an array
Gemma 4 sometimes closes an array while an object inside it is still
open, as in {items:[{label:<|"|>a<|"|>]}, leaving out one "}". The call
fails to parse and is dropped. Add a repair candidate that inserts the
missing "}" at the first such spot; like the other repairs, it is used
only if the result parses as JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:04:40 -08:00
AnneandClaude Opus 5.5 3020eec25c model/parsers: move the Gemma 4 missing-brace repair to its own PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:04:17 -08:00
AnneandClaude Opus 5.5 5415854a7d model/parsers: parse Gemma 4 tool calls in Add, as qwen3coder and glm46 do
Emit the raw tool call from the state machine and parse it in Add, so a
parse error is returned the same way the other parsers return it, and
name the tool in the error where the parser reads its arguments. Simplify
the missing-brace repair: it fixes the first spot and leaves validation to
the JSON parse, like the other repairs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:56:06 -08:00
AnneandClaude Opus 5.5 dfbd1cd922 model/parsers: repair or report Gemma 4 tool calls that fail to parse
When a Gemma 4 tool call could not be parsed or repaired, the parser
logged a warning and dropped it. The response ended with no text, no tool
call and no error, reported as a success, so the client had nothing to
act on.

Add a repair for the most common failure we saw: the model closes an
array while an object inside it is still open, leaving out one "}". When
a call still cannot be parsed, return an error that names the tool, as
the qwen3coder and glm46 parsers already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:00:37 -08:00
Jeffrey Morgan d0e848237e mlxrunner: keep a chat's restore points unless memory is short (#20012) 2026-11-29 10:03:37 -08:00
Patrick Devine 05414188a7 go: update toolchain and dependencies (#19992)
Update Go to 1.26.11, x/net to 0.63.0, and related x modules.
2026-11-28 16:02:27 -08:00
Patrick Devine d227b7e210 bump llama-server (#19953) v0.40.20-rc0 2026-11-27 13:06:59 -08:00
Patrick Devine 8ae8acb81a bump llama-server (#19917) v0.40.19-rc0 v0.40.19 2026-11-25 22:20:48 -08:00
Patrick Devine b207a5a319 mlxrunner: compact Engram history buffers (#19913) 2026-11-25 16:40:05 -08:00
Daniel Hiltgen 784dd54429 inkling2: faster short histories, draft proposals and conv snapshots (#19881)
* inkling2: faster short histories, draft proposals and conv snapshots

Histories under 1024 keys now use the Metal split attention kernels
that already served longer ones. Below that, the stock graph widened
the whole history to FP32 and built a dense mask per query, which cost
more than the attention itself. The split sums match MLX's one-pass
reduction to rounding. Other backends are unchanged.

A single request's unpadded block takes the fused attention merge and
gate that batched requests already use.

Draft proposals skip candidates less than a tenth as likely as the
best one, and an adaptive selector projects only the rows it uses onto
the vocabulary. Verification still samples from the request's own
settings and corrects for the proposal, so outputs are unchanged.
Drafters without adaptive depth are unaffected.

Early conv snapshots share one short window instead of copying the
whole forward's input.

* avoid bogus failures on virtual metal CI systems
2026-11-25 08:56:03 -08:00
Daniel Hiltgen 924cc286cc inkling2: faster Metal decode, prefill and draft rounds (#19843)
* inkling2: faster Metal decode, prefill and draft rounds

Add Inkling-only Metal kernels, each with a stock-graph fallback, gated
by GPU generation and size class: short BF16 products, deduplicated
NVFP4/MXFP8 expert gathers with fused SwiGLU, fused loop controllers and
residual mixing, relative-position split attention, fused short
convolutions, faster global prefill, an ordered window cache that
appends in place, and an 8-bit draft with a 4-bit vocabulary head
(proposals only; outputs stay exact).
v0.40.18-rc0 v0.40.18
2026-11-23 17:35:09 -08:00
Patrick Devine 900e1469fb llama.cpp: version bump b12651 + remove jetpack5 support (#19865) 2026-11-23 16:51:59 -08:00
Gaurav Jain 318ee284aa mlxrunner: share tensor helpers and model setup across architectures (#19805)
Move the helpers that MoE architectures copied verbatim (SupportsGatherQMM, TensorAny, FreeTensorKeys, StackAndClone, TransposeExpertWeightForGatherMM, FuseExpertStacks) into mlxrunner/model, and add Root.Quantization and Root.LoadTokenizer for the quantization and tokenizer setup each model constructor repeated, including the dflash and gemma4 assistant drafts. No behavior change.
2026-11-22 02:09:59 -08:00
Daniel Hiltgen 2bd4d6aabd mlx: fuse Inkling residual mixing on Metal (#19808)
Compute the normalized residuals, query scores, and weighted sum in one
dispatch. Keep intermediate values in the threadgroup and preserve the
existing reduction order and rounding.
2026-11-20 20:05:50 -08:00
Daniel Hiltgen 23b94a2daf mlx: inkling follow up (#19806) v0.40.17 2026-11-20 19:03:47 -08:00
Daniel Hiltgen cecac8bf1b mlxrunner: add Inkling 2 Mini (#19799)
* mlxrunner: add Inkling 2 Mini

* mlx: fuse Inkling 2 Mini residual mixing on Metal

Fuse RMS normalization and query scoring in one kernel. Apply the
softmax weights in a second kernel to avoid storing per-query products.

* create: expose Inkling 2 Mini context length in model metadata

Copy model_max_length to max_position_embeddings during import so
ollama show reports the checkpoint's context length. Reject configs
that specify conflicting limits.

* mlxrunner: reduce Metal dispatches in Inkling 2 Mini decode

Reuse the prefill mask shader to compute relative position bias in one
dispatch for single-query attention. On M3 Ultra with Metal 3, compute
the loop controller's gain and forget projections in one matrix multiply.
2026-11-20 18:38:44 -08:00