CMMLU

A comprehensive Chinese evaluation benchmark for large language models.

Listed on

What is CMMLU?

CMMLU is a comprehensive Chinese evaluation benchmark designed to assess the knowledge and reasoning capabilities of language models within Chinese contexts, covering 67 topics from foundational subjects to advanced professional levels. The suite includes natural sciences requiring calculation and reasoning, humanities and social sciences demanding broad knowledge, and practical areas like Chinese driving regulations. Many tasks within CMMLU feature China-specific answers that may not be universally applicable in other regions or languages. CMMLU provides rich test data, a leaderboard, and supports various evaluation methods such as five-shot and zero-shot testing, making it a vital tool for measuring the performance of Chinese language models.

How to use CMMLU

  1. Obtain the dataset: Download from GitHub by visiting the CMMLU GitHub page (https://github.com/haonan-li/CMMLU/) and locating the development and test datasets in the data directory, or load it directly via Hugging Face (https://huggingface.co/datasets/haonan-li/cmmlu).
  2. Prepare the testing environment: Install necessary Python libraries such as transformers and datasets, then clone the CMMLU GitHub repository to access the testing code and preprocessing tools.
  3. git clone https://github.com/haonan-li/CMMLU.git cd CMMLU
  4. Preprocess the data: Use the provided scripts in the src/mp_utils directory to preprocess the data into a format suitable for model input.
  5. python src/mp_utils/preprocess.py
  6. Run the evaluation code: Load the model and tokenizer based on the language model you wish to evaluate, then run the testing script in the script directory to assess performance across different tasks.
  7. python script/evaluate.py --model <model_name> --data_path <data_path>
  8. Submit test results: For open-source models, submit a pull request (PR) to update the testing code and results. For closed models, send the testing code and results to the designated email address (haonan.li@librai.tech) and wait for verification before updating the leaderboard.
  9. Analyze results: View the model's performance on different tasks in the leaderboard section of the GitHub page to analyze strengths and weaknesses.

Key features of CMMLU

  • 1

    Leaderboard

    Showcases the performance of different language models under five-shot and zero-shot testing conditions, helping users compare model capabilities.

  • 2

    Dataset

    Provides development and test data, supporting quick usage and evaluation.

  • 3

    Preprocessing Code

    Offers prompt generation methods to facilitate model training and testing.

  • 4

    Evaluation Tools

    Supports multiple evaluation methods, making it easier for researchers and developers to test model capabilities.

Use cases of CMMLU

  • 1

    LLM Performance Evaluation

    Used to test and compare the knowledge and reasoning capabilities of language models in Chinese multi-task scenarios, helping optimize model architectures.

  • 2

    Intelligent Tutoring in Education

    Develop intelligent tutoring systems that provide students with multi-subject practice and learning advice to improve learning outcomes.

  • 3

    Intelligent Customer Service Optimization

    Evaluate a model's knowledge understanding in specific domains to optimize intelligent customer service systems and improve service quality.

  • 4

    Cultural Knowledge Dissemination

    Use the CMMLU dataset to develop cultural Q&A systems that spread Chinese cultural knowledge and promote cultural heritage.

  • 5

    Medical and Health Knowledge Assessment

    Evaluate language models' knowledge understanding in the medical field to assist in developing medical consultation tools and provide health advice.

More in LLM Benchmarks

View all
AGI-Eval

AI Large Model Evaluation Community

LLM Benchmarks
PubMedQA

Biomedical research QA dataset and model leaderboard

LLM Benchmarks
LLMEval3

A large language model benchmark from Fudan University's NLP Lab

LLM Benchmarks
HELM

Stanford's comprehensive evaluation framework for large language models

LLM Benchmarks