---
title: "📚 3LM: A Benchmark for Arabic LLMs in STEM and Code"
description: "3LM is a benchmark for evaluating Arabic LLMs on STEM reasoning and code generation, built from three datasets: 865 native MCQs extracted from Arabic grade 8–12 educational materials via OCR (with Pix2Tex for math) and LLM-assisted extraction, 1,744 synthetic mid-to-high difficulty MCQs generated with the YourBench pipeline, and Arabic translations of HumanEval+ and MBPP+ validated by backtranslation with a ROUGE-L F1 cutoff of 0.8."
url: "https://swe.quest/articles/3lm-a-benchmark-for-arabic-llms-in-stem-and-code-45eb24e056a94df9"
canonical: "https://huggingface.co/blog/tiiuae/3lm-benchmark"
source: "Hugging Face"
published: "2025-08-01"
difficulty: "medium"
kind: "Research"
reading_minutes: 5
tags: ["evals","llms"]
---

# 📚 3LM: A Benchmark for Arabic LLMs in STEM and Code

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-08-01, 5 min read, Research. Original: [https://huggingface.co/blog/tiiuae/3lm-benchmark](https://huggingface.co/blog/tiiuae/3lm-benchmark)

## Summary

3LM is a benchmark for evaluating Arabic LLMs on STEM reasoning and code generation, built from three datasets: 865 native MCQs extracted from Arabic grade 8–12 educational materials via OCR (with Pix2Tex for math) and LLM-assisted extraction, 1,744 synthetic mid-to-high difficulty MCQs generated with the YourBench pipeline, and Arabic translations of HumanEval+ and MBPP+ validated by backtranslation with a ROUGE-L F1 cutoff of 0.8. Across 40+ models, Qwen2.5-72B-Instruct led MCQ accuracy (71.8% native, 67.0% synthetic), Gemma-3-27B led completion-style STEM (43.2%), and GPT-4o led code (83.5% pass@1+ on HumanEval-ar, 63.6% on MBPP-ar). Arabic and English pass@1 scores correlate at about 0.97, and instruction-tuned models proved more robust than base models under distractor perturbation. Datasets and lighteval/evalplus evaluation scripts are open-sourced.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- LLM evaluation benchmarks ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- pass@k metrics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

3LM, HumanEval+, MBPP+, YourBench, EvalPlus, lighteval, Qwen2.5-72B-Instruct, GPT-4o

## Related posts

- [QIMMA قِمّة ⛰: A Quality-First Arabic LLM Leaderboard](https://swe.quest/articles/qimma-a-quality-first-arabic-llm-leaderboard-16ec16b4143432e6.md): Hugging Face · 2026-04-21 · Medium · 10 min read · Evaluation, LLMs
  QIMMA is an Arabic LLM leaderboard that validates benchmark samples before evaluating models, consolidating 109 subsets from 14 benchmarks (52,000+ samples, 99% native Arabic) across seven domains including the first Arabic code evaluation.
- [The Open Arabic LLM Leaderboard 2](https://swe.quest/articles/the-open-arabic-llm-leaderboard-2-8ad7f45389118960.md): Hugging Face · 2025-02-10 · Easy · 13 min read · Evaluation, LLMs, RAG & retrieval
  Version 2 of the Open Arabic LLM Leaderboard (OALL) drops saturated and machine-translated benchmarks in favor of native or human-curated Arabic datasets: Native Arabic MMLU, human-translated MMLU, MedinaQA, AraTrust, and a new RAG benchmark, ALRAGE.
- [Arabic Leaderboards: Introducing Arabic Instruction Following, Updating AraGen, and More](https://swe.quest/articles/arabic-leaderboards-introducing-arabic-instruction-following-updating-aragen-736604e37db5e184.md): Hugging Face · 2025-04-08 · Medium · 15 min read · Evaluation, LLMs
  Inception and MBZUAI launched an Arabic-Leaderboards Space hosting an updated AraGen generative benchmark (AraGen-03-25) and a new instruction-following leaderboard built on Arabic IFEval, the first public Arabic instruction-following benchmark.
- [Rethinking LLM Evaluation with 3C3H: AraGen Benchmark and Leaderboard](https://swe.quest/articles/rethinking-llm-evaluation-with-3c3h-aragen-benchmark-and-leaderboard-91cde6b4f328edcb.md): Hugging Face · 2024-12-04 · Hard · 19 min read · Evaluation, LLMs
  AraGen is a generative benchmark and leaderboard for Arabic LLMs built on 3C3H, an LLM-as-judge measure that scores responses on Correctness and Completeness (binary) plus Conciseness, Helpfulness, Honesty and Harmlessness (1-5, normalized to \[0,1\]).
- [Falcon-Arabic: A Breakthrough in Arabic Language Models](https://swe.quest/articles/falcon-arabic-a-breakthrough-in-arabic-language-models-5486e04ec675f79c.md): Hugging Face · 2025-05-21 · Easy · 7 min read · LLMs, Model training, Evaluation
  Falcon-Arabic is a 7B-parameter model adapted from Falcon 3-7B that leads the OALL v2 Arabic benchmark in its size class and beats models up to 4× larger on Arabic MMLU, Exams, MadinahQA and Aratrust.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
