Metal installation documentation

Offen Anfängerfreundlich
#1,968 0 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
80/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
documentation

Rechercherichtung

Prüfe die aktuelle Installationsdokumentation für llama-cpp-python, wahrscheinlich in README.md oder docs/install.md. Verifiziere, ob das Metal-Backend in der neuesten Version unter macOS tatsächlich standardmäßig aktiviert ist. Vergleiche dies mit der im Issue verlinkten Dokumentation von llama.cpp. Aktualisiere die Dokumentation, um klarzustellen, dass die Umgebungsvariable CMAKE_ARGS für die Metal-Unterstützung möglicherweise nicht mehr erforderlich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I tried setting up llama-cpp-python in the current version 0.3.7 on my MacBook M4 Pro.
In the first step I only installed via pip install llama-cpp-python --no-cache-dir without specifiying the environment variable for Metal backend support.
I set the n_gpu_layers to -1 to fully use the GPU.

The interesting thing is the GPU was used even without having to install the Metal backend support as stated in the current documentation. I double checked this with a fresh start and explicitely setting the CMAKE_ARGS env variable and did not see and difference in terms of performance or GPU usage.

This is pretty handy, because when not using pip for dependency management (e.g. poetry) passing the environment variable did not work on my side.

Maybe the documentation should be updated to state that the env arguments are no longer required? This would also reflect the documentation in https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md#metal-build where it states that: "On MacOS, Metal is enabled by default"

This would also mean, that custom pre-built wheels are no longer required as well.

Vorherrschende Sprache
Python
Sterne
10.6k
Forks
1.5k
Ø Merge
23 Min.
Gemergte PRs (30 T.)
1

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus abetlen/llama-cpp-python

Alle Issues in abetlen/llama-cpp-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.