Expose `ggml_backend_load()` and `ggml_backend_load_all()` to make use of builds with `GGML_BACKEND_DL=ON` and `GGML_CPU_ALL_VARIANTS=ON`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
llama-cpp-python にあるバックエンド関連関数の既存の C バインディングを確認してください。issue では llama.cpp の ggml_backend_load() と ggml_backend_load_all() が言及されています。類似の関数がどこで公開されているかを確認し、これらを追加してください。GGML_BACKEND_DL=ON を指定したビルド構成を確認して、動的ロードの仕組みを理解してください。モデルをコンパイルしてロードすることでテストし、バックエンドライブラリが正しくロードされ、エラーが解消されることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
I just tried compiling llama-cpp-python with GGML_BACKEND_DL=ON and GGML_CPU_ALL_VARIANTS=ON to make use of this nice feature with dynamic dispatch to a dynamically loaded backend, which e.g. made it possible to build llama.cpp once but dynamically choose the best backend for the current CPU, i.e. for x86_64 depending on whether certain instructions like AVX2 or AVX512 are available choose the best backend for the current microarchitecture level.
Compiling worked for me so far on Ubuntu 24.04 LTS and when inspecting the wheel I see the backend dynamic libraries like bin/libggml-cpu-x64.so, libggml-cpu-sse42.so, libggml-cpu-haswell.so and so on. So that is good already.
But when loading a model with llama-cpp-python I get this error:
llama_model_load_from_file_impl: no backends are loaded. hint: use ggml_backend_load() or ggml_backend_load_all() to load a backend before calling this function but these functions are not exposed yet via the bindings.
I think this would be a really great thing to add. That would make the CPU wheels for llama-cpp-python way better, because it wouldn't be stuck with base x86_64 instructions and could thus be way more performant for cases where the wheel cannot be compiled at installation time.
- 主要言語
- Python
- スター
- 10.6k
- フォーク
- 1.5k
- 平均マージ
- 3時間 57分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
abetlen/llama-cpp-python のほかの issue
-
Seven llama_sampler_init_* bindings admit keyword arguments that the ctypes function object silently drops対応中かも @Belal0066 が 19 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
abetlen/llama-cpp-python#2371 ·
メンテナーはふだん 1 日以内に返信
-
uv add llama-cpp-python wheels fails for versions above 0.3.30対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2352 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs: consolidate build-from-source and GPU backend guide対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
abetlen/llama-cpp-python#2314 ·
メンテナーはふだん 1 日以内に返信
-
Llama.embed() calls LlamaBatch.add_sequence with old 3-arg signature; missing logits_array再び着手できるかも @lxcxjxhx が 96 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2211 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Llama() silently accepts and discards `embedding` kwarg; .embed() then raises confusingly対応中かも @Anai-Guo が 36 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2210 ·
メンテナーはふだん 1 日以内に返信
abetlen/llama-cpp-python の issue をすべて見る
似ている issue
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#14043 ·
メンテナーはふだん 1 日以内に返信
-
netbox status: needs triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
netbox-community/netbox#23376 ·
メンテナーはふだん 1 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
githubnext/gh-aw-workshop#4455 ·
メンテナーはふだん 1 日以内に返信
-
Triage 🩺
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitオープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
krkn-chaos/krkn#1627 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信