[BUG] llama_cpp: the GGUF file gets a random general.name, so the same build never has the same SHA-256
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
src/pruna/algorithms/llama_cpp.pyから始め、_convert_to_gguf()をたどって、convert_hf_to_gguf.pyコマンドを組み立てる箇所を確認します。モデル名の取得方法とコンバーターへの渡し方を調べ、GGUF変換に関連するテストを探します。同じモデルのビルドを繰り返しても安定したgeneral.nameが使われることを完了条件とし、レポートではその動作を検証するテストも求めています。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
_convert_to_gguf() in src/pruna/algorithms/llama_cpp.py saves the model into a tempfile.TemporaryDirectory and runs convert_hf_to_gguf.py on that folder without --model-name. When no name comes from the model card, the converter falls back to the folder name for general.name (convert_hf_to_gguf.py at the pinned b8958, lines 901 to 903). So every GGUF file carries a random name like tmpk3x9..., and two builds of the same model can never have the same SHA-256.
What I did
Smashed Qwen2.5-Coder-1.5B-Instruct three times with
SmashConfig({"llama_cpp": {"quantization_method": "q4_k_m", "n_gpu_layers": 0}}, device="cpu")
and compared the files:
- same file size in all three runs
- three different SHA-256 hashes
- three different model names in the logs, each the name of the temp folder
- the same answers on the same 200 Spider questions
Expected behavior
The same model and settings give the same file, or at least a stable general.name, so a checksum can show that the smashed model is the one that was evaluated.
Environment
- pruna version: 0.3.5
- python version: 3.12
- Operating System: Ubuntu (GitHub-hosted runner), x86_64, CPU only
Additional context
convert_hf_to_gguf.py has a --model-name option, and gguf/metadata.py lets it override the name. Passing a stable name, for example the last part of model.config._name_or_path, would fix it:
convert_cmd += ["--model-name", model_id]
I can open a PR with a test that builds twice and compares the names. Found while building a text-to-SQL benchmark on pruna (the same one as #800).
- 主要言語
- Python
- スター
- 1.4k
- フォーク
- 129
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PrunaAI/pruna のほかの issue
-
[BUG] set_to_eval calls Llama.eval() on llama.cpp models, so latency/energy/memory metrics log a warning on every run対応中かも @zuhalsicim が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
[FEATURE] Add speculative decoding to the decoder algorithm family対応中かも @mohityadav8 が 6 日前に担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
[BUG] kvpress algorithm: KVzipPress and FastKVzipPress never compress during generate再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンstale
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Rose22/openlumara#166 ·
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
enhancement feature/signals self-driving team/self-driving
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PostHog/posthog#144208 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted tests
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
LMPrado-DZ23/open_notas_br#14 ·
メンテナーはふだん 1 日以内に返信