{"id":13652711,"url":"https://github.com/RUCAIBox/BAMBOO","last_synced_at":"2025-04-23T03:31:33.045Z","repository":{"id":217108913,"uuid":"695397849","full_name":"RUCAIBox/BAMBOO","owner":"RUCAIBox","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-25T13:53:59.000Z","size":15686,"stargazers_count":31,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-10T03:35:46.637Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RUCAIBox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-23T04:04:18.000Z","updated_at":"2024-11-02T03:59:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8ad21df-c110-42d4-89e2-389e6a857359","html_url":"https://github.com/RUCAIBox/BAMBOO","commit_stats":null,"previous_names":["rucaibox/bamboo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FBAMBOO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FBAMBOO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FBAMBOO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FBAMBOO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RUCAIBox","download_url":"https://codeload.github.com/RUCAIBox/BAMBOO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365604,"owners_count":21418713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:01:01.917Z","updated_at":"2025-04-23T03:31:28.037Z","avatar_url":"https://github.com/RUCAIBox.png","language":"Python","funding_links":[],"categories":["A01_文本生成_文本对话","Anthropomorphic-Taxonomy"],"sub_categories":["大语言对话模型及数据","Typical Intelligence Quotient (IQ)-General Intelligence evaluation benchmarks"],"readme":"# BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities\n\nThis repository contains the evaluation code, prompt, and datasets for the paper [BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities](https://arxiv.org/abs/2309.13345).\n\nBAMBOO benchmark is  a comprehensive benchmark to analyze LLMs’ long text modeling. In BAMBOO benchmark, there are 10 datasets from 5 tasks, i.e., question answering, hallucination detection, langauge modeling, code completion, and text sorting. Our benchmark is constructed with the following principles:\n\n* Comprehensive Capacity Evaluation\n* Avoidance of Data Contamination\n* Accurate Automatic Evaluation\n* Different Length Levels\n\n\n## Repository Structure\n\n- `datasets`: This directory contains the data files in the benchmark. There are 10 datasets, and each dataset contains 2 files of different lengths(4k, 16k).\n\n- `evaluate.py`: This Python script is used to evaluate the outputs of your long text models.\n\n- `prompt.json`: This json file contains prompts used to evaluating your long context model. \n\n- `requirements.txt`: Python packages to be installed for evaluating your outputs.\n\n- `private_eval`: The directory contains evaluate code of `private_eval` datasets, which refers to [PyCodeGPT](https://github.com/microsoft/PyCodeGPT)\n\n\n## Evaluation\nIf you obtain outputs of each datasets, you can create a python environment ``BAMBOO`` and evaluate your outputs.\n\n1. Create and activate the conda environment named BAMBOO:\n    \n    ```bash\n    conda create -n BAMBOO\n    conda activate BAMBOO\n    ```\n\n2. Install the required Python packages by running:\n    \n    ```bash\n    pip install -r requirements.txt\n    ```\n3. Run the generation script with your model. For example:\n\n    ```bash\n    python code/run_for_all.py --output_path output_path --input_path input_path --prompt_name prompt_name --prompt_path prompt_path --model_path model_path\n    ```\n\n4. Run the evaluation script with your model's output. For example:\n    \n    ```bash\n    python evaluate.py --input_path your_file.jsonl --task task\n    ```\n### Evaluating a model from huggingface\n\nHere, we provide instructions on utilizing a model from Hugging Face to generate responses to prompts in BAMBOO. We employ the model ``lmsys/vicuna-7b-v1.5-16k``, along with its template in ``fastchat``, as an illustrative example. You can execute the following script to evaluate ``altqa_4K`` with the aforementioned model:\n\n```bash\npython run_for_all.py --output_path pred_altqa_long_longchat.jsonl --input_path datasets/altqa_middle.jsonl --prompt_name altqa --prompt_path prompt.json --model_path lmsys/vicuna-7b-v1.5-16k\n```\n\n### Output format\n\nEach data point in your jsonl file should at least contains two keys:\n\n* **pred**: prediction of the model.\n* **answer**: the right answer.\n\n### Task Selection\nTask should chosen from the list ``['meetingqa','paperqa','altqa','senhallu','abshallu','meetingpred','showspred','reportsumsort','showssort','private_eval']``\n\n\n## License\n\nThis repository is released under the [MIT License](LICENSE).\n\n## Citation\n\nIf you use this benchmark or code in your research, please consider citing the original paper:\n\n```\n@article{dong2023bamboo,\n  title={BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Models},\n  author={Dong, Zican and Tang, Tianyi and Li, Junyi and Zhao, Wayne Xin and Wen, Ji-Rong},\n  journal={arXiv preprint arXiv:2309.13345},\n  year={2023}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRUCAIBox%2FBAMBOO","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRUCAIBox%2FBAMBOO","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRUCAIBox%2FBAMBOO/lists"}