mrkeyoor.comAsk

jingyaogong/minimindtested 11 Oct 2026commit f659b55

minimind review

Use MiniMind to study and modify native PyTorch training code, comparing checkpoints and generated answers as part of the exercise.

  • Safety failed
  • Build 1 s
77 sto install
  • 164 packages
LLM Toolsevaluationupdated 20 Nov 2026
+2,706stars / 7d

MiniMind is jingyaogong/minimind, a Python project for studying language-model architecture and training in native PyTorch. Its Chinese and English READMEs describe pretraining, supervised fine-tuning, later training stages and local inference.

Verdict

Use MiniMind to study and modify native PyTorch training code, comparing checkpoints and generated answers as part of the exercise. Teams choosing a dependable assistant should not base that decision on this tutorial or its two-hour headline. Our October run installed it in 77 seconds; the November deployment attempt stopped at our harness's missing-Compose check. Start with one model generation, dataset and hardware configuration.

MiniMind infographic: study and modify native PyTorch training code, plus our test result and who it suits
Tested 11 October 2026: the source install took 77 s and the build 1 s.

We ran it

Lab card: what happened when we ran minimind
Lab card from our sandbox run
Screenshot of minimind (jingyaogong.github.io/minimind)
jingyaogong.github.io/minimind
Install✓ · 77s164 packages · 6154 MB
Build✓ · 1s
Testsn/ano test script
Known vulns174(pip-audit)
Repo49 files~4,680 lines of source · 12.5 MB · 0 CI workflows

Answers from our run

Does minimind build from source?

Dependencies installed in 77 seconds (164 packages), and the build succeeded in 1 seconds. We cloned commit f659b55 into a clean Debian container with 3 CPUs and no project-specific setup.

Does minimind have tests you can run?

Not through a standard command: the project exposes no test script or target that our harness could run.

Does minimind have known vulnerabilities in its dependencies?

pip-audit flagged 174 known advisories in the dependency tree at the time of our run.

Who should not use minimind?

Teams selecting a dependable assistant on the strength of a training tutorial.

What are the alternatives to minimind?

Hugging Face Transformers, nanochat. Use MiniMind to study and modify native PyTorch training code, comparing checkpoints and generated answers as part of the exercise.

Setup3/5Our source checkout installed in 77 s and built in 1 s, a heavy install of 164 dependencies, and we did not run a README task.Editor’s note: Installation and the recorded build step completed, but there is no completed training or inference setup result to assess.
Docs4/5The README has an install section (“📌 快速开始”) and usage in the same section; we did not run its quickstart ourselves, and the README is mostly in Chinese, not English.Editor’s note: The English guide documents setup routes, but its opening timing qualification differs from the repository's training-cost workload.
Community5/5Last push on 2026-11-18, 67,534 stars and maintainers answered or closed 10 of the 10 most-discussed issues we sampled.Editor’s note: Named experiments and maintainer replies support discussion analysis; they do not measure support capacity or production adoption.
Maturity2/5Latest release v2 on 2025-10-21 and repository created 2024-07-27.Editor’s note: The October audit and skipped tests describe the checkout; training correctness and assistant reliability have no lab assessment.

How we score

Discussed on

  1. hnMiniMind: End-to-end GPT-style LLM training pipeline in pure PyTorch3 points

Who it’s for

Developers who want to read and change native PyTorch training code.
Learners prepared to select hardware, datasets and settings for a particular training stage.
Experimenters comparing checkpoints and generated answers.

Who it’s NOT for

Teams selecting a dependable assistant on the strength of a training tutorial.
Readers budgeting every training configuration from the two-hour headline.
Developers expecting dependency installation to produce a working chat interface without downloaded weights.

Setup reality

