r/LocalLLaMA • • 13h ago

Resources MiniMind v3: 64M LLM from scratch in 2 hours.

https://github.com/jingyaogong/minimind

Based on Qwen 3

14 Upvotes

10 comments sorted by

7

u/ecolang 12h ago

That's cool. I think small models will be the future.

Glad I came here before people with anti-SLM mindset. Every time I say I like small models, they come to attack me saying these models are always useless.

4

u/Thistleknot 12h ago

we all got to start somewhere

2

u/Borkato 3h ago

Small models are honestly cool as hell.

1

u/TheConnectionPerson 10h ago

Training from scratch in 2 hours is a nice way to actually understand the pipeline. What hardware did you run it on, and roughly how coherent is the output at 64M? Curious if it's usable for narrow tasks like classification or tagging

2

u/Thistleknot 7h ago edited 7h ago

im training on an rtx 5000

first attempt took me 15 hours w chinchilla 20x per parm for 1 billion tokens just for pretraining

but ive learned to modify it w net2net and can train much faster now

newer cards with their fancy flash attention should train much faster

check out tinystories

https://arxiv.org/abs/2305.07759

also i use NeuML's atto 1k vocab size tokenizer

2

u/ecolang 10h ago

What hardware did you run it on

It's in the English README:

Note: This project is released under the Apache 2.0 license and is completely free. "2 hours" refers to the measured time for running 1 epoch of the SFT stage on a single NVIDIA 3090, while "RMB 3" refers to the corresponding GPU rental cost.

1

u/TheConnectionPerson 9h ago

Ah missed that, thanks. One epoch of SFT on a single 3090 for the price of a coffee is wild. Did they share pretraining time too or is the 2 hours only the SFT part?

1

u/ecolang 8h ago

Just read it man

minimind-3:

pretrain_t2t_mini + sft_t2t_mini: Single 3090 GPU, 1 epoch estimated approximately 2.31 hours, cost approximately 3.0 CNY. Can train a minimind-3 Zero dialogue model from scratch.

minimind-3-moe:

pretrain_t2t_mini + sft_t2t_mini: Single 3090 GPU, 1 epoch estimated approximately 3.23 hours, cost approximately 4.2 CNY. Can quickly obtain the basic dialogue version of minimind-3-moe.

The above values are estimates and are meant only as a rough reference for training cost.

2

u/TheConnectionPerson 8h ago

Fair, I skimmed past that haha. So pretrain + SFT together in ~2.3h on one 3090, that's wild for the price of a coffee. Thanks for pasting it

1

u/ecolang 8h ago

You're welcome