macOS: bump pinned llama.cpp to ≥ b10734 so the Metal tensor API works on M5 (prefill ~2.7× slower today)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 20/100
Direção de pesquisa
The version pin lives in pkg/inference/backends/llamacpp/download.go (pinnedServerVersion) and the .versions file; the upstream fix is ggml-org/llama.cpp#27461, shipped in b10734. Confirm the newest published docker/docker-model-backend-llamacpp Metal tag is at or above b10734, since the bump depends on that build existing. Done means the pin is updated and the M5 log no longer shows the tensor-API disabled warning, which likely needs a maintainer to publish the build.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Title: macOS: bump pinned llama.cpp to ≥ b10734 so the Metal tensor API works on M5 (prefill ~2.7× slower today)
Summary
On Apple M5 hosts, Docker Model Runner's pinned llama.cpp (b9879-metal) fails to enable the Metal tensor API (GPU Neural Accelerators) and falls back to the general-purpose shader path. Prompt processing runs at roughly ⅓ of what the same model file achieves with a current llama.cpp build on the same machine.
This is upstream llama.cpp issue ggml-org/llama.cpp#27473: the runtime Metal compile never sets MTLCompileOptions.languageVersion to 4.0, so the tensor-API probe fails with use of undeclared identifier 'mpp'. It was fixed in ggml-org/llama.cpp#27461, released in b10734.
#1104 bumps the vendored llama.cpp submodule to b12211, but pinnedServerVersion in pkg/inference/backends/llamacpp/download.go (and .versions) is still b9879. The newest Metal tag on docker/docker-model-backend-llamacpp is b9879-metal (latest-metal is older), so LLAMA_SERVER_VERSION cannot be used as a workaround.
Environment
- Apple M5 Pro (16-core GPU), 48 GB, macOS 27.2.1
- Docker Desktop 4.98.0, Docker Model Runner v1.2.9
- Backend:
llama.cpp b9879-metal (sha256:b70706f473b4043ca3e0c32704a7fda3412b83bceef0564684187b8011230de8),build 1 (72874f5) with AppleClang 17.0.0.17000013 - Model:
ai/llama3.18B Q4_K_M (sha256:c2d45031ad77…)
Observed
On every model load, ~/Library/Containers/com.docker.docker/Data/log/host/inference-llama.cpp-server.log:
E ggml_metal_library_init_from_source: error compiling source
W ggml_metal_device_init: - the tensor API is not supported in this environment - disabling
Measurements (same GGUF file, same host)
llama-bench -b 2048 -ub 2048 with Homebrew llama.cpp (build 12359, b1b770d90) against the GGUF in ~/.docker/models/bundles/sha256/c2d45031…/model/model.gguf, with DMR idle:
| Test | Native, tensor API on | Native, GGML_METAL_TENSOR_DISABLE=1 |
DMR b9879-metal (server log) |
|---|---|---|---|
| Prefill, 2,048 tokens | 1,055 tok/s | 385 tok/s | ~380 tok/s |
| Prefill, 7,168 tokens | 905 tok/s | 346 tok/s | — |
| Decode, 128 tokens | 55 tok/s | — | ~52–55 tok/s |
Disabling the tensor API on the current build reproduces DMR's numbers exactly, so the gap is the tensor API alone.
End to end, on a prompt-heavy summarization workload (OpenAI-compatible /chat/completions, ~10:1 prompt:completion tokens), swapping DMR for a tensor-enabled llama-server serving the same GGUF with the same slot layout (-c 32768 -np 4 -kvu) cut wall time 1.49× at 1 concurrent request and 1.64× at 4.
Request
Publish a docker/docker-model-backend-llamacpp Metal build at ≥ b10734 and bump pinnedServerVersion so Docker Desktop on M5 picks it up. Pre-M5 Apple Silicon is unaffected (ggml disables the tensor path by chip name on those devices).
- Linguagem predominante
- Go
- Estrelas
- 662
- Forks
- 156
- Merge médio
- 15h 26min
- PRs com merge (30d)
- 17
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de docker/model-runner
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 43/100
docker/model-runner#1103 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 Meio dia Facilidade para iniciantes 45/100
docker/model-runner#1100 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
docker/model-runner#1077 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
docker/model-runner#1073 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 68/100
docker/model-runner#1063 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de docker/model-runner
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
hexlet-basics/hexlet-basics#968 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
kubernetes-sigs/scheduler-plugins#1031 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Netcracker/qubership-authz-agent#311 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
agent-review-finding chore
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
jordansmall/spindrift#7254 ·
Mantenedores costumam responder em até 1 dia