Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
3
3
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
[ { "role": "system", "content": "You are a professional Chinese native translator who needs to fluently translate text into Chinese.\n\n## Translation Rules\n1. Output only the translated content, without explanations or additional content (such as \"Here's the translation:\" or \"Translation as follows:\")\...
End of preview. Expand in Data Studio

MiniCPM5-1B Immersive Translation SFT Dataset

英译中微调数据集,专为沉浸式翻译插件场景设计。用于微调 MiniCPM5-1B-Base,使其在插件运行时稳定遵循翻译规则、保留代码与 HTML 格式、正确处理多段 %% 分隔。

数据集描述

本数据集主要训练以下能力:

  • 严格遵循沉浸式翻译 system prompt 中的 5 条翻译规则
  • 多段输入的 %% 段落分隔,输入输出段落数严格一致
  • 代码块、行内代码、HTML 标签、URL、专有名词的原样保留
  • 技术文档(GitHub README、Hugging Face 文档)与学术摘要(arXiv)的英译中
  • 单段输入直接输出译文,无"翻译:"等额外前缀

数据格式为 ShareGPT 对话格式,每条样本包含 system / user / assistant 三角色。

数据来源

来源 说明 原始规模 本数据集采样量 License
Mxode/BiST en-zh(arxiv_abstract) arXiv 论文摘要英译中,英文为真实语料,中文为 LLM 合成 约 263 万行 ~20,000 请参考源仓库
FiveC/CoCoDoc-MT-20k 文档级多语言平行语料,含技术文档 20,000 ~12,000 请参考源仓库
lianghsun/chinese-english-technical-patent-glossary-chat 专利技术术语对话数据,反向构造为英→中 约 453 万条 5,000 请参考源仓库
Helsinki-NLP/opus-100 en-zh 通用英中平行语料 大规模 5,000 OPUS 各子集不同
自构造样本 代码/HTML/URL 保护、多段 %% 格式 ~1,600 本仓库作者

关于 BiST:该子集的英文源文本为真实 arXiv 摘要,中文译文由 LLM 合成。使用时请知悉其合成数据属性。

数据规模

划分 样本数 文件
训练集 17,317 immersive_zh_train.jsonl
验证集 911 immersive_zh_val.jsonl
合计 18,228

样本形态分布(近似):

  • 单段输入:55%
  • 多段输入(含 %% 分隔):35%
  • 代码/HTML/URL 保护样本:10%

数据格式

每行一个 JSON 对象,字段如下:

{
  "messages": [
    {"role": "system", "content": "You are a professional Chinese native translator ..."},
    {"role": "user", "content": "Translate to Chinese (output translation only):\n\n..."},
    {"role": "assistant", "content": "..."}
  ]
}

单段样本示例

{
  "messages": [
    {"role": "system", "content": "You are a professional Chinese native translator ..."},
    {"role": "user", "content": "Translate to Chinese (output translation only):\n\nThe committee approved the proposal after extensive deliberation."},
    {"role": "assistant", "content": "委员会经过充分讨论后批准了该提案。"}
  ]
}

多段样本示例

{
  "messages": [
    {"role": "system", "content": "You are a professional Chinese native translator ..."},
    {"role": "user", "content": "Translate to Chinese:\n\nFirst paragraph.\n\n%%\n\nSecond paragraph."},
    {"role": "assistant", "content": "第一段。\n\n%%\n\n第二段。"}
  ]
}

代码保护样本示例

{
  "messages": [
    {"role": "system", "content": "You are a professional Chinese native translator ..."},
    {"role": "user", "content": "Translate to Chinese:\n\nInstall via `pip install minicpm`. See <a href=\"https://github.com/OpenBMB/MiniCPM\">repo</a> for details."},
    {"role": "assistant", "content": "通过 `pip install minicpm` 安装。详情见 <a href=\"https://github.com/OpenBMB/MiniCPM\">repo</a>。"}
  ]
}

System Prompt

训练数据中的 system 字段完整照抄自沉浸式翻译插件的实际 system prompt,包含:

  • 5 条翻译规则
  • 输出格式说明
  • 多段/单段 few-shot 示例

这确保模型在插件真实请求下具有正确的指令遵循行为。

使用方式

推荐使用 LLaMA-Factory 进行 LoRA 微调。参考配置:

model_name_or_path: openbmb/MiniCPM5-1B
stage: sft
finetuning_type: lora
lora_rank: 16
lora_alpha: 32
lora_target: all
template: minicpm5
cutoff_len: 768
per_device_train_batch_size: 4
gradient_accumulation_steps: 4
learning_rate: 2.0e-4
num_train_epochs: 2.0
lr_scheduler_type: cosine
warmup_ratio: 0.03
fp16: true
gradient_checkpointing: true

dataset_info.json 示例:

{
  "immersive_zh_train": {
    "file_name": "immersive_zh_train.jsonl",
    "formatting": "sharegpt",
    "columns": {"messages": "messages"},
    "tags": {
      "role_tag": "role",
      "content_tag": "content",
      "user_tag": "user",
      "assistant_tag": "assistant",
      "system_tag": "system"
    }
  },
  "immersive_zh_val": {
    "file_name": "immersive_zh_val.jsonl",
    "formatting": "sharegpt",
    "columns": {"messages": "messages"},
    "tags": {
      "role_tag": "role",
      "content_tag": "content",
      "user_tag": "user",
      "assistant_tag": "assistant",
      "system_tag": "system"
    }
  }
}

推荐推理参数

参数
temperature 0.2
top_p 0.9
max_new_tokens 512
repetition_penalty 1.0

训练结果参考

在 Tesla P100 16GB 上使用上述配置训练 2 epoch:

指标
最终 eval_loss 1.1135
训练集样本 17,317
验证集样本 911
LoRA 可训练参数 11,206,656(1.03%)
训练轮数 2 epoch
硬件 Tesla P100 16GB

训练后模型在技术文档、GitHub README、arXiv 摘要的英译中任务上表现良好,代码块、HTML 标签、URL 均能原样保留。

校准数据集

本仓库同时包含从上述 SFT 数据中提取的 imatrix 校准文件:

  • 文件名:calibration_merged.txt
  • 格式:纯文本,每行一段
  • 规模:8,000 段,约 630 万字符,约 180 万 tokens
  • 用途:用于 llama-imatrix 计算重要性矩阵,优化 Q4_K_M 量化

已知限制

  • 纯代码块段落:当多段输入中存在仅含代码块的段落时,模型可能将其与相邻段落合并,导致 %% 数量不完全一致。实际使用中插件通常会剥离代码块,影响较小。
  • 维基百科信息框字段:如 ParentFoundedIndustry 等字段的翻译可能不准确,训练数据未覆盖此类结构化字段。
  • 复杂从句语序:个别 afterbefore 等时间状语从句的语序可能出错。
  • 合成数据风险:BiST 中文译文为 LLM 合成,可能继承源模型的翻译偏好。

引用与许可

本数据集由多个公开数据源混合而成,各源数据集 License 不同,商用前请逐一确认。自构造样本部分可视为 MIT 许可,但整体数据集建议遵循最严格的源 License。

如果使用本数据集,请同时引用原始数据源及 MiniCPM5:

@misc{minicpm5,
  title={MiniCPM5},
  author={OpenBMB},
  year={2025},
  howpublished={\url{https://huggingface.co/openbmb/MiniCPM5-1B}}
}

加载方式

from datasets import load_dataset

ds = load_dataset("Variable65536/immersive_translate_en-zh")
print(ds["train"][0])

致谢

  • OpenBMB 提供 MiniCPM5-1B 基座模型
  • LLaMA-Factory 提供微调框架
  • 各源数据集作者与维护者
Downloads last month
78

Models trained or fine-tuned on Variable65536/immersive_translate_en-zh