Commit Graph

4807 Commits

Author SHA1 Message Date
Michael Yang
0469861d9d build: call find_package to instantiate library paths 2025-09-30 13:12:46 -07:00
Inforithmics
8619ad6838 Merge remote-tracking branch 'upstream/main' into vulkanV3 2025-09-29 22:38:49 +02:00
Inforithmics
a7ddd0e2ae gofumpt fix 2025-09-26 22:15:58 +02:00
羊撅撅
c47154c08d fix: correct condition for AMDGPU_TARGETS filtering logic (#12412) 2025-09-26 11:38:47 -07:00
Patrick Devine
b04e46da3e bugfix: restore the current runOptions if loading fails in the CLI (#12402)
There are two bugs when using `/load <model>` for a model that doesn't exist, namely:
  1. it will not restore the current model settings if the current model is a thinking model; and
  2. it will crash is the current model is a non-thinking model

This bug fix saves the current runOptions and then restores them if the model load
doesn't happen. It also fixes the crash happening for non-thinking models.
v0.12.3
2025-09-25 18:30:45 -07:00
Devon Rifkin
34efbbd3f0 Merge pull request #12417 from ollama/drifkin/qwen3-coder-unicode
parsers: fix unicode handling for qwen3-coder
2025-09-25 15:56:34 -07:00
Devon Rifkin
05ba4ca1f4 parsers: fix unicode handling for qwen3-coder
When trimming whitespace at the end of every chunk, we were iterating
backwards over the string byte-by-byte instead of rune-by-rune.

As an example of how this can cause corruption, suppose we have the
multi-byte character  (`"\u2705"`), which is represented in utf-8 as
the three bytes `0xE2 0x9C 0x85`. It happens that `0x85` is NEL, which
passes `unicode.IsSpace()`. Because we were iterating byte-by-byte, this
caused us to mistakenly slice in the middle of the rune, removing `0x85`
and leaving `0xE2 0x9C`, which beyond being the incorrect place to
slice, is not even a valid utf-8 character.

`trailingWhitespaceLen()` was modified to count from the end in a
rune-aware way. Tests with various multibyte unicode characters were
also added.


Fixes: #12414
2025-09-25 15:47:46 -07:00
Patrick Devine
5a56ff3cf0 cli: add device signin flow when doing ollama push (#12405) 2025-09-25 15:04:43 -07:00
Gabe Goodhart
2fba04b5fb tools: handle the case where a tool call sends "arguments" or "parameters" as a serialized json string (#12413) 2025-09-25 14:37:39 -07:00
Daniel Hiltgen
5647ac91b2 test: harden integration tests for slow start
If the server takes a while to start up, block
tests from starting until it's online to avoid
setting large timeouts in individual test cases.
2025-09-25 10:50:00 -07:00
Daniel Hiltgen
936c6d6be1 win: fix CPU query buffer handling
Try in a short loop until we get the size right.
2025-09-25 10:50:00 -07:00
Inforithmics
82f0c7e6a5 ask for supported first 2025-09-25 08:47:04 +02:00
Inforithmics
05bdfedb56 Handle GGML_VK_VISIBLE_DEVICES 2025-09-25 08:23:13 +02:00
Inforithmics
a7e2d21f59 vk_check_flash_attention is not needed (coompat2 coopmapt and scalar implementation exist) 2025-09-25 06:33:15 +02:00
Inforithmics
a2f2d41d89 Merge remote-tracking branch 'upstream/main' into vulkanV3 2025-09-25 03:22:25 +02:00
Inforithmics
3a45922c01 Test if Vulkan device is supported 2025-09-25 03:22:01 +02:00
Daniel Hiltgen
5f9f312bdb fix - give bootstrapping more time on slow systems 2025-09-24 16:25:56 -07:00
Daniel Hiltgen
5c18fb456c fix vulkan ids to be underlying 2025-09-24 15:48:35 -07:00
Grace
fbd82ba5bb Grace/deepseek v3 migration (#12385)
* init deepseek model file

* temp removal of flash attention implementation

* shapes and proper, can make a pass

* query, key, value have good cosine similarity, but the max diff is a bit high

* Attention block is working! ** with eager for now, have not added the mask line

* Attention block is working! ** with eager for now, have not added the mask line

* working MoE at around 0.95 cosine sim

* added cosine similarity function

* Starting end to end structure

* Trying (and failing) to get rope to work, going to test full thing on tater

* running on tater36... just not the right outputs

* we have the right values for rope... but its still not working?

* chnage Extrapolation Factor to 1

* removed adding residuals twice, removed normalization from shared expert, refactored Norms (Attention, MLP) to be outside the (Attention, MLP) blocks and in the Transformer block instead, add cache setLayer

* Temporary modelfiles for cpu

* change kpass intermediate step to kv, two layer outputs [0,1] look fine

* this calls for 16 chicken nuggets

* whoops

* cleaning up code

* delete stuff we dont need

* getting rid of debug statements for llama cpp

* working with long contexts

* fix long context view error

* reverting some changes I made for files that are not apart of pr

* Added proper tokenizer for deeepseek3

* clean up model and go test

* remove Modelfile

* not passing the tests

* whoops

* how to pass the ci tests

* resolving some of the comments

* rename

* linted and renamed deepseek3 -> deepseek2

* remove name go

* addressed changes - main change was adopting qwen3 naming scheme

* I cannot with linters

* clean up logs

* clean up logs

---------

Co-authored-by: Grace Guo <graceguo@Graces-MBP.localdomain>
Co-authored-by: Grace Guo <graceguo@Graces-MacBook-Pro.local>
Co-authored-by: graceguo <graceguo@tater36.localdomain>
2025-09-24 15:19:47 -07:00
Daniel Hiltgen
2689357890 fix index bug 2025-09-24 12:22:46 -07:00
Michael Yang
2e742544bf prefer ollama engine for qwen3moe (#12374) v0.12.2 v0.12.2-rc0 2025-09-24 11:21:32 -07:00
Daniel Hiltgen
c57cd59be7 fix - trust the library paths from discovery when starting runner 2025-09-24 10:49:39 -07:00
Daniel Hiltgen
c86af47ac0 WIP - wire up Vulkan with the new engine based discovery
Not a complete implementation - free VRAM is better, but not accurate on
windows
2025-09-24 10:49:39 -07:00
Devon Rifkin
bbb195a6ff Merge pull request #12393 from ollama/drifkin/fix-built-ins
harmony: don't sanitize built-ins
2025-09-23 23:45:31 -07:00
Devon Rifkin
fd88cd7cb0 harmony: don't sanitize built-ins
In #11910 we started sanitizing function names, but we accidentally were
modifying built-ins like `browser.open` to `browser_open`. This was
removing the special prompt rendering for built-ins, but this wasn't
immediately apparent since the models seem to be reasonably good at
remembering the built-ins even when presented with these slightly
renamed version. This fix prevents built-ins from ever being renamed.
2025-09-23 23:34:55 -07:00
Michael Yang
e1979c571a fix: leaf alt name (#12390)
a leaf node with an alternative name gets all its alternatives names
added into the same branch rather than creating branches themselves
2025-09-23 17:50:53 -07:00
Michael Yang
bf78ed6ee9 add pre:, suf: to tags (#12274) 2025-09-23 16:08:57 -07:00
Michael Yang
a40d427bce multi-regexp pretokenizer (#12325) 2025-09-23 13:21:47 -07:00
Patrick Devine
64883e3c4c auth: fix problems with the ollama keypairs (#12373)
* auth: fix problems with the ollama keypairs

This change adds several fixes including:
  - reading in the pubkey files correctly
  - fixing the push unit test to create a keypair file in a temp directory
  - not return 500 errors for normal status error
v0.12.1 v0.12.1-rc1 v0.12.1-rc2
2025-09-22 23:20:20 -07:00
Inforithmics
66bdd882f5 Merge remote-tracking branch 'upstream/main' into vulkanV3 2025-09-22 23:24:36 +02:00
Devon Rifkin
41efdd4048 Merge pull request #12339 from ollama/drifkin/harmony-refactor-to-builtin
harmony: remove special casing in routes.go
2025-09-22 13:13:40 -07:00
Daniel Hiltgen
c23e6f4cae tests: add single threaded history test (#12295)
* tests: add single threaded history test

Also tidies up some existing tests to handle more model output variation

* test: add support for testing specific architectures
2025-09-22 11:23:14 -07:00
jmorganca
af060eb250 docs: update cloud.md for cloud models 2025-09-22 13:09:17 -03:00
jmorganca
ae5c33008e docs: move turbo.md to cloud.md 2025-09-22 13:09:17 -03:00
Daniel Hiltgen
3a8ee62bd5 Merge remote-tracking branch 'inforithmics/vulkanV3' into engine_based_discovery_with_vulkan 2025-09-21 14:04:22 -07:00
Daniel Hiltgen
3566fe0e7b timing info for runner 2025-09-21 13:53:24 -07:00
Daniel Hiltgen
f761292516 Use runners for GPU discovery
This revamps how we discover GPUs in the system by leveraging the Ollama
runner.  This should eliminate inconsistency between our GPU discovery and the
runners capabilities at runtime, particularly for cases where we try to filter
out unsupported GPUs.  Now the runner does that implicitly based on the actual
device list.  In some cases free VRAM reporting can be unreliable which can
leaad to scheduling mistakes, so this also includes a patch to leverage more
reliable VRAM reporting libraries if available.

Automatic workarounds have been removed as only one GPU leveraged this, which
is now documented. This GPU will soon fall off the support matrix with the next
ROCm bump.

Additional cleanup of the scheduler and discovery packages can be done in the
future once we have switched on the new memory management code, and removed
support for the llama runner.
2025-09-21 13:53:24 -07:00
Devon Rifkin
3677842ff1 Merge pull request #12358 from ollama/drifkin/qwen3-coder-ampersands
parsers: fix `&`s in qwen3coder parameter values
v0.12.1-rc0
2025-09-20 12:40:33 -07:00
Devon Rifkin
242df70a75 parsers: fix &s in qwen3coder parameter values
In <https://github.com/ollama/ollama/issues/12357> we that the model
will output tool calls such as

```
<function=shell>
<parameter=command>
pwd && ls -la
</parameter>
</function>
```

We parse this using the approach of transforming into valid xml and then
using an xml parser. While we do transform the function and parameter
names, we weren't escaping the parameter values (which in this example
are invalid since `pwd && ls -la` contains unescaped ampersands).

This has been fixed by first transforming the tags in the same way, and
then walking the transformed string and escaping the text in between the
tags. This also fixes a case where `<` in the middle of a parameter
value would cause an xml parse failure.

Fixes: #12357
2025-09-20 12:11:38 -07:00
Inforithmics
1cb70716bf revert debug code 2025-09-20 15:26:24 +02:00
Inforithmics
d26d920fb2 Filter out already supported gpus 2025-09-20 15:18:39 +02:00
Thomas Stocker
bd27162f24 Add Vulkan to Build Matrix
Vulkan Builds on CI
2025-09-20 11:06:35 +02:00
Inforithmics
04fba9ba09 revert debugging changes 2025-09-20 11:03:09 +02:00
Inforithmics
2098e6a8e3 trying to use version 1.4.313 2025-09-20 11:00:37 +02:00
Inforithmics
fe47191720 add some more extra 2025-09-20 10:53:43 +02:00
Inforithmics
6f546457de try again 2025-09-20 10:49:24 +02:00
Inforithmics
19bc49de5f try without version number 2025-09-20 10:48:18 +02:00
Inforithmics
a7557cf1a8 trying again 2025-09-20 10:39:05 +02:00
Inforithmics
3ccc18f1e1 try again 2025-09-20 10:36:48 +02:00
Inforithmics
79a0f526b1 fixed vulkan-sdk name 2025-09-20 10:33:23 +02:00