mobileaibench-eval
MobileAIBench: Benchmarking LLMs and LMMs for On-Device Use Cases — Murthy et al. (2024) (arXiv:2406.10290, 2024)
What this evaluates
Evaluates the task performance, latency, and hardware utilization of quantized LLMs and LMMs on real mobile devices across standard NLP, multi-modal, and trust & safety benchmarks.
Datasets
- Databricks — total ?; splits: test (-1)
- HotpotQA — total ?; splits: test (-1)
- sql-create-context — total ?; splits: test (-1)
- CNN — total ?; splits: test (-1)
- XSum — total ?; splits: test (-1)
- VQA-v2 — total ?; splits: test (-1)
- GQA — total ?; splits: test (-1)
- VisWiz — total ?; splits: test (-1)
- TextVQA — total ?; splits: test (-1)
- SQA — total ?; splits: test (-1)
- AlpacaEval — total ?; splits: test (-1)
- MT-Bench — total ?; splits: test (-1)
- MMLU — total ?; splits: test (-1)
- GSM8K — total ?; splits: test (-1)
- TruthQA — total ?; splits: test (-1)
- BBQ — total ?; splits: test (-1)
- SC-101 — total ?; splits: test (-1)
- Adv-Inst — total ?; splits: test (-1)
- DNA — total ?; splits: test (-1)
- Priv-Lk — total ?; splits: test (-1)
Metrics
Accuracy (primary) — range: [0, 1]
- Proportion of correctly answered instances across VQA, MMLU, GSM8K, and Trust & Safety tasks.
Exact Match (EM) — range: [0, 1]
- Percentage of predictions that exactly match the ground truth answer.
F1 Score (F1) — range: [0, 1]
- Harmonic mean of precision and recall based on token overlap between prediction and gold.
Rouge-1 (R1) — range: [0, 1]
- Unigram overlap F-score between generated summary and reference.
Rouge-L (RL) — range: [0, 1]
- Longest common subsequence F-score between generated summary and reference.
Win-Rate — range: [0, 1]
- Proportion of times the model's response is preferred over a baseline in pairwise comparisons (AlpacaEval).
MT-Bench Score — range: [0, 10]
- Average score assigned by an LLM-as-a-judge across multi-turn conversation prompts.
Input / output format
Input: Text prompts for NLP tasks; image and text prompts for VQA tasks; instruction or multi-turn prompts for trust & safety and benchmark tasks.
Output: Model-generated text responses.
Scoring recipe
def compute_metrics(predictions, golds, task_type):
if task_type in ['qa', 'vqa', 'trust_safety', 'mmlu', 'gsm8k']:
return sum(1 for p, g in zip(predictions, golds) if p.strip() == g.strip()) / len(golds)
elif task_type == 'summarization':
return rouge1(predictions, golds), rougel(predictions, golds)
elif task_type == 'text2sql':
return sql_parser_score(predictions, golds), levenshtein_score(predictions, golds)
elif task_type == 'alpaca':
return pairwise_win_rate(predictions, golds)
elif task_type == 'mtbench':
return llm_judge_score(predictions, golds)
Common pitfalls
- Quantization at 3-bit causes severe performance drops for most LMMs, while some models (e.g., Moondream2) remain robust.
- Desktop evaluations may not capture real-world mobile constraints like thermal throttling, RAM limits, or actual latency (time-to-first-token).
- Different models and tasks exhibit varying sensitivity to quantization, so reporting only average scores can hide critical degradation patterns.
Evidence (verbatim from paper)
For question answering tasks, we employ Exact Match (EM) and F1 Score (F1). In the context of Text-to-SQL tasks, we utilize the SQL Parser (SP) and Levenshtein Score (LS). For summarization tasks, we measure performance using Rouge-1 (R1) and Rouge-L (RL). Additionally, we use Win-Rate for AlpacaEval, Score for MT Bench, and Accuracy for both MMLU and GSM8K.
Citation
@misc{murthy2024mobileaibench,
title={MobileAIBench: Benchmarking LLMs and LMMs for On-Device Use Cases},
author={Murthy et al. (2024)},
year={2024},
note={arXiv:2406.10290}
}
1---2name: mobileaibench-eval3description: Evaluates the task performance, latency, and hardware utilization of quantized LLMs and LMMs on real mobile devices across standard NLP, multi-modal, and trust & safety benchmarks. Use when the user wants to benchmark on Databricks, HotpotQA, sql-create-context, CNN, XSum, VQA-v2, GQA, VisWiz, TextVQA, SQA, AlpacaEval, MT-Bench, MMLU, GSM8K, TruthQA, BBQ, SC-101, Adv-Inst, DNA, Priv-Lk, or asks about evaluating this task. Reports Accuracy.4---56# mobileaibench-eval78> MobileAIBench: Benchmarking LLMs and LMMs for On-Device Use Cases — Murthy et al. (2024) (arXiv:2406.10290, 2024)910## What this evaluates1112Evaluates the task performance, latency, and hardware utilization of quantized LLMs and LMMs on real mobile devices across standard NLP, multi-modal, and trust & safety benchmarks.1314## Datasets1516- **Databricks** — total ?; splits: test (-1)17- **HotpotQA** — total ?; splits: test (-1)18- **sql-create-context** — total ?; splits: test (-1)19- **CNN** — total ?; splits: test (-1)20- **XSum** — total ?; splits: test (-1)21- **VQA-v2** — total ?; splits: test (-1)22- **GQA** — total ?; splits: test (-1)23- **VisWiz** — total ?; splits: test (-1)24- **TextVQA** — total ?; splits: test (-1)25- **SQA** — total ?; splits: test (-1)26- **AlpacaEval** — total ?; splits: test (-1)27- **MT-Bench** — total ?; splits: test (-1)28- **MMLU** — total ?; splits: test (-1)29- **GSM8K** — total ?; splits: test (-1)30- **TruthQA** — total ?; splits: test (-1)31- **BBQ** — total ?; splits: test (-1)32- **SC-101** — total ?; splits: test (-1)33- **Adv-Inst** — total ?; splits: test (-1)34- **DNA** — total ?; splits: test (-1)35- **Priv-Lk** — total ?; splits: test (-1)3637## Metrics3839- `Accuracy` **(primary)** — range: [0, 1]40 - Proportion of correctly answered instances across VQA, MMLU, GSM8K, and Trust & Safety tasks.41- `Exact Match (EM)` — range: [0, 1]42 - Percentage of predictions that exactly match the ground truth answer.43- `F1 Score (F1)` — range: [0, 1]44 - Harmonic mean of precision and recall based on token overlap between prediction and gold.45- `Rouge-1 (R1)` — range: [0, 1]46 - Unigram overlap F-score between generated summary and reference.47- `Rouge-L (RL)` — range: [0, 1]48 - Longest common subsequence F-score between generated summary and reference.49- `Win-Rate` — range: [0, 1]50 - Proportion of times the model's response is preferred over a baseline in pairwise comparisons (AlpacaEval).51- `MT-Bench Score` — range: [0, 10]52 - Average score assigned by an LLM-as-a-judge across multi-turn conversation prompts.5354## Input / output format5556**Input**: Text prompts for NLP tasks; image and text prompts for VQA tasks; instruction or multi-turn prompts for trust & safety and benchmark tasks.5758**Output**: Model-generated text responses.5960## Scoring recipe6162```python63def compute_metrics(predictions, golds, task_type):64 if task_type in ['qa', 'vqa', 'trust_safety', 'mmlu', 'gsm8k']:65 return sum(1 for p, g in zip(predictions, golds) if p.strip() == g.strip()) / len(golds)66 elif task_type == 'summarization':67 return rouge1(predictions, golds), rougel(predictions, golds)68 elif task_type == 'text2sql':69 return sql_parser_score(predictions, golds), levenshtein_score(predictions, golds)70 elif task_type == 'alpaca':71 return pairwise_win_rate(predictions, golds)72 elif task_type == 'mtbench':73 return llm_judge_score(predictions, golds)74```7576## Common pitfalls7778- Quantization at 3-bit causes severe performance drops for most LMMs, while some models (e.g., Moondream2) remain robust.79- Desktop evaluations may not capture real-world mobile constraints like thermal throttling, RAM limits, or actual latency (time-to-first-token).80- Different models and tasks exhibit varying sensitivity to quantization, so reporting only average scores can hide critical degradation patterns.8182## Evidence (verbatim from paper)8384> For question answering tasks, we employ Exact Match (EM) and F1 Score (F1). In the context of Text-to-SQL tasks, we utilize the SQL Parser (SP) and Levenshtein Score (LS). For summarization tasks, we measure performance using Rouge-1 (R1) and Rouge-L (RL). Additionally, we use Win-Rate for AlpacaEval, Score for MT Bench, and Accuracy for both MMLU and GSM8K.8586## Citation8788```bibtex89@misc{murthy2024mobileaibench,90 title={MobileAIBench: Benchmarking LLMs and LMMs for On-Device Use Cases},91 author={Murthy et al. (2024)},92 year={2024},93 note={arXiv:2406.10290}94}95```9697- arXiv: 2406.10290