ollama/model/renderers
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
..
testdata qwen3.8: add renderer and MLX import support (#17745) 2026-08-14 09:31:09 -07:00
cogito.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
cogito_test.go preserve tool definition and call JSON ordering (#13525) 2026-01-05 18:03:36 -08:00
cohere.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
cohere_test.go models: add cohere2_moe (Command A / North) to the MLX engine (#16670) 2026-06-16 23:15:21 -07:00
deepseek3.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
deepseek3_test.go preserve tool definition and call JSON ordering (#13525) 2026-01-05 18:03:36 -08:00
functiongemma.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
functiongemma_test.go preserve tool definition and call JSON ordering (#13525) 2026-01-05 18:03:36 -08:00
gemma4.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
gemma4_reference_test.go model: align gemma4 chat template handling (#17182) 2026-07-14 15:42:04 -07:00
glimmer.go mlx: System one support (#18701) 2026-10-03 13:17:21 -07:00
glimmer_reference_test.go model/renderers: match Muse Glimmer reasoning template (#17732) 2026-08-13 14:35:50 -07:00
glimmer_test.go Release v0.32.7 (#17646) 2026-08-10 04:04:56 -07:00
glm46.go runner: Remove CGO engines, use llama-server exclusively for GGML models (#16031) 2026-05-29 13:35:47 -07:00
glm46_test.go model: add Glm4MoeLiteForCausalLM architecture to support GLM-4.7-Flash (#13779) 2026-01-19 12:47:17 -08:00
glm47.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
glm47_test.go model: add Glm4MoeLiteForCausalLM architecture to support GLM-4.7-Flash (#13779) 2026-01-19 12:47:17 -08:00
glmocr.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
glmocr_test.go anthropic: Preserve Claude local image-path tool results in renderer-owned prompt formatting (#16047) 2026-05-12 00:02:17 -04:00
image_tags.go anthropic: Preserve Claude local image-path tool results in renderer-owned prompt formatting (#16047) 2026-05-12 00:02:17 -04:00
image_tags_test.go anthropic: Preserve Claude local image-path tool results in renderer-owned prompt formatting (#16047) 2026-05-12 00:02:17 -04:00
json.go mlx: System one support (#18701) 2026-10-03 13:17:21 -07:00
json_test.go parsers/renderers: olmo3 think (#13290) 2025-12-09 10:41:47 -08:00
laguna.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
laguna_test.go lint: clean up current tree (#17456) 2026-07-29 15:33:28 -07:00
lfm2.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
lfm2_test.go model: update lfm2 parser/renderer for optional thinking (#16359) 2026-06-14 20:37:08 -07:00
nemotron3nano.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
nemotron3nano_reference_test.go nemotron_h: support the Nemotron 3.5 prompt layout (#17672) 2026-08-11 06:18:51 -07:00
nemotron3nano_test.go mlx: implement Nemotron 3 Nano Omni (#17060) 2026-08-10 21:42:34 -07:00
nemotron35_reference_test.go nemotron_h: support the Nemotron 3.5 prompt layout (#17672) 2026-08-11 06:18:51 -07:00
nemotron_cases_test.go mlx: implement Nemotron 3 Nano Omni (#17060) 2026-08-10 21:42:34 -07:00
nemotron_extra_reference_test.go mlx: implement Nemotron 3 Nano Omni (#17060) 2026-08-10 21:42:34 -07:00
olmo3.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
olmo3_test.go olmo3: fix flaky test (#13629) 2026-01-05 22:37:20 -08:00
olmo3_think.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
olmo3_think_test.go preserve tool definition and call JSON ordering (#13525) 2026-01-05 18:03:36 -08:00
ornith.go parser/renderer: add Ornith 9B renderer/parser support (#16920) 2026-06-25 23:18:47 -07:00
ornith_test.go parser/renderer: add Ornith 9B renderer/parser support (#16920) 2026-06-25 23:18:47 -07:00
qwen3coder.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
qwen3coder_test.go model: add qwen3-next architecture (#14051) 2026-02-03 23:27:21 -08:00
qwen3vl.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
qwen3vl_nonthinking_test.go anthropic: Preserve Claude local image-path tool results in renderer-owned prompt formatting (#16047) 2026-05-12 00:02:17 -04:00
qwen3vl_thinking_test.go model: support for qwen3.5 architecture (#14378) 2026-02-24 20:08:05 -08:00
qwen35.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
qwen35_test.go model: fix renderer and parser for qwen3.5 (#14605) 2026-03-03 20:58:29 -08:00
qwen38_test.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
renderer.go mlx: System one support (#18701) 2026-10-03 13:17:21 -07:00
renderer_test.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
testhelpers_test.go model: add Glm4MoeLiteForCausalLM architecture to support GLM-4.7-Flash (#13779) 2026-01-19 12:47:17 -08:00
thinking.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00
thinking_test.go api: expose model thinking levels and defaults (#18473) 2026-09-18 14:10:53 -07:00