Downloads · 30 days
2
7% of all-time downloads
eshaoliu/minimind-768-pretrain
minimind-768-pretrain is a machine learning model from eshaoliu. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
MiniMind 小规模英文数学基座模型(8 层 / 84M 参数),由 ultra-minimind 项目基于 Nemotron-CC-Math-v1 高质量英文数学语料预训练而成,是同系列 1B 模型(eshaoliu/minimind-1536-pretrain)的轻量对照。权重以 Qwen3 兼容布局导出为标准 HF safetensors 格式,官方 transformers 直接加载,无需 trustremotecode。
Downloads · 30 days
2
7% of all-time downloads
All-time downloads
30
Public
Parameters
84.2M
168 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 99%
From the Hugging Face model README
MiniMind 小规模英文数学基座模型(8 层 / 84M 参数),由 ultra-minimind 项目基于 Nemotron-CC-Math-v1 高质量英文数学语料预训练而成,是同系列 1B 模型(eshaoliu/minimind-1536-pretrain)的轻量对照。权重以 Qwen3 兼容布局导出为标准 HF safetensors 格式,官方 transformers 直接加载,无需 trust_remote_code。
⚠️ 这是预训练基座模型(base model),未经过 SFT/指令微调,不具备对话能力。适合做预训练/微调流程的快速验证。
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("eshaoliu/minimind-768-pretrain")
model = AutoModelForCausalLM.from_pretrained(
"eshaoliu/minimind-768-pretrain", torch_dtype="auto", device_map="cuda"
)
prompt = "The derivative of x^2 is"
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=100, do_sample=True, temperature=0.85, top_p=0.85)
print(tok.decode(out[0], skip_special_tokens=True))
也可用 ModelScope SDK:
from modelscope import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("eshaoliu/minimind-768-pretrain")
model = AutoModelForCausalLM.from_pretrained("eshaoliu/minimind-768-pretrain")
CPU 即可流畅推理(fp16 仅 ~160MB)。
| 项目 | 值 |
|---|---|
| 参数量 | 84.2M(embedding 与 lm_head 绑定,只存一份) |
| 层数 / 隐藏维度 | 8 / 768 |
| 注意力头 | 8 头,head_dim=96,GQA 4 KV 头,无 bias,qk-norm |
| FFN | SwiGLU,intermediate=2432 |
| 词表 | 32768(英文 BPE,tokenizer_en) |
| 位置编码 | RoPE(θ=1e6),最大 32K 上下文 |
| 精度 | fp16 |
权重命名为 Qwen3 标准布局(model.layers.N.self_attn.q_proj 等),config.json 中 architectures: ["Qwen3ForCausalLM"],任何支持 Qwen3 的推理框架均可直接消费。
ultra-minimind/trainer/train_pretrain.py(流式预训练管线)4+ 质量分桶,流式读取,按 1024 token 定长 packing;flash-attn 变长注意力按文档边界隔离model.safetensors:fp16 权重(~161MB)config.json / generation_config.json:Qwen3 架构配置与默认生成参数tokenizer.json / tokenizer_config.json / special_tokens_map.json:英文 BPE 分词器Apache 2.0(见 ultra-minimind 仓库 LICENSE)。