Our October 11, 2026 run at commit f659b55 installed MiniMind in 77 seconds, recording 164 dependencies and 6,154 MB on disk. The build step succeeded in 1 second. Tests were skipped because there was no test script or target, and pip-audit reported 174 known vulnerabilities. The sandbox configuration recorded 3 CPUs, 8 GB RAM and image ghcr.io/astral-sh/uv:python3.12-bookworm.

The November 20 attempt stopped at our deployment harness's safety check because it required a Compose file and found none. The README describes Python scripts for training and inference, with downloaded data or weights and an optional Streamlit interface.

The English README's opening note assigns two hours to one SFT epoch on a single NVIDIA 3090. The repository README's training-cost section separately estimates MiniMind-3 pretraining plus SFT at 2.31 hours and RMB 3 on a single 3090. These passages describe different workloads.

Our October 11, 2026 run installed MiniMind in 77 seconds and recorded a 6,154 MB environment. Use jingyaogong/minimind if your goal is to understand and modify language-model training code. Choose a different starting point if your immediate requirement is a dependable assistant. MiniMind exposes native PyTorch implementations, while community experiments document completed training exercises, poor arithmetic answers and regressions after further training.

What people use minimind for

MiniMind supports learning pretraining and SFT, experimenting with arithmetic data, and comparing training implementations or checkpoints. These uses appear in named community accounts with different outcomes. In issue #26, ssuurrffaaccee described pretraining and one round of full-parameter supervised fine-tuning on four idle company A30 GPUs. Their satisfaction came from producing intelligible language, a learning outcome that differs from application accuracy.

Person and task What happened What you can take from it
ssuurrffaaccee: pretraining and full-parameter SFT Reported intelligible language after training on four company A30 GPUs. Training account An identified hardware configuration and a completed learning exercise.
tangjinou: arithmetic with operands within 100 Reported poor answers after one million examples, with training loss of 0.000155. Arithmetic discussion Compare answers on questions outside the training examples.
Ok-Adagio-6830: Hugging Face rewrite Reported results very different from the project's implementation. r/LLM account Treat a framework rewrite as a reproduction task.
David-19940718: pretraining, two SFT stages and DPO Preferred sft_2048 to the subsequent DPO result, including after trying one DPO epoch. Checkpoint discussion Preserve the earlier checkpoint before continuing training.

The English README's data guide describes SFT conversations with user and assistant messages, and DPO examples with chosen and rejected responses. A learner can compare how these formats affect a training exercise: when readable language appears, how arithmetic answers compare with loss, and what changes after another training stage. Generated answers and their corresponding checkpoints give those comparisons something concrete to inspect alongside the logs.

What happened when we ran it

Our October installation succeeded in 77 seconds; the November 20 deployment attempt stopped at a missing-Compose safety check. The November safety step lists four absent Compose filenames: compose.yaml, compose.yml, docker-compose.yaml and docker-compose.yml. This requirement belongs to our deployment harness. MiniMind's documented quick start uses Python scripts, so the failed harness step and the project's documented execution route describe separate operations.

The November run header says deployment used the repository's own Docker Compose and bound every port to 127.0.0.1, while the safety step records a failure before deployment. The failed step determines the outcome of this attempt. Its teardown reports "ok". The header and step disagree; the header is not evidence of a running service.

October 11 sandbox observation Recorded result
Install Succeeded in 77 seconds
Installed environment 164 dependencies, 6,154 MB on disk
Build step Succeeded in 1 second
Tests Skipped: no tests script or target
Dependency audit pip-audit: 174 known vulnerabilities
Repository 49 files, approximately 4,680 source lines, 12.5 MB checked out
Automation signals No CI workflow files, no Dockerfile, no tests directory

The October run used commit f659b55, with a recorded configuration of 3 CPUs and 8 GB RAM. Its configured image was ghcr.io/astral-sh/uv:python3.12-bookworm. The installation, build and audit measurements show a 12.5 MB checkout and a 6,154 MB installed environment. Storage planning therefore includes the Python environment as well as repository files, followed by the model or dataset downloads required for the selected workflow.

