Commit Graph

12 Commits

Author SHA1 Message Date
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 3a45922c01 Test if Vulkan device is supported 2025-09-25 03:22:01 +02:00
Nakasaka, Masato 45430ded4b Fixed missing members in Vulkan header
also added zero clear for some structs
2025-09-17 16:04:43 +09:00
Nakasaka, Masato 6cf4e0a7c8 added missing NL 2025-09-17 15:21:24 +09:00
Nakasaka, Masato 73441c9780 Removed unneeded function call
Somehow removing this call fixed the crashing when Vulkan header was removed
2025-09-17 15:11:13 +09:00
Masato Nakasaka ede4081253 Fix compile error in Mac
Metal is preferred so we're disabling Vulkan for now
2025-09-16 17:00:17 +09:00
Masato Nakasaka ec7628f853 added Vulkan API to get correct Device UUID
current UUID from pipelineCacheUUID does not match CUDA
2025-09-09 17:11:50 +09:00
Xiaodong Ye 603d3ab0ca vulkan: get GPU ID (ollama v0.11.5)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-09-06 20:11:06 +02:00
Masato Nakasaka af5f5bdf60 Removed libcap related code
libcap is not directly related to Vulkan and should be added by its own PR. It adds additional library dependencies for building and also requires users to run setcap or run ollama as root, which is not ideal for easy use
2025-08-27 11:51:53 +09:00
Vadim Grinco 45dbd14645
Merged latest ollama 0.6.2 and nasrally's Flash Attention patches (#5)
* readme: add Ellama to list of community integrations (#9800)

* readme: add screenpipe to community integrations (#9786)

* Add support for ROCm gfx1151 (#9773)

* conditionally enable parallel pipelines

* sample: make mutations in transforms explicit (#9743)

* updated minP to use early exit making use of sorted tokens

* ml/backend/ggml: allocate memory with malloc when loading model (#9822)

* runner: remove cache prompt flag from ollama runner (#9826)

We do not need to bypass the prompt caching in the ollama runner yet, as
only embedding models needed to bypass the prompt caching. When embedding
models are implemented they can skip initializing this cache completely.

* ollamarunner: Check for minBatch of context space when shifting

Models can specify that a group of inputs need to be handled a single
batch. However, context shifting didn't respect this and could trigger
a break anyways. In this case, we should instead trigger a context
shift earlier so that it occurs before the grouped batch.

Note that there still some corner cases:
 - A long prompt that exceeds the context window can get truncated
   in the middle of an image. With the current models, this will
   result in the model not recognizing the image at all, which is
   pretty much the expected result with truncation.
 - The context window is set less than the minimum batch size. The
   only solution to this is to refuse to load the model with these
   settings. However, this can never occur with current models and
   default settings.

Since users are unlikely to run into these scenarios, fixing them is
left as a follow up.

* Applied latest patches from McBane87

See this for details: https://github.com/whyvl/ollama-vulkan/issues/7#issuecomment-2708820861

Signed-off-by: Vadim Grinco <vadim@grinco.eu>

* Add ability to enable flash attention on vulkan (#4)

* discover: add flash attention handling for vulkan
* envconfig: fix typo in config.go

As part of the process some code was refactored and I added a new field
FlashAttention to GpuInfo since the previous solution didn't allow for a
granular check via vulkan extensions. As a side effect, this now allows
for granular per-device FA support checking in other places

---------

Signed-off-by: Vadim Grinco <vadim@grinco.eu>
Co-authored-by: zeo <108888572+zeozeozeo@users.noreply.github.com>
Co-authored-by: Louis Beaumont <louis.beaumont@gmail.com>
Co-authored-by: Daniel Hiltgen <dhiltgen@users.noreply.github.com>
Co-authored-by: Michael Yang <mxyng@pm.me>
Co-authored-by: Parth Sareen <parth.sareen@ollama.com>
Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com>
Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>
Co-authored-by: Jesse Gross <jesse@ollama.com>
Co-authored-by: Nikita <50599445+nasrally@users.noreply.github.com>
2025-03-23 12:27:37 +01:00
pufferffish 9ad63a747b fix conflict 2025-01-12 01:00:41 +00:00