evalplus
valPlus v0.3.1
EvalPlus() =>大約•快速啟動•LLM後端•文檔•引文•確認
誰在使用evalplus數據集? LLM團隊使用了評估Plus,包括:
下面跟踪EvalPlus的顯著更新:
v0.3.1 ] :evalplus v0.3.1正式發布!亮點: (i)代碼效率通過esteperf進行評估, (ii)一個運行全部運行的命令:一代 +後處理 +評估, (iii)支持更多推理後端,例如Google Gemini&Anthropic等。v0.3.0 ] :改進了MBPP+任務的地面真相解決方案(IDS:459,102,559)。感謝evalarena。v0.3.0 ] :通過刪除一些損壞的任務(399-> 378任務),將MBPP+升級到v0.2.0 。 〜4pp Pass@1可以提高1個。v0.2.1 )您可以通過BigCode-evaluation-Harness使用EvalPlus數據集! HumaneVal+ Oracle修復(32)。v0.2.0 )MBPP+已發布! Humaneval合同和輸入修復程序(0/3/9/148/114/1/1/2/99/28/32/35/160)。v0.1.7 )排行榜發布; Humaneval+合同和輸入修復程序(32/166/126/6)v0.1.6 )可配置和違約保守的超時設置; Humaneval+合同和地面真相修復(129/148/75/75/53/0/3/9/140)v0.1.5 )當您有太多樣本時,HumaneVal+ Mini將進行超快速評估!v0.1.1 )優化用戶體驗:評估速度,PYPI軟件包,Docker等v0.1.0 )HumaneVal+已發布! 評估Plus是LLM4Code的嚴格評估框架,其中:
為什麼要評估?
想知道更多細節嗎?閱讀我們的論文和材料!
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.txt要了解有關如何使用評估Plus的更多信息,請參考以下內容:
@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 } ,
}