代码 · ise-uiuc

Magicoder-OSS-Instruct-75K

Uses real open-source code snippets as seeds to generate diverse coding problems and solutions with GPT-4. The OSS-Instruct method produces more realistic, grounded coding tasks than purely synthetic approaches. Magicoder-S-DS-6.7B trained on this data surpassed GPT-3.5-Turbo on HumanEval.

加载
from datasets import load_dataset
ds = load_dataset("ise-uiuc/Magicoder-OSS-Instruct-75K")
预览示例数据
{
  "problem": "Given a list of integers, write a function to find all pairs that sum to a target value. Return pairs as tuples sorted by first element.",
  "solution": "def find_pairs(nums: list[int], target: int) -> list[tuple[int, int]]:\n    seen = set()\n    pairs = []\n    for n in nums:\n        complement = target - n\n        if complement in seen:\n            pairs.append((min(n, complement), max(n, complement)))\n        seen.add(n)\n    return sorted(set(pairs))"
}

用这个数据集微调

使用 QLoRA(4-bit 基础模型 + LoRA 适配器)微调的预计显存需求(保守默认参数):

7B QLoRA · ~6GB VRAM13B QLoRA · ~10GB VRAM
检测你的 GPU 能否微调 →

常见问题

Magicoder-OSS-Instruct-75K 可以商用吗?

可以——Magicoder-OSS-Instruct-75K 采用 MIT 宽松许可证,允许商业使用,包括训练用于产品的模型。发布前请查看数据集卡片中的署名要求。

Magicoder-OSS-Instruct-75K 有多少数据?需要全部使用吗?

Magicoder-OSS-Instruct-75K 包含 75k Rows。通常不需要全部:风格和格式微调只需几百到几千条样本——先加载切片(如 split="train[:1000]"),质量到达瓶颈时再扩大规模。

Magicoder-OSS-Instruct-75K 最适合做什么?

Code instruction tuning grounded in real open-source snippets。它属于数据集中心的「代码」板块,那里有替代和互补的数据集。