test_relpos_attention_local: local (rel_pos_local_attn) attention diverges from NeMo
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
調査の方向性
forward_local と test_relpos_attention_local 実行ファイルから始め、ダンプされた pos_emb レイアウトと attention window の処理を scripts/gen_nemo_baseline.py と比較します。W=64 と W=32 で CPU f32 の乖離を再現します。C++ の出力が W に応答し、NeMo baseline と一致し、chunked と memory のテストが引き続き通過すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
While building a full NeMo-baseline set to run the model-dependent test suite, I
hit a divergence in the local (Longformer) attention path that looks separate
from #39 (the streaming O(N²) fix) — filing it on its own.
Symptom
test_relpos_attention_local fails on the 110m anchor, on CPU (PARAKEET_DEVICE=cpu,
f32 GGUF), so it isn't iGPU fp16 tolerance:
[relpos_attention_local] n=47616 max|d|=3.349e+02 mean|d|=9.779e+00 (worst@47338 got=0.44526 ref=335.37750) -> FAIL
The divergence is broad (mean |d| ≈ 10, not a single element) and the worst point
is the last time frame (worst index 47338 = frame 92 of T=93, d_model=512).
It's not the --att-context-size (W) chosen for the baseline
I regenerated PARAKEET_TEST_BASELINE_LOCAL at two windows and re-ran:
| W | result |
|---|---|
| 64 | worst@47338 got=0.44526 ref=335.37750 |
| 32 | worst@47338 got=0.44526 ref=356.31686 |
The C++ output (got) is identical across W while NeMo's ref changes — i.e.
forward_local does not respond to the window the baseline encodes. (W=128 is
correctly rejected by the test since W ≥ T.)
test_relpos_attention_local_chunked and test_relpos_attention_local_memory
pass (they use an internal brute-force reference), so the gap is specific to
the non-chunked forward_local vs the NeMo rel_pos_local_attn baseline.
Reproduce
# baseline (NeMo): local attention with a finite window over speech.wav
python scripts/gen_nemo_baseline.py \
--model nvidia/parakeet-tdt_ctc-110m \
--audio tests/fixtures/speech.wav \
--att-context-size 64 --output /tmp/baseline_local.gguf
# convert the 110m anchor to f32 gguf -> PARAKEET_TEST_GGUF
PARAKEET_DEVICE=cpu \
PARAKEET_TEST_GGUF=/tmp/pk110m-f32.gguf \
PARAKEET_TEST_BASELINE_LOCAL=/tmp/baseline_local.gguf \
./build/tests/test_relpos_attention_local
Question
Is this a known limitation, a layout/convention mismatch between the dumped
pos_emb ([2W+1, d_model]) and what forward_local expects, or a real bug in
the non-chunked local path? Happy to dig into forward_local if it's worth a fix.
- 主要言語
- C++
- スター
- 786
- フォーク
- 93
- 平均マージ
- 9日 19時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mudler/parakeet.cpp のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
mudler/parakeet.cpp#68 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
mudler/parakeet.cpp#62 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
mudler/parakeet.cpp#61 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
mudler/parakeet.cpp#60 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
mudler/parakeet.cpp#59 · コメント 3 件 ·
mudler/parakeet.cpp の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Icinga/icinga2#11058 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
component: split-view platform: windows
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zen-browser/desktop#15616 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area/ysql kind/bug priority/medium status/awaiting-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
yugabyte/yugabyte-db#34415 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
WayfireWM/wayfire#3148 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信