Dataset Viewer
Auto-converted to Parquet Duplicate
project
stringclasses
1 value
dataset_repo
stringclasses
1 value
model_repo
stringclasses
1 value
space_repo
stringclasses
1 value
wandb_run
stringclasses
1 value
data
dict
tokenizer
dict
training
dict
OLMo3-190M-zh 中文 Causal LM 预训练
xiaohuzhang/olmo3-190m-zh-training-data
xiaohuzhang/olmo3-190m-zh
spaces/xiaohuzhang/olmo3-190m-zh-demo
https://wandb.ai/huamanlouzxh-timecode/llm001-ch04-olmo3-zh/runs/f6as006o
{ "file": "tokenized.bin", "format": "packed token binary", "dtype": "uint16", "sequence_length": 2048, "size_gib": 6.37, "hf_display_size_gb": 6.84, "num_tokens_estimate": 3420228494, "num_sequences_estimate": 1670033 }
{ "path": "tokenizer/", "also_published_with_model": true }
{ "model_type": "Chinese Causal LM", "architecture": "OLMo3-style Transformer", "parameters": "187M", "hardware": "Modal H100", "steps": 13040, "epochs": 1, "final_train_loss": 3.965, "final_eval_loss": 3.82, "seq_len": 2048, "per_device_train_batch_size": 16, "gradient_accumulation_steps": 8, "...

OLMo3-190M-zh 预训练数据

这是我在 OLMo3-190M 中文 Causal LM 预训练项目中使用的 tokenized 训练数据仓库。数据以 packed token binary 形式保存,用于从随机初始化权重开始训练一个 187M 参数中文语言模型。

关联产物:

文件结构

文件 说明
tokenized.bin 预训练使用的 packed token binary 主数据文件
tokenizer/ 与该 tokenized 数据对应的 tokenizer 文件
training_data_manifest.json 数据格式、规模和训练配置元信息
README.md 数据集说明

数据格式

项目 数值
数据格式 packed token binary
dtype uint16
文件大小 6.37 GiB
Hugging Face 显示大小 约 6.84 GB
估算 token 数 3,420,228,494
估算序列数 1,670,033
单条序列长度 2,048 tokens

训练时会将连续 token 流按 2048 tokens 切分成样本。对于 Causal Language Modeling,输入和标签相同,只是标签相对输入右移一位进行自回归预测。

如何查看数据内容

tokenized.bin 不是原始文本文件,而是 uint16 token id 的二进制序列,不能直接用文本编辑器查看。可以用 tokenizer 解码成文本样本:

from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer
import numpy as np

repo_id = "xiaohuzhang/olmo3-190m-zh-training-data"
seq_len = 2048

bin_path = hf_hub_download(
    repo_id=repo_id,
    filename="tokenized.bin",
    repo_type="dataset",
)

tokenizer = AutoTokenizer.from_pretrained(
    repo_id,
    subfolder="tokenizer",
    repo_type="dataset",
)

tokens = np.memmap(bin_path, dtype=np.uint16, mode="r")

sample_idx = 0
start = sample_idx * seq_len
end = start + seq_len

ids = tokens[start:end].astype(np.int64).tolist()
text = tokenizer.decode(ids, skip_special_tokens=True)
print(text)

训练用途

该数据用于训练:

  • 模型:xiaohuzhang/olmo3-190m-zh
  • 模型类型:中文 Causal LM
  • 参数量:187M
  • 训练硬件:Modal H100
  • 训练步数:13,040 steps
  • 训练轮数:1 epoch
  • final train loss:3.965
  • final eval loss:3.82

训练配置摘要

参数 数值
seq_len 2048
per-device train batch size 16
gradient accumulation steps 8
learning rate 5.0e-4
warmup ratio 0.02
lr scheduler cosine
weight decay 0.1
max grad norm 1.0
precision bf16

说明

这个仓库用于记录和复现我的中文语言模型预训练实验。这里提供的是已经分词后的 token binary 数据,而不是原始文本语料。上传该数据的目的是让模型训练过程具备完整可追溯性:训练数据、训练配置、训练曲线、模型权重和在线 Demo 都可以对应起来。

Downloads last month
28

Models trained or fine-tuned on xiaohuzhang/olmo3-190m-zh-training-data