- 24 Sep, 2025 3 commits
-
-
Devon Rifkin authored
harmony: don't sanitize built-ins
-
Devon Rifkin authored
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.
-
Michael Yang authored
a leaf node with an alternative name gets all its alternatives names added into the same branch rather than creating branches themselves
-
- 23 Sep, 2025 3 commits
-
-
Michael Yang authored
-
Michael Yang authored
-
Patrick Devine authored
* 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
-
- 22 Sep, 2025 4 commits
-
-
Devon Rifkin authored
harmony: remove special casing in routes.go
-
Daniel Hiltgen authored
* 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
-
jmorganca authored
-
jmorganca authored
-
- 20 Sep, 2025 2 commits
-
-
Devon Rifkin authored
parsers: fix `&`s in qwen3coder parameter values
-
Devon Rifkin authored
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
-
- 19 Sep, 2025 1 commit
-
-
Patrick Devine authored
* gemma: fix rope scaling for qat models * gofumpt yourself
-
- 18 Sep, 2025 8 commits
-
-
Michael Yang authored
with #12181, there's now support for embeddings in ollama engine. this is done by mutating the architecture and adding _embed when it detects an embedding model. however this introduced a bug where if an embedding model was run based on an existing ollama engine model without an embedding implementation, e.g. llama4, it will pass the initial arch support check but fail when actually loaded. there's currently two entrypoints to creating a model. previously this second entrypoint was necessary because calling model.New would also load the model. since #11818, this is no longer th case so merge them to reduce complexity
-
Michael Yang authored
* cleanup * use pooling.TypeNone * pooling test * qwen3 embed
-
Jeffrey Morgan authored
-
Daniel Hiltgen authored
With the addition of cuda v13, on a clean setup, the level of parallelism was causing docker desktop to become overwhelmed and compilers were crashing. This limits to 8 parallel per build stage, with the ability to override if you have many more cores available.
-
Devon Rifkin authored
Now that we have a built-in parser abstraction, which was introduced in <https://github.com/ollama/ollama/pull/12248>, we can modify our harmony parser to match this and then get rid of nearly all of the harmony-specific logic in routes.go. We do have a small amount of code that turns the parser on by default if the architecture matches and no other built-in parser was provided. The built-in parser interface was modified in order to handle harmony's prefill and tool name translation requirements.
-
Patrick Devine authored
-
Michael Yang authored
-
Patrick Devine authored
This change moves back to converting bf16 vision weights to fp16, specifically if they start with the name "v." (such as v.blk.0.attn_k.weight). This fixes a bug where converted images are failing because they are trying to call `im2col` which doesn't have a bf16 kernel in ggml.
-
- 17 Sep, 2025 6 commits
-
-
frob authored
-
Patrick Devine authored
-
Daniel Hiltgen authored
Ensure that in a version skewed multi-cuda setup we use the lowest version for all GPUs
-
Michael Yang authored
* fix(llama): rope scale * spm llama * skip moe models * cleanup
-
Michael Yang authored
-
russcoss authored
Signed-off-by:russcoss <russcoss@outlook.com>
-
- 16 Sep, 2025 5 commits
-
-
Michael Yang authored
-
Devon Rifkin authored
add qwen3-coder tool support
-
Michael Yang authored
* use ggml_*_split activations when possible * forward qkv
-
Michael Yang authored
* cleanup * use pooling.TypeNone * pooling test
-
Beshoy Girgis authored
Prioritize GPU compute capability over driver version to ensure Pascal GPUs (CC 6.1) use compatible CUDA v12 libraries instead of v13.
-
- 15 Sep, 2025 5 commits
-
-
Daniel Hiltgen authored
-
Michael Yang authored
* fix truncate * s/SentencePieceModel/SentencePiece/ * bert * wordpiece * refactor pooling * more tokenizers * normalize embeddings
-
Michael Yang authored
this cleans up the model interface slightly without too much impact in other areas
-
Devon Rifkin authored
-
Devon Rifkin authored
The format qwen3-coder uses is relatively unique, both in rendering and in parsing. To implement parsing, I wrote a custom parser in similar style to harmony. For the rendering, I found that the logic would be much more difficult to follow in a template, so I introduced the concept of a built-in renderer that uses go code, rather than a template to generate prompts. I set us up for future built-in parsers and renderers by making it so they can be specified in a Modelfile like so: ``` RENDERER "qwen3-coder" PARSER "qwen3-coder" ``` These need to be provided explicitly because the architecture alone is not enough to understand what format the model expects to receive, and what format we expect it to output (e.g., qwen3-coder is `qwen3moe`, which includes other qwen3-family models as well) I haven't converted harmony to be one of these "built-ins" yet, since some of it is in flux with the changes @ParthSareen has been making to move harmony to the runner. It is likely that many other built-ins will need to move to the runner as well, but I'm able to slightly defer that decision since qwen3-coder doesn't have thinking (and therefore doesn't need to be in the runner to make structured outputs work). I expect to unify harmony with this approach very soon. Whether a particular model supports tools or thinking was previously inferred from templates, but without a template we now also use the parser itself to declare what it supports. If we have future models that re-use the same parsing format, but have different capabilities, we'll want to parameterize them and give them different names to be specified as a `PARSER`. Misc changes: - I worked on the renderer by diffing outputs from the reference implementation and ours. To make it easier to do this, I extended <https://github.com/ollama/ollama/pull/11875> to also support returning the prompt via the openai compat layer
-
- 12 Sep, 2025 3 commits
-
-
tc-mb authored
Ollama's recent engine update, llama.cpp, caused all models requiring a slice schema to not display images. As a result, the value of numTokens isn't always the length of the sliced image embed, but rather the end length of the schema. This causes the image embed to not be correctly included during all slice processing.