minimind / README.md
meet447's picture
Link the MiniMind chat Space
fd8cee4 verified
|
Raw History Blame Contribute Delete
2.73 kB
---
license: apache-2.0
language:
- en
- zh
library_name: transformers
pipeline_tag: text-generation
tags:
- minimind
- pytorch
base_model: jingyaogong/minimind-3
---
# MiniMind (meet447/minimind)
~64M MiniMind-3 dense checkpoint from the English-first fork
[meet447/minimind](https://github.com/meet447/minimind).
This Hub repo is the **living weight store**. New pretrain / SFT / later English
runs overwrite `main` so you can always pull the latest.
Chat with the current `main` weights: [meet447/minimind-chat](https://huggingface.co/spaces/meet447/minimind-chat).
## Current weights (T4, 2026-09-02)
| File | Stage | Notes |
|------|--------|--------|
| root (`config.json` + `model.safetensors`) | full SFT | Transformers / Qwen3-compatible layout |
| `pytorch/full_sft_768.pth` | full SFT | Native MiniMind trainer format |
| `pytorch/pretrain_768.pth` | pretrain | Native MiniMind trainer format |
**Architecture:** 8 × 768, GQA 8Q/4KV, vocab 6400, SwiGLU, QK-Norm, RoPE 1e6, tied embeddings, no MoE.
**This run:** 1 epoch packed pretrain on `pretrain_t2t_mini.jsonl` (Tesla T4, fp16, batch 96) then 1 epoch SFT on `sft_t2t_mini.jsonl` (batch 16, lr 3e-5). Trainer extras: sequence packing, 3% warmup, AdamW param groups, `torch.compile`.
**Honest quality note:** the tokenizer and mini datasets are still the upstream **Chinese-heavy** ones. These weights validate the fork trainer. They are **not** an English-from-scratch model yet. English tokenizer + FineWeb-Edu / SmolTalk data come next ([docs/ROADMAP.md](https://github.com/meet447/minimind/blob/master/docs/ROADMAP.md)).
## Load (Transformers)
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "meet447/minimind"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, torch_dtype="auto")
messages = [{"role": "user", "content": "Why is the sky blue?"}]
inputs = tok.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=128)
print(tok.decode(out[0], skip_special_tokens=True))
```
## Load (this repo's trainer)
```bash
# download native .pth into ./out
huggingface-cli download meet447/minimind pytorch/full_sft_768.pth --local-dir .
# then
python eval_llm.py --weight full_sft --hidden_size 768 --num_hidden_layers 8
```
## Update this repo
From a checkout that has `out/full_sft_768.pth` (and optionally `out/pretrain_768.pth`):
```bash
export HF_TOKEN=hf_...
python scripts/push_to_hub.py --repo-id meet447/minimind
```
License: Apache 2.0. Architecture and tokenizer follow [jingyaogong/minimind](https://github.com/jingyaogong/minimind).