Where people get stuck: tokenizer configuration and training regressions

A missing chat template stopped WangRongsheng's historical inference attempt in issue #27. The reporter restored inference by switching from an independently downloaded Mistral tokenizer to the repository's tokenizer configuration. The maintainer identified the missing chat template as the relevant difference. The README also treats tokenizer choice as part of the model setup, describing effects on weights, data formats and inference interfaces when vocabulary or segmentation rules change.

Symptom and reporter Resolution recorded in the issue Decision for your run
WangRongsheng: missing chat template, #27 Repository tokenizer/configuration restored inference. Match the tokenizer configuration to the chosen model generation.
ozbillwang: CUDA toolkit discovery error, #48 Installing the CUDA toolkit fixed that error; the reporter subsequently reached a VRAM failure. Track toolkit discovery and memory capacity as separate problems.
MoE users: NaN loss and exploding gradients, #567 jingyaogong attributed the problem to auxiliary load loss and linked a coefficient change from 0.1 to 0.01. Read the revision-specific coefficient fix before copying older advice.
DPO users: unreadable generation, #395 Higher gradient clipping still accompanied collapse; a loss-mask modification reportedly alleviated it. Compare generated answers with the SFT checkpoint.

The historical CUDA discussion in issue #48 records progress through more than one failure. Installing the toolkit addressed CUDA_HOME does not exist, unable to compile CUDA op(s), then an 8 GB RTX 4060 reached OutOfMemory. In issue #567, the maintainer supplied an auxiliary-loss adjustment and a linked commit. One discussion documents an intermediate installation repair; the other identifies a training coefficient change.

The September 2024 training account in issue #26 records flash-attn installation trouble and an unavailable torch==2.1.2+cu121 package. The reporter installed Torch separately, adjusted network access and used torch==2.1.2. During SFT they encountered a NameError involving malformed data and a TypeError when concatenating a float with a string. Their account describes updated code and string conversion as the respective repairs, tied to that historical setup.

The later discussion in issue #27 includes a MiniMind2 user running Transformers 4.46.3 who could not download 4.57.1 and received a mirror-install suggestion. The same thread also records gibberish after manually adding a template. In issue #519, the maintainer explained that function definitions do not automatically enter the template merely by appearing under functions; the discussion instead shows explicitly passing tools to apply_chat_template and matching training and inference formatting.

A small model still needs a hardware-specific training budget

The README's single-3090 timing and historical Mac pretraining reports describe different workloads. In issue #271, aluenkinglee reported nearly 40 hours for pretraining on a Mac M4 Pro with 24 GB memory. The discussion also records reducing batch size to avoid memory swapping, bringing a reported training-time estimate to around 1,000 minutes. The maintainer recommended CUDA for training in that exchange.

An 8 GB RTX 4060 attempt in issue #48 ran out of VRAM, while the maintainer separately told a laptop owner in issue #26 that an 8 GB 4060 could train slowly. These accounts concern different configurations. A training budget needs the model generation, dataset, stage, batch size and sequence length alongside the GPU. The README's cost reference specifically names a single NVIDIA 3090 and particular training workloads.

Keep the SFT checkpoint before you try DPO

David-19940718 preferred the sft_2048 result to the later DPO result in issue #172. After trying one DPO epoch, the user still described an unsatisfactory result. In issue #395, users reported unreadable generation, including collapse after increasing gradient clipping. Larger batches reportedly delayed collapse, and a change to the loss mask reportedly alleviated it. These reports make the earlier checkpoint a useful comparison point.

A practical evaluation plan is to save each checkpoint and ask the same unseen questions after every stage, comparing correctness, repetition and readability alongside loss. For custom evaluation data, the maintainer recommended a short answer-comparison script in issue #172. That approach fits an arithmetic exercise with expected answers that can be stored beside model output. It turns the choice between SFT and DPO checkpoints into an answer comparison rather than an assumption about stage order.

