feat: Update vendored llama.cpp to include ModernBERT support
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
調査の方向性
この issue では、vendored llama.cpp サブモジュールを 2025 年 12 月 22 日より後のコミットに更新し、その後、変更された C API(例: llama_get_kv_self はなくなっています)に合わせて llama_cpp/llama_cpp.py の Python ctypes バインディングを更新する必要があります。また、特に LLAVA_BUILD 周辺について CMakeLists.txt の修正も必要です。まず現在の vendor/llama.cpp サブモジュールとバインディングコードを調べ、次に対象コミットにおける llama.cpp C API の変更を確認してください。-DLLAVA_BUILD=OFF でのビルドは workaround ですが、バインディングは完全に互換性を持たなければなりません。ライブラリが ModernBERT GGUF モデルをエラーなしでロードできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Context
The current release (v0.3.16, Aug 15 2025) vendors llama.cpp at commit 4227c9b (Aug 14, 2025). ModernBERT architecture support was added to llama.cpp on Dec 22, 2025 in PR ggml-org/llama.cpp#15641 (src/models/modern-bert.cpp). The vendor submodule hasn't been updated in ~7 months.
Problem
Loading a ModernBERT GGUF model fails with:
llama_model_load: error loading model: error loading model architecture: unknown model architecture: 'modernbert'
The binary only knows: bert, falcon, gemma, gpt2, llama, mamba, qwen, rwkv, stablelm — no modernbert.
Attempted fix
We tried updating the vendor submodule to llama.cpp b8373 (Mar 16, 2026) and building from source. Results:
- CMake fails with
LLAVA_BUILD=ON(default) —vendor/llama.cpp/tools/mtmd/CMakeLists.txt:37has aset_target_propertieserror incompatible with the binding's CMakeLists.txt - CMake succeeds with
-DLLAVA_BUILD=OFF— builds and installs fine - Runtime ABI mismatch — the Python bindings call
llama_get_kv_selfwhich no longer exists in b8373 (symbol not found). The C API has diverged significantly in 7 months.
So it's not just a submodule bump — the Python ctypes bindings need updates to match the current llama.cpp C API.
Why it matters
Several recent high-quality embedding models use ModernBERT architecture:
- granite-embedding-small-english-r2 (IBM, 47M params, 384d, BEIR NDCG@10 50.9, Apache 2.0)
- modernbert-embed-base (Nomic, 149M params, Apache 2.0)
- gte-modernbert-base (Alibaba, 149M params)
These models can't be used with llama-cpp-python until the binding is updated.
Request
Update the Python ctypes bindings and CMakeLists.txt to be compatible with a recent llama.cpp build that includes ModernBERT support (post Dec 22, 2025).
- 主要言語
- Python
- スター
- 10.7k
- フォーク
- 1.5k
- 平均マージ
- 1時間 40分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
abetlen/llama-cpp-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
abetlen/llama-cpp-python#2424 ·
メンテナーはふだん 1 日以内に返信
-
Seven llama_sampler_init_* bindings admit keyword arguments that the ctypes function object silently drops対応中かも @Belal0066 が 59 日前に担当しました。 オープン
難易度 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 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 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 が 136 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2211 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
abetlen/llama-cpp-python の issue をすべて見る
似ている issue
-
Bug IronPython Python 3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pyrevitlabs/pyRevit#4184 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
jqueryscript/awesome-claude-code#1009 ·
-
tests
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Plugin] 群聊记忆 · 人格养成オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100