mlx-llm-bench
收藏资源简介:
MLX LLM Bench 是一个专为在 Apple Silicon Mac(特别是 16 GB 统一内存的 Mac mini 类设备)上运行的本地大语言模型(LLM)设计的基准测试数据集。该数据集旨在评估模型在有限硬件资源下的分类和指令遵循能力。数据集共包含 125 个精心设计的样本,其中 100 个用于分类任务,25 个用于 IFEval 指令遵循任务。分类任务涵盖三个具体场景:情感分析(区分积极/消极情绪)、主题分类(识别文本属于世界、体育、商业、科技中的哪一类)以及垃圾邮件检测(判断是否为垃圾邮件)。每个分类任务都平衡了“简单”和“困难”两种难度级别的样本,数据集中包含显式的“difficulty”字段。IFEval 任务则测试模型对复杂指令(如精确字数统计、字母排除、全大写输出、JSON 模式遵循、段落计数等)的遵循程度。数据集以 JSON 格式提供,每个样本包含任务类型、文本内容、真实标签和难度信息。该数据集主要用于在资源受限的本地环境中(如个人电脑)对 LLM 进行性能基准测试和比较,尤其关注模型在分类准确性和指令遵循格式合规性方面的表现。
MLX LLM Bench is a benchmark dataset designed for local large language models (LLMs) running on Apple Silicon Macs, particularly devices like the Mac mini with 16 GB unified memory. The dataset aims to evaluate the classification and instruction-following capabilities of models under limited hardware resources. It contains a total of 125 carefully designed samples, with 100 for classification tasks and 25 for IFEval instruction-following tasks. Classification tasks cover three specific scenarios: sentiment analysis (distinguishing positive/negative emotions), topic classification (identifying whether text belongs to world, sports, business, or technology), and spam detection (determining if it is spam). Each classification task balances samples of easy and hard difficulty levels, with an explicit difficulty field included in the dataset. The IFEval tasks test the models adherence to complex instructions, such as precise word count, letter exclusion, all-caps output, JSON schema compliance, paragraph counting, etc. The dataset is provided in JSON format, with each sample containing task type, text content, true labels, and difficulty information. It is primarily used for performance benchmarking and comparison of LLMs in resource-constrained local environments (e.g., personal computers), with a particular focus on model performance in classification accuracy and instruction-following format compliance.
数据集概述:MLX LLM Bench
这是一个用于评估在 Apple Silicon Mac(特别是 16 GB Mac mini)上运行的本地大语言模型(LLM)的分类和指令遵循能力的基准测试数据集。
- 数据集名称: MLX LLM Bench
- 许可证: MIT
- 语言: 英语
- 数据集大小: 少于 1000 个样本 (当前快照为 125 个样本)
- 任务类别: 文本分类
- 标签: LLM、基准测试、MLX、Apple Silicon、本地 AI、分类、情感、主题、垃圾邮件、指令遵循、排行榜
核心内容与结构
1. 评估任务
数据集包含 125 个样本,涵盖四个任务,每个任务均分为“简单”(Easy)和“困难”(Hard)两个难度级别:
| 任务 | 简单 (Easy) | 困难 (Hard) | 任务示例 |
|---|---|---|---|
| 情感分析 (正面/负面) | 21 | 12 | 讽刺、反向夸奖、轻描淡写的赞美 |
| 主题分类 (世界/体育/商业/科技) | 24 | 12 | 商业与科技模糊地带、安全漏洞与研究 |
| 垃圾邮件识别 (垃圾/正常) | 20 | 11 | BEC 诈骗、语音钓鱼、供应商欺诈邮件 |
| 指令遵循 (IFEval) | 13 | 12 | 精确字数、排除字母、全大写、JSON schema、段落数 |
2. 排行榜
提供了在 Mac mini M4 (16 GB) 上运行的主要模型得分(截至当前快照)。评估指标包括准确率(带95%置信区间)、简单/困难任务得分、格式遵循率(fmt_ok)、推理时间和模型大小。
| 排名 | 模型 | 准确率 (95% CI) | 时间/样本 | 模型大小 |
|---|---|---|---|---|
| 🥇 | gemma3-12b-qat |
92.8% [87–96] | 2.24 s | 8.0 GB |
| 🥈 | llama-3.2-3b |
92.0% [86–96] | 0.74 s | 1.8 GB |
| 🥉 | ministral-3-8b |
90.4% [84–94] | 4.21 s | 5.6 GB |
| ... | ... | ... | ... | ... |
3. 数据文件
该数据集在 Hugging Face 上提供,可直接加载。
python from datasets import load_dataset ds = load_dataset("onlyoneaman/mlx-llm-bench", split="test") print(ds[0])
输出: {task: sentiment, text: ..., label: positive, difficulty: easy}
仓库中的主要文件包括:
data.json: 125 个带标签的样本。leaderboard.json: 规范化的结构化排行榜数据。leaderboard.csv: 排行榜的表格形式。models.json: 已测试模型的注册表和观察行为记录。
关键说明
- 目标硬件: 该基准测试专为拥有 16 GB 统一内存的 Apple Silicon Mac 设计,特别是 Mac mini 级别。
- 快照机制: 此数据集是一个特定快照(
dataset_sha: 4546a1df566c)。不同dataset_sha的快照之间不具有直接可比性。 - 难度字段: 每个样本都包含明确的
difficulty字段,用于区分“简单”和“困难”。 - 评估方法: 分类任务使用严格的 JSON 约束输出和
temp=0;指令遵循任务由 Python 验证器全自动验证(format_ok)和结果正确性(correct)共同评判。 - 复现方法: 用户可通过运行
./bench run all --cached命令复现评测,代码和详细方法在 github.com/onlyoneaman/mlx-llm-bench 提供。