Security starts with the environment you install

Our October dependency audit reported 174 known vulnerabilities through pip-audit. The dated sandbox measurements also record 164 installed dependencies, no detected CI workflow files and no tests directory. For a learning setup, an isolated environment with disposable inputs gives the experiment a clear boundary. Credentials belong outside example code, and optional experiment tracking calls for an explicit choice about where training information will be sent.

The English README describes optional training visualization and a Streamlit chat interface. It says MiniMind currently defaults to SwanLab and discusses WandB-compatible usage. This explains why older commands and historical issue reports can name a different tracking service. Recording the chosen service and configuration alongside the training revision makes those differences easier to follow when returning to an experiment or comparing it with another account.

English documentation exists; model generation still matters

MiniMind has an English README alongside its Chinese default documentation, and the current guide describes MiniMind-3. The English changelog lists updates to architecture, tokenizer, training pipeline, inference interface and defaults on April 1, 2026. Its quick start downloads minimind-3 weights. Historical reports about MiniMind2 or September 2024 scripts consequently describe their named generations and configurations, while the current guide uses a different set of defaults.

Chinese study material includes 木乔_Mokio's architecture tutorial and a separate walkthrough covering SFT, LoRA, PPO, DPO and GRPO in the Bilibili tutorial listings. For English documentation, the repository guide supplies filenames for the selected generation. Its data section explicitly contrasts the current sft_t2t files with earlier sft_512, sft_1024 and sft_2048 schemes, connecting the historical discussions to the current documentation without treating their names as interchangeable.

MiniMind vs Hugging Face Trainer, nanochat and keeping your SFT model

MiniMind documents native PyTorch implementations, Trainer documents a training API, and nanochat documents a workflow spanning tokenization through inference. The Reddit rewrite account names Hugging Face and reports different results. Trainer enters this comparison through its own documentation, which describes the model interface expected by its training loop. These are choices about the code and workflow to study, rather than measured rankings of output quality.

Choice Why you would choose it Documented or reported basis
MiniMind's native training code Read and modify the training-stage implementations. The README describes native PyTorch core algorithms.
Hugging Face Transformers Trainer Use a training API with configurable training arguments. Trainer documentation describes its PyTorch training API and custom-model requirements.
Keep your SFT checkpoint Retain earlier output after a later stage regresses. David-19940718 preferred sft_2048 to the DPO result.
Rent a CUDA GPU instead of local MPS Follow the hardware preference expressed after a slow Mac run. aluenkinglee preferred rented GPU time in #271.
Write a small custom evaluator Compare answers against a small task-specific answer set. jingyaogong recommended a short script for custom data in #172.
nanochat Study tokenization through training, evaluation and inference. Its README describes those stages and a single-GPU-node design.

Transformers Trainer provides a PyTorch training API. Its documentation also specifies return values and loss handling for custom models. nanochat covers tokenization, pretraining, fine-tuning, evaluation and inference. Its README describes an experimental training harness whose reference speedrun uses an 8XH100 node. Those hardware details belong alongside the workflow when deciding which project matches the implementation you want to study and the compute you can allocate.

Outdated claims, corrected

MiniMind's English opening note assigns two hours to one SFT epoch on a single NVIDIA 3090. The opening qualification also assigns RMB 3 to the corresponding rental period. The repository README separately estimates MiniMind-3 pretraining plus SFT at 2.31 hours and RMB 3 on a single 3090. Its training-cost section names one epoch using pretrain_t2t_mini plus sft_t2t_mini and labels the figures as estimates.

The two README passages describe different workloads: SFT alone in the opening qualification, and pretraining plus SFT in the cost section. On X, the_osps described a two-hour run costing about three dollars in the November post. The README currency is RMB, and the YouTube overview repeats three yuan and about 40 cents. A budget should therefore begin with the named workload, currency and actual rental terms.

