flylcw/seq_monkey_pretrain_base_1.5B
018
seqmonkeypretrainbase1.5B(中文 Base 预训练模型)
基于 Qwen2.5-1.5B 架构、在出门问问「序列猴子」中文通用语料上 from-scratch(随机初始化)预训练 的中文 Base 模型。本模型为 Base(续写)模型,未经指令微调,适合下游继续预训练 / SFT,或直接做文本续写。
模型结构
预训练细节
- 训练方式:from-scratch 随机初始化(非加载官方权重),Causal LM
- 训练数据:ddzhu123/seq-monkey 的
mobvoi_seq_monkey_general_open_corpus——序列猴子中文通用文本语料,约 1300 万份中文文本,来源涵盖网页、百科、书籍等,许可 Apache-2.0 - 分词器:Qwen2.5 Tokenizer(vocab 151936)
- 序列长度:block_size = 1024
- 优化:bf16 + DeepSpeed ZeRO-2,8×NVIDIA A800-40G
- 学习率:2e-4,warmup + cosine
- 训练规模:1 epoch
- 收敛情况:loss 从 ~12(≈ln(151936),随机初始化理论起点)平滑收敛至 ~3.x,grad_norm 稳定
快速开始(Base = 续写,不用 chat template)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
name = "flylcw/seq_monkey_pretrain_base_1.5B"
tok = AutoTokenizer.from_pretrained(name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
name, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
prompt = "人工智能正在改变"
ids = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**ids, max_new_tokens=128, do_sample=True,
temperature=0.7, top_p=0.9, repetition_penalty=1.1)
print(tok.decode(out[0], skip_special_tokens=True))