- 29 Aug, 2025 1 commit
-
-
Daniel Hiltgen authored
* Always filter devices Avoid crashing on unsupported AMD iGPUs * Remove cuda device filtering This interferes with mixed setups
-
- 28 Aug, 2025 1 commit
-
-
ofrancon authored
-
- 27 Aug, 2025 2 commits
-
-
Jesse Gross authored
The recent memory management changes caused all GPUs to be visible to the runner, regardless of whether they are ultimately used. This caused CUDA devices to allocate a primary context (~300 MB VRAM) on each GPU, for each model. This is unnecessary, so we can both avoid touching GPUs that we exclude in the early stage of allocation and freeing the memory for any that we touch but don't use. The issue will continue to exist for the old engine, since it touches all devices during initialization.
-
Michael Yang authored
-
- 26 Aug, 2025 3 commits
-
-
Michael Yang authored
* convert: return bytes written * ggml flavor mxfp4 * simplify jit conversion * comment
-
Michael Yang authored
there's two bugs here. 1. the check for a layer id is incorrect and should be >= 0 since layer 0 is valid 2. if both tensors have an layer identifier, it will only compare the layer id which will return 0 if the tensors are in the same layer. instead it should fallback to comparing the full tensor name
-
Michael Yang authored
-
- 25 Aug, 2025 1 commit
-
-
Michael Yang authored
-
- 22 Aug, 2025 6 commits
-
-
Jeffrey Morgan authored
-
Jeffrey Morgan authored
-
Devon Rifkin authored
thinking: fix double emit when no opening tag
-
Jeffrey Morgan authored
-
zoupingshi authored
Signed-off-by:zoupingshi <hangfachang@outlook.com>
-
Devon Rifkin authored
The thinking parser will automatically transition to being a pass-through if non-whitespace is seen before an opening tag. However, we weren't clearing the buffer after the first non-whitespace input, so in practice the first token would be emitted twice. Added a test that demonstrated this, and then fixed the bug.
-
- 21 Aug, 2025 1 commit
-
-
Parth Sareen authored
-
- 20 Aug, 2025 6 commits
-
-
Michael Yang authored
-
Jesse Gross authored
With old memory estimates, it's currently impossible to load more than one model at a time when no GPUs are available. This is because the check for whether we need to evict a model looks to see if all layers of the new model can be loaded onto GPUs, which is never true if there are no GPUs. Before the memory management changes, there was a special code path for CPU-only systems. This problem does not exist with new memory estimates. Fixes #11974
-
Michael Yang authored
-
Devon Rifkin authored
model: fix boundary in bpe
-
Devon Rifkin authored
-
Devon Rifkin authored
0x007e is a tilde and was getting adjusted (+0x00a2) to 0x0120 in the encode, but then in the decode it was getting adjusted down (-0x0100) to 0x0020. The boundary for the +0x00a2 case has been adjusted to fix this Fixes: #11966
-
- 19 Aug, 2025 2 commits
-
-
Jesse Gross authored
Flash attention kernels require the mask of the KV cache be a F16 rather than an F32. We can use the GGML operation ggml_cast to do this rather than doing it ourselves, which allows reuse of a preallocated buffer in the graph rather than allocating a new one for each batch. This improves token generation performance with flash attention by 10-30% (with gpt-oss). This also makes performance with flash attention better than without it, as expected.
-
Michael Yang authored
-
- 18 Aug, 2025 8 commits
-
-
Kostis authored
-
Ruslan Suleymanov authored
-
Devon Rifkin authored
harmony: convert fn names to be valid ts identifiers
-
Jesse Gross authored
We dump out our best memory estimate after we complete processing for any reason, including errors. This is helpful for finding what what stopped us in error conditions but in some cases we might not have gotten even the first result yet. Fixes #11957
-
Devon Rifkin authored
In <https://github.com/ollama/ollama/issues/11704#issuecomment-3177380197> I noticed that hyphens in function names could possibly cause the model to become confused. Later in that issue I found other explanations, but at a minimum tool names with spaces in them are confusing to the model because of the prompt format. In this change I create a mapper that converts arbitrary tool names into valid typescript identifiers. It's a little overly strict in that it doesn't allow all unicode characters that might be valid in ts identifiers, but it's still very permissive. Since mappings aren't reversible, we must temporarily store this mapping in order to unmap it if the model comes back with a call. We also handle the case where multiple mappings collide into the same mapping and append a counter to the end to make them unique
-
Devon Rifkin authored
server: add debug option for printing out prompt instead of calling model
-
Kostis authored
-
Jody Doolittle authored
-
- 15 Aug, 2025 7 commits
-
-
Michael Yang authored
-
Patrick Devine authored
-
Thomas Pelster authored
-
Daniel Hiltgen authored
Docker build requires build-args to be defined. This ensures the release.yaml settings will be used.
-
Daniel Hiltgen authored
* test: improve scheduler/concurrency stress tests The scheduler test used to use approximate memory figures and would often over or under shoot a systems capcity leading to flaky test results. This should improve the reliability of this scenario by leveraging ps output to determinie exactly how many models it takes to trigger thrashing. The concurrency test is also refined to target num_parallel + 1 and handle timeouts better. With these refinements, TestMultiModelConcurrency was redundant * test: add parallel generate with history TestGenerateWithHistory will help verify caching and context are properly handled while making requests * test: focus embed tests on embedding models remove non-embedding models from the embedding tests
-
Devon Rifkin authored
-
Daniel Hiltgen authored
This reverts commit dc5a6454.
-
- 14 Aug, 2025 2 commits
-
-
Daniel Hiltgen authored
-
Jesse Gross authored
This changes the memory allocation strategy from upfront estimation to tracking actual allocations done by the engine and reacting to that. The goal is avoid issues caused by both under-estimation (crashing) and over-estimation (low performance due to under-utilized GPUs). It is currently opt-in and can be enabled for models running on the Ollama engine by setting OLLAMA_NEW_ESTIMATES=1. Behavior in other cases is unchanged and will continue to use the existing estimates.
-