The X description saying "All you need is one GPU" omits the hardware and settings needed to interpret its promise. The RTX 4060 failure and Mac timings show why the GPU model and workload belong in the description. Separately, issue #172 contains both the maintainer's categorical assurance about physical RAM and a report of training being killed on a 128 GB server. The reporter subsequently ran successfully with batch size eight and gradient accumulation.

FAQ

MiniMind AI here means jingyaogong/minimind, the language-model training project whose English README documents architecture, data, training and inference. Its GitHub repository is the entity reviewed on this page. The questions cover the repository, hardware, training stages and local interface, using the README's current filenames and identifying historical user outcomes by their issue discussions.

What is MiniMind AI, and where is the jingyaogong/minimind GitHub repository?

MiniMind is a language-model training project with native PyTorch implementations of its core algorithms. The English README describes pretraining, supervised fine-tuning and later adaptation or reinforcement stages, along with local inference. The owner-qualified repository name, jingyaogong/minimind, identifies the code and issue discussions reviewed here, distinguishing the training project from other products that use the MiniMind name.

Is this MiniMind LLM project the same entity as the similarly named education businesses or note-taking app?

This review concerns jingyaogong/minimind; mekanoide's Minimind note-taking and task app is a separate product. The r/SideProject post describes that app as a replacement for note-taking and task-management tools. The repository owner and language-model training purpose identify this page's subject. Similar wording in search queries supplies no relationship between that repository and a different business or application.

What can a model this small practically do beyond serving as a learning project?

In issue #519, yuyu5333 reported tool-call-shaped output in one of four MiniMind2 test cases. The tool-formatting discussion describes an output shaped like <tool_call>...</tool_call> after changes to the function-data format and template inputs, alongside repetition. It gives a concrete formatting outcome to study. The same discussion records custom system instructions having no effect in the reporter's tests and the maintainer's explanation that training used a fixed system prompt.

Does the advertised training run cost three yuan, about $0.40, or three dollars?

The README states RMB 3, while the_osps's X post says about three dollars. The English README note associates RMB 3 with its SFT timing, and the repository cost section estimates RMB 3 for MiniMind-3 pretraining plus SFT. The X post uses a different currency amount. These are attributed cost statements for particular descriptions of the workload.

How do I implement MiniMind's architecture and training pipeline from scratch in PyTorch?

MiniMind publishes its core algorithms in native PyTorch, according to the English README. Its architecture and training sections connect the model configuration, tokenizer and dataset formats for the current generation. The Bilibili architecture tutorial listing also names 木乔_Mokio's Chinese walkthrough. Reading the implementation together with those formats gives a more specific starting point than treating the training pipeline as a single command.

How do SFT, LoRA, PPO, DPO, and GRPO fit into MiniMind training?

The README labels pretraining and instruction fine-tuning as required starting stages and describes later adaptation and reinforcement paths separately. Its training guide covers SFT, LoRA, DPO and reinforcement methods including PPO and GRPO. Subsequent stages belong to the experiment's objective: adapting a model, learning from preference examples, or studying reinforcement training. Saving answers at each stage makes the resulting checkpoints comparable.

How do I choose a GPU, reproduce training, and connect MiniMind locally as a beginner?

The README provides a single NVIDIA 3090 timing reference and separate routes for downloading weights or training with data files. Its quick start places training data under dataset, then runs pretraining and SFT scripts. Local inference uses eval_llm.py. The revision, model generation, tokenizer, dataset and settings define the run to compare with a historical account, including any differences in hardware.

How do I build a local chat interface and locate the required model weights?

The README's Streamlit interface requires a Transformers-format model folder under scripts. The WebUI instructions describe copying minimind-3 there and starting web_demo.py through Streamlit. The script scans subdirectories for weights and reports an error when none are found. Downloading the model and placing it in the documented directory are therefore separate preparation steps after installing the Python dependencies.

Why did my Hugging Face rewrite produce different results from MiniMind's training code?

