Is perplexity correctly computed?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
提供された evaluate および datasets のスニペットを使い、指定されたモデル、Wikitext split、パッケージバージョンで問題を再現する。結果をリンクされた LLaMA の議論および Transformers の perplexity チュートリアルと比較する。メトリクスまたはその使用方法が誤っているかどうかを判断し、確認された不一致を文書化または修正できれば完了とする。
索引モデルが issue の本文から書いたものです。
説明
Hello. I'm struggling with replicating the reported perplexity (~6) for LLaMa-2-7b.
I am using this simple code snippet:
import evaluate
import datasets
perplexity = evaluate.load("perplexity", module_type="metric")
input_texts = datasets.load_dataset("wikitext",
"wikitext-2-raw-v1",
split="test")["text"]
input_texts = [s for s in input_texts if s!='']
results = perplexity.compute(
model_id="sharpbai/Llama-2-7b-hf",
batch_size=4,
predictions=input_texts
)
print(results)
And I get among the results: 'mean_perplexity': 60.9764459149642.
In this tutorial it is computed "approximately" by flattening the dataset into a string and by computing the avg. sliding window perplexity. I still get a high perplexity.
I tried to change the model in the code snippet to openai-community/gpt2 and the perplexity is above 600!
Does this depend on using the correct model class?
Thank you for any suggestion.
EDIT: I'm using the following versions
transformers 4.38.2
evaluate 0.4.1
datasets 2.18.0
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 368
- 平均マージ
- 48分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
huggingface/evaluate のほかの issue
-
exact_match: ignore_punctuation only removes ASCII punctuation対応中かも @reginaldalfret が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
huggingface/evaluate#836 ·
メンテナーはふだん 1 日以内に返信
-
EvaluationSuite.run fails with default args_for_task and mutates supplied kwargs対応中かも @ktz03 が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
huggingface/evaluate#825 ·
メンテナーはふだん 1 日以内に返信
-
exact_match scores two different answers as a perfect match when normalization erases both to the same residue対応中かも @MahendraMula が 43 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
huggingface/evaluate#822 ·
メンテナーはふだん 1 日以内に返信
-
Perplexity metric fails with GPT-2 tokenizer対応中かも @zanvari が 140 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
huggingface/evaluate#766 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
False/misleading instruction to use different checkpoints of BLEURT再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
huggingface/evaluate#679 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
huggingface/evaluate の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FinanceFlash/unvibecode#509 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/python-sdk#3821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug severity:low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
Log-odds calibration uses upper middle score instead of median for even candidate sets対応中かも @flysheep-ai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信