Infinity-Instruct
A 7.5M high-quality instruction dataset from the Beijing Academy of AI, combining foundational skills (math, code, reasoning) with conversational ability. Used to train models that surpass Llama 3 70B while being much smaller.
加载
from datasets import load_dataset
ds = load_dataset("BAAI/Infinity-Instruct")预览示例数据
{
"id": "inf_001",
"conversations": [
{"from": "human", "value": "Write a Python function to find all prime numbers up to n using the Sieve of Eratosthenes."},
{"from": "gpt", "value": "def sieve_of_eratosthenes(n):\n primes = [True] * (n+1)\n primes[0] = primes[1] = False\n for i in range(2, int(n**0.5)+1):\n if primes[i]:\n for j in range(i*i, n+1, i):\n primes[j] = False\n return [i for i in range(2, n+1) if primes[i]]"}
]
}用这个数据集微调
使用 QLoRA(4-bit 基础模型 + LoRA 适配器)微调的预计显存需求(保守默认参数):
7B QLoRA · ~6GB VRAM13B QLoRA · ~10GB VRAM
检测你的 GPU 能否微调 →微调新手?跟着分步教程走: 一小时微调你的第一个 LLM
常见问题
Infinity-Instruct 可以商用吗?
可以——Infinity-Instruct 采用 Apache 2.0 宽松许可证,允许商业使用,包括训练用于产品的模型。发布前请查看数据集卡片中的署名要求。
Infinity-Instruct 有多少数据?需要全部使用吗?
Infinity-Instruct 包含 7.5M Instructions。通常不需要全部:风格和格式微调只需几百到几千条样本——先加载切片(如 split="train[:1000]"),质量到达瓶颈时再扩大规模。
Infinity-Instruct 最适合做什么?
Large-scale general SFT when you need millions of samples。它属于数据集中心的「指令 / SFT」板块,那里有替代和互补的数据集。