代码 · m-a-p

CodeFeedback-Filtered-Instruction

74k coding instruction pairs across Python, Java, JavaScript, and C++ with a focus on interactive code generation and debugging. Combines data from Magicoder, ShareGPT-Python, and original generation to create a diverse multi-language coding chat dataset. Used to train OpenCodeInterpreter.

加载
from datasets import load_dataset
ds = load_dataset("m-a-p/CodeFeedback-Filtered-Instruction")
预览示例数据
{
  "query": "Write a JavaScript function to deep-clone an object without using JSON.parse/stringify.",
  "answer": "function deepClone(obj) {\n  if (obj === null || typeof obj !== 'object') return obj;\n  if (Array.isArray(obj)) return obj.map(deepClone);\n  return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, deepClone(v)]));\n}"
}

用这个数据集微调

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

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

常见问题

CodeFeedback-Filtered-Instruction 可以商用吗?

可以——CodeFeedback-Filtered-Instruction 采用 Apache 2.0 宽松许可证,允许商业使用,包括训练用于产品的模型。发布前请查看数据集卡片中的署名要求。

CodeFeedback-Filtered-Instruction 有多少数据?需要全部使用吗?

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

CodeFeedback-Filtered-Instruction 最适合做什么?

Training coding models that respond to execution feedback。它属于数据集中心的「代码」板块,那里有替代和互补的数据集。