Commit graph

635 commits

Author SHA1 Message Date
Devon Rifkin
f864601538
server: proxy cloud usage and balance APIs (#18829)
Forward GET /api/usage and GET /api/balance through the local server
using the signed-in account.

Add API documentation and tests for proxying, signing, and
disabled cloud access.
2026-10-06 18:31:54 -07:00
Patrick Devine
efe43c5561
model: add multimodal embeddings (#18820)
Implements the EmbeddingGemma2Model architecture on the MLX runner: 24-layer
bidirectional text encoder with PLE, shared gemma4 vision/audio towers,
mean-pool + L2 output. /api/embed accepts per-item media via input dicts.
2026-10-06 08:08:38 -07:00
Daniel Hiltgen
0fde06c4d2 Merge remote-tracking branch 'upstream/main' into release_v0.40.0 2026-10-04 08:48:45 -07:00
Daniel Hiltgen
a00d083bb5
mlx: System one support (#18701)
* mlxrunner: restore System One scoring

Carry the MLX implementation and its tests from the original System One
commit. The API/compiler and llama-server implementation already exist on
the release branch, so retain those versions. Adapt the optional model test
to the renamed decision package and its explicit rendering/context setup.

(cherry picked from commit 26e546ddb3)

* Enable MLX System One and add regression coverage

* mlxrunner: add Laya support for System One

Import Laya checkpoints and implement bidirectional decision scoring.

* mlxrunner: release cached buffers after System One scoring

* decision: match Tev1 and Nimble publisher prompt formats

Select Tev1 prompts using renderer metadata and fix JSON formatting, with regression coverage for GGUF and MLX.

* mlx: support Clef and Clef Flash decision models

Add model import, quantization safeguards, and text/image scoring with the Clef joint decision head.

* support vision capabilities for decision models

* Make Clef scoring cancellable between prefill chunks

Preserve joint-head inputs and test cancellation, cleanup, and recovery.

* mlx: separate decision preparation and readout from forward

Let serial and batched scoring share model-owned preparation and readout
without duplicating architecture-specific logic in the runner.

* mlx: add Strands Decider support

* implement caching

---------

Co-authored-by: ParthSareen <parth.sareen@ollama.com>
2026-10-03 13:17:21 -07:00
Parth Sareen
42e911bc3d
docs: document image input for decision models (#18757) 2026-10-02 11:52:27 -07:00
Parth Sareen
e896a52a4f
docs: link to available decision models (#18758) 2026-10-02 11:51:55 -07:00
Daniel Hiltgen
1c345795ab Merge remote-tracking branch 'upstream/main' into release_v0.40.0 2026-10-01 16:51:30 -07:00
Jeffrey Morgan
e4c0d18eb8
models: add clef support (#18741) 2026-10-01 15:52:04 -07:00
Parth Sareen
1abe35e6e6
docs: document System One API (#18702) 2026-09-29 19:33:23 -07:00
Daniel Hiltgen
eadb68a609 Merge remote-tracking branch 'upstream/main' into release_v0.40.0
# Conflicts:
#	server/routes.go
2026-09-29 11:15:31 -07:00
Daniel Hiltgen
b3f78b7732
create: support explicit model capabilities (#18708)
Add CAPABILITY declarations to Modelfiles and an additive capabilities
field to create requests. Preserve declarations across GGUF and safetensors
creation, inheritance, and Modelfile export.

Require decision capability before scheduling System One requests instead
of matching Qwen architecture/renderer metadata. Retain main's GGUF-only
scoring restriction until the separate MLX runtime work lands.

Extracted from the capability foundation in 36d46a0c3 on system_one_mlx;
MLX scoring and manifest-list changes are intentionally separate.
2026-09-29 11:10:25 -07:00
Daniel Hiltgen
75b952780f llama-server: prepare to remove compatibility patch
Add manifest-list storage so runner-specific manifests can coexist under one tag while preserving existing v1 tags as best-effort downgrade anchors. Show/list/copy/remove/pull/push now understand runner and digest selection and transfer referenced child manifests and layers.

Add lazy local compatibility migration for legacy Ollama GGUFs into llama.cpp-compatible children, covering the patched model families and preserving parser/renderer, templates, projectors, media metadata, split GGUFs, and MTP/draft tensors where applicable.

Extend create/import/conversion paths for the same compatibility rules, harden manifest-list combine validation, and add focused manifest, migration, transfer, and integration coverage for first-load conversion plus chat/tools/vision/audio/embedding behavior.
2026-09-24 19:25:52 -07:00
Daniel Hiltgen
7af393188d
api: deprecate typical_p (#18627)
Switch from rejecting API requests to logging a warning.  Model creation still rejects the deprecated param.

Follow up from #18448 to remove the hard API failure.
2026-09-24 15:03:28 -07:00
Parth Sareen
c173758997
docs: document thinking control discovery (#18501) 2026-09-22 18:28:11 -07:00
Eva H
35bdad61df
docs: clarify integrations overview and add assistant icons (#18511) 2026-09-17 14:10:18 -07:00
Eva H
28a9f8c955
docs: fix cloud retirements settings link (#18496) 2026-09-16 16:20:58 -07:00
Parth Sareen
38fdb5dd58
docs: refresh getting started guides (#18450) 2026-09-14 23:32:30 -07:00
Daniel Hiltgen
2c29c9f05e
API: Deprecate typical_p (#18448)
Drop support for creating new models with typical_p parameters, while
retaining support for existing GGUF models with the setting.
2026-09-14 21:24:26 -07:00
Daniel Hiltgen
98acec40ae
create: add server-side MLX imports and drop GGUF conversion (#14969)
* create: add server-side MLX imports and drop GGUF conversion

Support safetensors imports through the MLX create pipeline both locally and on the server, including remote upload/staging, draft layer handling, cancellation propagation, transfer limits, and shared manifest/blob writing.

Limit GGUF create to wrapping existing GGUF inputs into Ollama manifests. Remove the in-tree safetensors-to-GGUF converter, server quantization path, and converter-only dependencies so GGUF conversion and quantization stay in llama.cpp tooling.

Keep the MLX path focused on supported safetensors model creation with validation before MLX work, and expose that flow without the --experimental CLI gate.

* address comments

* add client side gguf create fast path

* address comments

* rebase adjustments
2026-09-14 20:32:36 -07:00
Parth Sareen
2d26fafc42
docs: add ChatGPT Desktop integration (#18377) 2026-09-14 13:24:31 -07:00
Daniel Hiltgen
855f4bf989
Report cached prompt tokens (#17943)
* Report cached prompt tokens

Add prompt_eval_cached_count to native responses and expose equivalent cached-token fields through the OpenAI- and Anthropic-compatible APIs. Keep prompt_eval_count as the logical input total while excluding cache hits from CLI and benchmark prefill rates. Surface processed and cached prompt counts in benchmark output.

Collect cache counts from llama-server and MLX, preserve coherent metrics across two-pass structured generation.

Fixes #8008

Related to #15758

* review comments
2026-09-02 09:30:44 -07:00
Marcel Petrick
e37a00a8fa
fix(docs): correct typos found during code review (#17579)
* fix(docs): correct typos found during code review

Non-functional changes only:
- Fixed minor spelling mistakes in comments
- Corrected typos in user-facing strings
- No variables, logic, or functional code was modified.

Signed-off-by: Marcel Petrick <mail@marcelpetrick.it>

* fix additional typos and shell-unsafe example in docs

---------

Co-authored-by: Patrick Devine <patrick@ollama.com>
2026-08-31 08:59:55 -07:00
Parth Sareen
e2c6c7e894
docs: claude docs (#18006) 2026-08-25 19:34:13 -07:00
Parth Sareen
9dbf139133
docs: document Claude Desktop integration (#18004) 2026-08-25 19:12:21 -07:00
Parth Sareen
78e818e3ce
docs: register DeepSeek Harness (#17751) 2026-08-14 14:30:21 -07:00
Parth Sareen
39df91c982
launch: add DeepSeek Harness integration (#17733) 2026-08-13 15:19:02 -07:00
Parth Sareen
b6b1b258c3
openai: support web search in Responses API (#17686) 2026-08-12 11:51:54 -07:00
Jesse Gross
6a261db7d8 api: stop applying repeat_penalty 1.1 to models that don't set one
Request options are the model's published parameters and the request's
own options layered over the server defaults, so the default
repeat_penalty of 1.1 reaches every model whose parameters leave it
unset. No maker of the library's current models recommends 1.1: their
generation configs either omit the penalty, meaning 1.0, or pin 1.05.
llama.cpp dropped the same 1.1 default in 2024; vLLM, SGLang, and
transformers apply no penalty. An always-on penalty also distorts
output that legitimately repeats tokens, such as code, JSON, and long
reasoning traces.

The penalty is especially costly for speculative decoding, where
drafts are proposed without it: the penalized target rejects drafted
tokens and the depth controller backs off. On muse-glimmer 30B (DFlash
on M5 Max, HumanEval) the 1.1 default costs 13-16% of end-to-end
throughput at greedy and temperature 1 alike, and drops prose
acceptance at temperature 0.8 from 0.44 to 0.30. On qwen3.6-35B it
cuts the mean accepted draft length from 4.3 to 3.5 tokens and makes
the controller stop speculating on prose.

Defaulting to 1.0 disables the penalty unless a model's parameters or
the request set one. Across the library:

- qwen3, qwen3.6, and qwen3-coder pin their own values (1.0, 1.0, and
  Qwen's recommended 1.05) and are unchanged.
- Everything else local now matches its maker's no-penalty
  recommendation, including gemma2 through gemma4, muse-glimmer, both
  laguna 2.1 models, qwen3.5 (previously 1.1 stacked on its
  presence_penalty of 1.5), gpt-oss, deepseek-r1 and v3.1, the
  nemotron family, granite4, the mistral and llama3/llama4 families,
  phi4, glm4, llava, and devstral.
- qwen2.5 recommends 1.05 but ships no parameters, so it moves from
  1.1 to 1.0 and still needs a parameters layer to conform.
- Cloud models (kimi-k3, deepseek-v4-flash) never receive these
  defaults.

Small older models may repeat themselves more without the penalty
masking it; the remedy is a per-model parameter, not a penalty applied
to every model.
2026-08-11 21:47:51 -07:00
Eva H
948f69330a
docs: fix broken links (#17676) 2026-08-11 14:36:39 -07:00
Eva H
a836eb8c3c
docs: require VS Code 1.127 (#17655) 2026-08-10 11:21:26 -07:00
Eva H
1a9e4235ac
docs: add VS Code context length guidance (#17610) 2026-08-10 09:46:25 -07:00
Jeffrey Morgan
4713800b08
imagegen: remove MLX image generation code (#16615)
Remove the x/imagegen tree (MLX image generation engine, Flux2/zimage
models, cache, C bindings) and all imagegen integration points:

- server: drop imagegen routes, scheduling, and generate handling
- api/cmd/docs: remove image generation API surface and docs
- middleware/openai: remove image endpoint support
- integration: remove imagegen test suites
- x/create: adopt the rewritten create pipeline from main; drop
  imagegen create path (CreateImageGenModel, IsTensorModelDir,
  model_index.json detection, Flux2KleinPipeline vision hack)
- retain x/imagegen/manifest (Ollama-store safetensors manifest
  loader), still used by x/mlxrunner and x/create/client
- fix Windows MLX dl.dll install, MLX CMake version path, and the
  show command after removing safetensors models
2026-07-28 15:35:28 -07:00
Michael Yang
efb7e3c55e
docs: update retirements (#17289) 2026-07-22 14:24:11 -07:00
Patrick Devine
e2c2edcc27
docs: add renderer/parser fields to the API docs (#17275) 2026-07-20 16:22:46 -07:00
Parth Sareen
e8f7c93a0b
launch: update Hermes integration (#17202) 2026-07-20 11:28:01 -07:00
Parth Sareen
76188f60cd
docs: add VS Code extension setup (#17158) 2026-07-15 11:30:43 -07:00
Michael Yang
d49b96d9ab
docs: collapsed previous retirements (#17167) 2026-07-14 14:00:10 -07:00
Daniel Hiltgen
dba1e27fa8
llama: enable FA on CUDA CC 6.x GPUs (#16994)
Recent upstream Pascal kernel fixes let us compile native SM60/SM61 kernels again instead of relying on PTX JIT, so allow Flash Attention auto at runtime for CC 6.x devices.

Fixes #16591

Fixes #16754
2026-07-02 17:11:39 -07:00
Daniel Hiltgen
26acfa42b5
rocm: remove no longer supported devices (#17010)
The presets and docs had fallen out of sync with what our current ROCm versions on Linux and Windows actually support.  We rely on Vulkan now to cover these older unsupported devices.
2026-07-02 16:59:01 -07:00
Michael Yang
cecd265d3a
docs(cloud): update retirement list (#17000) 2026-07-01 19:43:14 -07:00
Bruce MacDonald
2cb2c5381f
launch: update hermes install urls to official (#16913) 2026-06-25 16:22:19 -07:00
Eva H
2a6b50421a
fix capability grid dark mode style (#16907) 2026-06-25 13:55:39 -04:00
Daniel Hiltgen
f22ec2ec49
CUDA: require driver 550 or newer for v12 (#16895)
Our cuda_v12 build requires nvcc fatbin compression, which in turn requires driver 550 or newer.  This change filters incompatible CUDA devices based on the runtime and driver version.  This allows users to build from source with older toolkits to support older drivers.

Fixes #16449
2026-06-25 08:46:00 -07:00
Eva H
d9075caf1a
docs: redesign coding integration docs (#16808) 2026-06-25 10:03:59 -04:00
Eva H
d48d790baf
docs: redesign docs landing and integrations overview (#16807)
Co-authored-by: Parth Sareen <parth.sareen@ollama.com>
2026-06-24 16:28:28 -04:00
Parth Sareen
479e1cf94e
docs: document max think level (#16877) 2026-06-23 15:29:15 -07:00
Bruce MacDonald
74cbf1d2c2
docs: omp (#16552)
Add docs for explaining and setting up "oh my pi" (omp)
2026-06-08 11:43:51 -07:00
Bruce MacDonald
5c1e37eb67
docs: hermes desktop (#16549) 2026-06-08 11:43:11 -07:00
Jeffrey Morgan
f0078ae476
docs: update docs examples to use Gemma 4 instead of Gemma 3 (#16607) 2026-06-07 12:43:13 -07:00
Chris Chen
25e0e81e12
docs: update Zod example to use native toJSONSchema (#14746)
Co-authored-by: fuleinist <fuleinist@gmail.com>
2026-06-05 16:21:07 -07:00