Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable use to the rebar feature to upload buffers to the device. #9251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtavenrath
Copy link
Contributor

Instead of copying host -> host staging -> device one can use the rebar feature to directly copy host -> device skipping the latency and 2nd memcpy which tripples memory bw consumption.

@github-actions github-actions bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Aug 30, 2024
@mtavenrath
Copy link
Contributor Author

Benchmark with Mistral-Nemo-Instruct-2407.Q5_K.gguf

| model                          |       size |     params | backend    | ngl |          nkvo | mmap |          test |              t/s |
| ------------------------------ | ---------: | ---------: | ---------- | --: | ------------: | ---: | ------------: | ---------------: |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         pp512 |    431.11 ± 3.66 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         pp512 |    438.10 ± 0.52 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         pp512 |    434.48 ± 1.57 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         tg128 |     30.55 ± 0.75 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         tg128 |     31.73 ± 0.11 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         tg128 |     31.62 ± 0.13 |

rebar

| model                          |       size |     params | backend    | ngl |          nkvo | mmap |          test |              t/s |
| ------------------------------ | ---------: | ---------: | ---------- | --: | ------------: | ---: | ------------: | ---------------: |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         pp512 |    435.98 ± 1.63 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         pp512 |    433.19 ± 1.01 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         pp512 |    435.82 ± 0.89 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         tg128 |     35.07 ± 0.14 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         tg128 |     34.89 ± 0.20 |
| llama 13B Q5_K - Medium        |   8.12 GiB |    12.25 B | Vulkan     | 100 |             1 |    0 |         tg128 |     34.36 ± 0.19 |

@mofosyne mofosyne added the Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix label Aug 30, 2024
@0cc4m 0cc4m assigned 0cc4m and unassigned 0cc4m Sep 8, 2024
@0cc4m 0cc4m self-requested a review September 8, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix Vulkan Issues specific to the Vulkan backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants