Commit Graph

5561 Commits

Author SHA1 Message Date
Daniel Hiltgen
a51df81573 test: revamp integration test entrpoints (#16560)
This refactors the existing integration tests into 3 priumary groups: fast,
release, and library.  It also refines some of the release tests to drop some
of the older models and pick up newer models, while retaining the broad
coverage in the library group.
v0.32.2 v0.32.2-rc3
2026-07-21 16:06:38 -07:00
Daniel Hiltgen
a18c230189 model: add Laguna v8 chat support and fix Metal inference (#17291)
Add a laguna-v8 renderer/parser matching the Laguna XS 2.1 template, and fix v2 handling of embedded thinking and structured tool arguments.

Prevent FP16 overflow in Metal's quantized routed-MoE prefill path by scaling the linear branch and folding the inverse into the routing scale. Other backends and token-generation paths are unchanged.

Add comprehensive v2/v8 Jinja parity and parser tests.
2026-07-21 16:06:29 -07:00
Daniel Hiltgen
e21d5327b0 CI: fix missing CUDA v13.4 sub-package (#17288)
Needed for cross-compiling WoA
v0.32.2-rc2
2026-07-21 12:25:10 -07:00
Jhye
4d1b53e6fb server: detect download stalls before the first byte (#17259)
* server: detect download stalls before the first byte

* server: keep stall timeout out of download API
v0.32.2-rc1
2026-07-21 11:28:19 -07:00
Daniel Hiltgen
6100aca085 win: support CUDA on Windows ARM64 (#16931) 2026-07-21 10:53:30 -07:00
Daniel Hiltgen
72116bafb3 llama: enable dio on linux CUDA/ROCm iGPUs (#17286)
Avoid double memory consumption by enabling direct IO for iGPUs
2026-07-21 10:53:08 -07:00
Patrick Devine
e2c2edcc27 docs: add renderer/parser fields to the API docs (#17275) 2026-07-20 16:22:46 -07:00
Daniel Hiltgen
de1ce45913 cuda: add CC 10.0 for linux in CUDA v12 (#17025)
Add compute capability 10.0 to the Linux CUDA v12 preset so B200-class devices can use the cuda_v12 backend with drivers that do not meet the CUDA v13 minimum.

Fixes #12583
v0.32.2-rc0
2026-07-20 13:09:36 -07:00
Daniel Hiltgen
51fc00122b build: bump Linux toolchain to GCC 13 (#17244)
GCC 11 builds broken AMX code which causes the Sapphire Rapids CPU backend to crash.

Fixes #17006
Fixes #17205
2026-07-20 11:54:39 -07:00
Daniel Hiltgen
445284b428 MLX update (#17189) 2026-07-20 11:54:24 -07:00
Parth Sareen
e8f7c93a0b launch: update Hermes integration (#17202) 2026-07-20 11:28:01 -07:00
Parth Sareen
0de38190d7 cmd/tui/chat: render bold emphasis consistently across markdown (#17224) 2026-07-20 11:25:43 -07:00
Parth Sareen
681dfaedcc cmd: remove standalone agent command (#17229) 2026-07-20 11:25:31 -07:00
Parth Sareen
9893d39218 cmd: complete slash commands before submitting (#17230) 2026-07-20 11:25:12 -07:00
Parth Sareen
5ba17e6fdf agent/tui: remove redundant context-window refreshes from event loop (#17241) 2026-07-20 11:25:01 -07:00
Parth Sareen
6f3b997dec cmd: route root command server start through checkServerHeartbeat (#17245)
The bare `ollama` command (and `ollama launch` with no integration) used a
bespoke `ensureServerRunning` that forked `ollama serve` directly and polled
its heartbeat forever (no timeout, no platform-aware launch). Every other
subcommand (`ollama run`, `ollama pull`, `ollama launch <integration>`, ...)
goes through `checkServerHeartbeat` -> `startApp`, so the root command behaved
differently and could hang indefinitely.

Route `runInteractiveTUI` through `checkServerHeartbeat(cmd, nil)` — the same
path `ollama launch <thing>` uses — so the root command is consistent and no
longer runs an unbounded server-spawn loop. `ensureServerRunning` and its
`backgroundServerSysProcAttr` helpers (only it referenced them) are removed,
along with the now-unused `os/exec` import.

The platform `startApp`/`waitForServer` paths are unchanged, so behavior on
macOS/Windows is identical to the other subcommands, and on Linux the root
command now errors the same way the subcommands already do when no server is
running.
2026-07-20 11:24:25 -07:00
Daniel Hiltgen
cc62676656 llama.cpp update (#17186) 2026-07-20 11:21:09 -07:00
Parth Sareen
573386c35e agent: skills system (#17203) 2026-07-17 10:32:22 -07:00
Eva H
794a254111 anthropic: close text block before starting thinking block (#17225) 2026-07-17 10:24:38 -04:00
Parth Sareen
714b6fc2a4 agent: allow unlimited tool rounds for cloud models by default (#17217) 2026-07-16 19:07:01 -07:00
Parth Sareen
61e1b1ba5e agent: clean up semantics, UX, DX, and procedural code (#17212) 2026-07-16 19:06:06 -07:00
Parth Sareen
5865a01e48 agent: reorder working directory instruction (#17228) 2026-07-16 19:05:30 -07:00
Parth Sareen
e61c1c73fe cmd: remove dead agent prompt wrappers (#17227) 2026-07-16 17:16:14 -07:00
Eva H
03d61e1925 launch: keep Claude Code channels available (#17210) 2026-07-16 13:08:50 -04:00
Parth Sareen
30c390384e cmd: put current working dir in the system prompt (#17188) v0.32.1 v0.32.1-rc0 2026-07-15 12:10:28 -07:00
Parth Sareen
d590830091 agent/tools: isolate web tests from cloud policy (#17208) 2026-07-15 12:07:05 -07:00
Parth Sareen
fdcf9efafd fix launch model picker recovery (#17170) 2026-07-15 11:31:22 -07:00
Parth Sareen
76188f60cd docs: add VS Code extension setup (#17158) 2026-07-15 11:30:43 -07:00
Daniel Hiltgen
8a0016f826 model: align gemma4 chat template handling (#17182)
Incorporate the upstream Gemma4 chat template refinements for tool-calling stability, turn closure, and multi-turn reasoning. This updates the native renderer and checked-in HF template fixtures to keep adjacent assistant/tool continuations in the same model turn, add the post-tool thought-channel cue when thinking is enabled, and match Google's default of not replaying historical thinking before a later user turn.

Also preserve null tool arguments through Gemma4 rendering/parsing and extend the Jinja2 parity coverage for these upstream behaviors.
2026-07-14 15:42:04 -07:00
Michael Yang
d49b96d9ab docs: collapsed previous retirements (#17167) 2026-07-14 14:00:10 -07:00
Parth Sareen
3bd506bd1c agent/tools: surface actionable web auth error (#17169) 2026-07-14 13:35:16 -07:00
Jesse Gross
123b1f2479 mlxrunner: raise the MTP pending-flush cap to 256 tokens
Per-token cost of the batched head forward keeps falling until the
flush is large enough to reach the fastest kernels: NAX matmul tiles
for dense heads, and the segmented gather path for MoE heads, which
needs tokens*topK/experts >= 4. Measured across the qwen3.6 heads,
256 is the smallest cap past every threshold and within a few percent
of each head's per-token floor. The cost is bounded: up to 2.5 MiB of
pinned hiddens per request and a flush stall under one decode step.
2026-07-14 10:32:04 -07:00
Jesse Gross
556245843a mlxrunner: key the cache trie by token pairs for draft caches
A draft cache pairs each slot with the token that follows it, so the
deepest stored pair always names one token past what a prefix match
can verify - at generation end, the sampled-but-never-committed
final token. Restoring at the match point reuses that pair blind: a
stop token stripped from the next prompt, or any divergence at the
boundary, leaves it stale, and pairing never rewrites below the
resume position, quietly lowering draft acceptance.

Key the trie by token pairs instead: the key for offset i packs
(token i, token i+1), so matching k keys verifies k+1 tokens and
every match is a valid restore point. A pair is reused only if the
token it names matched, and prefill re-evaluates the boundary token,
rebuilding its pair with the token that actually follows. A token
gets a key only once its successor is recorded, so endings record the
final sampled token - never forwarded - and the trie stays level with
the caches. Without a look-ahead the keys are the tokens and behavior
is unchanged.

The recorded tokens' slice bounds used to reject state past them for
free; close now checks the invariant against the stored keys
directly. The test harness rests requests the way the pipeline does -
the deepest recorded token never enters the caches.
2026-07-14 10:32:04 -07:00
Jesse Gross
c963822dca mlxrunner: construct per-model state at load
The caches, the speculation binding, and the drafter were each built
lazily inside the first request: begin constructed the caches, and open
bound the cache partition and made a fresh drafter every time. All of
it is a property of the loaded model, so build it once at load.
newPrefixCache replaces the lazy construction in begin, speculation
binds when it is created, and the drafter splits the way speculation
does: a persistent mtpDrafter constructed at load opens each request's
mtpDraftSession, whose constructor syncs the pairing cursor to the
draft caches' restored offset.
2026-07-14 10:32:04 -07:00
Jesse Gross
dd49563d55 mlxrunner: rename kvCache to prefixCache
The type coordinates every cache kind — KV, sliding-window, recurrent —
around prefix matching over the trie, so kv was a misnomer.
2026-07-14 10:32:04 -07:00
Jesse Gross
4e96f4dbf2 cache: stop recurrent conv state from pinning the forward buffer
Keeping the recurrent conv state small was handled unevenly: the committed
live state was recopied on every commit — wasted work on single-token
decode, where the window is already tiny — while boundary states captured as
snapshots could still be plain slices of the forward-sized convolution
buffer. A cached slice pins that whole buffer even though the trie's eviction
accounting only counts the slice's bytes, so recurrent cache memory piled up
across requests and eviction could never reclaim it.

Compact each boundary state to its real size once, where it is produced in
the conv wrapper, so live state and snapshots own only their own bytes and
eviction sees the true cost. Single-token decode leaves the already-tiny
window as a slice.

Fixes #16698
2026-07-14 10:32:04 -07:00
Jesse Gross
d573a2367b nn/recurrent: derive conv boundary states from a single conv pass
The MTP validation forward schedules a snapshot at every drafted token, which
made CausalConv1D re-run the depthwise conv once per segment to recover each
boundary's conv tail. A conv boundary state is just the trailing convTail
input positions, so run the conv once over the whole window and slice each
boundary tail from the shared buffer, removing the per-token conv launches.
2026-07-14 10:32:04 -07:00
frob
4f7786d0ba mlx: configurable model load timeout (#14796) 2026-07-13 16:06:29 -07:00
Parth Sareen
f1a0ffd621 launch: rename Codex App integration to ChatGPT (#17161) v0.32.0 2026-07-13 14:34:17 -07:00
Parth Sareen
cd600e19a3 cmd/tui: simplify integration selection and update menu description (#17159) 2026-07-13 12:52:40 -07:00
Daniel Hiltgen
59bd0b49bb mlx: restore NAX in Metal v4 builds (#17160)
MLX now requires a macOS 26.2 deployment target for NAX kernels. Ollama's Metal v4 build still targeted 26.0, so recent MLX bumps silently built mlx_metal_v4 without NAX kernels.
2026-07-13 12:50:38 -07:00
Parth Sareen
82f905cd9c cmd: agent UI (#17017) v0.32.0-rc0 2026-07-09 17:27:31 -07:00
Parth Sareen
cb3d98ccb2 launch: warn before launching old agent models (#17063) 2026-07-09 16:55:10 -07:00
Jesse Gross
d47859ce49 create: select the qwen3.5 parser and renderer for Qwen3.5/Next
Qwen3.5/Qwen3-Next architecture strings contain the substring "qwen3", so the
broad qwen3 match claimed them for the generic parser and qwen3-coder
renderer, whose template doesn't frame the thinking block — an empty
<think></think> leaked into content and think=false was ignored. Match the
family first via isQwen35Family so the parser, renderer, and
thinking-capability checks share one variant list.
2026-07-08 11:12:48 -07:00
Daniel Hiltgen
a6293eb516 llm: allow iGPU mmproj offload with fit padding (#16996)
* llm: allow iGPU mmproj offload with fit padding

llama.cpp's fit pass sizes text-model placement before the multimodal projector is loaded. Ollama had been avoiding that risk on non-Metal iGPUs by disabling projector offload entirely, which forces CLIP onto CPU on GB10 and Strix Halo even when the projector has ample memory available.

Let integrated GPUs use the same projector-memory check as other GPUs. When projector offload is enabled, add the estimated projector memory plus the existing 1 GiB headroom to Ollama-owned LLAMA_ARG_FIT_TARGET so fit leaves space for the later projector allocation. If Ollama/device setup already supplied a fit target, add the projector pad to it. If the user set LLAMA_ARG_FIT_TARGET explicitly, leave it exactly as provided.

Fixes #16419

* review comments
v0.31.2-rc2 v0.31.2
2026-07-07 15:28:42 -07:00
Arkadeep Dutta
892e7f6be6 server: apply format constraint for all thinking parsers when think=false (#15901) 2026-07-07 11:54:50 -07:00
Patrick Devine
f3d69a3dee server: remove unused internal/ code (#17071) 2026-07-07 11:44:38 -07:00
Daniel Hiltgen
67b6a1c2d4 create: harden GGUF create flows (#17062)
* create: harden GGUF create flows

* lint
v0.31.2-rc1
2026-07-06 16:20:20 -07:00
Parth Sareen
87b64213b4 launch: disable claude code telemetry by default (#17061) 2026-07-06 15:24:11 -07:00
Daniel Hiltgen
f2d069f6df mlx: update to de7b4ed9 (#17056) v0.31.2-rc0 2026-07-06 13:31:22 -07:00