evalplus
valPlus v0.3.1
EvalPlus() =>?について•クイックスタート•LLMバックエンド•ドキュメント•引用•謝辞
EvalPlusデータセットを使用しているのは誰ですか? EvalPlusは、さまざまなLLMチームで使用されています。
以下は、evalplusの顕著な更新を追跡します。
v0.3.1 ] :EvalPlus v0.3.1が公式にリリースされました!ハイライト: (i) evalperfを介したコード効率評価、 (ii)すべてを実行する1つのコマンド:生成 +後処理 +評価、 (iii) Google Gemini&Anthropicなどのより多くの推論バックエンドのサポートなど。v0.3.0 ] :MBPP+タスクの改善されたグラウンドトゥルースソリューション(IDS:459、102、559)。 Evalarenaに感謝します。v0.3.0 ] :MBPP+は、いくつかの壊れたタスク(399-> 378タスク)を削除することにより、 v0.2.0にアップグレードされます。 〜4ppパス@1の改善が予想されます。v0.2.1 )BigCode-Evaluation-Harnessを介してEvalPlusデータセットを使用できます! Humanval+ Oracle Fixe(32)。v0.2.0 )MBPP+がリリースされます! Humanval Contract&Inpt Fixes(0/3/9/9/114/1/2/99/28/32/35/160)。v0.1.7 )リーダーボードのリリース。 HumanVal+契約および入力修正(32/166/126/6)v0.1.6 )構成可能および副省保守型タイムアウト設定。 HumanVal+契約および地上ート修正(129/148/75/53/0/3/9/140)v0.1.5 )Humaneval+ Miniは、サンプルが多すぎると超高速評価のためにリリースされます!v0.1.1 )ユーザーエクスペリエンスの最適化:評価速度、PYPIパッケージ、Dockerなど。v0.1.0 )Humaneval+がリリースされます! EvalPlusは、LLM4Codeの厳密な評価フレームワークです。
なぜevalplus?
詳細を知りたいですか?私たちの論文と資料を読んでください!
pip install --upgrade " evalplus[vllm] @ git+https://github.com/evalplus/evalplus "
# Or `pip install "evalplus[vllm]" --upgrade` for the latest stable release
evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend vllm
--greedy # Local generation
evalplus.codegen --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset humaneval
--backend vllm
--greedy
# Code execution within Docker
docker run --rm --pull=always -v $( pwd ) /evalplus_results:/app ganler/evalplus:latest
evalplus.evaluate --dataset humaneval
--samples /app/humaneval/ise-uiuc--Magicoder-S-DS-6.7B_vllm_temp_0.0.jsonlpip install --upgrade " evalplus[perf,vllm] @ git+https://github.com/evalplus/evalplus "
# Or `pip install "evalplus[perf,vllm]" --upgrade` for the latest stable release
sudo sh -c ' echo 0 > /proc/sys/kernel/perf_event_paranoid ' # Enable perf
evalplus.evalperf --model " ise-uiuc/Magicoder-S-DS-6.7B " --backend vllm # Local generation
evalplus.codegen --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset evalperf
--backend vllm
--temperature 1.0
--n-samples 100
# Code execution within Docker
sudo sh -c ' echo 0 > /proc/sys/kernel/perf_event_paranoid ' # Enable perf
docker run --cap-add PERFMON --rm --pull=always -v $( pwd ) /evalplus_results:/app ganler/evalplus:latest
evalplus.evalperf --samples /app/evalperf/ise-uiuc--Magicoder-S-DS-6.7B_vllm_temp_1.0.jsonltransformersバックエンド: evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend hf
--greedy注記
EvalPlusは、ベースモデルとチャットモデルにさまざまなプロンプトを使用します。デフォルトでは、 hf / vllmバックエンドとして使用する場合、 tokenizer.chat_templateによって検出されます。他のバックエンドの場合、チャットモードのみが許可されます。
したがって、ベースモデルにtokenizer.chat_templateが付属している場合は、チャットモードで評価されないように--force-base-promptを追加してください。
# Install Flash Attention 2
pip install packaging ninja
pip install flash-attn --no-build-isolation
# Note: if you have installation problem, consider using pre-built
# wheels from https://github.com/Dao-AILab/flash-attention/releases
# Run evaluation with FA2
evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend hf
--attn-implementation [flash_attention_2 | sdpa]
--greedyvllmバックエンド: evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend vllm
--tp [TENSOR_PARALLEL_SIZE]
--greedyopenai互換サーバー(例:VLLM): # OpenAI models
export OPENAI_API_KEY= " {KEY} " # https://platform.openai.com/settings/organization/api-keys
evalplus.evaluate --model " gpt-4o-2024-08-06 "
--dataset [humaneval | mbpp]
--backend openai --greedy
# DeepSeek
export OPENAI_API_KEY= " {KEY} " # https://platform.deepseek.com/api_keys
evalplus.evaluate --model " deepseek-chat "
--dataset [humaneval | mbpp]
--base-url https://api.deepseek.com
--backend openai --greedy
# Grok
export OPENAI_API_KEY= " {KEY} " # https://console.x.ai/
evalplus.evaluate --model " grok-beta "
--dataset [humaneval | mbpp]
--base-url https://api.x.ai/v1
--backend openai --greedy
# vLLM server
# First, launch a vLLM server: https://docs.vllm.ai/en/latest/serving/deploying_with_docker.html
evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--base-url http://localhost:8000/v1
--backend openai --greedy export OPENAI_API_KEY= " [YOUR_API_KEY] "
evalplus.evaluate --model " gpt-4o "
--dataset [humaneval | mbpp]
--backend openai
--greedy export ANTHROPIC_API_KEY= " [YOUR_API_KEY] "
evalplus.evaluate --model " claude-3-haiku-20240307 "
--dataset [humaneval | mbpp]
--backend anthropic
--greedy export GOOGLE_API_KEY= " [YOUR_API_KEY] "
evalplus.evaluate --model " gemini-1.5-pro "
--dataset [humaneval | mbpp]
--backend google
--greedy export BEDROCK_ROLE_ARN= " [BEDROCK_ROLE_ARN] "
evalplus.evaluate --model " anthropic.claude-3-5-sonnet-20241022-v2:0 "
--dataset [humaneval | mbpp]
--backend bedrock
--greedyあなたはevalplus_results/[humaneval|mbpp]/で生成と結果をチェックアウトできます。
git clone https://github.com/evalplus/evalplus.git
cd evalplus
export PYTHONPATH= $PYTHONPATH : $( pwd )
pip install -r requirements.txtEvalPlusの使用方法の詳細については、次のことを参照してください。
@inproceedings { evalplus ,
title = { Is Your Code Generated by Chat{GPT} Really Correct? Rigorous Evaluation of Large Language Models for Code Generation } ,
author = { Liu, Jiawei and Xia, Chunqiu Steven and Wang, Yuyao and Zhang, Lingming } ,
booktitle = { Thirty-seventh Conference on Neural Information Processing Systems } ,
year = { 2023 } ,
url = { https://openreview.net/forum?id=1qvx610Cu7 } ,
}
@inproceedings { evalperf ,
title = { Evaluating Language Models for Efficient Code Generation } ,
author = { Liu, Jiawei and Xie, Songrun and Wang, Junhao and Wei, Yuxiang and Ding, Yifeng and Zhang, Lingming } ,
booktitle = { First Conference on Language Modeling } ,
year = { 2024 } ,
url = { https://openreview.net/forum?id=IBCBMeAhmC } ,
}