Ok-Adagio-6830 reported different results after a Hugging Face rewrite on r/LLM. A proposed investigation would compare preprocessing, training labels, loss calculation and settings between the two implementations, using matching checkpoints and evaluation questions. Each comparison concerns an input or operation that can be inspected directly. This is an investigation plan for reproducing the difference, rather than a diagnosis of the reporter's implementation.

How much RAM and VRAM does MiniMind training actually need?

The reports describe configuration-specific memory outcomes: an 8 GB RTX 4060 reached an out-of-memory error, while a 128 GB server report progressed after reducing batch size and enabling gradient accumulation. The GPU failure and batch-size workaround concern different training setups. Model generation, sequence length and batch configuration belong beside any memory figure used to budget another run.

Can an RTX 4060 laptop with 8 GB VRAM and 32 GB RAM pretrain MiniMind?

The maintainer answered that configuration could train slowly in issue #26. A separate historical RTX 4060 attempt reached a VRAM error. The maintainer's answer and the failed attempt concern different setups, so neither replaces the other. Selecting a model and batch configuration gives the laptop question a specific workload, rather than relying on the GPU name alone.

Can MiniMind-O be trained to handle vision, listening, and speech?

The main README identifies MiniMind-O as a separate multimodal extension. The repository overview distinguishes it from the text-model project, while the Bilibili listing by 光子平方 advertises seeing, hearing and speaking. Choosing that extension means following a different project's training route and model requirements. This review's installation figures belong to jingyaogong/minimind at commit f659b55.

What we have not tested yet

Our completed run covers dependency installation, a recorded build step and an audit at f659b55; training, inference and the WebUI remain untested. The November attempt stopped before deployment and produced no completed chat task, answer-quality measurement or screenshot. The configured image label alone supplies no actual runtime or operating-system version. The audit count gives no application-specific exploitability assessment or evidence that the reported advisories have since been fixed.

Neither the English README's SFT-only configuration nor the repository README's estimated pretraining-plus-SFT configuration or rental cost was reproduced by our lab. There is no controlled CUDA-versus-MPS comparison, English-quality result, cross-project speed comparison or current-version reproduction of the historical failures in this review. The Reddit rewrite has no resolved diagnosis and does not identify Trainer. Tutorial listings and introductory video descriptions add no executed implementation or model-quality result.

The arithmetic exchange supplies no held-out accuracy result. The MiniMind2 tool experiment supplies no dependable end-to-end tool execution result, and the custom-system-prompt discussion supplies no general instruction-following fix. The later Transformers mirror-install suggestion has no confirmed outcome. DPO workarounds and the promised special-token update in train_distill_reason.py need revision-specific reproduction; the original cause of the killed process in #172 is unresolved. Rendered layout, resolved links, automatic related links, recommendation modules and template behavior were outside this text review.

A useful next experiment would freeze one revision and dataset, save the SFT checkpoint, and compare later stages on the same unseen questions. Generated answers would sit alongside loss, hardware and training settings. That experiment would answer whether a particular continuation improves the required behavior and produces a checkpoint worth choosing over the earlier one, with its additional compute recorded as part of the comparison.

Alternatives

ProjectWhat it isPick it when
Hugging Face Transformers gh↗Trainer provides a PyTorch training API with configurable training arguments.Choose it when its training API suits your project and your model follows the documented return-value and loss interface.
nanochat gh↗An experimental language-model training project spanning tokenization, training, evaluation and inference.Choose it to study another complete experimental workflow, matching its documented hardware configuration to your compute budget.

What people are saying

  1. [github-trending] jingyaogong/minimind

Sources

  1. MiniMind English README
  2. MiniMind repository README and training-cost estimates
  3. Historical training account
  4. DPO regression discussion
  5. MiniMind2 custom prompts and tools
  6. Mac training reports
  7. Transformers Trainer documentation
  8. nanochat README

More llm tools reviews