
? 영향 • ? 뉴스 • 빠른 시작 • 원격 평가 • LLM 생성 코드 •? 고급 사용법 •? 결과 제출 • 인용
BigCodeBench는 다음을 포함한 많은 LLM 팀에서 사용했습니다.
bigcodebench==v0.2.0 출시하고 있습니다!bigcodebench==v0.1.9 방출합니다.bigcodebench==v0.1.8 입니다.bigcodebench==v0.1.7 방출합니다.bigcodebench==v0.1.6 방출합니다.0.1.5 와 함께 제공됩니다. BigCodeBench는 코드를 통해 실용적이고 도전적인 작업을 해결하기위한 사용하기 쉬운 벤치 마크입니다. 보다 현실적인 설정에서 대형 언어 모델 (LLM)의 실제 프로그래밍 기능을 평가하는 것을 목표로합니다. 벤치 마크는 HumaneVal과 같은 기능 수준 코드 생성 작업을 위해 설계되었지만 훨씬 더 복잡한 지침과 다양한 기능 호출이 있습니다.
BigCodebench에는 두 개의 분할이 있습니다.
Complete : 스플릿은 포괄적 인 docstrings를 기반으로 코드 완료를 위해 설계되었습니다.Instruct : 분할은 자연어 지침에 따라 모델이 코드 스 니펫을 생성하도록 요청받는 명령 조정 및 채팅 모델에 대해서만 작동합니다. 지침에는 필요한 정보 만 포함되어 있으며보다 복잡한 추론이 필요합니다.BigCodeBench는 다양한 기능 호출 및 복잡한 지침 으로 코드 생성을 통한 작업 자동화에 중점을 둡니다.
시작하려면 먼저 환경을 설정하십시오.
# By default, you will use the remote evaluation API to execute the output samples.
pip install bigcodebench --upgrade
# You are suggested to use `flash-attn` for generating code samples.
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 # Install to use bigcodebench.generate
pip install " git+https://github.com/bigcode-project/bigcodebench.git " --upgrade우리는 욕심 많은 디코딩을 예제로 사용하여 원격 API를 통해 생성 된 코드 샘플을 평가하는 방법을 보여줍니다.
경고
세대를 완화하기 위해 기본적으로 배치 추론을 사용합니다. 그러나 배치 추론 결과는 배치 크기 및 배치 크기 및 버전, 버전 , 적어도 VLLM 백엔드에 따라 다를 수 있습니다. 탐욕스러운 디코딩에 대한 더 많은 결정적인 결과를 얻으려면 --bs 1 으로 설정하십시오.
메모
BigCodeBench-Full 에서 원격으로 실행하는 데 일반적으로 6-7 분이 걸리며 BigCodeBench-Hard 에서는 일반적으로 4-5 분이 걸립니다.
bigcodebench.evaluate
--model meta-llama/Meta-Llama-3.1-8B-Instruct
--split [complete | instruct]
--subset [full | hard]
--backend [vllm | openai | anthropic | google | mistral | hf]bcb_results 라는 폴더에 저장됩니다.[model_name]--bigcodebench-[instruct|complete]--[backend]-[temp]-[n_samples]-sanitized_calibrated.jsonl 이라는 파일에 저장됩니다.[model_name]--bigcodebench-[instruct|complete]--[backend]-[temp]-[n_samples]-sanitized_calibrated_eval_results.json 이라는 파일에 저장됩니다.[model_name]--bigcodebench-[instruct|complete]--[backend]-[temp]-[n_samples]-sanitized_calibrated_pass_at_k.json 이라는 파일에 저장됩니다. 메모
BigCodeBench는 기본 및 채팅 모델에 다른 프롬프트를 사용합니다. 기본적으로 hf / vllm 백엔드로 사용할 때 tokenizer.chat_template 에 의해 감지됩니다. 다른 백엔드의 경우 채팅 모드 만 허용됩니다.
따라서 기본 모델에 tokenizer.chat_template 가 함께 있으면 채팅 모드에서 평가되지 않도록 --direct_completion 추가하십시오.
OpenAI 콘솔에서 OpenAI API에 액세스하십시오
export OPENAI_API_KEY= < your_openai_api_key >인류 콘솔에서 인간 API에 액세스하십시오
export ANTHROPIC_API_KEY= < your_anthropic_api_key >Mistral Console에서 Mistral API에 액세스하십시오
export MISTRAL_API_KEY= < your_mistral_api_key >Google AI Studio에서 Gemini API에 액세스하십시오
export GOOGLE_API_KEY= < your_google_api_key > 우리는 평가 한 LLM의 사전 생성 코드 샘플을 공유합니다.
sanitized_samples_calibrated.zip 포함합니다. 자세한 내용은 고급 사용법을 참조하십시오.
생성 된 코드 샘플과 실행 결과를 [email protected]로 이메일로 보내주십시오. 파일 이름은 [model_name]--[revision]--[bigcodebench|bigcodebench-hard]-[instruct|complete]--[backend]-[temp]-[n_samples]-sanitized_calibrated.jsonl 및 형식이어야합니다. [model_name]--[revision]--[bigcodebench|bigcodebench-hard]-[instruct|complete]--[backend]-[temp]-[n_samples]-sanitized_calibrated_eval_results.json . 3 일 이내에 귀하의 이메일에 응답하지 않으면 문제를 제기 할 수 있습니다.
@article { zhuo2024bigcodebench ,
title = { BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions } ,
author = { Zhuo, Terry Yue and Vu, Minh Chien and Chim, Jenny and Hu, Han and Yu, Wenhao and Widyasari, Ratnadira and Yusuf, Imam Nur Bani and Zhan, Haolan and He, Junda and Paul, Indraneil and others } ,
journal = { arXiv preprint arXiv:2406.15877 } ,
year = { 2024 }
}