{"repo": "anonymous-submitter0104/neurips-submission", "files": {"indic-mmlu/README.md": {"6e9995688769bb4aea3224af97961761ed2e5679": {"t": 1785747245.7293606, "n": 19996, "h": "116c711498ccf534", "c": "# Indic MMLU — Benchmarking Open-Source LLMs on Indian Languages\n\nA rigorously prepared, multi-language adaptation of the CAIS/MMLU test set, translated and enhanced for **22 Indic languages**, designed to evaluate open-source LLMs’ real-world ability to understand Indian languages.\nWe additionally conducted large-scale **evaluation on 16 of these Indic languages (plus English)**, producing detailed accuracy reports and per-language visualizations.\n\n---\n# Table of Contents\n\n1. [Overview](#overview)\n2. [Why the Need for Indic MMLU](#why-the-need-for-indic-mmlu)\n - [Data Distillation for Indian Languages](#data-distillation-for-indian-languages)\n - [The Role of Indic MMLU](#the-role-of-indic-mmlu)\n3. [What This Dataset Has on Offer](#what-this-dataset-has-on-offer)\n4. [Coverage](#coverage)\n5. [High-Level Pipeline](#high-level-pipeline-what-we-did)\n - [Indic MMLU Construction Algorithm](#indic-mmlu-construction-algorithm)\n6. [Translation Algorithm](#translation-algorithm)\n7. [Reproducible Commands](#reproducible-commands-examples)\n - [Translate](#translate)\n - [Enhance Translations (LLM-based)](#enhance-translations-llm-based)\n - [Generate Embeddings](#generate-embeddings)\n - [Cosine Similarity](#cosine-similarity-english-vs-translated-enhancements)\n - [Linguist / Teacher Rating](#linguist--teacher-rating-llm-assisted-orchestration)\n - [Model Evaluation with `lm-eval`](#model-evaluation-with-lm-eval)\n8. [Download Indic MMLU Dataset](#download-Indic-mmlu-dataset)\n9. [Summary of LLM-as-Judge Ratings](#summary-of-llm-as-judge-ratings)\n10. [Cosine Similarity](#cosine-similarity)\n11. [Model Evaluation Methodology](#model-evaluation-methodology)\n12. [Important Note](#important-note)\n13. [Indic MMLU Results](#indic-mmlu-results)\n14. [How to Reproduce (Quick Checklist)](#how-to-reproduce-quick-checklist)\n15. [Best Practices & Caveats](#best-practices--caveats)\n16. [Visual Assets & Tables](#visual-assets--tables)\n\n---\n\n## Why the Need for Indic MMLU\n\nThe rise of large language models (LLMs) has enabled advanced **synthetic data generation**, including:\n\n* Building LLM-based frameworks for **data curation and sandboxing**\n* Generating reasoning and coding examples in non-English languages\n* Creating SFT datasets, as well as off-policy datasets for **RLHF, DPO, GRPO**-style training\n\nTo fully leverage these capabilities for Indian languages, we need LLMs with at least **limited native proficiency** in these languages. Such models allow us to generate high-quality, culturally-aligned datasets, create virtual personas to introduce nuanced constructs, and maintain **full control and flexibility** over the synthetic data pipeline.\n\n### Data Distillation for Indian Languages\n\nData distillation provides a practical approach to achieve this:\n\n* **Easier and cleaner access to world knowledge** from state-of-the-art LLMs\n* **Domain control and flexibility** to shape datasets according to cultural and linguistic requirements\n* Embedding **strong Indian values** into datasets more effectively than via custom pipelines\n* Creating safety datasets that mitigate **anti-Indian stances** and promote positive responses\n\n**Distillation** is the process of generating data from large models to produce **task-specific, high-quality, and culturally-aligned datasets**. Using distillation, we can apply various synthetic data augmentation strategies, such as:\n\n* Chain-of-Thought (CoT) reasoning\n* Multi-turn conversational setups for richer data\n* Summaries and diverse QA pairs\n* Incorporation of strong Indian values through **virtual Indian personas**\n* Other augmentations, including translations and language-specific refinements\n\n### The Role of Indic MMLU\n\nBefore deploying LLMs for such Indian-language data generation, we first need to **evaluate their cross-lingual knowledge transfer capabilities**. Indic MMLU serves this purpose by providing a benchmark to test how well models understand Indian languages, rather than merely translating English content.\n\nWhile previous efforts have translated MMLU into Indian languages, none have **released their methodology**. Indic MMLU is the first benchmark to provide:\n\n* **Open recipe and open code** for translations\n* Coverage of **22 Indian languages**\n* A fully transparent and **reproducible evaluation setup**\n\nThis ensures that models can be assessed rigorously for genuine Indian-language understanding, forming a **foundation for culturally-aware synthetic data pipelines** in future research.\n\n---\n\n## What this dataset has on offer\n\nLarge language models are often benchmarked only on English datasets, which leaves open the question of whether they can *actually* understand Indian languages beyond surface-level translation.\n\nThe **Indic MMLU dataset** bridges this gap by:\n\n* Translating the widely used **[CAIS/MMLU](https://huggingface.co/datasets/cais/mmlu) benchmark** into **22 Indian languages**.\n* Enhancing those translations with high-quality open-source LLM refinement.\n* Providing a reproducible evaluation setup for **measuring open-source models across 16 Indic languages (evaluated subset)**.\n\nIf a model’s score on an Indic version is close to its score on the original English MMLU, it indicates **genuine language understanding** and strong cross-lingual generalization.\n\n---\n\n## Coverage\n\n* **Dataset scope:** 22 Indic languages (full benchmark availability).\n* **Evaluation scope:** 16 Indic languages + English (practically evaluated with ~24 open-source LLMs).\n\nThis separation ensures the dataset is **broad and inclusive**, while evaluation focuses on the languages with the most immediate support and resources.\n\n---\n\n## Overview\n\n* **Source benchmark:** CAIS/MMLU (general knowledge QA benchmark).\n* **Target:** 22 Indic languages + English (translated test set).\n* **Workflow:** Machine translation → LLM-based translation enhancement → embedding comparison → Persona based LLM-as-judge Scores → Correlation between Embeddings and LLM as Judge → human/linguist rating and automated evaluation.\n* **Deliverables:** Enhanced translated `.jsonl` datasets, per-language embeddings, cosine similarity reports, teacher/linguist ratings, model evaluation scores and visualizations (radar plots).\n\n---\n\n## Key principles applied\n\n1. **Preserve semantic parity:** Questions remain semantically the same as English; only language changes.\n2. **Quality control:** Model-Based Automated checks (embeddings, math correctness) + human linguist ratings.\n3. **Reproducibility:** Dockerized inference environment, scriptable pipeline, and clear CLI commands.\n4. **Transparency:** We provide similarity metrics to demonstrate translation fidelity and teacher ratings to highlight linguistic quality.\n\n---\n\n## High-level pipeline (what we did)\n\n1. **Translate** the CAIS/MMLU test set to each Indic language using *IndicTrans2* (baseline MT).\n2. **Enhance** those translations using an open-source LLM with task-specific instructions (to correct phrasing, clarify ambiguous translations, preserve math expressions, and maintain answer choices alignment).\n3. **Embed** both the original English items and the (enhanced) translated items with the same embedding model.\n4. **Compare** embeddings using cosine similarity to measure semantic closeness.\n5. **LLM as Judge and Human review**: linguists/teachers rated samples for language quality, math correctness, and coherence.\n6. **Evaluate models**: run ~24 open-source LLMs across all languages using the lm-eval framework and visualize results (radar plots, top-3 per language).\n\n---\n\n## Indic MMLU Construction Algorithm\n\nTo complement the pseudo-code, the following flowchart provides a **visual overview of the Indic MMLU pipeline**. It clearly illustrates the step-by-step workflow, starting from the English MMLU dataset and moving through translation, enhancement, evaluation, and validation:\n\n* **Translation Stage:** The English MMLU instance is translated into Indic languages using specialist MT.\n* **Enhancement Stage:** Translations are refined with large-scale LLMs for improved fluency and alignment.\n* **LLM Based Judging Phase:** Three types of evaluation are conducted — *fluency by native language experts, subject correctness by domain experts, and alignment by coherence judges*.\n* **Validation Stage:** Embedding similarity checks, n-gram metrics (BLEU, ROUGE, ChrF++), and discrepancy detection ensure quality.\n* **Final Output:** A validated Indic MMLU dataset instance ready for benchmarking.\n\n\n\n# Translation Algorithm \n\n```\nInput:\n original_mmlu\n target_languages\n instructions\n\nFor each language L in target_languages:\n translated = translate(original_mmlu, tgt=L)\n enhanced = enhance_using_llm(translated, instructions)\n\n eng_emb = embed(original_mmlu)\n trans_emb = embed(enhanced)\n sim_scores = cosine_similarity(eng_emb, trans_emb)\n\n llm_scores = LLM_as_Judge(original_mmlu, translated)\n\n consistency = consistency_check(sim_scores, llm_scores)\n\n If consistency is poor:\n human_ratings = rate_sample(enhanced)\n Else:\n accept enhanced\n\nAggregate all scores:\n combine sim_scores, llm_scores, human_ratings\n compute per-language model scores\n\nProduce visualizations:\n generate charts and plots for cross-language comparison\n\nOutput:\n per-language evaluation scores\n visualizations\n\n```\n\nThis visual representation makes it easier to understand how the **algorithmic steps, human evaluation, and automated checks** come together to ensure translation quality and dataset reliability.\n\n---\n\n## Reproducible commands (examples)\n\n> These are the canonical commands used in our pipeline. Replace file paths, ports, and concurrency values as appropriate for your environment.\n\n**Translate**\n\n```bash\npython3 trans_mmlu.py \\\n --input_file_path test-00000-of-00001_with_ids.jsonl \\\n --output_file_path mmlu_kn_in.jsonl \\\n --tgt_lang \"kn\" \\\n --src_lang \"en\"\n```\n\n**Enhance translations (LLM-based)**\n\n```bash\npython3 async_infr.py \\\n --input-path mmlu_as_in.jsonl \\\n --output-file ds_enhance_eval_hi.jsonl \\\n --instruction-path instruction_prompts.yml \\\n --task deepseek_enhance_instruct \\\n --template-fields 'og_question' 'og_choices' 'question' 'answer' 'Hindi' \\\n --max-concurrency 4096 \\\n --backend sglang-oai-chat \\\n --extra-request-body '{\"temperature\":0.7,\"top_p\":0.9,\"top_k\":50,\"max_tokens\":1024}' \\\n --port 30000\n```\n\n**Generate embeddings**\n\n```bash\npython3 get_embeddings.py \\\n --input-file test-00000-of-00001_with_ids.jsonl \\\n --output-file mmlu_qwen3_embd.jsonl \\\n --server-url http://127.0.0.1:30000 \\\n --concurrency 4096\n```\n\n**Cosine similarity (English vs translated enhancements)**\n\n```bash\npython3 calculate_cosine_similarity.py \\\n --input_dir deepseek_enhance \\\n --output_dir mmmlu/similarity/cosine/enhance/deepseek_enhance \\\n --english_file mmlu_eng.jsonl\n```\n\n**Linguist / teacher rating (LLM assisted orchestration)**\n\n```bash\npython3 async_infr.py \\\n --input-path mmlu_as_in.jsonl \\\n --output-file ds_enhance_eval_as_qwen3_instruct.jsonl \\\n --instruction-path instruction_prompts.yml \\\n --task rate_translated_text_linguist \\\n --template-fields 'og_question' 'og_choices' 'enhanced_text' 'Assamese' \\\n --max-concurrency 4096 \\\n --backend sglang-oai-chat \\\n --extra-request-body '{\"temperature\":0.7,\"top_p\":0.9,\"top_k\":50,\"max_tokens\":1024}' \\\n --port 30000\n```\n\n**Model evaluation with `lm-eval`**\n\n```bash\n# Example wrapper which runs evaluation for a model snapshot against the Indic MMLU dataset\nbash lm-eval-llm.sh /path/to/model_snapshot /benchmark-result-path\n```\n\n---\n\n## Download Indic MMLU Dataset\n\nThe complete benchmark covering **22 Indic languages + English** is available here: \n\n- [Download Full Benchmark (PARQUET)](https://github.com/anonymous-submitter0104/neurips-submission/tree/main/opensource-release/Indic%20MMLU)\n\n> ⚠️ Please cite this repository if you use the dataset in your research.\n\n\n---\n\n### Summary of LLM-as-Judge Ratings\n\nTo evaluate translation quality systematically, we employed **LLMs as judges**, operating under three carefully designed expert personas:\n\n* **Math Expert Persona** → Rated mathematical correctness, terminology, and conceptual fidelity.\n* **Linguistic Expert Persona** → Assessed fluency, grammar, idiomatic usage, and naturalness of the translation.\n* **Coherence Expert Persona** → Evaluated semantic alignment, logical flow, and clarity between English and the target language.\n\n**What we measured:**\n\n* Language quality, fluency, and linguistic suitability.\n* Mathematical correctness and fidelity of technical content.\n* Overall coherence and semantic alignment with the English source.\n\n| Language | Avg Maths Rate | Avg Coherence Rate | Avg Linguist Rate | Total Records |\n|-----------|----------------|--------------------|-------------------|---------------|\n| Hindi\t | 9.658029\t | 9.722054\t | 9.667891\t | 14042 |\n| Bengali\t | 9.182561\t | 9.131505\t | 8.202293\t | 14042 |\n| Nepali | 9.473793 | 9.331505 | 8.402293 | 14042 |\n| Telugu | 9.220837 | 8.975929 | 7.986256 | 14042 |\n| Oriya | 9.264421 | 8.944096 | 8.220268 | 14042 |\n| Punjabi | 9.348027 | 9.049138 | 8.253454 | 14042 |\n| Assamese | 9.147201 | 9.039097 | 8.133243 | 14042 |\n| Sanskrit | 8.338485 | 8.112520 | 6.390115 | 14042 |\n| Kannada | 9.322746 | 9.111736 | 8.131819 | 14042 |\n| Sindhi | 2.070645 | 3.109956 | 2.478137 | 14042 |\n| Gujrati | 9.260647 | 9.206523 | 8.368965 | 14042 |\n| Marathi | 9.301951 | 9.342045 | 8.381926 | 14042 |\n| Tamil | 9.047856 | 9.042943 | 8.071144 | 14042 |\n| Malayalam | 9.134952 | 8.998148 | 7.956488 | 14042 |\n| Maithili | 9.263282 | 9.118146 | 8.218772 | 14042 |\n\n**How to read the table:**\n\n* Ratings are on a **1–10 scale**, where higher scores reflect better translation and enhancement quality.\n* Most languages achieved **consistently high averages (>8.9)**, showing strong quality after enhancement.\n* A few outliers suggest areas where further targeted refinement may be beneficial.\n\n---\n\n## Cosine similarity \n\n* Cosine similarity gives a quick automated signal of semantic closeness between the translated/enhanced items and their English originals.\n* Typical mean similarities range from ~0.76 to 0.85 across languages; higher means closer embeddings (better semantic preservation).\n* Use the similarity scores as a triage: low similarity → manual review; high similarity → likely semantically faithful.\n\n| Language | Mean Similarity | Std Similarity | Min Similarity | Max Similarity |\n|-------------------------|-----------------|----------------|----------------|----------------|\n| mmlu_as_in_qwen3_embed | 0.8045 | 0.0597 | 0.4644 | 1 |\n| mmlu_bn_in_qwen3_embed | 0.8133 | 0.0504 | 0.5276 | 1 |\n| mmlu_gu_in_qwen3_embed | 0.8211 | 0.0535 | 0.4016 | 1 |\n| mmlu_hi_in_qwen3_embed | 0.8472 | 0.0489 | 0.3688 | 1 |\n| mmlu_kn_in_qwen3_embed | 0.8106 | 0.0565 | 0.4660 | 1 |\n| mmlu_mai_in_qwen3_embed | 0.8226 | 0.0504 | 0.4936 | 1 |\n| mmlu_ml_in_qwen3_embed | 0.8158 | 0.0531 | 0.5109 | 1 |\n| mmlu_mr_in_qwen3_embed | 0.8129 | 0.0513 | 0.5281 | 1 |\n| mmlu_ne_in_qwen3_embed | 0.8242 | 0.0502 | 0.4802 | 1 |\n| mmlu_or_in_qwen3_embed | 0.8159 | 0.0555 | 0.4684 | 1 |\n| mmlu_pa_in_qwen3_embed | 0.8246 | 0.0516 | 0.5450 | 1 |\n| mmlu_sa_in_qwen3_embed | 0.7912 | 0.0574 | 0.4981 | 1 |\n| mmlu_sdd_in_qwen3_embed | 0.7646 | 0.0735 | 0.3633 | 0.9676 |\n| mmlu_ta_in_qwen3_embed | 0.7964 | 0.0559 | 0.5242 | 1 |\n| mmlu_te_in_qwen3_embed | 0.8006 | 0.0524 | 0.5379 | 1 |\n\n---\n\n## Model Evaluation Methodology\n\nWe evaluated **~24 open-source LLMs** across **16 Indic languages** (subset of the 22 total dataset languages) plus English, using the Indic MMLU benchmark.\n\nWorkflow:\n\n1. **Environment Setup:** Dockerized `vllm/vllm-openai` for reproducibility.\n2. **Framework:** `lm-eval` for standardized evaluation.\n3. **Metrics:** per-language accuracy, top-3 rankings per language, aggregate averages.\n4. **Visualization:** radar plots for each language and comparative top-3 plots.\n\n---\n\n## Important Note\n\n* **Indic MMLU Dataset = 22 Indian languages**\n* **Current Model Evaluation = 16 Indian languages + English**\n* Work is ongoing to expand the evaluation to cover all 22 languages.\n\n---\n### Indic MMLU Results \n\n|