MiniSeek Dense · SFT / 对话版
超小开源 Decoder-only 对话模型。Hub 上约 31.73M 参数(本发布将 tok_emb 与 lm_head 分开存储);tied 基座结构约 28.45M。预训练基座:MiniSeek-D0.1-base。
| Model ID | wyf-yfw/MiniSeek-D0.1 |
| 基座 | wyf-yfw/MiniSeek-D0.1-base |
| 系列 | MiniSeek-D(Dense) |
| 版本 | 0.1(chat / SFT) |
| 参数量 | 31,728,128(~31.73M;untied tok_emb + lm_head) |
| 权重文件 | model.safetensors |
| 结构 | Dense Decoder-only Transformer |
| 训练上下文 | 512 tokens |
| 分词器 | MiniMind(vocab_size=6400) |
| 对话模板 | `< |
| 协议 | MIT |
命名:
MiniSeek-D{x.y}-base — 预训练 / 继续预训练MiniSeek-D{x.y} — SFT / chat(本仓库)MiniSeek-M{x.y} — MoE 线(后续)与基座相同的 Dense 栈(d=512,L=8,vocab=6400)。基座共享 Embedding / LM Head(~28.45M);本 SFT 发布在磁盘上分开存放(~31.73M = 28.45M + 6400×512)。示意图见 基座模型卡 / assets/architecture.jpg。
| 阶段 | 说明 |
|---|---|
| 基座 | MiniSeek-D0.1-base(pretrain_t2t_mini,Stage-0 Dense) |
| SFT 数据 | jingyaogong/minimind_dataset · sft_t2t_mini.jsonl |
| 初始化 | checkpoints/stage0/best.pt |
| 发布权重 | checkpoints/sft/best.pt |
| Train step(best) | 54949 |
| Train loss(best) | ≈ 0.54 |
| 硬件 | NVIDIA RTX 3090 |
| 优化器 | AdamW · 峰值 LR 5e-5 → 最小 1e-5 |
代码:github.com/wyf-yfw/miniseek(Web UI 对话 Tab)。
不是生产助手。事实错误、弱数学/代码、拒答能力弱都属预期。
用 messages + apply_chat_template(与常见 HF 模型一致),不用手拼特殊符号:
import json
from pathlib import Path
import torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from transformers import AutoTokenizer
# clone https://github.com/wyf-yfw/miniseek ,把仓库根目录加入 PYTHONPATH:
from model.config import ModelConfig
from model.dense import DenseLM
repo = snapshot_download("wyf-yfw/MiniSeek-D0.1")
cfg = ModelConfig.from_dict(json.loads(Path(repo, "config.json").read_text()))
model = DenseLM(cfg).eval()
model.load_state_dict(load_file(Path(repo) / "model.safetensors"))
tokenizer = AutoTokenizer.from_pretrained(Path(repo) / "tokenizer", trust_remote_code=True)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "你好,用一句话介绍你自己"},
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
ids = tokenizer.encode(prompt, add_special_tokens=False)
out = model.generate(
torch.tensor([ids]),
max_new_tokens=64,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(out[0, len(ids):].tolist(), skip_special_tokens=True))
也可直接:from model.chat import chat → print(chat(model, tokenizer, messages))。
自定义
DenseLM,尚不支持AutoModelForCausalLM;tokenizer 已带 ChatMLchat_template。
低温下能答简单中文常识 / 小算术,并跟随短指令;高温易跑偏。代码与安全拒答较弱。请当作学习检查点。
<|im_end|>(id=2);参考 generate 尚无 KV cache@misc{miniseek-d01,
title = {MiniSeek-D0.1},
author = {Wang Yifan},
year = {2026},
howpublished = {\url{https://huggingface.co/wyf-yfw/MiniSeek-D0.1}},
note = {Ultra-small dense Decoder-only chat (SFT) checkpoint}
}
jingyaogong/minimind_datasetwyf-yfw/MiniSeek-D0.1-baseUltra-small open decoder-only chat checkpoint. ~31.73M params on the Hub (this release stores untied tok_emb + lm_head); tied base architecture is ~28.45M. Pretrained base: MiniSeek-D0.1-base.
| Model ID | wyf-yfw/MiniSeek-D0.1 |
| Base | wyf-yfw/MiniSeek-D0.1-base |
| Family | MiniSeek-D (Dense) |
| Version | 0.1 (chat / SFT) |
| Parameters | 31,728,128 (~31.73M; untied tok_emb + lm_head) |
| Weight file | model.safetensors |
| Architecture | Dense decoder-only Transformer |
| Context (train) | 512 tokens |
| Tokenizer | MiniMind (vocab_size=6400) |
| Chat template | `< |
| License | MIT |
Naming:
MiniSeek-D{x.y}-base — pretrained / continued-pretrainMiniSeek-D{x.y} — SFT / chat (this repo)MiniSeek-M{x.y} — MoE line (later)Same dense stack as the base (d=512, L=8, vocab=6400). The base ties embedding/LM head (~28.45M); this SFT release keeps them separate on disk (~31.73M = 28.45M + 6400×512). Diagram: base model card / assets/architecture.jpg.
| Stage | Detail |
|---|---|
| Base | MiniSeek-D0.1-base (pretrain_t2t_mini, Stage-0 dense) |
| SFT data | jingyaogong/minimind_dataset · sft_t2t_mini.jsonl |
| Init | checkpoints/stage0/best.pt |
| Release weights | checkpoints/sft/best.pt |
| Train step (best) | 54949 |
| Train loss (best) | ≈ 0.54 |
| Hardware | NVIDIA RTX 3090 |
| Optimizer | AdamW · peak LR 5e-5 → min 1e-5 |
Code: github.com/wyf-yfw/miniseek (Web UI chat tab).
Not a production assistant. Factual errors, weak math/coding, and poor refusal behavior are expected.
Use messages + apply_chat_template like other Hub models — no hand-stitched special tokens:
import json
from pathlib import Path
import torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from transformers import AutoTokenizer
# clone https://github.com/wyf-yfw/miniseek and put the repo root on PYTHONPATH:
from model.config import ModelConfig
from model.dense import DenseLM
repo = snapshot_download("wyf-yfw/MiniSeek-D0.1")
cfg = ModelConfig.from_dict(json.loads(Path(repo, "config.json").read_text()))
model = DenseLM(cfg).eval()
model.load_state_dict(load_file(Path(repo) / "model.safetensors"))
tokenizer = AutoTokenizer.from_pretrained(Path(repo) / "tokenizer", trust_remote_code=True)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "你好,用一句话介绍你自己"},
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
ids = tokenizer.encode(prompt, add_special_tokens=False)
out = model.generate(
torch.tensor([ids]),
max_new_tokens=64,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(out[0, len(ids):].tolist(), skip_special_tokens=True))
Or: from model.chat import chat → print(chat(model, tokenizer, messages)).
Custom
DenseLM— not drop-inAutoModelForCausalLMyet; tokenizer ships with a ChatMLchat_template.
At low temperature it can answer simple Chinese facts / small arithmetic and follow short instructions; at higher temperature it drifts. Code and safety refusal are weak. Treat as a learning checkpoint.
<|im_end|> (id=2); no KV cache yet in reference generate@misc{miniseek-d01,
title = {MiniSeek-D0.1},
author = {Wang Yifan},
year = {2026},
howpublished = {\url{https://huggingface.co/wyf-yfw/MiniSeek-D0.1}},
note = {Ultra-small dense Decoder-only chat (SFT) checkpoint}
}
jingyaogong/minimind_datasetwyf-yfw/MiniSeek-D0.1-basewyf-yfw/MiniSeek-D0.1-base