OLMo3 Full 中文持续预训练模型
基于 MikeLee000/olmo3-190m-zh-full 完成一轮持续预训练(Continued Pretraining,CPT)的实验模型,约 187M 参数。
不是 SFT 或指令对话模型。 使用普通文本作为提示进行续写,不使用 apply_chat_template,不应将其作为可靠的问答助手。
训练与评估
- 架构:
Olmo3ForCausalLM,12 层,hidden size 768,intermediate size 3072,词表 48,000。 - 数据:
cmz1024/llm101-olmo3-zh-demo-data仓库中的continue/tokenized_v31.bin。 - 全参数持续预训练;不使用 LoRA;序列长度 2,048;BF16。
- 1 epoch,共 11,918 个 optimizer steps。
- Batch size 16,gradient accumulation 4,有效 batch size 64。
- Learning rate 2e-4,warmup ratio 0.1,cosine scheduler。
- Transformers 5.9.0,PyTorch 2.5.1。
- 验证集为打包序列末尾约 5%,共 40,141 段;每 1,000 步评估。
- 最终 validation loss:1.9467759132385254。这是特定验证集上的语言模型损失,不是准确率或通用问答质量评分。
权重来源
发布文件来自 /checkpoints/olmo3_zh_continue/final,已核对与 checkpoint-11918/model.safetensors 的 SHA-256 一致:
502f0a297710d58212a577a4ef20f3cfc59fc9132709cd4b3aef99d21f04576c
只发布推理所需的 safetensors 权重、配置、tokenizer 和说明,不包含训练数据、优化器状态、training_args.bin、遗留聊天模板或访问凭证。
CPU 推理示例
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "MikeLee000/olmo3-190m-zh-full-continue"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=False)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype=torch.float32, attn_implementation="sdpa",
trust_remote_code=False,
).eval()
inputs = tokenizer("从前有座山,山里有座庙,", return_tensors="pt")
with torch.inference_mode():
output = model.generate(
**inputs, max_new_tokens=64, do_sample=True,
temperature=0.8, top_p=0.9, repetition_penalty=1.1,
use_cache=True, pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
演示与限制
对应的 Gradio Space 使用 ZeroGPU 共享 GPU 做文本续写,不重新训练模型。GPU 按请求分配,有每日额度和排队限制;首次启动或休眠后唤醒需要等待加载。
模型可能重复、跑题、产生病句和错误事实,尤其不应相信未经核实的编程、医疗、法律或财务内容。持续预训练降低语言建模损失,不等于获得可靠的指令遵循或对话能力。请勿向公开演示输入密码、密钥或其他敏感信息。