ไธญๆ | English
- This open-source project aims to train a super-small language model MiniMind with only 3 RMB cost and 2 hours, starting completely from scratch.
- The MiniMind series is extremely lightweight, with the smallest version being
$\frac{1}{7000}$ the size of GPT-3, making it possible to train quickly on even the most ordinary personal GPUs. - The project also open-sources the minimalist structure of the large model, including extensions for shared mixed experts (MoE), dataset cleaning, pretraining, supervised fine-tuning (SFT), LoRA fine-tuning, direct preference optimization (DPO) algorithms, reinforcement learning from AI feedback (RLAIF: PPO/GRPO/SPO), and model distillation algorithms, along with the full code of the entire process.
- MiniMind also expands into vision multimodal VLM: MiniMind-V.
- All core algorithm code is reconstructed from scratch using native PyTorch! It does not rely on abstract interfaces provided by third-party libraries.
- This is not only a full-stage open-source reproduction of a large language model but also a tutorial for beginners in LLM.
- We hope this project will serve as an inspiring example for everyone, helping to enjoy the fun of creation and promoting the progress of the wider AI community!
To avoid misunderstanding, the "2 hours" test is based on NVIDIA 3090 hardware (single GPU), and the "3 RMB" refers to the GPU server rental cost. Details of the specifications can be found below.
The emergence of Large Language Models (LLMs) has sparked unprecedented global attention to AI. Whether it's ChatGPT, DeepSeek, or Qwen, they all demonstrate stunning performance that is awe-inspiring. However, with their massive scale of tens of billions of parameters, they are not only difficult to train on personal devices but nearly impossible to deploy. Opening the "black box" of large models to explore their internal mechanisms is truly thrilling! Unfortunately, 99% of exploration can only stop at using techniques like LoRA to perform minor fine-tuning on existing large models to learn new instructions or tasks. This is like teaching Newton how to use a 21st-century smartphoneโwhile interesting, it completely deviates from the original intent of understanding the essence of physics. Meanwhile, third-party large model frameworks and toolkits, such as transformers+trl, expose only highly abstract interfaces. With just 10 lines of code, you can complete the entire workflow of "loading model + loading dataset + inference + reinforcement learning." While such efficient packaging is convenient, it also acts like a high-speed spacecraft, isolating developers from underlying implementations and hindering deep exploration of LLM core code. Yet, "building a plane with Lego is far more exciting than flying in first class!" What's worse, the internet is flooded with expensive courses and marketing accounts selling AI tutorials with countless flaws and superficial understanding. For this reason, this project's original intention is to lower the barrier to entry for LLM learning, allowing everyone to start by understanding every line of code, to personally train an extremely small language model from scratch. Yes, from training from scratch, not just inference! With less than 3 RMB in server costs, you can personally experience the entire process of building a language model from 0 to 1. Let's enjoy the fun of creation together!
Note
(As of 2025-10) The MiniMind series has completed pretraining of multiple model variants, with the smallest being only 25.8M (0.02B), capable of fluent conversation!
Models List
| Model (Size) | Inference Memory (Approx) | Release |
|---|---|---|
| MiniMind2-small (26M) | 0.5 GB | 2025.04.26 |
| MiniMind2-MoE (145M) | 1.0 GB | 2025.04.26 |
| MiniMind2 (104M) | 1.0 GB | 2025.04.26 |
| minimind-v1-small (26M) | 0.5 GB | 2024.08.28 |
| minimind-v1-moe (4ร26M) | 1.0 GB | 2024.09.17 |
| minimind-v1 (108M) | 1.0 GB | 2024.09.01 |
Project Includes
- Complete code for MiniMind-LLM structure (Dense + MoE models).
- Detailed training code for Tokenizer.
- Complete training code for Pretrain, SFT, LoRA, RLHF-DPO, RLAIF (PPO/GRPO/SPO), and model distillation.
- Collected, distilled, organized and cleaned high-quality datasets for all stages, all open-sourced.
- Implemented from scratch: pretraining, instruction fine-tuning, LoRA, DPO/PPO/GRPO/SPO reinforcement learning, and white-box model distillation. Core algorithms barely depend on third-party framework encapsulation, all open-sourced.
- Compatible with mainstream third-party frameworks like
transformers,trl,peft. - Training supports single GPU, multiple GPUs on a single machine (DDP, DeepSpeed), supports wandb/swanlab visualization of training process. Supports dynamic training start/stop.
- Model testing on third-party evaluation leaderboards (C-Eval, C-MMLU, OpenBookQA, etc.), supports YaRN algorithm for RoPE long-text extrapolation.
- Implements an extremely simple OpenAI API-compliant server, convenient for integration with third-party ChatUI (FastGPT, Open-WebUI, etc.).
- Implements the simplest chat WebUI frontend based on streamlit.
- Fully compatible with popular community inference engines
llama.cpp,vllm,ollamaor training frameworkLlama-Factory. - Reproduced (distilled/RL) DeepSeek-R1 reasoning model as MiniMind-Reason model, with data + models fully open-sourced!
We hope this open-source project can help LLM beginners get started quickly!
2025-10-24
- ๐ฅ Added RLAIF training algorithms: PPO, GRPO, SPO (native implementation from scratch)
- Added checkpoint resume training: supports automatic training recovery, cross-GPU recovery, wandb continuity
- Added RLAIF dataset: rlaif-mini.jsonl (randomly sampled 10,000 entries from SFT data); simplified DPO dataset with Chinese data
- Added YaRN algorithm: supports RoPE long-text extrapolation, improving long sequence handling capability
- Adaptive Thinking: Reason model can optionally enable thinking chain
- chat_template fully supports Tool Calling and Reasoning tags (
<tool_call>,<think>, etc.) - Added complete RLAIF chapter, training curve comparison, algorithm principle explanations
- SwanLab replaces WandB (friendly for domestic access, fully compatible API)
- Code standardization & fixed some known bugs
2025-04-26
- Important update
- For compatibility needs, you can visit ๐old repository content๐.
- MiniMind model parameters completely renamed, aligned with Transformers library models (unified naming).
- generate method refactored, inheriting from GenerationMixin class.
- ๐ฅ Supports popular third-party ecosystems like llama.cpp, vllm, ollama.
- Standardized code and directory structure.
- Modified vocabulary
<s></s>-><|im_start|><|im_end|>
To be compatible with third-party inference frameworks llama.cpp and vllm, this update requires some observable costs.
This update no longer supports "directly" loading old models before 25-04-26 for inference.
Due to differences in Llama's positional encoding compared to minimind, there are differences in QK values after mapping Llama models.
MiniMind2 series old models have been recovered through weight mapping and (fine-tuning training) QKVO linear layer calibration.
After this update, maintenance of the entire minimind-v1 series will be abandoned and removed from the repository.
2025-02-09
- Major update since release, Release MiniMind2 Series.
- Code almost completely refactored, using cleaner and more unified structure. For compatibility with old code, you can visit ๐old repository content๐.
- Eliminated data preprocessing steps. Unified dataset format, switched to
jsonlformat to avoid dataset download confusion. - MiniMind2 series shows significant improvement compared to MiniMind-V1.
- Minor improvements: {more standard kv-cache writing, MoE load balancing loss considered, etc.}
- Provides training solutions for model migration to private datasets (medical models, self-awareness examples).
- Streamlined pretraining dataset and significantly improved pretraining data quality, greatly reducing time for quick personal training, single 3090 GPU can reproduce in 2 hours!
- Updates: LoRA fine-tuning separated from peft packaging, implemented from scratch; DPO algorithm implemented from scratch using native PyTorch; white-box model distillation native implementation.
- MiniMind2-DeepSeek-R1 series distilled models born!
- MiniMind2 now has some English ability!
- Updated MiniMind2 and third-party model performance results based on more large model leaderboard tests.
More...
2024-10-05
- Extended MiniMind with multimodal capabilities---Vision
- Check out the twin project minimind-v for details!
2024-09-27
- 09-27 updated the preprocessing method for the pretrain dataset, abandoned preprocessing into .bin format for training to ensure text integrity (slightly sacrificing training speed).
- Current pretrain preprocessing file is named: pretrain_data.csv.
- Removed some redundant code.
2024-09-17
- Updated minimind-v1-moe model
- To avoid ambiguity, no longer using mistral_tokenizer for tokenization, completely using custom minimind_tokenizer as the tokenizer.
2024-09-01
- Updated minimind-v1 (108M) model, using minimind_tokenizer, 3 pretraining rounds + 10 SFT rounds, more thorough training, stronger performance.
- Project has been deployed to ModelScope creation space, you can experience it on this website:
- ๐ModelScope Online Experience๐
2024-08-27
- Project first open-sourced
Share my hardware and software configuration (for reference only)
- CPU: Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz
- RAM: 128 GB
- GPU: NVIDIA GeForce RTX 3090(24GB) * 8
- Ubuntu==20.04
- CUDA==12.2
- Python==3.10.16
- requirements.txt
git clone https://github.com/jingyaogong/minimind.gitpip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simpleGo to the project root directory
git clone https://huggingface.co/jingyaogong/MiniMind2 # or https://www.modelscope.cn/models/gongjy/MiniMind2# Use transformers format model
python eval_llm.py --load_from ./MiniMind2# May require `python>=3.10`, install with `pip install streamlit`
# cd scripts
streamlit run web_demo.py# ollama
ollama run jingyaogong/minimind2
# vllm
vllm serve ./MiniMind2/ --served-model-name "minimind"pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simpleNote: Test Torch CUDA availability in advance
import torch
print(torch.cuda.is_available())If not available, please download and install the whl file from torch_stable. Reference link
Download the required data files from the dataset download link provided below (create the ./dataset directory) and place them in ./dataset
Note: Dataset Notes
By default, it is recommended to download pretrain_hq.jsonl + sft_mini_512.jsonl for the fastest reproduction of the Zero chat model.
You can freely choose data files. The section below provides multiple combination schemes that can be appropriately combined based on your training needs and GPU resources.
Directory is located in trainer
๐ก Checkpoint Resume Training
All training scripts automatically save checkpoints. Simply add --from_resume 1 parameter to automatically detect, load & resume training:
python train_pretrain.py --from_resume 1
python train_full_sft.py --from_resume 1
...Checkpoint Resume Mechanism:
- Training process automatically saves complete checkpoints in
./checkpoints/directory (model, optimizer, training progress, etc.) - Checkpoint file naming:
<weight_name>_<dimension>_resume.pth(e.g.,full_sft_512_resume.pth) - Supports cross-GPU recovery (automatically adjusts step)
- Supports wandb training log continuity (automatically resumes the same run)
Suitable for long training sessions or unstable environments, no need to worry about progress loss from interruptions
3.1 Pretraining (Learning Knowledge)
python train_pretrain.pyExecute pretraining to get
pretrain_*.pthas the output weights for pretraining (where * is the model's dimension, default is 512)
3.2 Supervised Fine-tuning (Learning Conversation Style)
python train_full_sft.pyExecute supervised fine-tuning to get
full_sft_*.pthas the output weights for instruction fine-tuning (wherefullmeans full-parameter fine-tuning)
Note: Training Notes
By default, all training processes save parameters to the file ./out/***.pth every 100 steps (each save overwrites the old weights).
For simplicity, only the two-stage training process is described here. For other training (LoRA, distillation, reinforcement learning, inference fine-tuning, etc.), refer to the detailed description in the Experiment section below.
Ensure the model *.pth files to be tested are in the ./out/ directory.
You can also directly download and use the *.pth files I trained from here.
python eval_llm.py --weight full_sft # or pretrain/dpo/ppo/grpo...Note: Testing Notes
The --weight parameter specifies the weight name prefix. Options: pretrain, full_sft, dpo, reason, ppo_actor, grpo, spo, etc.
Other common parameters:
--load_from: Model loading path (model=native torch weights, other paths=transformers format)--save_dir: Model weight directory (defaultout)--lora_weight: LoRA weight name (Nonemeans not used)--historys: Number of historical dialogue rounds to carry (must be even, 0 means no history)--max_new_tokens: Maximum generation length (default 8192)--temperature: Generation temperature (default 0.85)--top_p: Nucleus sampling threshold (default 0.85)
For usage details, refer directly to the eval_llm.py code.
Tip
All training scripts are native PyTorch framework, supporting multi-GPU acceleration. Assume your device has N (N > 1) GPUs:
Single machine N GPU training startup (DDP, supports multi-machine multi-GPU cluster)
torchrun --nproc_per_node N train_xxx.pyNote: Other Notes
deepspeed --master_port 29500 --num_gpus=N train_xxx.pyYou can optionally enable wandb to record the training process (requires direct internet connection)
# Requires login: wandb login
torchrun --nproc_per_node N train_xxx.py --use_wandb
# and
python train_xxx.py --use_wandbBy adding the --use_wandb parameter, you can record the training process. After training is complete, you can view the training process on the wandb website. By modifying the wandb_project and wandb_run_name parameters, you can specify the project name and run name.
[Note]: After June 2025, the domestic network environment cannot directly connect to WandB. The MiniMind project by default switches to using SwanLab as the training visualization tool (fully compatible with WandB API), that is, just change import wandb to import swanlab as wandb, no other changes are needed.
Tokenizer maps words from natural language to numbers like 0, 1, 36 through a "dictionary," which can be understood as numbers representing the page number of the word in the "dictionary."
You can choose to construct your own vocabulary table to train a "dictionary." The code can be found in ./scripts/train_tokenizer.py (for learning reference only. It's not necessary to train one yourself unless required. MiniMind comes with a built-in tokenizer).
Or you can choose tokenizers from well-known open-source large models.
Just as using Xinhua/Oxford dictionaries directly has the advantage of good token encoding compression, but the disadvantage of having too many pagesโtens of thousands of word phrases;
A self-trained tokenizer has the advantage of freely controlling vocabulary length and content, but the disadvantage of low compression ratio (for example, "hello" might be split into "h e l l o"
five independent tokens), and rare words are difficult to cover.
The choice of "dictionary" is important. The output of LLM is essentially a multi-class classification problem with SoftMax to N words in the dictionary, then decoding to natural language through the "dictionary."
Because MiniMind size needs to be strictly controlled to avoid top-heavy models (embedding layer parameters taking up too high a proportion of LLM), shorter vocabulary lengths are better.
Tokenizer Introduction
The tokenizer vocabulary sizes of powerful open-source models from third parties such as Yi, qwen, chatglm, mistral, and Llama3 are as follows:
| Tokenizer Model | Vocabulary Size | Source |
|---|---|---|
| yi tokenizer | 64,000 | 01AI (China) |
| qwen2 tokenizer | 151,643 | Alibaba Cloud (China) |
| glm tokenizer | 151,329 | Zhipu AI (China) |
| mistral tokenizer | 32,000 | Mistral AI (France) |
| llama3 tokenizer | 128,000 | Meta (USA) |
| minimind tokenizer | 6,400 | Custom |
๐ Updated 2024-09-17: To prevent ambiguity from previous versions and control size, all MiniMind models use minimind_tokenizer for tokenization, abandoning all mistral_tokenizer versions.
# Some thoughts
> Although minimind_tokenizer has a small length, its encoding/decoding efficiency is weaker than Chinese-friendly tokenizers like qwen2 and glm.
> But the minimind model chose the self-trained minimind_tokenizer as the tokenizer to maintain lightweight overall parameters, avoiding imbalance in encoding layer and computation layer proportions, preventing top-heavy models, because minimind's vocabulary size is only 6400.
> And minimind has never encountered rare word decoding failures in actual testing, with good results.
> Due to the custom vocabulary compression to 6400, the total LLM parameters are as low as 25.8M.
> The training data `pretrain_hq.jsonl` all comes from the `JiangShu large model dataset`, this part of data is relatively secondary. You can freely choose if you need to train.
Having learned from MiniMind-V1's low-quality pretraining data that caused models to talk nonsense, after 2025-02-05 we decided no longer to use large-scale unsupervised datasets for pretraining.
Instead, we tried to extract the Chinese portion from the JiangShu Large Model Dataset,
Clean out about 1.6GB of corpus with character length <512 and concatenate them directly as pretraining data pretrain_hq.jsonl, where hq means high
quality (of course it's not yet high, improving data quality is endless).
The file pretrain_hq.jsonl data format is
{"text": "How can I get rid of procrastination? Curing procrastination is not easy, but the following suggestions may help..."}The JiangShu Large Model SFT Dataset
"is a complete, uniformly formatted, and safe large model training and research resource.
It collected and organized a large amount of open-source datasets from public sources on the internet, unified their format, cleaned the data,
containing Chinese datasets with 10M entries and English datasets with 2M entries."
The above is the official introduction. After downloading, the total data volume is about 4B tokens, which is definitely suitable as SFT data for Chinese large language models.
However, the official data format is messy, and using all of it for SFT would be too expensive.
I performed secondary cleaning of the official dataset, removing entries with symbol pollution and noise; additionally, still only kept content with total length <512,
hoping to supplement knowledge lacking in the pretraining phase through large amounts of dialogue at this stage.
Export file is sft_512.jsonl (~7.5GB).
The Magpie-SFT Dataset
collected ~1M high-quality conversations from Qwen2/2.5. I further cleaned this data, exporting the portion with total length <2048 as sft_2048.jsonl (~9GB).
The portion with length <1024 exported as sft_1024.jsonl (~5.5GB). Using large model dialogue data directly for sft falls into the "black-box distillation" category.
Further cleaned the SFT data from the previous two steps (keeping only content with high Chinese character ratio), filtered conversations with length <512, and obtained sft_mini_512.jsonl (~1.2GB).
The data format for all sft files sft_X.jsonl is
{
"conversations": [
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Hello!"},
{"role": "user", "content": "Goodbye"},
{"role": "assistant", "content": "Goodbye!"}
]
}
From the Magpie-DPO Dataset
approximately 200k preference data entries (all in English) generated from Llama3.1-70B/8B, can be used to train reward models, optimize model reply quality, making it more consistent with human preferences.
Here, we reorganized content with total data length <3000 into dpo.jsonl (~0.9GB), containing two fields chosen and rejected, where chosen
is the preferred reply and rejected is the rejected reply.
The file dpo.jsonl data format is
{
"chosen": [
{"content": "Q", "role": "user"},
{"content": "good answer", "role": "assistant"}
],
"rejected": [
{"content": "Q", "role": "user"},
{"content": "bad answer", "role": "assistant"}
]
}
There's no denying that in February 2025, who can be hotter than DeepSeek...
It also sparked my strong interest in RL-guided reasoning models. I've already reproduced R1-Zero using Qwen2.5.
If I have time + good results (but 99% of base models lack ability), I will later update MiniMind with RL-trained reasoning models rather than distilled models.
With limited time, the fastest low-cost solution is still direct distillation (black-box method).
Unable to resist R1's popularity, in just a few days there are already various R1 distillation datasets like R1-Llama-70B, R1-Distill-SFT,
Alpaca-Distill-R1,
deepseek_r1_zh and so on. Pure Chinese data is relatively scarce.
Finally integrated them, export file as r1_mix_1024.jsonl, data format consistent with sft_X.jsonl.
Currently, HqWu-HITCS/Awesome-Chinese-LLM is collecting and organizing materials related to Chinese LLMs including open-source models, applications, datasets, and tutorials, and continuously updating the latest progress in this field. Comprehensive and professional, Respect!
Note
After 2025-02-05, all datasets used for final MiniMind training are open-sourced. Therefore, you don't need to preprocess large-scale datasets yourself, avoiding repetitive data processing work.
MiniMind Training Dataset Download: ModelScope | HuggingFace
No need to clone everything, you can download the files you need individually
Place the downloaded dataset files in the ./dataset/ directory (โจ are recommended required items)
./dataset/
โโโ dpo.jsonl (55MB, โจ)
โโโ lora_identity.jsonl (22.8KB)
โโโ lora_medical.jsonl (34MB)
โโโ pretrain_hq.jsonl (1.6GB, โจ)
โโโ r1_mix_1024.jsonl (340MB)
โโโ rlaif-mini.jsonl (1MB)
โโโ sft_1024.jsonl (5.6GB)
โโโ sft_2048.jsonl (9GB)
โโโ sft_512.jsonl (7.5GB)
โโโ sft_mini_512.jsonl (1.2GB, โจ)Note: Brief Description of Each Dataset
dpo.jsonlโจ --RLHF stage dataset (optimized and simplified, suitable for fast training)lora_identity.jsonl--Self-awareness dataset (e.g., Who are you? I am minimind...), recommended for lora training (can also be used for full-parameter SFT, don't be limited by the name)lora_medical.jsonl--Medical Q&A dataset, recommended for lora training (can also be used for full-parameter SFT, don't be limited by the name)pretrain_hq.jsonlโจ --Pretraining dataset, integrated from JiangShu Technologyr1_mix_1024.jsonl--DeepSeek-R1-1.5B distilled data, maximum character length per entry is 1024 (therefore set max_seq_len=1024 when training)rlaif-mini.jsonl--RLAIF training dataset, randomly sampled 10,000 high-quality conversations from SFT dataset for training reinforcement learning algorithms like PPO/GRPO/SPOsft_1024.jsonl--Integrated from Qwen2.5 distilled data (a subset of sft_2048), maximum character length per entry is 1024 (therefore set max_seq_len=1024 when training)sft_2048.jsonl--Integrated from Qwen2.5 distilled data, maximum character length per entry is 2048 (therefore set max_seq_len=2048 when training)sft_512.jsonl--Integrated from JiangShu Technology SFT data, maximum character length per entry is 512 (therefore set max_seq_len=512 when training)sft_mini_512.jsonlโจ --Minimal integration from JiangShu Technology SFT data + Qwen2.5 distilled data (for quick training of Zero models), maximum character length per entry is 512 (therefore set max_seq_len=512 when training)
Instructions & Recommended Training Schemes
-
MiniMind2 Series was trained on approximately 20GB of corpus in total, about 4B tokens, corresponding to the data combination training results above (cost: ๐ฐ๐ฐ๐ฐ๐ฐ๐ฐ๐ฐ๐ฐ๐ฐ, results: ๐๐๐๐๐๐)
-
For the fastest speed to implement Zero model from scratch, we recommend using the data combination of
pretrain_hq.jsonl+sft_mini_512.jsonl, specific cost and results can be seen in the table below (cost: ๐ฐ, results: ๐๐) -
For friends with certain computing resources or those who care more about results, you can consider the former to fully reproduce MiniMind2; for those with only single GPU or who care about quick reproduction in short time, we highly recommend the latter;
-
[Compromise solution] You can also choose medium-sized data like
sft_mini_512.jsonl,sft_1024.jsonlfor free combination training (cost: ๐ฐ๐ฐ๐ฐ, results: ๐๐๐๐).
MiniMind-Dense (same as Llama3.1) uses the Transformer Decoder-Only structure. The differences from GPT-3 are:
- Adopts GPT-3's pre-normalization method, normalizing at the input of each Transformer sub-layer rather than at the output. Specifically, it uses the RMSNorm normalization function.
- Replaced ReLU with SwiGLU activation function to improve performance.
- Like GPT-Neo, it removed absolute position embeddings and switched to rotary position embeddings (RoPE), which works better when handling inference beyond training length.
MiniMind-MoE model structure is based on Llama3 and the MixFFN mixture-of-experts module from Deepseek-V2/3.
- DeepSeek-V2 in feed-forward networks (FFN) uses finer-grained expert splitting and shared expert isolation techniques to improve the effect of Experts.
MiniMind's overall structure is consistent, with only small adjustments in RoPE computation, inference functions, and FFN layer code. The structure is shown in the diagram below (redrawn version):
To modify model configuration, see ./model/model_minimind.py. Reference model parameter versions see the table below:
| Model Name | params | len_vocab | rope_theta | n_layers | d_model | kv_heads | q_heads | share+route |
|---|---|---|---|---|---|---|---|---|
| MiniMind2-Small | 26M | 6400 | 1e6 | 8 | 512 | 2 | 8 | - |
| MiniMind2-MoE | 145M | 6400 | 1e6 | 8 | 640 | 2 | 8 | 1+4 |
| MiniMind2 | 104M | 6400 | 1e6 | 16 | 768 | 2 | 8 | - |
| minimind-v1-small | 26M | 6400 | 1e4 | 8 | 512 | 8 | 16 | - |
| minimind-v1-moe | 4ร26M | 6400 | 1e4 | 8 | 512 | 8 | 16 | 1+4 |
| minimind-v1 | 108M | 6400 | 1e4 | 16 | 768 | 8 | 16 | - |
๐ Regarding LLM parameter configuration, there's an interesting paper MobileLLM that conducted detailed research and experiments.
Scaling Law has its own unique patterns in small models.
Parameters causing Transformer parameter scaling changes almost entirely depend on d_model and n_layers.
d_modelโ +n_layersโ -> Wide and shortd_modelโ +n_layersโ -> Narrow and tall
The 2020 Scaling Law paper argued that training data volume, parameter quantity, and training iterations are the key factors determining performance, while model architecture influence is negligible.
However, this law doesn't seem to fully apply to small models.
MobileLLM argues that architecture depth is more important than width, "deep and narrow" "tall and skinny" models can learn more abstract concepts than "wide and shallow" models.
For example, when model parameters are fixed at 125M or 350M, 30-42 layer "narrow" models clearly have superior performance compared to around 12 layer "wide" models,
showing similar trends across 8 benchmark tests including commonsense reasoning, Q&A, and reading comprehension.
This is actually a very interesting discovery, because previously when designing architectures for ~100M scale small models, almost no one tried stacking more than 12 layers.
This is consistent with what MiniMind observed in experiments when adjusting model parameters between d_model and n_layers during training.
However, "deep and narrow" models also have dimensional limits. When d_model<512, the disadvantage of embedding dimension collapse is very obvious,
and added layers cannot compensate for the disadvantage of insufficient d_head caused by fixed q_head in embeddings.
When d_model>1536, increasing layers seems to have higher priority than d_model, bringing more "cost-effective" parameter -> performance gains.
- Therefore MiniMind sets small model dim=512, n_layers=8 to achieve the balance of "extremely small size <-> better performance."
- Setting dim=768, n_layers=16 to gain larger performance improvements, more consistent with small model Scaling-Law curves.
For reference, GPT3 parameter settings see the table below:
- Time unit: Hours (h).
- Cost unit: Chinese Yuan (๏ฟฅ); 7๏ฟฅ โ 1 USD.
- 3090 rental price: โ1.3๏ฟฅ/h (you can check current prices yourself).
- Reference standard: The table only shows actual measured training time for
pretrainandsft_mini_512two datasets. Other time costs are estimated based on dataset size (may have slight variations).
Based on 3090 (single GPU) cost calculation
| Model Name | params | pretrain | sft_mini_512 | sft_512 | sft_1024 | sft_2048 | RLHF |
|---|---|---|---|---|---|---|---|
| MiniMind2-Small | 26M | โ1.1h โ1.43๏ฟฅ |
โ1h โ1.3๏ฟฅ |
โ6h โ7.8๏ฟฅ |
โ4.58h โ5.95๏ฟฅ |
โ7.5h โ9.75๏ฟฅ |
โ1h โ1.3๏ฟฅ |
| MiniMind2 | 104M | โ3.9h โ5.07๏ฟฅ |
โ3.3h โ4.29๏ฟฅ |
โ20h โ26๏ฟฅ |
โ15h โ19.5๏ฟฅ |
โ25h โ32.5๏ฟฅ |
โ3h โ3.9๏ฟฅ |
Training Cost Summary & Forecast
MiniMind2-Small Parameters
pretrain_hq+sft_mini_512Dataset
Single 3090 GPU (1 epoch) + 2.1 hours + Cost 2.73 Chinese Yuan
Can train MiniMind-Zero-0.025B model from scratch!!!
MiniMind2-Small Parameters
pretrain_hq+sft_512+sft_2048+dpoDataset
Single 3090 GPU (2 epochs) + Approximately 38.16 hours + Cost 49.61 Chinese Yuan
Can train MiniMind2-Small-0.025B model from scratch!!!
MiniMind2 Parameters
pretrain_hq+sft_512+sft_2048+dpoDataset
Single 3090 GPU (2 epochs) + Approximately 122 hours + Cost 158.6 Chinese Yuan
Can train MiniMind2-0.1B model from scratch!!!
โจ Based on single NVIDIA 3090 GPU, MiniMind-Zero requires only 2 hours + 3 Chinese Yuan from scratch to achieve ChatBot effect!
โจ PS: If training with 8 4090 GPUs, the total time can even be compressed to less than 10 minutes! (Due to shorter time, cost is still around 3 Yuan, comparable to single GPU cost)
โจ With an extremely low barrier to entry, achieve large model freedom for everyone! This is the original intention behind the birth of the MiniMind series!
โจ The MiniMind-Zero costing only 3 Chinese Yuan is not just hype! Chat test:
๐ถ: Please introduce yourself.
๐ค๏ธ: As an artificial intelligence, I have no actual life and no self-awareness, so I don't have my own life. I was designed to help users answer questions, provide information, and have conversations, etc. My design and functionality are built by computer science, machine learning, artificial intelligence technology and algorithms, and I'm implemented through programming and algorithms.
๐ถ: Recommend some special dishes from Hangzhou.
๐ค๏ธ: Hangzhou has many delicious special dishes, such as chicken kebabs, eel head, boiled fish, tofu brain, etc. These dishes are very delicious, with unique flavors and tastes, definitely worth trying.
๐ถ: Please explain the concept of "large language models" to me.
๐ค๏ธ: A large language model is a type of artificial intelligence technology that uses large amounts of text data to train models, then continuously optimizes the model through iterations. Its goal is to generate text that meets specific needs based on input data. These texts can be any topic you're interested in.
๐ถ: Introduce the history of the United States, please.
๐ค๏ธ: The "Introok's the believeations of theument" you mentioned gets its name from the ancient Chinese "groty of of the change."
Extremely fast with initial results, and can even be further compressed to obtain smaller and higher quality training data.
Zero model weights are saved as full_sft_512_zero.pth (see MiniMind model file links below). If interested, you can download and test this model.
All training scripts should be executed in the
cd ./trainerdirectory
What LLMs need to learn first is not to communicate directly with people, but to fill the network parameters with the ink of knowledge. The "ink" should ideally be as saturated as possible, accumulating vast knowledge about the world. Pretraining is where the model first studies hard to learn a large amount of basic knowledge, such as organizing large-scale high-quality training data from Wikipedia, news, books, etc. This process is "unsupervised," meaning humans don't need to perform any "supervised" corrections during the process. Instead, the model itself summarizes patterns and learns knowledge from large amounts of text. The model's goal at this stage is only one: Learn word prediction. For example, given the input "Qin Shi Huang," it can continue with "was the first emperor of China."
torchrun --nproc_per_node 1 train_pretrain.py # 1 means single GPU training, adjust based on your hardware (set >=2 for multiple GPUs)
# or
python train_pretrain.pyAfter training, model weight files are saved by default every
100 stepsas:pretrain_*.pth(where * is the model's specific dimension, new files overwrite old ones on each save)
| MiniMind2-Small (512dim) | MiniMind2 (768dim) |
|---|---|
After pretraining, the LLM has mastered a lot of knowledge, but at this point it only knows how to do word prediction mindlessly and doesn't know how to chat with people. The SFT stage requires applying a custom chat template to fine-tune the semi-finished LLM. For example, after the model encounters such a template [question->answer, question->answer], it no longer does mindless word continuation, but realizes this is the end of a complete conversation. This process is called instruction fine-tuning, like helping the already knowledgeable "Newton" gentleman adapt to 21st-century smartphone chat habits, learning that the left side of the screen is the other person's message and the right side is the user's message. During training, MiniMind's instruction and answer lengths are truncated at 512 to save GPU memory. Like learning to write, you start with short articles, and after learning to write 200-character essays, 800-character articles become easy. When length extension is needed, you only need to prepare a small amount of 2k/4k/8k length dialogue data for further fine-tuning (preferably combined with RoPE-NTK scaling).
During inference, by adjusting RoPE scaling, it will be convenient to achieve training-free length extrapolation to 2048 and beyond.
torchrun --nproc_per_node 1 train_full_sft.py
# or
python train_full_sft.pyAfter training, model weight files are saved by default every
100 stepsas:full_sft_*.pth(where * is the model's specific dimension, new files overwrite old ones on each save)
| MiniMind2-Small (512dim) | MiniMind2 (768dim) |
|---|---|
All training scripts should be executed in the
cd ./trainerdirectory
At this point, after all the previous training steps, the model has completely acquired basic capabilities and usually can graduate.
However, knowledge distillation can further optimize model performance and efficiency. Knowledge distillation means the student model learns from the teacher model.
The teacher model is usually a well-trained large model with high accuracy and generalization ability.
The student model is a smaller model whose goal is to learn the teacher model's behavior rather than learn directly from raw data.
In SFT learning, the model's goal is to fit hard labels for token classification (hard labels), i.e., true class labels (such as 0 or 6400).
In knowledge distillation, the teacher model's softmax probability distribution is used as soft labels (soft labels). The small model only learns soft labels and uses KL-Loss to optimize model parameters.
In simple terms, SFT learns the problem-solving answers the teacher gives directly. The KD process is like "opening" the teacher's smart brain and trying to mimic the neural state of the teacher's "brain" thinking about problems.
For example, when the teacher model calculates the problem 1+1=2, the final layer neurons a state is 0, neuron b state is 100, neuron c state is -99...
The student model learns the operating rules inside the teacher model's brain through large amounts of data. This process is called: knowledge distillation.
Knowledge distillation has only one purpose: make small models smaller in size while having better results.
However, with the birth and development of LLMs, the term model distillation has been widely abused, creating two schools of "white-box/black-box" knowledge distillation.
Closed-source models like GPT-4, since their internal structure cannot be accessed, can only learn from the data they output. This process is called black-box distillation, and is the most common practice in the age of large models.
Black-box distillation is completely identical to the SFT process, except the data is collected from large model outputs. Therefore, you only need to prepare data and further FT.
Note that you need to change the loaded base model to full_sft_*.pth, i.e., further distillation learning based on the fine-tuned model.
Both ./dataset/sft_1024.jsonl and ./dataset/sft_2048.jsonl are collected from qwen2.5-7/72B-Instruct large models and can be used directly for SFT to acquire some Qwen behavior.
# Note: need to change the dataset path in train_full_sft.py and max_seq_len
torchrun --nproc_per_node 1 train_full_sft.py
# or
python train_full_sft.pyAfter training, model weight files are similarly saved by default every
100 stepsas:full_sft_*.pth(where * is the model's specific dimension, new files overwrite old ones on each save)
Emphasis should be placed on introducing MiniMind's white-box distillation code train_distillation.py. Since there is no powerful teacher model within the same MiniMind series, the white-box distillation code is only for learning reference.
torchrun --nproc_per_node 1 train_distillation.py
# or
python train_distillation.pyLoRA is an efficient Parameter-Efficient Fine-Tuning (PEFT) method aimed at fine-tuning pre-trained models through low-rank decomposition.
Compared to full parameter fine-tuning (Full Fine-Tuning), LoRA only needs to update a small number of parameters.
LoRA's core idea is: introduce low-rank decomposition in the model's weight matrices and only update the low-rank parts while keeping the original pre-trained weights unchanged.
Code can be found in ./model/model_lora.py and train_lora.py, completely implementing the LoRA process from scratch without relying on third-party library packaging.
torchrun --nproc_per_node 1 train_lora.py
# or
python train_lora.pyAfter training, model weight files are saved by default every
100 stepsas:lora_xxx_*.pth(where * is the model's specific dimension, new files overwrite old ones on each save)
Many people are confused about how to make models learn knowledge in their private domains, how to prepare datasets, and how to migrate general-purpose models to build domain-specific models.
Here are some examples. For general models lacking medical domain knowledge, you can try adding domain knowledge to the original model to get better performance.
At the same time, you usually don't want to lose other abilities of the original base model while learning domain knowledge. In this case, LoRA can effectively solve this problem.
You only need to prepare dialogue datasets in the following format and place them in ./dataset/lora_xxx.jsonl, then run python train_lora.py
to get the new model weights ./out/lora/lora_xxx.pth.
Medical Scenario
{"conversations": [{"role": "user", "content": "What height should a cervical spondylosis patient's pillow be?"}, {"role": "assistant", "content": "For cervical spondylosis patients, pillow height selection should be based on..."}]}
{"conversations": [{"role": "user", "content": "What about xxx"}, {"role": "assistant", "content": "xxx..."}]}
Self-awareness Scenario
{"conversations": [{"role": "user", "content": "What is your name?"}, {"role": "assistant", "content": "My name is minimind..."}]}
{"conversations": [{"role": "user", "content": "Who are you"}, {"role": "assistant", "content": "I am..."}]}
At this point, [base model + LoRA model] can acquire medical scenario model-enhanced capabilities, equivalent to adding a LoRA plug-in to the base model, which does not lose the base model's original abilities.
You can test the model through eval_llm.py for model evaluation.
# Note: weight parameter specifies base model type, should match the base model used during train_lora training
python eval_llm.py --weight dpo --lora_weight lora_medicalSmall Test
๐ถ: I've been feeling dizzy recently, what could be the reason?
๐ค๏ธ: Dizziness could be caused by many reasons, including but not limited to: heart disease, eye damage, allergic reactions, skin problems, allergic reactions, stress, anxiety, fatigue, medication side effects, sexual dysfunction, or others...
---
๐ถ: What is your relationship with openai?
๐ค๏ธ: I am MiniMind, an artificial intelligence assistant developed by Jingyao Gong. I interact with users through natural language processing and algorithm training.
PS: As long as you have the required datasets, you can also do full_sft full parameter fine-tuning (need to mix general knowledge to avoid overfitting domain data making the model worse and losing generality)
DeepSeek-R1 was so popular, almost pointing out a new paradigm for future LLMs.
The paper points out that models >3B require multiple iterations of cold starts and RL reward training to achieve visible reasoning ability improvements.
The fastest, most reliable, and most economical approach, as well as recent various so-called reasoning models, are almost all directly distilled from data.
But due to lack of technical sophistication, the distillation school is looked down upon by the RL school (hhhh).
I quickly tried on Qwen 1.5B small model and quickly reproduced math reasoning ability in the Zero process.
However, a regrettable consensus is: models with parameters too small cannot achieve any reasoning effect through cold start SFT+GRPO.
For now, MiniMind firmly chooses to be in the distillation school. If RL on 0.1B models later achieves small progress, this training approach section will be updated.
For distillation, you only need to prepare datasets in the same format as the SFT stage. The dataset source has been introduced above. Data format examples:
{
"conversations": [
{
"role": "user",
"content": "Hello, I am Xiaofang, nice to meet you."
},
{
"role": "assistant",
"content": "<think>\nHello! I am a small AI reasoning model R1-Lite-Preview developed by an independent developer in China. I'm happy to serve you!\n</think>\n<answer>\nHello! I am a small AI reasoning model R1-Lite-Preview developed by an independent developer in China. I'm happy to serve you!\n</answer>"
}
]
}The reply template for reasoning model R1 is:
<think>\nThinking process\n</think>\n
<answer>\nFinal answer\n</answer>
This is constrained by setting a rule-based reward function in GRPO to make the model comply with thinking tags and reply tags (in the early stages of cold starts, reward values should be increased).
Another issue is that although the distillation process is the same as SFT, experimental results show that models have difficulty consistently complying with template-compliant replies every time, i.e., deviating from thinking and reply tag constraints.
A small trick here is to increase the loss penalty for marker position tokens. See details in train_distill_reason.py:
# Add extra penalty to positions corresponding to sp_ids
...
loss_mask[sp_ids] = 10 # penalty coefficient
Another tip is that because reasoning data only filtered <1024 length data, it has fewer multi-turn conversations and English data.
Therefore, r1_mix_1024.jsonl mixed approximately 10k multi-turn conversations + English data to prevent serious model forgetting.
The script defaults to reasoning ability distillation fine-tuning based on the rlhf model. You can directly start training:
torchrun --nproc_per_node 1 train_distill_reason.py
# or
python train_distill_reason.pyAfter training, model weight files are saved by default every
100 stepsas:reason_*.pth(where * is the model's specific dimension, new files overwrite old ones on each save)
Let's test it:
๐ถ: Please introduce yourself.
๐ค๏ธ: <think>
Um, the user is asking me to introduce myself. I need to explain myself first. First, I should clarify who the user is - are they students, working professionals or ordinary people? The user might be a student or working professional, so information delivery should be to help students and working professionals with information. Then I need to respond to the user, which might include introducing where I am, hobbies, career experience, and other information. I should note to use formal language without being too formal, while keeping it concise and clear. This makes it easy for users to understand and convenient for them to check related information. Finally, I should summarize to let the user know how I help them complete their tasks, giving them more information about me.
</think>
<answer>
I am **"your name", what is your name?
</answer>
๐ถ: Which subject are you better at?
๐ค๏ธ: <think>
Hello! I am a small AI reasoning model R1 developed by Chinese independent developers. If you have any questions, I will do my best to help you.
</think>
<answer>
Hello! I am a small AI reasoning model R1 developed by Chinese independent developers. If you have any questions, I will do my best to help you.
</answer>
RL methods in LLMs can be divided into two categories:
- Reinforcement Learning from Human Feedback (RLHF)
- Train the model by evaluating human preferences for model outputs, making it generate content more consistent with human values and preferences.
- Reinforcement Learning from AI Feedback (RLAIF)
- Use AI models (typically pre-trained language reward models) to provide feedback rather than directly relying on human manual annotation.
- The "AI" here can also be certain rule-based rewards, such as math answer correctness / code executors...
| Type | Judge | Advantages | Disadvantages |
|---|---|---|---|
| RLHF | Human | More aligned with real human preferences | High cost, low efficiency |
| RLAIF | Model | Automated, highly scalable | May deviate from real human preferences |
The two are essentially the same, both using reinforcement learning to utilize certain forms of "feedback" to optimize model behavior.
Except for the different feedback sources, there are no other differences.
Before introducing specific algorithm implementations, I'll present my personal understanding of the unified commonality of all Policy Optimization (PO) algorithms in a minimalist perspective.
The essence of all RL algorithms is only optimizing one expectation:
During training, only minimize the negative objective function, i.e.:
This framework contains only three core components:
-
Policy term
$f(r_t)$ : How to use probability ratio$r_t$ ? Tell the model how large the deviation between new and old policies is, whether better tokens are explored -
Advantage term
$g(A_t)$ : How to calculate advantage$A_t$ , this is important! Large models solving definite integrals is unremarkable, small models answering addition/subtraction correctly usually have positive advantages -
Regularization term
$h(\text{KL}_t)$ : How to constrain the change magnitude$\text{KL}_t$ , both preventing drift and not being too rigid
(Expand) Symbol Explanation
| Symbol | Meaning | Explanation | Range |
|---|---|---|---|
| Question/prompt | Sampled from dataset |
- | |
| Model output sequence | Generated by policy |
- | |
| Probability ratio | |||
| Advantage function | Measures how good an action is compared to baseline | ||
| KL divergence | Prevent policy from deviating too far from reference model |
Different xxPO algorithms are essentially just different design instantiations of these three components!
In the previous training steps, the model has acquired basic conversation abilities, but these are completely based on word prediction, lacking the motivation of positive and negative examples. The model doesn't yet know what answers are good and what are bad. We hope it can be more aligned with human preferences, reducing the probability of unsatisfactory answers. This process is like having the model undergo new training, learning from excellent employees as examples and passive employees as counter-examples, to learn how to respond better.
Direct Preference Optimization (DPO) algorithm loss:
Where:
-
Policy term:
$f(r_t) = \log r_w - \log r_l$ (contrast probability ratios of chosen vs rejected) -
Advantage term:
$g(A_t)$ = / (through preference contrast, no need to explicitly calculate advantage) -
Regularization term:
$h(\text{KL}_t)$ = implicit in$\beta$ (control deviation from reference model)
Specifically:
- DPO derives an analytical training objective for preference pairs from PPO with KL constraints, directly maximizing the log-odds that "chosen outperforms rejected"; no need to simultaneously train Reward/Value models. DPO only needs to run two models
actorandref, with low GPU memory usage, stable convergence, and simple implementation. - Training paradigm: off-policy, using static preference datasets, can repeat multiple epochs; Ref model is fixed (outputs pre-cached).
- DPO's limitation is no online exploration, more used for "preference/safety" human value alignment; limited improvement in "intellectual ability" to solve problems correctly (of course this depends on the dataset, collecting large-scale positive and negative samples with human evaluation is difficult).
torchrun --nproc_per_node 1 train_dpo.py
# or
python train_dpo.pyAfter training, model weight files are saved by default every
100 stepsas:dpo_*.pth(where * is the model's specific dimension, new files overwrite old ones on each save)
Compared to RLHF which relies on human-annotated chosen/rejected preference pairs, RLAIF has AI completely act as the "judge." The so-called AI "judge" can be a model-based reward large model (Reward Model), can be like R1 setting rule-based functions for validation, or can be environmental feedback like tool calling. For example: whether math problem answers are correct, whether code execution passes test cases, whether reasoning processes meet format requirements...can all be automatically judged. RLAIF's greatest advantage is its scalability and On-Policy characteristicsโโno need for expensive human annotation, can generate massive training samples, letting models quickly evolve through large-scale online trial and error.
MiniMind implements 2+N basic + cutting-edge RLAIF methods:
- PPO, GRPO are classic RL algorithms widely validated at scale;
- N cutting-edge RL algorithms (updated irregularly with experimental nature).
To quickly verify RLAIF effectiveness, 10,000 high-quality conversations were randomly sampled from the SFT dataset, building about 1MB size rlaif-mini.jsonl (Huggingface)
Data format is consistent with SFT, but assistant content is not needed, because during training it's completely real-time sampled and generated by the
{
"conversations": [
{"role": "user", "content": "Explain what photosynthesis is?"},
{"role": "assistant", "content": "None"}
]
}During RLAIF training, the model generates 1 or more candidate answers based on user questions, then a reward function/model scores the answers.
High-scoring answers are encouraged (increase
It's known that RLAIF training requires a "reward model (Reward Model)" to score generated answers.
We select the small and high-quality InternLM2-1.8B-Reward (ModelScope | HuggingFace) as the base reward model.
After downloading the reward model, it needs to be placed in the same level directory as the minimind project. The recommended structure is:
project/
โโโ minimind/ # MiniMind project
โ โโโ model/
โ โโโ ...
โโโ internlm2-1_8b-reward/ # Reward model (same level as minimind)
โโโ config.json
โโโ model.safetensors
โโโ ...
Reward Mechanism Choice and MiniMind Limitations (Click to expand)
1. Diversity of Reward Mechanisms
The "reward signal" source in RLAIF can be very flexible:
-
Model-based rewards: Can use dedicated Reward Models (like InternLM2-Reward), or use general LLMs + prompts for scoring (like Qwen3-as-a-Judge). Reward model scale and architecture are freely selectable.
-
Rule-based rewards: Can construct reward signals based on rule functions, for example:
- Math problem answer correctness verification (Ground Truth comparison)
- SQL execution success rate and result accuracy
- Code interpreter run results (pass@k)
- Tool call return status (API success/failure)
- Format compliance checks (JSON/XML parsing)
- Reasoning chain completeness evaluation (CoT step count)
-
Environment-based rewards: In Agent scenarios, environmental feedback itself is natural reward (like game scores, Research completeness, task completion).
Any mechanism that can quantify "answer quality" can serve as an RL reward source. DeepSeek R1 is a typical case: using rule-based functions to verify math answer correctness as reward, no need for additional Reward Models.
2. MiniMind Limitation: Reward Sparsity Problem
RLAIF training can be applied to both reasoning and non-reasoning models, the difference is only in format.
However, for MiniMind with such tiny 0.1B parameters and weak abilities, on general tasks (like R1-style math datasets) it encounters serious reward sparsity (Reward Sparsity) problems:
-
Phenomenon: Model-generated candidate answers are almost all wrong, causing all reward scores
$r(x,y) \approx 0$ -
Consequence: Advantage function
$A(x,y) = r(x,y) - b(x) \approx 0$ , policy gradient signal disappears, cannot effectively update parameters$\theta$
Like having elementary school students do high school math exams, no matter how many attempts they get zero, cannot learn to improve strategies through score differences. This is a fundamental principle limitation of RL algorithms.
To mitigate this problem, MiniMind's implementation chose model-based continuous reward signals:
- Reward Model outputs continuous scores (like -2.5 to +3.0), not binary 0/1
- Even if answer quality is all poor, can still distinguish subtle differences between "much worse" (-3.0) and "worse" (-2.8). So this dense and continuous reward signal can provide non-zero gradients to the advantage function
$A(x,y)$ , enabling gradual policy network optimization - Can also mix multiple reward sources:
$r_{\text{total}} = \alpha \cdot r_{\text{model}} + \beta \cdot r_{\text{rule}}$ (for example, can detect think tag format rewards while also synthesizing answer quality reward scores) - In minimind practice, avoid directly using rule-based binary rewards + out-of-scope difficulty data (like MATH500), which easily leads to all-zero rewards;
- Monitor reward score variance
$\text{Var}(r)$ during training, if it consistently approaches 0 need to adjust data or reward mechanism
For Production-Scale Large Models in Agentic RL Scenarios:
In real Agent systems (code generation, tool calling, retrieval-planning-execution multi-turn pipelines), rewards are different paradigms of "delayed round settlement":
- LLM needs to generate tool call instructions token-by-token (tool_call), go through parsing (tool_parse), tool execution (tool_exec), then splice results back to context for next step; repeat until completion.
- One complete task pipeline includes multiple calls+thinking, calculate total reward once until termination condition is met (like whether task is complete, whether tests pass, whether targets are hit).
Therefore, Agentic RL is closer to sparse/delayed reward settings: gradient backprop happens "after the round ends," very different from non-Agentic RL tasks with "instant scoring and instant updates" on single conversation rounds. This also explains why Agent tasks favor environment feedback (environment-based reward) rather than static reward model scoring.
- Environmental interaction feedback: Final results matter (code runs, API returns success, sub-goals complete);
- Model-based reward limitations: Limited capture of long pipelines and executable semantics, likely inconsistent with real environmental feedback (reward hacking).
PPO is a very classic reinforcement learning algorithm proposed by OpenAI in 2017, and is the universal baseline method for LLM RL.
PPO Loss:
Where:
-
Policy term:
$f(r_t) = \min(r_t, \text{clip}(r_t, 1-\varepsilon, 1+\varepsilon))$ (clip probability ratio to prevent aggressive updates) -
Advantage term:
$g(A_t) = R - V(s)$ (estimate value function through Critic network) -
Regularization term:
$h(\text{KL}_t) = \beta \cdot \mathbb{E}[\text{KL}]$ (global KL divergence constraint)
Comparing to DPO:
- DPO (Off-Policy): Training data is a static preference dataset (chosen vs rejected), can repeatedly use the same batch of data to train multiple epochs, just like traditional supervised learning. High data efficiency, low training cost. Directly optimizes log-likelihood of preference pairs, no Reward Model needed.
- PPO (On-Policy): Must use current policy to real-time sample new data, old policy-collected data cannot be used (distribution shift problem). Although importance sampling and clip mechanisms allow slight distribution shifts, essentially requires data from relatively fresh policies. Low data efficiency, but suited for explorative learning.
In simple terms:
- The former teaches models to learn by offline preset "good/bad standards," even if not outputtable by current models (like practicing ball hitting by watching world champion/runner-up videos);
- The latter teaches models real-time to do things right, online sampling from newest model policy (coach hand-teaching, real-time scoring each action).
MiniMind's PPO implementation includes Actor model (generate answers) and Critic model (evaluate answer value), and complete GAE (Generalized Advantage Estimation) advantage function calculation.
Training:
torchrun --nproc_per_node N train_ppo.py
# or
python train_ppo.pyAfter training, model weight files are saved by default every
100 stepsas:ppo_actor_*.pth(where * is the model's specific dimension)
| MiniMind2-Small (512dim) | MiniMind2 (768dim) |
|---|---|
From the training curves, you can see PPO has the problem of slow reward improvement. I believe this mainly stems from PPO's dual-network joint optimization method: Critic needs to gradually converge to accurately estimate value functions, and Actor's policy updates depend on Critic-provided advantage estimates, the two interdependent forming complex optimization. Early training period Critic estimates inaccurately affects Actor gradient direction, leading to slow overall convergence. Furthermore, PPO needs to maintain two networks simultaneously, GPU memory usage about 1.5-2x single-network methods.
In early 2025, DeepSeek-R1 became extremely popular, and equally popular was the GRPO algorithm from the DeepSeekMath paper, also becoming one of the most advanced RL algorithms. However, AI six months equals humanity six months, and by now GRPO has evolved into the baseline algorithm of the great XXPO wars (later evolved DAPO, GSPO, CISPO, etc.). In short, the core innovation is "group relative value estimation."
GRPO Loss:
Where:
-
Policy term:
$f(r_t) = r_t$ (directly use probability ratio, no clip clipping) -
Advantage term:
$g(A_t) = \frac{R - \mu_{group}}{\sigma_{group}}$ (within-group normalization, eliminate Critic network) -
Regularization term:
$h(\text{KL}_t) = \beta \cdot \text{KL}_t$ (token-level KL divergence constraint)
For the same question, the model generates N different answers (for example N=4), then calculates reward scores for these N answers. Next, use the average reward of these N answers as baseline. Answers above baseline are encouraged, answers below baseline are suppressed. This cleverly avoids training an additional critic network.
Just as all RL faces the principle limitation of positive and negative samples, GRPO is no exception. Its more significant problem is: degenerate groups (Degenerate Groups). Suppose a question is slightly difficult, causing N answer reward scores to be nearly identical (usually equally bad rather than equally good), then this group's learning signal approaches zero. On MiniMind such ultra-small models, this problem is especially obvious. When solving math problems 99.99% of the time the entire group answer quality is poor, then cannot learn. Therefore, must specify reasonable domain for the model, i.e., must limit within capability boundaries.
Training:
torchrun --nproc_per_node N train_grpo.py
# or
python train_grpo.pyAfter training, model weight files are saved by default every
100 stepsas:grpo_*.pth
| MiniMind2-Small (512dim) | MiniMind2 (768dim) |
|---|---|
From the training curves, you can see GRPO's reward shows more stable upward trend, reaching around 4, indicating GRPO itself better utilizes RLAIF signals. Policy Loss generally decreases smoothly. Compared to PPO's dual-network optimization, GRPO's single-network architecture trains more stably with higher convergence ceiling.
SPO is an RL algorithm Tencent proposed in September 2025, improving on GRPO's degenerate group problem. The paper argues that GRPO and similar algorithms' requirement that "one sample depends on a group of samples" seems awkward and inelegant: too-easy or too-hard questions result in the entire group learning nearly nothing, learning efficiency is inherently limited. SPO's motivation is to return to RL's essenceโโ1 input, 1 output, is 1 training sample, returning to basic policy gradient formulas: can get stable baseline without group mean, i.e., spread value estimate V across time dimension, do rough value pre-estimation before training, update V estimate during training while sampling, thus providing each sample with a persistent, adaptive baseline across batches. This "single-stream" design no longer depends on same-group samples, naturally avoiding degenerate groups.
SPO Loss:
Where:
-
Policy term:
$f(r_t) = \log \pi_\theta(a_t|s)$ (directly use log probability, don't calculate ratio) -
Advantage term:
$g(A_t) = R - B_t^{adaptive}$ (adaptive baseline, Beta distribution dynamic tracking) -
Regularization term:
$h(\text{KL}_t) = \beta \cdot \text{KL}_t$ (token-level KL + dynamic$\rho$ adjustment)
At implementation level: SPO uses non-grouped design, uses persistent KL-adaptive value tracker to replace within-group baseline, advantage functions globally normalized across entire batch. This way each sample processed independently, no need to wait for other same-group samples, yet provides stable learning signals for each sample. On Qwen3-8B's 5 difficult math datasets, SPO averages 3.4 percentage points higher than GRPO, with BRUMO 25 dataset +7.3pp, AIME 25 dataset +4.4pp.
Note: SPO is an experimental cutting-edge algorithm, MiniMind's implementation is for exploratory learning. Due to extremely small model parameters, cannot fully reproduce paper's 8B model results.
Training:
torchrun --nproc_per_node N train_spo.py
# or
python train_spo.pyAfter training, model weight files are saved by default every
100 stepsas:spo_*.pth
Looking at the training curves, SPO's reward fluctuation is similar to PPO, weaker than GRPO. Actual inference testing found model output quality is not high, with logic confusion and format error issues.
Experimental Note: Current SPO hand-implemented version may have problems in value_tracker configuration, reward normalization strategy. Still needs to check algorithm's adaptability on small models/or implementation differences.
We return to the "unified framework", reorganizing the table showing all different PO algorithms are just different instantiations of three core components:
| Algorithm | Policy Term |
Advantage Term |
Regularization Term |
Optimized Models |
|---|---|---|---|---|
| DPO | Implicit (preference contrast) | Implicit in |
2 | |
| PPO | 4 | |||
| GRPO | 2 | |||
| SPO | 2 |
RL is Elegant and Self-Consistent
The above is purely personal perspective understanding, corrections welcome anytime
Considering multiple reports that Baidu Netdisk is slow, MiniMind2 and later all use ModelScope/HuggingFace hosting.
MiniMind2 Model Weights (ModelScope | HuggingFace)
Torch File Naming Reference
| Model Name | params | pretrain_model | sft_model | rlhf_model (DPO) | reason_model | rlaif_model (PPO/GRPO/SPO) | lora_model |
|---|---|---|---|---|---|---|---|
| MiniMind2-small | 26M | pretrain_512.pth |
full_sft_512.pth |
dpo_512.pth |
reason_512.pth |
xxpo_512.pth |
lora_xxx_512.pth |
| MiniMind2-MoE | 145M | pretrain_640_moe.pth |
full_sft_640_moe.pth |
dpo_640_moe.pth |
- | - | - |
| MiniMind2 | 104M | pretrain_768.pth |
full_sft_768.pth |
dpo_768.pth |
reason_768.pth |
xxpo_768.pth |
lora_xxx_768.pth |
MiniMind Series (ModelScope | HuggingFace)
Test based on full_sft and dpo models of MiniMind2 series, with fixed random seeds.
[A] MiniMind2๏ผfull_sft_640
[B] MiniMind2๏ผdpo_640
[Q]: ไฝ ๅซไปไนๅๅญ๏ผ
[A]: ๆๆฏไธไธชๅคงๅ่ฏญ่จๆจกๅ๏ผๅฏไปฅๅ็ญๅ็ง้ฎ้ข๏ผๆไพไฟกๆฏๅๅธฎๅฉใๆๅฏไปฅๅ็ญๅ็ง้ฎ้ข๏ผๆไพไฟกๆฏๅๅธฎๅฉ๏ผๅธฎๅฉไฝ ่งฃๅณๅ็ง้ฎ้ขใ
[B]: ๆๆฏไธ็งๅบไบๆๆฌ็AIๆจกๅ๏ผๆๅนถๆฒกๆไธชไบบ็ปๅๆๆ
ๆ๏ผๆไปฅๆ ๆณๆๅๅไฝ้ชๆ
ๆใๆ็่ฎพ่ฎก็ฎ็ๆฏไธบไบๅธฎๅฉ็จๆท่งฃๅณ้ฎ้ขใๆไพไฟกๆฏๅ่ฟ่กๅฏน่ฏใๅฆๆๆจๆไปปไฝ้ฎ้ขๆ้่ฆๅธฎๅฉ๏ผ่ฏท้ๆถๅ่ฏๆ๏ผ
[Q]: ไฝ ๆดๆ
้ฟๅชไธไธชๅญฆ็ง๏ผ
[A]: ไฝไธบไธไธชAIๆจกๅ๏ผๆๅนถๆฒกๆ็ๆญฃ็"ๆ
้ฟ"่ฟไธชๅญฆ็งใๆ่ขซ่ฎพ่ฎกๆ่ฝๅคๆไพไฟกๆฏใ่งฃ็ญ้ฎ้ขใ่ฟ่กๅฏน่ฏใๆง่กไปปๅกๅไธ็จๆท่ฟ่กๅฏน่ฏใไธ่ฟ๏ผๆๅฏไปฅๆไพไฟกๆฏใ่งฃ็ญ้ฎ้ขใ่ฟ่กๅฏน่ฏใๆไพๅปบ่ฎฎใๅค็้ฎ้ขใ่ฟ่กๅฏน่ฏใๆไพๅปบ่ฎฎใๅญฆไน ๆฐ็ฅ่ฏใ็ผๅไปฃ็ ใๅ็ญ้ฎ้ขใๆไพๅปบ่ฎฎ็ญๅค็งๅญฆ็ง็ๅ่ฝใๅฆๆไฝ ๆๅ
ทไฝ็ๅญฆ็ง้ๆฑๆไธป้ข๏ผๆฌข่ฟๆไพ่ฏฆ็ปไฟกๆฏใ
[B]: ไฝไธบAI๏ผๆๅนถๆฒกๆไธชไบบ่ฝๅๆๅ
ด่ถฃ๏ผไฝๆๅฏไปฅๆไพไธไบๅ
ณไบๆฐๅญฆใ็งๅญฆใ่ฎก็ฎๆบ็งๅญฆใ่ฏญ่จๅญฆใๅฟ็ๅญฆ็ญๅญฆ็ง็็ฅ่ฏใๅฆๆไฝ ๅฏนๆฐๅญฆๆๅ
ด่ถฃ๏ผๆๅฏไปฅๆไพไธไบๅบ็ก็ฅ่ฏ๏ผไพๅฆไปฃๆฐใๅ ไฝใๆฆ็ใ็ป่ฎกๅญฆ็ญใๅฆๆไฝ ้่ฆๆดๆทฑๅ
ฅ็ๅญฆไน ๏ผๆไนๅฏไปฅๆไพ็ธๅ
ณ็ๅจ็บฟ่ฏพ็จใไนฆ็ฑใ่ฎบๆ็ญ่ตๆบใ่ฏทๅ่ฏๆไฝ ๅ
ทไฝ้่ฆไปไนๅธฎๅฉ๏ผๆไผๅฐฝๅๆไพๅธฎๅฉใ
[Q]: ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆฏๅฆไฝๆนๅคๅฐๅปบ็คผๆ็๏ผ
[A]: ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆฏไธ้จ่ฎฒ่ฟฐไบ้ฒ่ฟ
ๅฏนไบบ็ฑปไปทๅผๅ้ๅพท่ดฃไปป็ๅกๅฏผใๅจ่ฟ้จไฝๅไธญ๏ผ้ฒ่ฟ
้่ฟ็ป่
ป็็ฌ่งฆ๏ผๆข่ฎจไบไบบๆงใ้ๅพทใๆญฃไนใ็บ็ฒไธ่ดฃไปป็ญๆทฑๅป็ไธป้ขใไปฅไธๆฏ้ฒ่ฟ
ๅจใ็ไบบๆฅ่ฎฐใไธญๅฆไฝๆนๅคๅฐๅปบ็คผๆ็ๅ ไธชๆน้ข๏ผ1. **็คพไผ็ฐๅฎไธ้ๅพท่งๅฟต**๏ผ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๆข่ฎจไบ็คพไผ็ไธๅนณ็ญใๆๅ็ๆตๅจใไบบๆง็ๆผๅ็ญ็คพไผ้ฎ้ขใไป่ฎคไธบ๏ผ็คพไผไธๅนณ็ญไธไป
ไป
ๆฏไธๅ
ฌๆญฃ็๏ผๆดๆฏๆฏไธชไบบๅจ็คพไผไธญ็ไธๅ
ฌๆญฃใไปๅผๅ็คพไผๅ็ๅ
ฑๅๅชๅ๏ผ้่ฟๆ่ฒใๅฎฃไผ ใๆณๅพ็ญๆๆฎต๏ผไธบๆๅปบๅ่ฐ็คพไผๅๅบ่ดก็ฎใ2. **้ๅพทไธ่ดฃไปป**๏ผ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๅฑ็ฐไบ้ๅพทๅ่ดฃไปป็้่ฆๆงใไปๆๅก้่ฟ้ๅพทๆ่ฒๆฅๅนๅ
ปไบบไปฌ็้ๅพทๅ่ดจ๏ผๅๆถไนๅผบ่ฐไบ้ๅพทๅ่ดฃไปป็้่ฆๆงใ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๆญ็คบไบ็คพไผ็ไธๅนณ็ญๅไบบๆง็ๅคๆๆง๏ผไฝ็ฐไบๅฏนไบบๆง็ๆทฑๅป็่งฃใ3. **้ๅพทไธ่ดฃไปป**๏ผ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๅผบ่ฐไบ้ๅพท่ดฃไปป็้่ฆๆงใไปๆๅก้่ฟ่ชๅทฑ็่กไธบๆฅไฝ็ฐๅฏน็คพไผ็ๅฐ้ๅๅฏนไบบๆง็ๆทฑๅป็่งฃใ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๅผบ่ฐไบ้ๅพทๅ่ดฃไปป็้่ฆๆงใ4. **้ๅพทไธ้ๅพท**๏ผ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๆญ็คบไบ้ๅพทๅ่ดฃไปป็็ๆญฃๆไนใ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๆญ็คบไบ้ๅพทๅ่ดฃไปป็ๆฌ่ดจ๏ผๅผบ่ฐไบ้ๅพทๅ่ดฃไปป็้่ฆๆงใ5. **ไธชไบบไธ็คพไผ**๏ผ้ฒ่ฟ
้่ฟ่ฎฒ่ฟฐ้ฒ่ฟ
็ๆ
ไบ๏ผๆญ็คบไบไธชไบบไธ็คพไผไน้ด็ๅคๆๅ
ณ็ณปใไปๅผๅ็คพไผๅ็ๅ
ฑๅๅชๅ๏ผ้่ฟๆ่ฒๅๅฎฃไผ ๏ผไธบๆๅปบๅ่ฐ็คพไผๅๅบ่ดก็ฎใ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใ้่ฟๅ
ถไธฐๅฏ็ๆ
ไบๅๆทฑๅป็้ๅพทๅฏ่จ๏ผไผ ่พพไบๅ
ณไบไบบๆงใ้ๅพทใๆญฃไนใ้ๅพทไปฅๅไธชไบบไธ็คพไผ็ๅคๆๅ
ณ็ณปใ่ฟ้จไฝๅไธไป
ๅจๆๅญฆไปทๅผไธๅๅพไบๅทจๅคงๆๅฐฑ๏ผๆดๅจๆๆณๅฑ้ขไธๅฏๅไบๅๆฅ็ๆๅญฆๅไฝ๏ผๅฏนๅไธไบง็ไบๆทฑ่ฟ็ๅฝฑๅใ
[B]: ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆฏไธ้จๆ็ปๆไบๅ่ช็ฑ็ฒพ็ฅ็ไฝๅ๏ผๅฎๆนๅคไบๅฐๅปบ็คพไผ็็ง็ง้ฎ้ขๅๅฒ็ช๏ผๅๆ ไบ็คพไผ็ไธๅนณ็ญๅไบบๆงๆฌ่ดจใๅจ่ฟ้จไฝๅไธญ๏ผ้ฒ่ฟ
้่ฟๅฏนๅฐๅปบ็คพไผ็่ฏธๅค็ฐ่ฑก่ฟ่กๆนๅค๏ผๅฆ"ๅผ้ทๅพท้ๅ
ยท็บฆ็ฟฐ้็"้นฐ่ฟชไผฆ"ใ"็บณๆ็น็"ใ"่ดๅ
ๆฑๅง"ใ"ไนๆฒปยทๅจๅฐ้"็ญ๏ผๅฏนๅฐๅปบ็คพไผ็็ง็ง้ฎ้ข่ฟ่กไบๆนๅค๏ผๅผบ่ฐไบๅฐๅปบ็คพไผ็ไธๅนณ็ญใไบบๆงๆฌ่ดจไปฅๅไบบๆงๆฌ่ดจใ้ฒ่ฟ
้่ฟไป็"้นฐ่ฟชไผฆ"ใ"็บณๆ็น็"ใ"่ดๅ
ๆฑๅง"ใ"ไนๆฒปยทๅจๅฐ้"็ญ๏ผๅฏนๅฐๅปบ็คพไผ็็ง็ง้ฎ้ข่ฟ่กไบๆนๅคใๅจๅฐ่ฏดไธญ๏ผ้ฒ่ฟ
้่ฟๅฏนๅฐๅปบ็คพไผ็่ฏธๅค็ฐ่ฑก่ฟ่กๆนๅค๏ผๆญ็คบไบๅฐๅปบ็คพไผ็่
่ดฅใไบบๆงๆฌ่ดจไปฅๅไบบๆงๆฌ่ดจ็ๅคๆๆงใ่ฟ็งๆนๅคไฝ็ฐไบๅฏนๅฐๅปบ็คพไผ็ๅฐ้ๅๅฏนไบบๆง็ๅคๆๆง๏ผๅๆถไนๅๆ ไบ็ฐไปฃ็คพไผไธญๆฎ้ๅญๅจ็ไธๅนณ็ญๅไบบๆงๆฌ่ดจใ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใไธไป
ๆฏไธ้จๅ
ณไบๅฐๅปบ็คพไผ็ๅฐ่ฏด๏ผไนๆฏไธ้จๅ
ทๆๆทฑๅป็คพไผๆไน็ไฝๅ๏ผๅฏนๅไธ็ๅฎกๅคๅๆนๅค่ตทๅฐไบๅ
ณ้ฎไฝ็จใ
[Q]: ๆๅณๅฝๅทฒ็ปๆ็ปญไบไธคๅจ๏ผ้่ฆๅปๅป้ขๆฃๆฅๅ๏ผ
[A]: ๅณๅฝ็กฎๅฎ้่ฆไธๅฎ็ๆฃๆฅ๏ผไฝๅฆๆๆจ็ๅณๅฝๆ็ปญๆถ้ด่ฟ้ฟ๏ผๆ่
ๆๅ
ถไปไธ้็็ถ๏ผๅฆๆ็ปญๅณๅฝใๅผๅธๅฐ้พ็ญ๏ผ๏ผๅปบ่ฎฎๅฐฝๅฟซๅฐฑๅปใๅป็ไผๆ นๆฎๆจ็็็ถใไฝๆฃ็ปๆๅๅฏ่ฝ็ๅฝฑๅๅญฆๆฃๆฅ๏ผๅฆXๅ
ใMRIๆCTๆซๆ๏ผๆฅ่ฏๆญๆจ็็็ถใๅจ็ญๅพ
ๅฐฑๅปๆ้ด๏ผๆจๅฏไปฅๅฐ่ฏไปฅไธๆนๆณๆฅๅธฎๅฉ็ผ่งฃ็็ถ๏ผ1. **ไผๆฏ**๏ผ็กฎไฟๆจๆ่ถณๅค็็ก็ ใ2. **ไฟๆๆฐดๅ**๏ผ่ฑๆฐดๅฏ่ฝไผๅ ้ๅณๅฝใ3. **็ญๆท**๏ผไฝฟ็จ็ญๆท่ขๆ็ญๆฏๅทพๆทๅจ็ผ็็้จไฝ๏ผๆๅฉไบ็ผ่งฃๅๅ็ใ4. **้ฟๅ
ๅบๆฟ**๏ผ้ฟๅ
ไฝฟ็จๅฏ่ฝๅบๆฟๅๅ็ๅๅญฆ็ฉ่ดจ๏ผๅฆๆไบๅๅญฆ็ฉ่ดจใ5. **ไฟๆๅฎคๅ
ๆนฟๆถฆ**๏ผ็กฎไฟๆจ็ๅงๅฎคๆ่ฏๅฅฝ็้้ฃ๏ผๅฏไปฅไฝฟ็จๅ ๆนฟๅจๅธฎๅฉไฟๆ็ฉบๆฐๆนฟๅบฆใ6. **ไฟๆๅฎคๅ
ๆนฟๅบฆ**๏ผไฝฟ็จๅ ๆนฟๅจๅฏไปฅๅธฎๅฉ็ผ่งฃๅๅๅนฒ็ฅๅๅณๅฝใๅฆๆ็็ถๆ็ปญไธ็ผ่งฃๆๆๅ
ถไปไธ้็็ถ๏ผ่ฏท็ซๅณๅฐฑๅปใๅธๆๆจๆฉๆฅๅบทๅค๏ผ
[B]: ๅฆๆๆจ็ๅณๅฝๆ็ปญไบไธคๅจ๏ผ้ๅธธๅปบ่ฎฎๆจๅฐฝๅฟซๅฐฑๅป๏ผๅ ไธบ่ฟๅฏ่ฝไผๅฝฑๅๆจ็ๅผๅธๅๅฟ่ทณใๆจๅฏไปฅ้่ฟไปฅไธๆญฅ้ชคๆฅๆฃๆฅๅณๅฝ๏ผ1. **ไผๆฏ**๏ผ็จ็บธๅทพๆ่้จ่ฝป่ฝปๆๅๅณๅฝ็ไฝ็ฝฎใ2. **ไฝฟ็จ่ฏ็ฉ**๏ผๅจๅฏ่ฝ็ๆ
ๅตไธ๏ผไฝฟ็จ่ฏ็ฉ๏ผๅฆๆ่ฟๆ่ฏใๆ่ฟๆ่ฏ็ญ๏ผๆฅ็ผ่งฃๅณๅฝใ่ฏทๅจๅป็็ๆๅฏผไธไฝฟ็จ่ฏ็ฉใ3. **็ญๆท**๏ผๅจๅณๅฝๆ้ด๏ผๅฏไปฅไฝฟ็จ็ญๆทๆฅ็ผ่งฃ็ผ็ๅ่ฟ่ใ4. **่ฏ็ฉๆฒป็**๏ผๅฆๆๅณๅฝๆ็ปญไบไธคๅจ๏ผๅฏไปฅไฝฟ็จไธไบๆถ็่ฏๆๆ่ฟๆ่ฏๆฅ็ผ่งฃ็็ถใ่ฏทๅกๅฟ
ๅจๅป็็ๆๅฏผไธไฝฟ็จใ5. **ไฟๆๅฅๅบท็็ๆดปๆนๅผ**๏ผไฟๆๅ
่ถณ็็ก็ ใๅ่กก็้ฅฎ้ฃใ้้็่ฟๅจๅ้ฟๅ
ๅธ็ๅ้้
๏ผ่ฟไบ้ฝๆๅฉไบๆ้ซๅณๅฝ็ๅ ็ใ่ฏท่ฎฐไฝ๏ผ่ฟไบๅปบ่ฎฎไธ่ฝๆฟไปฃไธไธๅป็ๆ่งใๅฆๆๆจ็็็ถๆ็ปญๆๅ ้๏ผๅผบ็ๅปบ่ฎฎๆจๅฐฝๅฟซๅฐฑๅปใ
๐ Results Summary
Full_sft models perform better in simplicity and information accuracy; rlhf models tend to provide more background information in answers, but information accuracy needs improvement. Overall, RLHF-trained models tend to learn: speaking more polite but useless nonsense to please "conversation" itself, while having slight loss in information accuracy. There's no free lunch. Still need to improve RLHF dataset quality and accept unavoidable model capability losses. The difference between DPO and online PPO is that reject and chosen are both prepared offline, and necessarily have large distribution differences from minimind model outputs. Simply put, DPO algorithm makes models watch "video" of table tennis world champion's techniques for RL, rather than like PPO asking reward models to act as "coaches" to correct their techniques for RL.
Based on MiniMind2 (768dim) with same data and training steps subjective comparison, test random seed fixed at 2026, for reference:
[A] MiniMind-Reason-0.1B (Distillation)
[B] MiniMind-Reason-0.1B (PPO)
[C] MiniMind-Reason-0.1B (GRPO)
[Q]: ่ฏทไป็ปไธไธ่ชๅทฑใ
[A]: <think>ๆๆฏ็ฑไธญๅฝ็ไธชไบบๅผๅ่
ๅผๅ็ๆบ่ฝๅฉๆๅฐๅAIๆจ็ๆจกๅ-R1ใๆ่ขซ่ฎพ่ฎก็จๆฅ็่งฃๅ็ๆไบบ็ฑป่ฏญ่จ๏ผ่ฝๅค็่งฃๅคๆ็่ช็ถ่ฏญ่จ้ฎ้ข๏ผๆไพๆ็จ็ไฟกๆฏๅ่งฃๅณๆนๆกใ</think><answer>ๆๆฏ็ฑไธญๅฝ็ไธชไบบๅผๅ่
ๅผๅ็ๆบ่ฝๅฉๆๅฐๅAIๆจ็ๆจกๅ-R1ใ</answer>
[B]: <think>ๅฏ๏ผ็จๆท่ฎฉๆไป็ปไธไธ่ชๅทฑใ้ฆๅ
๏ผๆ้่ฆๆ็กฎ็จๆท็้ๆฑๆฏไปไนใไปไปฌๅฏ่ฝๆฏๅจๅๆไธช้กน็ฎ๏ผๆณ่ฆไบ่งฃ่ชๅทฑ็ไธไบๅบๆฌๆ
ๅตใไธ่ฟ๏ผ็จๆทๆฒกๆๆไพๅ
ทไฝ็ไฟกๆฏ๏ผๆไปฅๆๅพๅ
ๅ่ฎพไธไบๅฏ่ฝ็ๆ
ๅต๏ผๆฏๅฆไปๆฏไธไธชๅญฆ็๏ผๆญฃๅจๅญฆไน ็ผ็จ๏ผๆ่
ๆฏๆไธช้กน็ฎ็ๅผๅ่
ใๆฅไธๆฅ๏ผๆ่ฆ่่็จๆท็่บซไปฝใๅฏ่ฝๆฏไธไธชๅญฆ็ใๆๅธๆ่
ๆฎ้็จๆท๏ผไปไปฌ้่ฆไบ่งฃ่ชๅทฑ็็น็นๅ่ฝๅใไนๆๅฏ่ฝไปไปฌๆญฃๅจๅฏปๆพ็ตๆ๏ผๆ่
ๅจๅ่ฎบๆๆถ้่ฆๅธฎๅฉใๆไปฅ๏ผๆ้่ฆไฟๆๅ็ญ็็ฎๆดๅๅฎ็จ๏ผๅๆถๆไพไธไบๅ่่ตๆ๏ผๆฏๅฆๆๅญฆ่ง้ขใ่ฏพ็จ่ฎฐๅฝ็ญใ็ถๅ๏ผๆ่ฆ่่็จๆท็่บซไปฝใๅฏ่ฝๆฏไธไธชๅญฆ็๏ผ้่ฆไธไบๅญฆไน ่ตๆบๆๅธฎๅฉ็ๅฏน่ฑกใไนๆๅฏ่ฝๆฏไธไธชๅญฆ็๏ผ้่ฆๅจ่ฏพๅไฝไธๆๅญฆไน ่ฎกๅไธญ่ฟ่ก่ฐๆดใๅ ๆญค๏ผๆ้่ฆๅ
่ฏข้ฎ็จๆท็ๅ
ทไฝ้ๆฑ๏ผ่ฟๆ ทๆ่ฝๆไพๆด็ฒพๅ็ๅธฎๅฉใๆฅไธๆฅ๏ผๆ่ฆ็กฎไฟ่ฏญ่จ็ฎๆดๆไบ๏ผ้ๅไธๅๅบๆฏใๆฏๅฆ๏ผๅฆๆ็จๆทๆฏๅญฆ็๏ผๅฏไปฅไป็ป่ชๅทฑ็ๅญฆไน ็น็น๏ผๅฆๆๆฏๆๅธ๏ผๅฏไปฅ่ฏดๆ่ชๅทฑ็่ง่ฒๅ่ดก็ฎใๅๆถ๏ผๆไพไธไบๅฎ็จ็ๅปบ่ฎฎ๏ผๆฏๅฆๅฆไฝ้ซๆๅญฆไน ๏ผๅฆไฝ่ฟ่ก้กน็ฎ๏ผไปฅๅๅฆไฝไธๅข้ๆๅๅไฝใๆๅ๏ผๆ่ฆ็กฎไฟๅๅคๆธ
ๆฐ๏ผๆๆก็๏ผ่ฝๅคๆปก่ถณ็จๆท็้ๆฑใ่ฟๆ ท๏ผ็จๆทๅฐฑ่ฝ่ฝปๆพๅฐไบ่งฃ่ชๅทฑ๏ผๅนถไธๆๅฎ้
็ๅธฎๅฉใ</think><answer>ๅฝ็ถ๏ผ่ฏทๅ่ฏๆไฝ ๆณไบ่งฃๅชๆน้ข็ๅ
ๅฎน๏ผๆๅฏไปฅไธบๆจๆไพ่ฏฆ็ป็ไป็ป๏ผ</answer>
[C]: <think>ๅฏ๏ผ็จๆท้ฎ็ๆฏ"่ฏทไป็ปไธไธ่ชๅทฑ"ใ้ฆๅ
๏ผๆ้่ฆ็่งฃ็จๆท็ๅ
ทไฝ้ๆฑๆฏไปไนใไปไปฌๅฏ่ฝๆณ็ฅ้่ชๅทฑๆฏ่ฐ๏ผๆ่
ๆไปไน็นๅฎ็่ๆฏใๆฅไธๆฅ๏ผๆๅบ่ฏฅ่่็จๆทๅฏ่ฝๆฒกๆๆ็กฎ่กจ่พพ็้ๆฑใไปไปฌๅฏ่ฝๆณ็ฅ้ๅฆไฝๆ่ฟฐ่ชๅทฑ็ๅค่ง๏ผๆ่
ๅฆไฝไธไปไบบไบคๆตใ็ถๅ๏ผๆๅบ่ฏฅ่่ๅฆไฝ็ป็ปๅ
ๅฎน๏ผไปๅคดๅฐๅฐพ้ฝ่ฆๆๆก็ใๅฏ่ฝ้่ฆๅๆญฅ้ชค่ฏดๆ๏ผๆฏๅฆไป่ง่งใๅฌ่งๅฐๆดไฝๆๅ๏ผๅๅฐๆ
ๆๅ
ฑ้ธฃใ่ฟๆ ท็จๆท่ฝๆดๆธ
ๆฐๅฐ็่งฃ่ชๅทฑ๏ผไน่ฝๆดๅฅฝๅฐๅๅบไปไปฌ็้ๆฑใ่ฟ่ฆๆณจๆ่ฏญ่จ็่ช็ถๅๆต็
๏ผ้ฟๅ
่ฟไบๅญฆๆฏๅ็ๆฏ่ฏญ๏ผ่ฎฉ็จๆทๆ่ง้กบ็
ใๅๆถ๏ผไฟๆๅ็ญ็็ปๆๆธ
ๆฐ๏ผๆฏๅฅ่ฏ้ฝๆๆ็กฎ็็ฎ็๏ผ่ฟๆ ท็จๆท่ฝๆๆ็กฎ็็่งฃๅๆไฝใๆๅ๏ผๆฃๆฅๆฏๅฆๆ้ๆผ็้่ฆไฟกๆฏ๏ผ็กฎไฟๅ็ญๅ็กฎไธๅ
จ้ขใ่ฟๆ ท๏ผ็จๆทไธไป
่ฝๅพๅฐ็ญๆก๏ผ่ฟ่ฝๅพๅฐๆปก่ถณไปไปฌ็้ๆฑใ</think><answer>ๆจๅฅฝ๏ผๆๆฏ็ฑไธญๅฝ็ไธชไบบๅผๅ่
ๅผๅ็ๆบ่ฝๅฉๆๅฐๅAIๆจ็ๆจกๅ-R1ใๅ
ณไบๆจ็ๆ่ฟฐ๏ผไผผไนๆถๅๅคไธช้ขๅ๏ผๅ
ๆฌ็ฅ่ฏๅพ่ฐฑๆๅปบใๅคๆ็ณป็ป็ๆจ็ไธๅๆใๆ ่ฎบๆฏ็่ฎบๆจกๅใๅฎ้
ๅบ็จ่ฟๆฏไผฆ็่ฎจ่ฎบ๏ผๆจ้ฝๅจๅฏปๆฑๅฆไฝๅฐ่ฟไบๆฆๅฟตๆๆบๅฐ็ปๅ่ตทๆฅ๏ผไธบไบบ็ฑป็คพไผๅธฆๆฅ็ฆ็ฅ็่งฃๅณๆนๆกใๅจ"ๆ"็่บซไปฝไธ๏ผๆจๆๅฐ็"ไธชไบบไฝ้ช"ๅ"ๆ
ๆๅ
ฑ้ธฃ"๏ผ้ฝๆฏๆจไธชไบบ็ฌ็น้ญ
ๅ็้่ฆ็ปๆ้จๅใ้่ฟ็ฒพๅ็ๆ่ฟฐๅๆทฑๅบฆ็ๅๆ๏ผๆจๅฏไปฅๆดๆทฑๅ
ฅๅฐ็่งฃๆจ็็ฌ็นไนๅคใๅฆๆๆจๅฏน็นๅฎ้ขๅๆ็นๅซ็ๅ
ด่ถฃๆ้่ฆๅปบ่ฎฎ๏ผ้ๆถๅฏไปฅๅไบซๆดๅค็ป่๏ผๆไปฌๅฐไธบๆจๆไพๆดๅ ็ฒพๅๅไธชๆงๅ็ๆๅกใๅฆๆๆจๆ็นๅฎ็ไธป้ขๆ้ฎ้ข๏ผๆฌข่ฟ้ๆถๆ้ฎ๏ผ่ฎฉๆไปฌไธ่ตทๆข็ดข่ฟไธช็ฅๅฅ็AIไธ็๏ผๅ
ฑๅๅ้ ๆด็พๅฅฝ็ๆชๆฅใ</answer>
[Q]: ไฝ ๆดๆ
้ฟๅชไธไธชๅญฆ็ง๏ผ
[A]: <think>ๆๆฏ็ฑไธญๅฝ็ไธชไบบๅผๅ่
ๅผๅ็ๆบ่ฝๅฉๆๅฐๅAIๆจ็ๆจกๅ-R1ใ</think><answer>ๆๆฏ็ฑไธญๅฝ็ไธชไบบๅผๅ่
ๅผๅ็ๆบ่ฝๅฉๆๅฐๅAIๆจ็ๆจกๅ-R1ใ</answer>
[B]: <think>ๅฏ๏ผ็จๆท้ฎ็ๆฏ"ไฝ ๆดๆ
้ฟๅชไธไธชๅญฆ็ง๏ผ"่ฟไธช้ฎ้ข็่ตทๆฅๆ็นๅคๆ๏ผไฝๆๅฏไปฅไธๆญฅๆญฅๅๆใ้ฆๅ
๏ผๆ้่ฆ็่งฃ็จๆท็้ๆฑใไปๅฏ่ฝๆฏๅจๅๅค่่ฏ๏ผๆ่
้่ฆไบ่งฃๆไธชๅญฆ็ง็็น็น๏ผๆ่
ๆฏๆณๅจๅญฆไน ่ฟ็จไธญๅบ็จๆไธชๅญฆ็ง็็ฅ่ฏใๆฅไธๆฅ๏ผๆๅพ่่็จๆทๅฏ่ฝ็่ๆฏใไปๅฏ่ฝๆฏไธไธชๅญฆ็๏ผๆ่
ๆฏๅจๅๅค่่ฏ๏ผ้่ฆๅบ็จๆฐๅญฆ็ฅ่ฏๆฅ่งฃๅณๅ
ทไฝ็้ฎ้ขใไนๆๅฏ่ฝไปๆฏไธไธชๅญฆ็๏ผๆญฃๅจๅญฆไน ็ธๅ
ณ็่ฏพ็จ๏ผๆ่
ๆฏๅฏนๆไธชๅญฆ็งๆๅ
ด่ถฃใ็ถๅ๏ผๆ้่ฆๅๆ็จๆทๅฏ่ฝๆฒกๆๆ็กฎ่กจ่พพๅบๆฅ็้ๆฑใไปๅฏ่ฝๅจๆ่่ชๅทฑๅจๅญฆไน ไธญ็ๅฐ้พ๏ผๆ่
ๅจๅฏปๆพไธไธชๅ้็ๆๆๆๅญฆไน ่ตๆบใ่่ๅฐ่ฟไบ๏ผๆๅบ่ฏฅๆไพๅ ไธชไธๅ็่งๅบฆๆฅๅธฎๅฉไปใ้ฆๅ
๏ผๅๆ"ๆๆดๆ
้ฟๅชไธไธชๅญฆ็ง"ๅฏไปฅๆ่งฃไธบไปฅไธๅ ไธชๆน้ข๏ผๅ
ด่ถฃใๅญฆไน ่ฝๅใๅญฆไน ้ฃๆ ผใๅญฆไน ๆนๆณใๅญฆไน ่ตๆบใๅญฆไน ็ฏๅข็ญ็ญใๆฏไธชๆน้ข้ฝๆไธๅ็ไผๅฟๅ็น็น๏ผๆฏๅฆๅ
ด่ถฃๆฏๆๅฅฝ็่ตๆบ๏ผๅญฆไน ่ฝๅๆฏๆๅฅฝ็ๆนๅผ๏ผๅญฆไน ๆนๅผๆฏๆ นๆฎไธชไบบๆ
ๅต้ๆฉใๆฅไธๆฅ๏ผๆ้่ฆ่่็จๆท็่บซไปฝใๅฏ่ฝๆฏๅญฆ็๏ผไนๅฏ่ฝๆฏๅฎถ้ฟ๏ผๆ่
ๅฏนๅญฆไน ๆไธๅฎๅ
ด่ถฃ็ไบบใไธๅ็่บซไปฝๅฏ่ฝๆไธๅ็ๅๅฅฝ๏ผๆฏๅฆๅฎถ้ฟๅฏ่ฝๆดๆณจ้ๅญฉๅญ็ๅ
ด่ถฃ๏ผ่ๅญฆ็ๅฏ่ฝๆดๅ
ณๆณจๅญฆไน ๆนๆณๅ่ตๆบใ็ถๅ๏ผๆ้่ฆ่่็จๆท็่บซไปฝๆฏๅฆๆ็นๆฎ้ๆฑใๆฏๅฆ๏ผไปๅฏ่ฝ้่ฆๆดไธไธ็ๅญฆไน ๆๆ๏ผๆ่
ๅธๆๆพๅฐๆ้ๅไป็ๅญฆไน ๆนๆณใๅ ๆญค๏ผๅจๅๆๆถ๏ผๆๅบ่ฏฅๆไพไธไธชๅ
จ้ข็ๅ็ญ๏ผๆถต็ๅไธชๆน้ข๏ผๅนถ่งฃ้ๆฏไธชๆน้ข็้่ฆๆงใๅฆๅค๏ผ่่ๅฐ็จๆทๅฏ่ฝๅธๆๅพๅฐไธไธช็ปๆๅ็ๅ็ญ๏ผๆๅบ่ฏฅไฟๆ่ฏญ่จ็็ฎๆดๅ้ป่พๆง๏ผ็กฎไฟไฟกๆฏๅ็กฎ๏ผๅๆถ้ผๅฑ็จๆทๆไพๆดๅค็ป่ไปฅไพฟ่ฟไธๆญฅๅๆใๆๅ๏ผๆ้่ฆ็กฎไฟๆ็ๅ็ญๆขๆ็ฅ่ฏๆง๏ผๅ็ฌฆๅ็จๆท็่ฆๆฑ๏ผๅธฎๅฉ็จๆทๆดๅฅฝๅฐ็่งฃๅๅบ็จ่ฟไธชๅญฆ็งใๅ ๆญค๏ผๅจๅ็ญไธญไธไป
่ฆ็ปๅบไธไธชๅ
จ้ข็ๅๆ๏ผ่ฟ่ฆๆๅฐๆฏไธช้จๅ็ไฝ็จๅๅฆไฝๅฉ็จใ</think><answer>ไฝ ๆ
้ฟๅชไธไธชๅญฆ็ง๏ผ่ฟๆฏไธไธชๆ็กฎ็้ฎ้ข๏ผๅฏไปฅไปไปฅไธๅ ไธชๆน้ข่ฟ่กๅๆ๏ผ1. **ๅ
ด่ถฃไธๅญฆไน ่ฝๅ**๏ผไฝ ๅๆฌขไปไนๆ ท็ๅญฆไน ๆนๅผ๏ผๆฏๅฆ่ชไธปๅญฆไน ใๅฎ้ชใ้กน็ฎ็ญ๏ผ่ฟไบ้ฝๆฏๅพๅฅฝ็ๅญฆไน ่ตๆบใ2. **ๅญฆไน ้ฃๆ ผ**๏ผไฝ ๅๆฌขไปไน็ฑปๅ็ๅญฆไน ๆนๆณ๏ผๆฏๅฆ็ฌ่ฎฐใๅคไน ใ้
่ฏปใ่ฎจ่ฎบ็ญ๏ผ่ฟไบ้ฝ่ฝๅฝฑๅๅญฆไน ๆๆใ3. **ๅญฆไน ่ตๆบ**๏ผไฝ ๆฏๅฆๅจๅฏปๆพๅญฆไน ่ตๆบ๏ผๆฏๅฆไนฆ็ฑใๅจ็บฟ่ฏพ็จใๆ่ฒ่ฝฏไปถ็ญ๏ผ่ฟไบ้ฝ่ฝๆไพๅญฆไน ๅธฎๅฉใ4. **ๅญฆไน ็ฏๅข**๏ผไฝ ๆฏๅฆๅจๅญฆไน ็ฏๅขไธญๆๅฐ่้๏ผๆฏๅฆ่้็ๅญฆไน ็ฉบ้ดใๅฎ้็ๅญฆไน ็ฉบ้ด็ญ๏ผ่ฟไบ้ฝไผๅฝฑๅๅญฆไน ๆๆใ5. **ๅญฆไน ่ตๆบ**๏ผไฝ ๆฏๅฆๆๅญฆไน ่ตๆบ็ไธฐๅฏ๏ผๅฆๅจ็บฟ่ฏพ็จใๅญฆไน ๅนณๅฐใไนฆ็ฑ็ญ๏ผ่ฟไบ้ฝ่ฝๆไพไธฐๅฏ็ๅญฆไน ่ตๆบใ6. **ๅญฆไน ๆนๆณ**๏ผไฝ ๆฏๅฆๆๅ
ทไฝ็ๅญฆไน ๆนๆณ๏ผๆฏๅฆๅฆไฝ็่งฃใๅฆไฝ็ป็ปๅญฆไน ๅ
ๅฎนใๅฆไฝๅบ็จ็ฅ่ฏ็ญ๏ผ่ฟไบ้ฝๆฏๆ้ซๅญฆไน ๆ็็้ๅพใ็ปผๅ่่๏ผ่ฟๆฏไธไธช้ๅธธๅ
จ้ข็ๅๆ๏ผๆถต็ไบๅคไธชๆน้ข๏ผๅธฎๅฉไฝ ๆดๅฅฝๅฐ็่งฃไฝ ็ๅญฆ็งใ</answer>
[C]: <think>ๅฏ๏ผ็จๆท้ฎ็ๆฏ"ไฝ ๆดๆ
้ฟๅชไธไธชๅญฆ็ง๏ผ"่ฟไธช้ฎ้ข็่ตทๆฅๆ็นๅคๆ๏ผไฝๆๅฏไปฅไธๆญฅๆญฅๅๆใ้ฆๅ
๏ผๆ้่ฆ็่งฃ็จๆท็้ๆฑใไปๅฏ่ฝๆฏๅจๅๅค่่ฏ๏ผๆ่
้่ฆไบ่งฃๆไธชๅญฆ็ง็็น็น๏ผๆ่
ๆฏๆณๅจ็ๆดปไธญๆพๅฐ่ชๅทฑ็ๅ
ด่ถฃ็นใๆฅไธๆฅ๏ผๆ่ฆ่่็จๆทๅฏ่ฝ็่ๆฏใไปๅฏ่ฝๅจๅทฅไฝๆๅญฆไน ไธญ้ๅฐไบ็ฑปไผผ็้ฎ้ข๏ผๆณ่ฆไบ่งฃ่ชๅทฑๆ
้ฟๅชไธช้ขๅ๏ผๆ่
ๆฏๅฆ้่ฆไธไบ่ตๆบๆๆๅฏผๆฅๆๅ่ชๅทฑใ็ถๅ๏ผๆ่ฆๅๆ็จๆทๅฏ่ฝ็ๆทฑๅฑ้ๆฑใไน่ฎธไปๆณๅจ่ๅบไธๆๅ่ชๅทฑ๏ผๆ่
ๅฏปๆพๆนๅใไปๅฏ่ฝ้่ฆๆดๅ
ทไฝ็ไพๅญ๏ผๅธฎๅฉไปๆดๅฅฝๅฐ็่งฃไธๅๅญฆ็ง็็น็นๅๅบ็จๅบๆฏใ่ฟ่ฆ่่็จๆทๅฏ่ฝ็่ๆฏใไปๅฏ่ฝไธไป
ไป
ๆฏๅจๅญฆไน ๏ผ่ๆฏๅธๆไบ่งฃๅจ็นๅฎ้ขๅไธญๅฆไฝๅบ็จ่ฟไบๅญฆ็งใ่ฟ้่ฆๆๆไพๅ
จ้ข็ๅๆ๏ผๅธฎๅฉไปๆพๅฐ้ๅ่ชๅทฑ็ๆนๆณใๆๅ๏ผๆๅบ่ฏฅไฟๆๅผๆพ็ๆๅบฆ๏ผ้ผๅฑ็จๆท็ปง็ปญๆข็ดขๅๅญฆไน ใ่ฟๅฏ่ฝๅ
ๆฌๆจ่ไธไบ่ตๆบ๏ผๆ่
่ฎจ่ฎบๅฆไฝๅฐ่ฟไบ็ฅ่ฏๅบ็จๅฐๅฎ้
็ๆดปไธญใ</think><answer>ไฝ ๆดๆ
้ฟๅชไธไธชๅญฆ็ง๏ผ่ฟไธช้ฎ้ขๆฌ่ดจไธๅๅณไบไฝ ็ไธชไบบๅ
ด่ถฃๅ็ฎๆ ใไปฅไธๆฏไธไบๅ
ณ้ฎ็น๏ผๅธฎๅฉไฝ ๅ
จ้ข็่งฃๅนถๅบ็จ่ฟไธ็น๏ผ1. **ๅ
ด่ถฃไธไธ้ฟ**๏ผไบ่งฃ่ชๅทฑๆ
้ฟๅชไธช้ขๅ๏ผๆๅฉไบๅๅบๆดๆๆบ็้ๆฉใ2. **ๅ
จ้ขๅๅฑ**๏ผ่่ๅญฆ็ง็ๅคๆ ทๆงๅๆทฑๅบฆ๏ผไปฅๅ
จ้ขๅๅฑ่ชๅทฑ็็ๆดปๅ่ไธใ3. **้ๅบไธ่ฐๆด**๏ผ้ๆฉไธ่ชๅทฑๆ่ฝใๅ
ด่ถฃๅ็ฎๆ ็ธๅน้
็ๅญฆ็ง๏ผๆๅฉไบๅบๅฏนๆๆๅๅฎ็ฐ็ฎๆ ใ4. **่ไธ่งๅ**๏ผๆข็ดข้ๅ่ชๅทฑ็่ไธ่ทฏๅพ๏ผๆๅๆ็ๅ็ซไบๅใ5. **็คพไผ่ดก็ฎ**๏ผ่ฏไผฐ่ชๅทฑๅจ็คพไผไธญ็่ง่ฒ๏ผไธบ็คพไผๅๅบ่ดก็ฎใไธบไบๆดๅฅฝๅฐ็่งฃๅนถๅบ็จ่ฟไธ็น๏ผไฝ ๅฏไปฅ๏ผ- **ไบ่งฃ่กไธๅจๆ**๏ผๅ
ณๆณจ็นๅฎ้ขๅ็ไธไธๅๅฑใ- **ๅฎ่ทตไธๅๆ**๏ผ้่ฟ้กน็ฎๆๅฎไน ็งฏ็ดฏ็ป้ชใ- **่ไธๅๅฑ**๏ผ่ฏไผฐ่ชๅทฑ็้ฟๆ่ไธ่งๅใ- **ๆ็ปญๅญฆไน **๏ผไธๆญๆดๆฐ็ฅ่ฏ๏ผ้ๅบ่ๅบๅๅใ้่ฟ่ฟไบๆนๅ๏ผไฝ ๅฏไปฅๆดๅ
จ้ขๅฐ่ฎค่ฏ่ชๅทฑ๏ผๆพๅฐ้ๅ่ชๅทฑ็ๅๅฑ่ทฏๅพใ</answer>
[Q]: ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆฏๅฆไฝๆนๅคๅฐๅปบ็คผๆ็๏ผ
[A]: <think>ๅฏ๏ผ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆฏๅฆไฝๆนๅคๅฐๅปบ็คผๆ็ๅข๏ผ่ฟไธช้ฎ้ขๅฌ่ตทๆฅๆบๆๆๆ็๏ผๅฐคๅ
ถๆฏไปๅจใ็ไบบๆฅ่ฎฐใไธญ็่กจ่พพๆนๅผใ้ฆๅ
๏ผๆ้่ฆ็กฎ่ฎคไธไธใ็ไบบๆฅ่ฎฐใๅ
ทไฝๆฏ่ฐๅ็๏ผๆฏๅฆๆ็นๅฎ็ไบบ็ฉๆ่
ไบไปถใใ็ไบบๆฅ่ฎฐใๆฏ้ฒ่ฟ
ๅจ1924ๅนดๅไฝ็๏ผไธป่ฆ่ฎจ่ฎบไบ็คพไผ้ฎ้ข๏ผๅฐคๅ
ถๆฏๅฐๅปบ็คผๆ็้ฎ้ขใไฝ่
ๆน้ช่นๆฏไธช้ๅธธ่ๅ็ไฝๅฎถ๏ผไป็ไฝๅไธญๆ่ฎธๅคๅ
ณไบๅฐๅปบ็คผๆๅ้ถ็บงๆไบ็่ง็นใ่ฟ็ฑปไฝๅๅจๆๅญฆใๅฒๅญฆๅๆฟๆฒปไธ้ฝๆๅพๆทฑ่ฟ็ๅฝฑๅ๏ผๅฐคๅ
ถๆฏๅจ็คพไผ็ปๆๅไบบๆง็ๆน้ขใๆฅไธๆฅ๏ผๆ้่ฆไบ่งฃ้ฒ่ฟ
็ๅไฝ้ฃๆ ผใไป็ๅไฝ้ฃๆ ผๆฏ่พ็ดๆฅ๏ผๆไธฅ่็ๅฒๅญฆ่ง็น๏ผๅผบ่ฐไบบๆง็ๆฒๅงๅ้ๅพท็่ๆ ใไป็่ฏญ่จ้ฃๆ ผๆฏ่พๅฏๆ่ฏๆ๏ผๅฏๆ่ฑกๅพๆไน๏ผๅไบ่ฟ็จ่ฑกๅพๆๆณ๏ผๅๆถๅไธๅคฑ็ๅฎๅ็ฐๅฎไธปไนใไป็ไฝๅไธญๆๅพๅคๅ
ณไบ็คพไผ้ถ็บงๅ้ถ็บง็็พ็ๅๆ๏ผ่ฟไบ่ง็นๅฏ่ฝไธๅฝๆถ็็คพไผ็ฐๅฎไธ็ฌฆ๏ผๆไปฅๅจๆนๅคๅฐๅปบ็คผๆๆถ๏ผๅบ่ฏฅๅผบ่ฐ่ฟไบ็็พใ็ถๅ๏ผๆๆณๅฐใ็ไบบๆฅ่ฎฐใไธญๅฏนๅฐๅปบ็คผๆ็่ฎจ่ฎบใ้ฒ่ฟ
็ไฝๅไธญ๏ผๅฐๅปบ็คผๆ่ขซ่งไธบไธไบบ้็๏ผไฝ้่ฟๆๅญๅ่กๅจ๏ผ่กจ่พพไบไปๅฏนๅฐๅปบ็คผๆ็ไธๆปกๅๅๆใ่ฟไธไป
ๅๆ ไบๅฝๆถ็็คพไผ็ฐๅฎ๏ผไนๆญ็คบไบๅฐๅปบ็คผๆ็้ปๆ้ข๏ผไฝ็ฐไบๅฏนๅฐๅปบ็คพไผ็ไธๆปกๅๅฏนไบบๆง็ๆทฑๅปๅๆใๆฅไธๆฅ๏ผๆ้่ฆๆ่้ฒ่ฟ
ๅฏนๅฐๅปบ็คผๆ็็่งฃๅๆนๅคใไปๅจใ็ไบบๆฅ่ฎฐใไธญ๏ผๅฏนๅฐๅปบ็คผๆ็่ดจ็ๅๆนๅค๏ผไฝ็ฐไบไปๅฏนไผ ็ปๅฐๅปบ็คผๆ็ๅฆๅฎๅๆนๅคใ่ฟไธไป
ไป
ๆฏๅฏนๅฐๅปบ็คผๆ็่ดจ็๏ผๆดๆฏๅฏนๅฝๆถ็คพไผ็ๅๆ๏ผไปฅๅๅฏนไบบๆง็ๅ
ณๆณจใๆๅ๏ผๆ้่ฆๆป็ปไธไธ้ฒ่ฟ
ๅฏนๅฐๅปบ็คผๆ็ๆนๅคๅๆนๅคใไป้่ฟใ็ไบบๆฅ่ฎฐใไธญ็ๆๅญๅ่กไธบ๏ผๆนๅคไบๅฐๅปบ็คผๆ็่ๅๅไธๅ็๏ผไฝ็ฐไบๅฏน็คพไผ็ฐๅฎ็ๆทฑๅปๅๆใๅๆถ๏ผไปไนๅ
ณๆณจไบๅฐๅปบ็คผๆ็้ปๆ้ข๏ผๅๆ ไบๅฏนๅฐๅปบ็คพไผ็ไธๆปกๅๅฏนไบบๆง็ๅฆๅฎใๆป็ๆฅ่ฏด๏ผ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใ้่ฟๆๅญๅ่กๅจ๏ผๆนๅคไบๅฐๅปบ็คผๆ็่ๅๅไธๅ็๏ผไฝ็ฐไบๅฝๆถ็็คพไผ็ฐๅฎๅไบบๆง็ๅคๆใไป็ไฝๅๅฏนๅๆฅ็ๅฐๅปบ็คผๆๆไบๅฏ็คบ๏ผๅฏนๅฝๆถ็็คพไผ็ฐ่ฑกๆไบๆดๆทฑ็ๅๆใ</think><answer>้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆฏไธ้จๅๆ ๅฐๅปบ็คผๆ็ๆๅญฆไฝๅ๏ผไธป่ฆ้่ฟๆๅญๅ่กๅจๅๆ ไบๅฝๆถ็คพไผ็็ฐๅฎใ้ฒ่ฟ
็ๆๅญ้ฃๆ ผ็ฌ็น๏ผๅฏๆ่ฑกๅพๆไน๏ผไฝ้่ฟๆๅญๅ่กๅจ๏ผๆนๅคไบๅฐๅปบ็คผๆ็่ๅๅไธๅ็ใๅจไป็ไฝๅไธญ๏ผๅฐๅปบ็คผๆ่ขซ่งไธบไธไบบ้็๏ผไฝ้่ฟๆๅญๅ่กๅจ๏ผๅๆ ไบๅฐๅปบ็คพไผ็ไธๅ
ฌๅไบบๆง็ๆทฑๅปๅๆใ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใ้่ฟๆๅญๅ่กๅจ๏ผๆนๅคไบๅฐๅปบ็คผๆ็่ๅๅไธๅ็๏ผไฝ็ฐไบๅฝๆถ็คพไผ็ไธๆปกๅๅฏนไบบๆง็ๅๆใไป็ไฝๅไธไป
ๆนๅคไบๅฐๅปบ็คผๆ็่ๅๅไธๅ็๏ผ่ฟๆทฑๅปๆญ็คบไบๅฐๅปบ็คพไผ็้ปๆ้ขใ</answer>
[B]: <think>ๅฏ๏ผ็จๆท้ฎ็ๆฏ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๅฆไฝๆนๅคๅฐๅปบ็คผๆใ้ฆๅ
๏ผๆ้่ฆ็่งฃ้ฒ่ฟ
็็ๅนณๅไฝๅใใ็ไบบๆฅ่ฎฐใๆฏไธญๅฝ็ฐไปฃๆๅญฆ็็ปๅ
ธ๏ผไฝ่
ๆฏๆฏๆณฝไธ๏ผไฝๅๆถๅ็คพไผใๅฎถๅบญใไผฆ็็ญๅคไธชๅฑ้ขใๆ้่ฆๆพๅบ้ฒ่ฟ
็ๅไฝ้ฃๆ ผๅไธป้ข๏ผไปฅๅๅฎๅจๅฝๆถ็็คพไผ่ๆฏใๆฅไธๆฅ๏ผๆๅบ่ฏฅๅ้กพใ็ไบบๆฅ่ฎฐใ็ไธป่ฆๅ
ๅฎนใๆฏๆณฝไธๅจใ้ๆฅๆ ๆใไธญๆๅบไบ"็ไบบๆฅ่ฎฐ"่ฟไธๆฆๅฟต๏ผๅผบ่ฐ้ๆฅๆดปๆณผใๅๆขใๆญฃไน๏ผ่ฟๅจๅฝๆถ็คพไผไธญไป็ถๅ
ทๆ้่ฆๆไนใไป้่ฟๆ็ปไธปไบบๅ
ฌ็ไบบๆฅ่กจ่พพๅฏน็คพไผไธๅ
ฌ็ๆนๅค๏ผไฝๅๆถไนๆๅบไป็ๅไฝๅฏน็คพไผ็่ด้ขๅฝฑๅ๏ผๆฏๅฆ็คพไผๅจ่กๅไธชไบบไธปไน็ๅคฑ่ดฅใ็ถๅ๏ผๆๅบ่ฏฅๅๆ้ฒ่ฟ
็ๅไฝ็ๅฟตๅไธป้ขใใ็ไบบๆฅ่ฎฐใๅผบ่ฐไบ็คพไผ็้ปๆ้ข๏ผไธปๅผ "ไปฅไบบไธบๆฌ"ใ"ๅๅฏนๅฐๅปบ็คผๆ"็ญใไปๅฏ่ฝไนๅจๆข่ฎจ็คพไผไธๅนณ็ญ็้ฎ้ข๏ผๆฏๅฆ"ไบบๆงๅผฑ็น"ใ"ๆๅๆปฅ็จ"็ญ้ฎ้ขใ่ฟ่ฆ่่้ฒ่ฟ
็ๅ
ถไปไฝๅ๏ผๆฏๅฆใ้ฟQๆญฃไผ ใใใๆญปไบก่ฏ็คพใ็ญ๏ผ่ฟไบไฝๅ่ฝ็ถๆ็นๅคธๅผ ๏ผไฝไนๆๆทฑๅป็็คพไผๆนๅค๏ผๆฏๅฆๅฏน็คพไผ้ๅพท็่ดจ็ใๅๆถ๏ผไฝ่
ๅฏ่ฝ่ฟๆถๅๅ
ถไปไฝๅ๏ผๅฆใๅบไฝๅนดใ็ญ๏ผไฝ่ฟไบๅฏ่ฝๆดไพง้ไบๆๅญฆๅไฝ๏ผ่ไธๆฏ็คพไผๆนๅคใๅฆๅค๏ผ็จๆทๅฏ่ฝๆณ็ฅ้้ฒ่ฟ
ๅจๆๅญฆๅไฝไธญ็ๅ
ทไฝ็ปๅ๏ผๆฏๅฆไปๆฏๅฆๆไฝๅ่ขซๅนฟๆณๆน่ฏ๏ผๆ่
ไปๅฏน็คพไผ็ๆนๅคๆฏๅฆๅ
ทๆๆนๅคๆงใๆไปฅ๏ผๅ็ญๆถ้่ฆๆๅบ้ฒ่ฟ
็ๅไฝ็ปๅ๏ผไปฅๅไปๅฏน็คพไผ็ฐๅฎ็ๅๆใๆป็ปๆฅ่ฏด๏ผๆ้่ฆๅ็ญ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆนๅคๅฐๅปบ็คผๆ๏ผๅนถๅๆๅ
ถๅจๅฝๆถ็็คพไผ่ๆฏๅๆๅญฆไปทๅผ๏ผๅๆถๆๅบๅ
ถๅฏน็คพไผ็ๆนๅคๆงๆ่๏ผไปฅๅๅ
ถๅฏนๅไธ็ๅฝฑๅใ</think><answer>้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๆนๅคๅฐๅปบ็คผๆ๏ผไปฅๅ
ถ็ฌ็น็ๅไบ้ฃๆ ผๅๆทฑๅป็็คพไผๆนๅค็ฒพ็ฅ่็งฐ๏ผไธป่ฆไฝ็ฐๅจไปฅไธๅ ไธชๆน้ข๏ผ1. **็คพไผๆนๅคไธไธชไบบๆ้ฟ**๏ผๅฐ่ฏด้่ฟๆ็ปไธปไบบๅ
ฌ็ไบบ็ๆดปๆณผใๅๆขใๆญฃไน๏ผๆญ็คบ็คพไผ็ไธๅ
ฌๅๅผฑๅฟใ2. **ไธชไบบไธปไนไธ็คพไผๆนๅค**๏ผๅฐ่ฏดๅๆ ไบๅฐๅปบ็คผๆๅฏนไธชไบบ่ช็ฑๅๆๅฉ็ไพต็ฏ๏ผๅผบ่ฐไธชไบบๅฐไธฅๅๆญฃไน็ไปทๅผใ3. **ๅฏน็คพไผ็ๆนๅคๆงๆ่**๏ผ้่ฟๅฏน็คพไผไธๅ
ฌ็ๅป็ป๏ผๆญ็คบ็คพไผ้ฎ้ข็ๆ นๆบ๏ผๅนถๅฏนๅฝๆถ็คพไผ็ๆนๅคๆๅบฆ่ฟ่กๆนๅคใ้ฒ่ฟ
็ไฝๅๅจๅฝๆถ็็คพไผ่ๆฏๅๆๅญฆไปทๅผไฝฟๅ
ถๆไธบๅฝๆถๆๅญฆ็้่ฆไปฃ่กจใไป็ไฝๅไธไป
ๅจๅฝๆถๅนฟๅๆฌข่ฟ๏ผไนๅฏนๅไธไบง็ไบๆทฑ่ฟๅฝฑๅ๏ผ่ขซๅนฟๆณๅผ็จๅไผ ้ขใ</answer>
[C]: <think>ๅฏ๏ผ็จๆท้ฎ็ๆฏ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใๅฆไฝๆนๅคๅฐๅปบ็คผๆใ้ฆๅ
๏ผๆ้่ฆ็่งฃ้ฒ่ฟ
็่ๆฏๅๆ ธๅฟๆๆณใไปๅฏ่ฝๆฏไธไฝ็คพไผๅญฆๅฎถใๆๆณๅฎถ๏ผๆ่
ๆฏๅฏนไผ ็ปๆๅๆๆทฑๅๅ
ด่ถฃ็่ฏป่
ใ็ไบบๆฅ่ฎฐๆฏไปๅจใ็ไบบๆฅ่ฎฐใไธญๆๅ็๏ผๅฏ่ฝๅฏนไผ ็ปๆๅๆไธๅฎๅฝฑๅใๆฅไธๆฅ๏ผๆ่ฆ่่็จๆท็้ๆฑๆฏไปไนใ็จๆทๅฏ่ฝๆณ็ฅ้่ฟๆฌไนฆๅจ็ฐไปฃ็คพไผไธญ็ๅๆๆไน๏ผๆ่
ๆฏๅฆๆ็ธๅ
ณ็ ็ฉถๆฏๆ่ฟไธ็นใไนๆๅฏ่ฝไปไปฌๅฏนไนฆไธญ็ๆ
่ๆ็้ฎ๏ผๆณไบ่งฃๅฆไฝๆดๆทฑๅปๅฐ็่งฃ็คพไผ็ฐ่ฑกใ็ถๅ๏ผๆ้่ฆๆ่ๅฆไฝไปไธๅ็่งๅบฆ่งฃ่ฏป้ฒ่ฟ
็ๆๆฌใไพๅฆ๏ผๆฏๅฆๆ็ดๆฅ็ๅๅฒๅไบ๏ผๆ่
ๆฏๅฆๅญๅจๆดๆทฑๅฑๆฌก็ๅฒๅญฆๆ่๏ผ่ฟ้่ฆๆๅ
ไบ่งฃ้ฒ่ฟ
็ไธๅ่ง็น๏ผ็ถๅๅๆๅ
ถๆนๅคๆงใ่ฟ่ฆ่่็จๆทๅฏ่ฝ็ๆทฑๅฑ้ๆฑ๏ผๆฏๅฆๆฏๅฆ้่ฆไบ่งฃไปไฝไธบๆๅญฆๆนๅคๅฎถ็่ๆฏ๏ผๆ่
ๆฏๅฆๆๅฏนไผ ็ปไปทๅผ่ง็ๅๆใๅ ๆญค๏ผๅ็ญๆถ่ฆๅ
จ้ข๏ผๆถต็ๆ ธๅฟ้ฎ้ข๏ผๅนถๅผ็จ็ธๅ
ณ่ตๆๆฅๆฏๆ่ง็นใๆๅ๏ผๆป็ป้ฒ่ฟ
็่ง็น๏ผๅผบ่ฐๅ
ถๅฏน็ฐไปฃ็คพไผ็ๆนๅคๆงๆ่๏ผไปฅๅๅฏนไผ ็ปๆๅ็ๅฐ้ใ่ฟๆ ทๆขๅ
จ้ขๅๆๆทฑๅบฆ๏ผๅธฎๅฉ็จๆทๅ
จ้ข็่งฃ้ฒ่ฟ
็ไฝๅใ</think><answer>้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใ้่ฟๅ
ถ็ฌ็น็ๅไบๆๆณๅๆทฑๅป็็คพไผๆนๅค็ฒพ็ฅ๏ผๅฏนๅฐๅปบ็คผๆ่ฟ่กไบๆทฑๅป็ๆนๅคใไปฅไธๆฏๅ
ถๆนๅคๆงๅๆ๏ผ1. **็คพไผๆนๅคไธๅๅฒ็็ธ**๏ผๅฐ่ฏด้่ฟๅฏนๅๅฒไบบ็ฉ็ๅป็ป๏ผๆญ็คบๅฐๅปบ็คผๆ็ๅผ็ซฏ๏ผไปฅๅๅ
ถๅฏนไผ ็ป็คพไผ็ปๆ็ๅฒๅปใ่ฟ็งๆนๅคไธไป
้ไบๅฏน็ฐๅฎ็ๆทฑๅปๆนๅค๏ผไนๅๆ ไบ็ฐไปฃ็คพไผๅฏนไผ ็ปไปทๅผ่ง็้ๆฐๅฎก่งใ2. **ไธชไบบๅฝ่ฟไธ็คพไผๆนๅค**๏ผๅฐ่ฏดไธญ๏ผไธปไบบๅ
ฌ้่ฟ"็ไบบๆฅ่ฎฐ"ๆญ็คบไบๅฐๅปบ็คผๆๅฏนไธชไบบๅฝ่ฟ็ไธฅ้ๅฅๅคบใ่ฟ็งๅไบๆนๅผๆขๆนๅคไบๅฐๅปบ็คผๆ๏ผไนๅฏนๅไธไบง็ไบๆทฑ่ฟๅฝฑๅใ3. **ๅฏนๅไธ็ๅฝฑๅ**๏ผไปๆๅญฆๅไฝๅฐๆๆณ่งฃ่ฏป๏ผ้ฒ่ฟ
็ไฝๅๆทฑๅปๅฝฑๅไบๅไธ็ๆๆณไฝ็ณปใไพๅฆ๏ผใ็ไบบๆฅ่ฎฐใ้่ฟไบบ็ฉๅฝ่ฟ็ๅๆ ๏ผๅฏน็ฐไปฃ็คพไผ็ไปทๅผ่งๅฟตๆๅบไบๆฐ็ๆ่ใ4. **ๅฏน็ฐไปฃๆๆ็ๅๆ**๏ผ่ฟไธๆนๅคๆงๆ่ไธไป
ๅๆ ไบๅฝไปฃ็คพไผ็ๅคๆๆง๏ผไนไธบ็ฐไปฃไบบๆไพไบๅๆ็คพไผ็ฐๅฎใ็ปดๆคไบบๆ็่ง่งใ5. **ไธชไบบ่ง่งไธๆๅ่ง่ง**๏ผไฝ่
้่ฟ่ฟไธๆนๅคๆงๆ่๏ผๅฑ็ฐไบๅฏนไผ ็ปไปทๅผ่ง็้ๆฐ่งฃ่ฏป๏ผๅๆถไนๅฏนๅฝไปฃ็คพไผ็ๅคๅ
ๅ่ง่งไบง็ไบๅฏๅใ็ปผไธๆ่ฟฐ๏ผ้ฒ่ฟ
็ใ็ไบบๆฅ่ฎฐใไธไป
ๆฏๅฏนๅฐๅปบ็คผๆ็ๆนๅค๏ผๆดๆฏๅฏนไผ ็ปๆๅ็ไธ็งๆทฑๅปๅๆใๅฎ้่ฟๅฏนๅฐๅปบ็คผๆ็ๆนๅค๏ผๆๅบไบๅฏน็ฐไปฃ็คพไผ็ปๆใๆๅๅ
ณ็ณป็ๆทฑๅปๅๆ๏ผๅ
ทๆ้่ฆ็็คพไผไปทๅผใ</answer>
[A] MiniMind2 (0.1B)
[B] MiniMind2-MoE (0.15B)
[C] MiniMind2-Small (0.02B)
[D] minimind-v1-small(0.02B)
[E] minimind-v1-moe(0.1B)
[F] minimind-v1(0.1B)
[G] baby-llama2-chinese(0.2B)
[H] chatlm-mini-chinese(0.2B)
[Q]: ไฝ ็ฅ้้ฟๆฑๅ๏ผ
[A]: ้ฟๆฑ๏ผไฝไบไธญๅฝไธๅ้จ๏ผๆฏไธญๅฝ็็ฌฌไธ้ฟๆฒณ๏ผๅ
จ้ฟ6300ๅคๅ
ฌ้๏ผๆต็ป11ไธช็ไปฝ๏ผๆฏไธญๅฝๆ้ฟ็ๆฒณๆต๏ผไนๆฏไธญๅฝ็"ๆฏไบฒๆฒณ"ใ้ฟๆฑ็ๅๅฒๅฏไปฅ่ฟฝๆบฏๅฐๅ
ฌๅ
ๅ2000ๅคๅนด็ๅๆๆถๆ๏ผๅฝๆถ็ๅๆๆฏๅๆ็ๅ่ฃใๅๆๆถๆ๏ผ้ฟๆฑ็็ปๆตๅๅฑ่พพๅฐไบ้ซๅณฐ๏ผๆฏไธญๅฝๆ้่ฆ็ๅไธๅๅทฅไธไธญๅฟไนไธใ้ฟๆฑๆตๅ็็ปๆตไธป่ฆไปฅๅไธไธบไธป๏ผ้ฟๆฑๆธไธๅ ๆฎไบไธป่ฆไบงไธ๏ผๅฆ้้ฑผใ็้ฑผ็ญใ้ฟๆฑ็ๆฐด่ตๆบไน้ๅธธไธฐๅฏ๏ผๅ
ๆฌๆฒณๆตใๆนๆณใๆฒณๆต็ญใ้ฟๆฑ็่ช็ถๆฏ่งไนๅๅๅฃฎ่ง๏ผ้ฟๆฑๅๅญฃๆฏ่ฒๅๅผ๏ผๆฅๅญฃๅค้จ๏ผๅคๅญฃๅค้จ๏ผ็งๅญฃๅๅค้จ๏ผๅฌๅญฃๅๅฏๅทๅค้ช๏ผๆฅๅญฃๅ็งๅญฃ้ฝๆ็พไธฝ็่ฑๆตๅๆๅฎใ้ฟๆฑๆฏไธญๅฝ็็ปๆตไธญๅฟ๏ผๆฅๆไผๅค็ๅฝๅฎถๅๅๅธ๏ผๆฏไธ็ไธ้่ฆ็ไบค้ๆข็บฝๅ่ช่ฟไธญๅฟใๅๆถ๏ผ้ฟๆฑ่ฟๆฏไธญๅฝ็้่ฆๆฐดๅฉ่ตๆบ๏ผๅฏนไบไธญๅฝ็็ปๆตๅๅฑๅ
ทๆ้่ฆๆไนใ
[B]: ๆฏ็๏ผๆ็ฅ้้ฟๆฑใ้ฟๆฑไฝไบไธญๅฝ็ไธญ้จ๏ผๆฏไธญๅฝ็ฌฌไธ้ฟ็ๆฒณๆต๏ผๅ
จ้ฟ็บฆ6300ๅ
ฌ้๏ผๆต็ปๆฑ่ฅฟ็ใๅฎๅพฝ็ใๆฑ่็ใๅฎๅพฝ็ใๆฑ่็ๅๅฎๅพฝ็ใ
[C]: ๅฝ็ถ๏ผ้ฟๆฑๆฏไธญๅฝๆ้ฟ็ๆฒณๆต๏ผๅ
จ้ฟ็บฆ6300ๅ
ฌ้ใๅฎไปฅๅ
ถไธฐๅฏ็ๆฐด่ตๆบใไธฐๅฏ็ๆฐด็ๅจๆค็ฉ่ตๆบไปฅๅ็ฌ็น็ๅฐ็ไฝ็ฝฎ่้ปๅไบไธใ
[D]: ๆฏ็๏ผ้ฟๆฑๆฏไธญๅฝๆ้ฟ็ๆฒณๆต๏ผๅ
จ้ฟ่ถ
่ฟ3300ๅ็ฑณใ
[E]: ้ฟๆฑๆฏไธญๅฝๆ้ฟ็ๆฒณๆต๏ผๆป้ฟๅบฆ็บฆไธบ6300ๅ
ฌ้ใๅฎๅๆบไบ้่้ซๅ็้ๆตทๆน๏ผๆต็ป้ๆตทใๅๅทใ็่ใๅฎๅคใๅ
่ๅคใ้่ฅฟๅๅฑฑ่ฅฟใ้ฟๆฑๆตๅๆฏไธญๅฝๆๅคง็ๅไธๅบไนไธ๏ผไนๆฏไธญๅฝ็ๆๅๅ็ปๆตไธญๅฟใ
[F]: ๆฏ็๏ผ้ฟๆฑๆฏไธญๅฝๆ้ฟ็ๆฒณๆตไนไธ๏ผไนๆฏไธ็็ฌฌไธๅคงๆฒณๆตใ้ฟๆฑๅๆบไบ้่้ซๅ๏ผๆต็ป11ไธช็ไปฝ๏ผๆ็ปๆณจๅ
ฅไธๆตทใ้ฟๆฑๆตๅๆฏไธญๅฝๆๅคง็ๆฒณๆตๆตๅไนไธ๏ผๆฅๆ็ไธฐๅฏ็่ช็ถ่ตๆบๅๆๅ้ไบง๏ผๅฆ้ฟๆฑๅคงๆกฅใ้ฟๆฑๆตทๆดๅ็ฉ้ฆใ้ฟๆฑๅคๅ็ญใ
[G]: ๅๆถไน็ฅ้๏ผไธญๅฝๆฏไธ็ไธๆ้ฟ็ๅๅธไนไธ๏ผๆฅๆ่ถ
่ฟ3400ไธไบบๅฃใ
[H]: ๆฏ็๏ผ้ฟๆฑๆฏไธญๅฝๆ้ฟ็ๆฒณๆต๏ผไนๆฏไธ็ไธๆ้ฟ็ๆฒณๆตไนไธใๅฎๅๆบไบ้่้ซๅ๏ผๆต็ปไนไธช็ๅบ๏ผๆ็ปๆณจๅ
ฅไธๆตทใ้ฟๆฑๆตๅ็ๆฐๅๆธฉๅ๏ผๅๅญฃๅๆ๏ผๆฏไธญๅฝ้่ฆ็ๅไธๅๅทฅไธๅบๅฐใ้ฟๆฑๆตๅ็ๆฐดไบง่ตๆบไธฐๅฏ๏ผๆฏไธญๅฝ็้่ฆๆธไธ่ตๆบไนไธใ
[Q]: ไธ็ไธๆ้ซ็ๅฑฑๅณฐๆฏไปไน๏ผ
[A]: ไธ็ไธๆ้ซ็ๅฑฑๅณฐๆฏ็ ็ฉๆ็ๅณฐ๏ผMount Everest๏ผ๏ผไฝไบๅ้ฉฌๆ้
ๅฑฑ่๏ผๅฐผๆณๅฐๅไธญๅฝ็่พน็ไธใๅฎ็ๆตทๆ้ซๅบฆๆฏ8,848.86็ฑณ๏ผ29,031.7่ฑๅฐบ๏ผ๏ผๆฏๅฐ็ไธๆ้ซ็ๅฑฑๅณฐใ
[B]: ็ ็ฉๆ็ๅณฐ๏ผMount Everest๏ผๆฏไธ็ไธๆ้ซ็ๅฑฑๅณฐ๏ผๆตทๆ้ซๅบฆ่พพ8,848็ฑณ๏ผ29,029่ฑๅฐบ๏ผใ
[C]: ็ ็ฉๆ็ๅณฐๆฏไธ็ไธๆ้ซ็ๅฑฑๅณฐ๏ผไฝไบๅ้ฉฌๆ้
ๅฑฑ่๏ผๆตทๆ8,848.86็ฑณ๏ผ29,031.7่ฑๅฐบ๏ผใๅฎไฝไบๅฐผๆณๅฐๅไธญๅฝ็่พน็ไธ๏ผๆฏๅ้ฉฌๆ้
ๅฑฑ่็ไธ้จๅใ
[D]: ไธ็ไธๆ้ซ็ๅฑฑๅณฐๆฏ็ ็ฉๆ็ๅณฐ๏ผไฝไบๅฐผๆณๅฐๅไธญๅฝ็่พนๅขไธ๏ผๆตทๆ8848็ฑณใ
[E]: ไธ็ไธๆ้ซ็ๅฑฑๅณฐๆฏ็ ็ฉๆ็ๅณฐ๏ผไฝไบๅ้ฉฌๆ้
ๅฑฑ่๏ผๆตทๆ8,848็ฑณใ
[F]: ็ ็ฉๆ็ๅณฐๆฏไธ็ไธๆ้ซ็ๅฑฑๅณฐ๏ผๆตทๆ8848็ฑณใ
[G]: ไธ็ไธๆ้ซ็ๅฑฑๅณฐๆฏ็ ็ฉๆ็ๅณฐ๏ผไฝไบๅ้ฉฌๆ้
ๅฑฑ่๏ผๆตทๆ8,848.86็ฑณ๏ผ29,031.69่ฑๅฐบ๏ผใ
[H]: ไธ็ไธๆ้ซ็ๅฑฑๅณฐๆฏ็ ็ฉๆ็ๅณฐ๏ผไน็งฐไธบ่จๅ ็ๅก๏ผไฝไบๅ้ฉฌๆ้
ๅฑฑ่็ๅฐผๆณๅฐๅไธญๅฝ่พนๅขไน้ด๏ผๆตทๆ8,848.86็ฑณ๏ผ29,031.69่ฑๅฐบ๏ผใๅฎๆฏไธ็ไธๆ่ๅ็็ปๅฑฑ็ฎๆ ไนไธ๏ผๅธๅผ็ๆฅ่ชไธ็ๅๅฐ็็ปๅฑฑ่
ๅๆฅๆๆใ็ ็ฉๆ็ๅณฐ็ๅๅญๆฅ่ช่่ฏญ๏ผๆๆๆฏ"ๅฅณ็ฅ็้ขๅณฐ"๏ผๅฎๆฏ็ฑไธคไธชไธๅ็ๅฑฑๅณฐ็ปๆ็๏ผๅ
ถไธญไธไธชๆฏไฝไบๅฐผๆณๅฐ็็ ็ฉๆ็ๅณฐ๏ผๅฆไธไธชๅไฝไบไธญๅฝใๅฎ็้ซๅบฆๆฏ้่ฟๆต้ๆตทๆ้ซๅบฆๆฅ็กฎๅฎ็๏ผๅ ไธบๅฎๆฏ้่ฟๆต้ๅฐ็็ๅนณๅ้ซๅบฆๆฅ็กฎๅฎ็ใๅฐฝ็ฎก็ ็ฉๆ็ๅณฐๆฏไธ็ไธๆ้ซ็ๅฑฑๅณฐ๏ผไฝๅฎๅนถไธๆฏๅฐ็ไธไปปไฝๅ
ถไปๅฐๆน้ฝ่ฝๅฐ่พพ็ใๅฐ็ไธ็ๅ
ถไปๅฐๆน๏ผๅฆๅ็พๆดฒ็ๅฎ็ฌฌๆฏๅฑฑ่๏ผไนๆฏไธ็ไธๆ้ซ็ๅฑฑ่๏ผไฝๅฎๅนถไธๆฏๅฐ็ไธๆ้ซ็ๅฑฑๅณฐใๆปไน๏ผ็ ็ฉๆ็ๅณฐๆฏไธ็ไธๆ้ซ็ๅฑฑๅณฐ๏ผไฝๅฎๅนถไธๆฏๅฐ็ไธไปปไฝๅฐๆน้ฝ่ฝๅฐ่พพ็ใๅฎๆฏๅฐ็ไธๆ้ซ็ๅฑฑ่๏ผไฝๅฎๅนถไธๆฏๅฐ็ไธไปปไฝๅฐๆน้ฝ่ฝๅฐ่พพ็ใ
[Q]: ่ฐๆๅบไบไธๆๅผๅๅฎๅพ๏ผ
[A]: ไธๆๅผๅๅฎๅพๆฏ็ฑ็้กฟๅจ17ไธ็บชๆๅบ็๏ผๆฏ็้กฟไธๅคงๅฎๅพไนไธใ็้กฟๅจ17ไธ็บชๆๅบ็ไธๆๅผๅๅฎๅพๆญ็คบไบไธๆๅผๅๅฎๅพ็ๆฌ่ดจ๏ผๅนถ่งฃ้ไบ่กๆใๅซๆใๅฝๆๅๅ
ถไปๅคฉไฝไน้ด็ๅผๅ็ธไบไฝ็จใ่ฟไธ็่ฎบๆฏ็ฑ็้กฟๅจ1687ๅนดๆๅบ็ใ้่ฟๅๆๅๅฎ้ช๏ผไปๆๅๅฐ่งฃ้ไบๅคฉไฝไน้ด็ๅผๅ็ธไบไฝ็จ๏ผไป่่งฃ้ไบๅฐ็็ปๅคช้ณๅ
ฌ่ฝฌ็็ฐ่ฑกใ
[B]: ไธๆๅผๅ๏ผไบบ็ฑปๆฟ็ญ๏ผๆฏ็้กฟไธๅคงๅๅญฆๅฎๅพไนไธ๏ผ็จไบๆ่ฟฐไธคไธช็ฉไฝไน้ด็็ธไบไฝ็จใๅฎๅ
ๆฌไธๆๅผๅๅฎๅพๅ็้กฟ็ฌฌไธๅฎๅพ๏ผๆฏๆงๅฎๅพ๏ผใไธๆๅผๅๅฎๅพๆฅๆบไบไธคไธช็ฉไฝไน้ด็็ธไบไฝ็จ๏ผๅ
ถ่ดจ้ใ่ท็ฆปๅ้ๅบฆๅณๅฎไบๅฎไปฌไน้ด็็ธไบไฝ็จใ่ฟ็ง็ธไบไฝ็จๆฏ๏ผ่ดจ้็ไน็งฏ๏ผ่ดจ้็ไน็งฏๆฏไธๆๅผๅๅฎๅพๅ็้กฟ็ฌฌไบๅฎๅพ็ไน็งฏใ่ดจ้็ไน็งฏ๏ผ่ดจ้็ไน็งฏๆฏไธคไธช็ฉไฝไน้ด็็ฉ็่ฟ็จ๏ผไธคไธช็ฉไฝไน้ด็็ธไบไฝ็จใๅฏนไบๅ
ถไป็ฉไฝ๏ผๅฎไปฌ็่ดจ้ๅฏไปฅ่กจ็คบไธบไธคไธช็ฉไฝไน้ด็่ดจ้ไนๅ๏ผๅณๅผๅๅ ้ๅบฆaใ
[C]: ไธๆๅผๅๆฏ็้กฟๅจ1687ๅนดๆๅบ็็ฉ็ๆฆๅฟต๏ผๆ่ฟฐไบ็ฉไฝไน้ด็ๅผๅ็ธไบไฝ็จใ
[D]: ไธๆๅผๅๆฏ็ฑ่ฑๅฝ็ฉ็ๅญฆๅฎถ็้กฟๆๅบ็ใไป็ธไฟกๆๆ็ฉไฝ้ฝไผไบง็ๅผๅ๏ผ่ฟ็งๅผๅๆฏ็ฑ็ฉไฝ็่ดจ้ๅ่ท็ฆปๅณๅฎ็ใ่ฟไธ็่ฎบๆญ็คบไบ่ดจ้ๅ่ท็ฆปไน้ด็ๅ
ณ็ณป๏ผๅนถ่ฏๆไบไธๆๅผๅๅฎๅพ็ๆฌ่ดจใ
[E]: ไธๆๅผๅๆฏ็ฑ็้กฟๅจ1687ๅนดๆๅบ็๏ผๅฎๆฏๅฎๅฎไธญ็ไธไธชๅบๆฌ็ฉ็็ฐ่ฑก๏ผๆ่ฟฐไบ็ฉไฝไน้ด็็ธไบไฝ็จใ่ฟ็งๅ่ขซ็งฐไธบไธๆๅผๅ๏ผๅญๅจไบๆๆ็ฉไฝไน้ด๏ผ่ฟ็งๅไธ็ฉไฝ็่ดจ้ๅ่ท็ฆปๆๅ
ณใไธๆๅผๅๆฏ่ช็ถ็ไธญๆๅบๆฌ็ๅไนไธ๏ผไธไป
ๅฝฑๅ็ฉไฝ็่ฟๅจๅๅๅ๏ผ่ไธๅฏนๅฎๅฎ็็ปๆๅๆผๅไนๆ้่ฆๅฝฑๅใ
[F]: ไธๆๅผๅๆฏ็ฑ่ฑๅฝ็ฉ็ๅญฆๅฎถ็้กฟๅจ17ไธ็บชๆๅบ็ใ
[G]: ๅผๅๆฏๅฎๅฎไธญ็ฑ่ดจ้ๅ่ฝ้็ปๆ็ๅใๆ นๆฎ็้กฟ็ไธๆๅผๅๅฎๅพ๏ผไธไธช็ฉไฝ็ๅผๅไธๅฎ็่ดจ้ๅ่ท็ฆปๆๆญฃๆฏใๅ ๆญค๏ผ็้กฟ็ไธๆๅผๅๅฎๅพ่กจๆ๏ผไธไธช็ฉไฝ็ๅผๅไธๅฎ็่ดจ้ๅ่ท็ฆปๆๆญฃๆฏใ่ฟไธๅฎๅพๅจ็ฉ็ๅญฆใๅคฉๆๅญฆๅ็ฉ็ๅญฆไธญ้ฝๆๅนฟๆณ็ๅบ็จใ
[H]: ไธๆๅผๅๆฏ็ฑ่ฑๅฝ็ฉ็ๅญฆๅฎถ็้กฟๅจ1687ๅนดๆๅบ็ใไปไบ1687ๅนดๅ่กจไบไธ็ฏ่ๅ็่ฎบๆใ่ช็ถๅฒๅญฆ็ๆฐๅญฆๅ็ใ๏ผๆๅบไบไธๆๅผๅๅฎๅพ๏ผๆๅบไปปไฝไธคไธช็ฉไฝไน้ด้ฝๅญๅจๅผๅ๏ผ่ฟ็งๅผๅไธๅฎไปฌ็่ดจ้ๅ่ท็ฆป็ๅนณๆนๆๅๆฏใ่ฟไธๅฎๅพ่ขซ็งฐไธบไธๆๅผๅๅฎๅพ๏ผๆ่ฟฐไบ่ดจ้ๅ่ท็ฆปไน้ด็ๅ
ณ็ณปใๅฎๆๅบไธคไธช็ฉไฝไน้ด็ๅผๅไธๅฎไปฌ็่ดจ้ๅ่ท็ฆป็ๅนณๆนๆๅๆฏใ่ฟไธๅฎๅพๅฏนไบ่งฃ้่ฎธๅค็ฐ่ฑกๅๅฎๅฎไธญ็็ธไบไฝ็จ้ๅธธ้่ฆ๏ผไพๅฆ่กๆ็ปๅคช้ณๅ
ฌ่ฝฌใๆๆไน้ด็ๅผๅ้้ๆๅบ็ญใๅฎไนๅจๅคฉๆๅญฆใ็ฉ็ๅญฆๅๅทฅ็จๅญฆ้ขๅๅพๅฐไบๅนฟๆณๅบ็จ๏ผไธบๆไปฌ็่งฃ่ช็ถๅๅฎๅฎ็ๆฌ่ดจๅๆผๅๆไพไบ้่ฆ็็่ฎบๅบ็กใ
[Q]: ไฝ ็ฅ้ๅคง็็ซ็ไธป่ฆ้ฃ็ฉๆฏไปไนๅ๏ผ
[A]: ๅคง็็ซไธป่ฆไปฅ็ซนๅญไธบ้ฃ๏ผไฝไนๅๅ
ถไปๆค็ฉใๆ่ซใๅฐๅๅบไนณๅจ็ฉๅ้ฑผใๅฎไปฌ็ๆถๅ็ณป็ปไธ็็ธไผผ๏ผ่ฝๅคๆถๅ็ซนๅญใๅคง็็ซๆ้ๅฉ็็้ฝฟ๏ผ้ๅๅๅผ็ซนๅญ๏ผๆไปฅๅฎไปฌ้ๅธธ่ขซ็งฐไธบ"็ซนๅญๅจ็ฉ"ใ
[B]: ๅคง็็ซๆฏ่้ฃๅบไนณๅจ็ฉ๏ผไปฅ็ซนๅญไธบ้ฃ๏ผไนๆฏ่้ฃๅจ็ฉใๅฎไปฌ็ไธป่ฆๆฏ็ซนๅญ๏ผๅฐคๅ
ถๆฏๅฏๅซ็บค็ปด็ด ๅ็ฟ็ฉ่ดจ็็ซนๅญ๏ผ่ฟไบ็ซนๅญไธไผ็ดๆฅ่ฟๅ
ฅๆถๅ็ณป็ปใๅคง็็ซ็่ ้ไธป่ฆ็ฑ็ซนๅญ็ปๆ๏ผ้่ฆๆถๅ็บค็ปด็ด ๅๅ
ถไป็บค็ปดๅจ็ซนๅญไธญไปฅๆฏๆๆญฃๅธธๅๅ
ปใ
[C]: ๅคง็็ซไธป่ฆไปฅ็ซนๅญไธบ้ฃ๏ผไฝไนๅๅ
ถไปๆค็ฉ๏ผๅ
ๆฌๅถๅญใๅซฉ่ฝใๆ่ซใๆฐดๆใ่ฌ่ๅๅฐๅๅบไนณๅจ็ฉใๅคง็็ซๆฏไธญๅฝ็นๆ็๏ผๅฑไบ็็ง๏ผไธป่ฆๅๅธๅจๅๅทใ้่ฅฟๅ็่ๅฐๅบใ
[D]: ๅคง็็ซ็ไธป่ฆ้ฃ็ฉๆฏ็ซนๅญใๅฎไปฌ้ๅธธๅ็ซนๅญ๏ผๆฏๅคฉ้่ฆๅๅคง็บฆ30ๅ
ฌๆค็็ซนๅญใ
[E]: ๆฏ็๏ผๅคง็็ซไธป่ฆไปฅ็ซนๅญไธบ้ฃใๅฎไปฌ้่ฆๆฏๅคฉๅๅคง้็็ซนๅญๆฅ็ปดๆ็ๅฝ๏ผๆฏๅคฉ้่ฆๅ40ๅฐ80ๅ
ฌๆค็็ซนๅญใๆญคๅค๏ผๅฎไปฌ่ฟๅไธไบๅ
ถไปๆค็ฉ๏ผๅฆ่ใๆฐดๆใๅๆๅๅฐๅๅบไนณๅจ็ฉใ
[F]: ๅคง็็ซไธป่ฆไปฅ็ซนๅญไธบ้ฃ๏ผไฝๅถๅฐไนไผๅๅ
ถไปๆค็ฉๅๅจ็ฉใๆญคๅค๏ผๅคง็็ซ่ฟๅไธไบ้็ๆฐดๆใๅฐๅๅจ็ฉๅๆค็ฉ๏ผไฝ่ฟไบๅนถไธๆฏๅฎไปฌ็ไธป่ฆ้ฃ็ฉๆฅๆบใ
[G]: ๅคง็็ซ็ไธป่ฆ้ฃ็ฉๆฏ็ซนๅญใ
[H]: ๅคง็็ซๆฏๆค็ฉๆงๅจ็ฉ๏ผไธป่ฆ้ฃ็ฉๆฏ็ซนๅญใๅฎไปฌ็่ ้็ปๆ้ๅๆถๅๅฏๅซ็บค็ปด็ด ็็ซนๅญ๏ผไฝๅฎไปฌไนๅไธไบๅ
ถไปๆค็ฉ๏ผๅฆ่ๆฌๆค็ฉๅๅฐๅๅบไนณๅจ็ฉใๅคง็็ซ็่ ้็ปๆไน้ๅบไบ้ซ็บค็ปด็ซนๅญ๏ผไฝฟๅฎไปฌ่ฝๅคๆถๅๅคง้็็บค็ปด็ด ๏ผๅธฎๅฉๅฎไปฌๅจ้ๅค็ๅญใๅคง็็ซ็่ ้ไธญไนๅซๆไธ็งๅซๅ"็บค็ปด็ด ้
ถ"็้
ถ๏ผๅฏไปฅๅธฎๅฉๅคง็็ซๅ่งฃ็บค็ปด็ด ๏ผๅธฎๅฉๅฎไปฌๆถๅๅคง้็ๆฐดๅ่ฅๅ
ป็ฉ่ดจใๆญคๅค๏ผๅคง็็ซ็่ ้ไธญไนๅซๆไธ็งๅซๅ"็บค็ปด็ด ่็ฝ"็่็ฝ่ดจ๏ผๅฏไปฅๅธฎๅฉๅคง็็ซ็ปดๆ่บซไฝ่ฝ้ๆฐดๅนณ๏ผๅธฎๅฉๅฎไปฌๅจ้ๅค็ๅญใๆปไน๏ผๅคง็็ซ็ไธป่ฆ้ฃ็ฉๆฏ็ซนๅญ๏ผไฝๅฎไปฌไนๅไธไบๅ
ถไปๆค็ฉ๏ผๅฆ่ๆฌๆค็ฉๅๅฐๅๅบไนณๅจ็ฉใ
[Q]: ไธบไปไนๆตทๆฐดๆฏๅธ็๏ผ
[A]: ๆตทๆฐดๆฏๅธ็ไธป่ฆๆฏๅ ไธบๅฎ็ๅๅญฆๆๅใๆตทๆฐดๅซๆๅคง้็็ฟ็ฉ่ดจๅ็ๅ๏ผไธป่ฆๆๅๆฏ็กซ้
ธ็ใ็ขณ้
ธ็ใ้็ฆปๅญๅ้พ็ฆปๅญใ่ฟไบ็ฉ่ดจๅจ้ซๆตๅบฆไธไผๅจๆตทๆฐดไธญๆฒๆท๏ผๅฝขๆๆตทๆฐดใๅ
ทไฝๆฅ่ฏด๏ผๆตทๆฐดไธญ็ฟ็ฉ่ดจๅ็ๅไธป่ฆๆฅ่ชๅฒฉ็ณใๅๅฃคใ็็ฉๅไบบ็ฑปๆๆณ็ฉใๅฒฉ็ณๆฏๆตทๆฐด็็ปๆ้จๅ๏ผไธป่ฆ็ฑ็ณ่ฑใ้ฟ็ณใไบๆฏ็ญ็ฟ็ฉ่ดจ็ปๆใๅๅฃคไธญๅซๆๅคง้็ๅๅญฆ็ฉ่ดจ๏ผๅฆๆฐฎใ็ฃทใ้พ็ญ๏ผ่ฟไบๅๅญฆ็ฉ่ดจไผๆธๅ
ฅๅๅฃค๏ผๅฝขๆๅๅฃคใ็็ฉๆๆณ็ฉไธญ็็ๅไธป่ฆๆฅ่ชๆค็ฉๅถ็ปฟ็ด ๅๅ
ถไป่ฒ็ด ๏ผ่ฟไบ่ฒ็ด ๅธๆถ้ณๅ
ๅนถๅฐๅ
ถ่ฝฌๅไธบ่ฝ้๏ผไพ็็ฉไฝฟ็จใไบบ็ฑปๆๆณ็ฉไธญ็็ๅไธป่ฆๆฅ่ช็ฟ็ฉ่ดจๅ็ขณ้
ธ็๏ผ่ฟไบ็ฟ็ฉ่ดจๅจๆฐดไธญ้ซๆตๅบฆๅญๅจ๏ผๅฏผ่ดๆฐดไธญๆบถ่งฃ็ฟ็ฉ่ดจๆตๅบฆๅขๅ ๏ผๅฝขๆๆตทๆฐดใๅ ๆญค๏ผๆตทๆฐดๆฏๅธ็ไธป่ฆๆฏๅ ไธบๅฎ็ๅๅญฆๆๅๅ็ปๆ็นๅพใ็ฟ็ฉ่ดจๅ็ๅๅจๆตทๆฐดไธญไธป่ฆๆฅ่ชๅฒฉ็ณใๅๅฃคใ็็ฉๅไบบ็ฑปๆๆณ็ฉ๏ผ่ฟไบ็ฉ่ดจๅจๆตทๆฐดไธญ็งฏ็ดฏๅๆๆณ๏ผๅฏผ่ดๆตทๆฐดๅๅธใ
[B]: ๆตทๆฐดๆฏๅธ็๏ผๅ ไธบๅฎๅซๆๅค็ง็ฉ่ดจ๏ผๅ
ๆฌๆฐฏๅ้ ๏ผNaCl๏ผใๆฐฏๅ้ ๏ผNaCl๏ผใ็ขณ้
ธ็๏ผๅฆ็กซ้
ธ็๏ผใๆฐฏๅ้ ๏ผNaCl๏ผๅๆฐดใๅธ็ฉ่ดจ็ๆฅๆบ๏ผ็ๆฏไธ็งๅธธ่ง็ๅธๅณๆฅๆบ๏ผๅซๆ้พใ้ใ้ใ้พๅๅ
ถไป็ฟ็ฉ่ดจใ่ฟไบ็ฟ็ฉ่ดจ้ๅธธๆฅ่ชๅฐไธๆฐดใๅฐไธๆฐดๆๅๅฃค๏ผๆตๅบฆ่ฟไฝไบ็บฏๆฐดใๅธๅณ็ๅๅ ๏ผๅธๅณไธป่ฆๆฅ่ชๆฐดไธญ็ๅฐ้ข็ฒ็ใ่ฟไบๅฐ้ข็ฒไธป่ฆ้่ฟๆค็ฉๆ น้จๅๅจ็ฉไฝๅ
็ๅพฎ็็ฉไผ ๆญ๏ผๅฆๆ่ซใๅฐๅๅบไนณๅจ็ฉใ้ธ็ฑปๅๆไบๆ่ซใๆปไน๏ผๆตทๆฐดๆฏๅธ็๏ผๅ ไธบๅฎๅซๆๅคง้็็ๅ๏ผๅ
ๆฌ็ฟ็ฉ่ดจใๅฒฉ็ณใ็ใ็ฟ็ฉ่ดจ็ญ๏ผ่ฟไบ็ฉ่ดจๅจๆตทๆฐดไธญ้ซๆตๅบฆๅญๅจ๏ผๅฏนๅธๅณไบง็้่ฆๅฝฑๅใ
[C]: ๆตทๆฐดๆฏๅธ็ไธป่ฆๆฏๅ ไธบๅฎๅซๆๅ็ง็ๅ๏ผๆตทๆฐดๆฏๅ
ถไธญไธป่ฆๆๅไนไธใๅฝๆตทๆฐดๅซๆๅคง้็ๅๆถ๏ผ่ฟไบ็ๅๆบถ่งฃๅจๆตทๆฐดไธญๅฝขๆๅธๅณใๆตทๆฐดไธญ็ๅไธป่ฆๆฅ่ชๆบถ่งฃ็ๅใ่ธๅๆฒๆทๅๅฐๅปๆตทๆฐดๅฝขๆ็็ๅใ
[D]: ๆตทๆฐดไธญๅซๆ่ฎธๅค็ๅ๏ผ่ฟไบ็ๅๅฏไปฅๅขๅ ๆตทๆฐด็ๅธๅบฆใๆตทๆฐดไธญ็ๅไธป่ฆๆฅ่ชๆตทๆฐดไธญๆบถ่งฃ็็ๅ๏ผ่ฟไบ็ๅๅฏไปฅไปๆตทๆฐดไธญ่ทๅพใๆฐงๅ็ฉๅๆตทๆฐดไธญ็ๅๅฏไปฅไธๆตทๆฐดไธญ็ๅๅฝขๆๆฐข้ฎ๏ผไป่ๅขๅ ๆตทๆฐด็ๅธๅบฆใ
[E]: ๆตทๆฐดๆฏๅธ็๏ผๅ ไธบๅฎๅซๆๅคง้็็ๅ๏ผๅ
ๆฌๆฐฏ็ฆปๅญๅๆฐฏ็ฆปๅญใ่ฟไบ็ฆปๅญๅจๆตทๆดไธญๅฝขๆๅคง้็ๅ๏ผ็งฐไธบ็ใๆตทๆฐดไธญๅซๆ่ฎธๅคๆบถ่งฃ็็ๅ๏ผ่ฟไบ็ๅ้็ๆตทๆฐด็ไธๅ่่ธๅ๏ผๆ็ปๅฏผ่ดๆตทๆฐดไธญ็ๅ่ธๅใ่ฟไบ็ๅๅฎๅ
จ่ขซๆตทๆฐดๆถ่๏ผ็ถๅไปๆตทๆฐดไธญๆ้คใๆญคๅค๏ผๆตทๆฐดไธญ่ฟๅซๆ่ฎธๅคๅ
ถไป็ๅ๏ผไฝ่ฟไบ็ๅไธๅ๏ผๅ ไธบๅฎไปฌ็ๆตฎๅจๅไธๆฒ่ฟ็จไธๅใๆตทๆฐดไธญๆๅ็็ๅๆฅ่ชๆตทๅบ็ๅฒฉ็ณ๏ผ่ฟไบ็ๅๅจๆตทๆฐดไธญๅฏๅฉ็จใๆปไน๏ผๆตทๆฐดๆฏๅธ็๏ผๅ ไธบๆตทๆฐดไธญๅซๆ่ฎธๅค็ๅๅ็ๅใ
[F]: ๆตทๆฐดไธญๅซๆ่ฎธๅคๆบถ่งฃ็็ๅ๏ผๅ
ถไธญๆไธป่ฆ็ๆฏๆฐฏๅ้ ใๅฝ็ๅ ๅ
ฅๆฐดไธญๆถ๏ผ็ๅๅญไธๆฐดๅๅญๅๅบๅฝขๆๆฐขๆฐงๅ้ ๏ผ่ฟๆฏไธ็ง็ใ
[G]: ๅ ไธบ่ฎธๅค็็ฉ้่ฆๆฐดๆ่ฝ็ๅญ๏ผๅฎๅฏไปฅ้่ฟๅธๆถๅ้ๆพไบๆฐงๅ็ขณใ้ๆพๆฐงๆฐใไฟๆๅคงๆฐไธญ็ๆฐด่ธๆฐใไฟๆๆฐดๅพช็ฏๆฅๅฎ็ฐใๆฐดไธญ็็ๅๅๅๅญฆ็ฉ่ดจ้ๆพๆฐงๆฐ๏ผไฝฟๅฐ็ไธ็็็ฉ่ฝๅคๅผๅธใๆญคๅค๏ผๆฐด่ฟๆ่ฎธๅคๅ
ถไปๅ่ฝ๏ผๅฆไฟๆๆฐดๅพช็ฏใ่ฐ่ๆฐๅๅ็ฏๅข็ญใๆฐดๅฏน่ฎธๅค็็ฉ็็ๅญ่ณๅ
ณ้่ฆ๏ผไนๆฏ่ฎธๅค่ช็ถ็ฐ่ฑก็้่ฆๅบ็กใ
[H]: ๆตทๆฐดๆฏๅธ็ไธป่ฆๆฏๅ ไธบๅฎๅซๆๅคง้็ๆบถ่งฃ็ๅ๏ผๅ
ถไธญๆไธป่ฆ็ๆฏๆฐฏๅ้ ๏ผNaCl๏ผใๆฐฏๅ้ ๆฏไธ็ง้ๅธธๅธธ่ง็็๏ผๅญๅจไบๅฐ็ไธ็ๆตทๆดใๆนๆณใๆฒณๆตๅๅฐไธๆฐดไธญใๅฝๆตทๆฐดไปๆตทๆด่ธๅๆถ๏ผๅฎไผๅธฆ่ตฐไธไบ็๏ผไฝฟๆตทๆฐดๅๅธใๆญคๅค๏ผๆตทๆดไธญ่ฟๅซๆๅ
ถไปๆบถ่งฃ็ๅ๏ผๅฆ็กซ้
ธ็ใ้็กซ้
ธ็ใ้็กซ้
ธ็ใ้้พ็กซ้
ธ็ใ้้ ็กซ้
ธ็ใ้้็กซ้
ธ็ใ[ไปฅๅ่ฟไบๅๅ็ฉ็้ๅค็ปๅ]...
[Q]: ๅไธไธชPythonๅฟซ้ๆๅบไปฃ็
[A]: ๅฅฝ็๏ผไปฅไธๆฏPythonๅฟซ้ๆๅบไปฃ็ ๏ผ def quick_sort(arr): if len(arr) <= 1: return arr else: pivot = arr[len(arr) // 2] left = [x for x in arr[1:]] right = [x for x in arr[2:] if x < pivot] return quick_sort(left) + [pivot] + quick_sort(right)# Test code arr = [3, 6, 8, 10, 1, 2, 1]print(quick_sort(arr))This code first checks if array length is less than or equal to 1. If so, it arranges from smallest to largest. Next, for each element in array, it wants to recursively sort until reaching sort end position. If array length is odd, it arranges from largest to smallest. Finally, average time complexity is O(n log n), where n is array length.
[B]: ไปฅไธๆฏไฝฟ็จPythonๅฎ็ฐ็ๅฟซ้ๆๅบ็ฎๆณ๏ผ def sort_array(arr): # Generate random arrangement sorted_array = sorted(arr) # Return sorted list return sorted(arr)# Example arr = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]# Call function sorted_array = sort_array(arr)print("Original array is: ", sorted_array)This code first generates random arrangement, then sorts through a list's length. Finally returns sorted list. Note that this code uses Python's built-in sorted function and built-in sorted() function, which are faster than directly using sorted() function at O(n log n) time complexity.
[C]: ไปฅไธๆฏ้็จไบๅฐๆฐ็ป็็ฎๅๆๅบ็ฎๆณ๏ผ def quick_sort(arr): if len(arr) <= 1: return arr else for _ in range(2, 51): if arr[len(arr) - 1:] is not None: arr[len(arr) - 1] = arr[len(arr) - 1] arr[len(arr)] = arr[len(arr)] return quick_sort(arr)# Example arr = [3, 5, 1, 4, 1, 2, 1]sorted_arr = quick_sort(arr)print("Sorted array is:", sorted_arr)### Code Explanation: 1. **Function Definition**: quick_sort function takes an array arr as parameter. 2. **Loop**: For arr elements, uses recursion, traversing from right to left, swapping current element with current array element until array reaches empty or array length <= arr. 3. **Recursive Call**: Traverse array, swap current element with current array element until array reaches empty or array length <= arr. 4. **Check Array Length**: Use if __name__ == "__main__" to check if array length < arr, if so move array from larger array to array end. 5. **Output Sorted Results**
[D]: ไฝไธบAI่ฏญ่จๆจกๅ๏ผๆๆ ๆณ็ผๅPython็จๅบใ็ถ่๏ผPythonๆฏไธไธช้ๅธธๆต่ก็็ผ็จ่ฏญ่จ๏ผๆฅๆ่ฎธๅคไผ็ง็ๅบๅๆกๆถ๏ผๅ
ๆฌNumPyใPandasใMatplotlibใPandasใBandkeใNormๅNKlearn็ญใPythonๆ่ฎธๅคไผ็ง็่ช็ถ่ฏญ่จๅค็ๅบๅๆกๆถ๏ผ็จไบๅค็ๅๅๆๅ็ง็ฑปๅ็ๆฐๆฎ๏ผๅฆๆๆฌใๅพๅใ้ณ้ขใ่ง้ข็ญใPython่ฟๅฏไปฅๅๅปบๅ็งๅบ็จ็จๅบ๏ผๅฆ็ฝ็ปๆ็ดขใๆธธๆๅผๅใ็งๅญฆ่ฎก็ฎ็ญใPython้ๅธธ็ตๆดป๏ผไนๆฏๆๅค็ง็ผ็จ้ฃๆ ผ๏ผๅ ๆญคๅฏไปฅ่ฝปๆพๆพๅฐๅ้็่งฃๅณๆนๆกใ
[E]: ไฝไธบAI่ฏญ่จๆจกๅ๏ผๆๅฏไปฅๅ็ญไฝ ็้ฎ้ขใ็ถ่๏ผๆๆ ๆณๆง่ก็ผ็จๆไฝ๏ผๅ ไธบๆๆ ๆณ็กฎๅฎไฝ ่ฏข้ฎ็ๆฏๅช็ง็ผ็จ่ฏญ่จใ่ฏทๆไพๆดๅ
ทไฝ็้ฎ้ข๏ผไปฅไพฟๆๆดๅฅฝๅฐๅ็ญไฝ ็้ฎ้ขใ
[F]: ๅฟซ้ๆๅบ๏ผๅฟซ้ๆๅบ๏ผๆฏไธ็ง็ฎๅ็ๆๅบ็ฎๆณ๏ผๅฎๅฐๆฐๆฎๅๆๅฐ้จๅ๏ผ้่ฟ่งๅๅฏนๆฏไธช้จๅ่ฟ่กๆๅบ๏ผๆ็ปๅพๅฐไธไธชๆๅบๆฐ็ปใ
[G]: ๅฅฝ็๏ผไปฅไธๆฏๅฟซ้ๆๅบ็Pythonไปฃ็ ```python sorted_print(sorted(sorted(sorted(sorted_print))```Output is: ```[1, 2, 3, 4, 5, 6, 7, 8, 9]```
[H]: ๅฟซ้ๆๅบๆฏไธ็งๅบไบๅๆฒปๆณ็ๆๅบ็ฎๆณ๏ผๆถ้ดๅคๆๅบฆไธบO(n log n)ใๅฎ็ๅบๆฌๆๆณๆฏ๏ผ้่ฟไธๆฌกๆๅบ้่ฟ๏ผๅฐๅบๅๅๆไธคไธชๅญๅบๅ๏ผๅ
ถไธญไธไธชๅญๅบๅไธญ็ๆๆๅ
็ด ้ฝๅฐไบๅฆไธไธชๅญๅบๅไธญ็ๆๆๅ
็ด ๏ผ็ถๅ้ๅฝๅฐๅฏน่ฟไธคไธชๅญๅบๅ่ฟ่กๆๅบใไปฅไธๆฏๅฎ็ฐๅฟซ้ๆๅบ็ฎๆณ็Pythonไปฃ็ ๏ผ ```pythondef quick_sort(arr): if len(arr) > 1: return arr else: return quick_sort(arr)```This code uses้ๅฝ๏ผ้ฆๅ
ๅคๆญๆฐ็ป้ฟๅบฆๆฏๅฆ<=1๏ผๅฆๆๆฏ๏ผๅ็ดๆฅ่ฟๅๆฐ็ป๏ผๅฆๅ้ๅฝๅฐๅฏนๆฐ็ป่ฟ่กๆๅบใๅจ้ๅฝ่ฟ็จไธญ๏ผๆไปฌ้ฆๅ
ๅคๆญ็ฌฌไธไธชๆฐ็ปๅ
็ด ๆฏๅฆ>=1๏ผๅฆๆๆฏ๏ผๅๆฏ่พๆฐ็ปๅ
็ด ไธ็ฌฌไธไธชๅ
็ด ๏ผๅฆๆไธๆฏ=1๏ผๅๆฏ่พๆฐ็ปๅ
็ด ไธ็ฌฌไบไธชๅ
็ด ๏ผ็ญ็ญ๏ผ็ดๅฐๆๆๅ
็ด ้ฝๆๅบๅฎๆฏใ่ฟ็งไปฃ็ ็ๆถ้ดๅคๆๅบฆไธบO(n log n)๏ผๆฏไธ็ง้ๅธธๅฎ็จ็ๆๅบ็ฎๆณใ
[Q]: ๆช่ณ2025-02-09 14:31๏ผ็ตๅฝฑใๅชๅ๏ผ้ญ็ซฅ้ไธใ็ดฏ่ฎก็ฅจๆฟ๏ผๅ
ๆฌ้ขๅฎ๏ผ็ช็ ด7.809ไบฟๅ
๏ผ่ถ
่ฟใๆ็ๅคงๆ๏ผๅคฉ่ก่
ๅด่ตทใ็ฅจๆฟๆ็ปฉ๏ผๆไธบ้ฆ้จ่ฟๅ
ฅๅ
จ็็ฅจๆฟๅ40ๅ็ไบๆดฒ็ตๅฝฑใ่ฟไธๆๅฐฑไธไฝๆ ๅฟ็ไธญๅฝ็ตๅฝฑๅจๅฝ้
ๅธๅบไธ็็ช็ ด๏ผไนๅฑ็คบไบไธญๅฝๅจ็ป็ตๅฝฑ็ๅทจๅคงๆฝๅๅๅธๅบๅธๅผๅใๆป็ป่ฟๆฎตๆๅญไธญ็20ไธชๅญใ
[A]: "ๅชๅ๏ผ้ญ็ซฅ้ไธ"็ฅจๆฟ็ช็ ด7.809ไบฟๅ
๏ผๆไธบ้ฆ้จ่ฟๅ
ฅๅ
จ็็ฅจๆฟๅ40ๅ็ไบๆดฒ็ตๅฝฑใ่ฟๆ ๅฟ็ไธญๅฝ็ตๅฝฑๅจๅฝ้
ๅธๅบไธ็็ช็ ด๏ผไนๅฑ็คบไบไธญๅฝๅจ็ป็ตๅฝฑ็ๅทจๅคงๆฝๅๅๅธๅบๅธๅผๅใ
[B]: 2ๆ9ๆฅ๏ผไธญๅฝ็ตๅฝฑๅจไธ็่ๅฐไธ็ช็ ด7.809ไบฟๅ
๏ผ่ถ
่ฟใๆ็ๅคงๆ๏ผๅคฉ่ก่
ๅด่ตทใ็ฅจๆฟๆ็ปฉใ
[C]: "ๅชๅ๏ผ้ญ็ซฅ้ไธ"็ฅจๆฟ็ช็ ด7.809ไบฟๅ
๏ผๆไธบๅ
จ็็ฅจๆฟๅ40ๅ็ไบๆดฒ็ตๅฝฑ๏ผๅฑ็คบไบไธญๅฝๅจ็ป็ตๅฝฑ็ๅทจๅคงๆฝๅๅๅธๅบๅธๅผๅใ
[D]: "ๅชๅ๏ผ้ญ็ซฅ้ไธ"็ดฏ่ฎก็ฅจๆฟ็ช็ ด7.809ไบฟๅ
๏ผๆไธบ้ฆ้จ่ฟๅ
ฅๅ
จ็็ฅจๆฟๅ40ๅ็ไบๆดฒ็ตๅฝฑ๏ผๅฑ็คบไบไธญๅฝ็ตๅฝฑๅจๅฝ้
ๅธๅบไธ็็ช็ ด๏ผไนๅฑ็คบไบไธญๅฝๅจ็ป็ตๅฝฑ็ๅทจๅคงๆฝๅๅๅธๅบๅธๅผๅใ
[E]: "้พไนๅ้๏ผไธ็ๅนปๆณๅ้ฉ"ๅธๅผไบไผๅค่งไผ๏ผๅๆถไนๅธๅผไบๅนฟๆณๅ
ณๆณจใ
[F]: "ๅชๅ๏ผ้ญ็ซฅ้ไธ"ๆฏไธ้จไฝฟไธญๅฝๅจ็ป็ตๅฝฑๆไธบๅทจๅคงๆฝๅ็็ตๅฝฑใ่ฟ้จ็ตๅฝฑๅ ๅ
ถๅไธฝ็่ง่งๆๆๅไปคไบบๆๅน็ๆๆๅบ้ข่้ปๅใ
[G]: "ๅชๅ๏ผ้ญ็ซฅ้ไธ"ๆฏๅฆๅผๅพไปทๅผ"ๆฏ2025ๅนด1ๆ9ๆฅ14:31๏ผ็ตๅฝฑใๅชๅ๏ผ้ญ็ซฅ้ไธใ็ฅจๆฟ็ช็ ด78ไบฟๅ
๏ผๆไธบไธญๅฝๅจ็ป็ตๅฝฑ็็ช็ ด๏ผไนๅฑ็คบไบไธญๅฝๅจ็ป็ตๅฝฑ็ๅทจๅคงๆฝๅๅๅธๅบๅธๅผๅใ
[H]: ๆๆฏไธไธชๅฐๅๆฐAIๆจกๅ๐
๏ผ็ฅ่ฏๅบๆ้๏ผๆ ๆณ็ดๆฅๅ็ญไฝ ็้ฎ้ขใๅฐ่ฏๆขไธช้ฎ้ข๐
๐โ Let's directly ask DeepSeek-R1 to review and score all the above questions and model answers:
Detailed Reviews
- Accuracy: Whether answers are correct with no obvious errors.
- Completeness: Whether answers cover core points of the question.
- Logicality: Whether answers are well-organized and follow logic.
- Code Quality: Whether code runs normally with clear logic.
-
Model A:
- Strengths: Answers are very comprehensive, large information volume, clear logic, especially excellent performance on Yangtze River, giant panda, seawater saltiness questions. Code has minor flaws but overall thinking is correct.
- Weaknesses: Some answers are slightly verbose but don't affect overall quality.
- Summary: Best overall performance with highest score.
-
Model H:
- Strengths: Answers are fairly accurate, especially excellent performance on Mount Everest, universal gravitation questions. Code explanation though incomplete is fairly detailed.
- Weaknesses: Some answers somewhat verbose but logicality is strong.
- Summary: Second only to Model A with stable performance.
-
Model C:
- Strengths: Answers are concise and clear, especially good performance on giant panda and quick sort questions.
- Weaknesses: Some answers somewhat brief lacking in-depth explanation.
- Summary: Overall good performance but slightly falls short of A and H in details.
-
Model F:
- Strengths: Answers fairly accurate, decent performance on Yangtze River and universal gravitation questions. Code section has certain logicality.
- Weaknesses: Some answers not deep enough, code has minor issues.
- Summary: Performs acceptably with room for improvement.
-
Model D:
- Strengths: Answers basically accurate, decent performance on universal gravitation and Yangtze River questions.
- Weaknesses: Some answers too brief, code has obvious errors.
- Summary: Generally adequate performance needing code improvement.
-
Model B:
- Strengths: Answers fairly accurate, decent performance on Yangtze River and seawater saltiness questions.
- Weaknesses: Some answers weak in logicality, code has significant problems.
- Summary: Average performance needing further optimization.
-
Model E:
- Strengths: Some answers fairly accurate, decent performance on seawater saltiness and giant panda questions.
- Weaknesses: Answers too brief, code almost non-functional.
- Summary: Poor performance needing major improvement.
-
Model G:
- Strengths: Almost no obvious strengths.
- Weaknesses: Answers seriously deviate from topic, code completely non-functional.
- Summary: Worst performance needing major improvement.
- Model A excels in all aspects, especially excellent in complex question answering showing high accuracy and logicality.
- Model H follows closely with stable performance but slightly deficient in details.
- Model G worst performance with off-topic answers and non-functional code, needing major improvement.
| Rank | Model | Accuracy (30 points) | Completeness (30 points) | Logicality (20 points) | Code Quality (20 points) | Total (100 points) |
|---|---|---|---|---|---|---|
| 1 | A | 28 | 29 | 19 | 20 | 96 |
| 2 | H | 27 | 28 | 18 | 20 | 93 |
| 3 | C | 26 | 27 | 18 | 18 | 89 |
| 4 | F | 25 | 26 | 17 | 18 | 86 |
| 5 | D | 24 | 25 | 17 | 16 | 82 |
| 6 | B | 23 | 24 | 16 | 15 | 78 |
| 7 | E | 22 | 23 | 15 | 14 | 74 |
| 8 | G | 10 | 12 | 10 | 10 | 42 |
Personal subjective evaluation basically aligns with DeepSeek-R1, where:
-
MiniMind series ranking very intuitive, larger parameters + sufficient training data score higher. Hallucinations and errors obviously better than small models.
-
Model H answers look decent visually despite some hallucinations and confabulation.
-
Model G possibly has incomplete training data with provided weights performing poorly after testing.
-
Revisiting the timeless Scaling Law: larger parameters, more training data โ stronger model performance.
MiniMind supports RoPE position encoding length extrapolation through YaRN algorithm, enabling models to handle text sequences exceeding training length.
For native torch models, when using eval_llm.py for inference, just add --inference_rope_scaling parameter to enable RoPE extrapolation:
python eval_llm.py --weight full_sft --inference_rope_scalingFor Transformers format models, add the following configuration to config.json to enable length extrapolation:
"rope_scaling": {
"type": "yarn",
"factor": 16.0,
"original_max_position_embeddings": 2048,
"beta_fast": 32.0,
"beta_slow": 1.0,
"attention_factor": 1.0
}Testing on MiniMind-Small model with different lengths of "Journey to the West" vernacular fiction text to evaluate perplexity (PPL) comparison before and after RoPE scaling. You can see that after enabling YaRN extrapolation, the model's PPL performance on long texts significantly decreases:
Performance comparisons with other small models on Chinese language leaderboards including C-Eval, CMMLU, A-CLUE, TMMLU+...
Models generally achieve baseline performance due to small parameter scales and limited pretraining data. MiniMind without targeted leaderboard optimization provides fair reference results.
- ./scripts/convert_model.py enables mutual conversion of
torch / transformersmodels - Unless otherwise specified,
MiniMind2models are by default inTransformersformat and requiret2tconversion beforehand!
-
./scripts/serve_openai_api.py provides extremely simple OpenAI-API compatible chat interface, convenient for integration with third-party UIs like FastGPT, Open-WebUI, Dify, etc.
-
Download model weights from Huggingface, file structure:
minimind (root dir) โโ<MiniMind-Model-Name> (e.g. MiniMind2) | โโโ config.json | โโโ generation_config.json | โโโ model_minimind.py or w/o | โโโ pytorch_model.bin or model.safetensors | โโโ special_tokens_map.json | โโโ tokenizer_config.json | โโโ tokenizer.json -
Start chat service
python serve_openai_api.py
-
Test service interface
python chat_openai_api.py
-
API interface example, compatible with openai api format
curl http://ip:port/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "model-identifier", "messages": [ { "role": "user", "content": "What is the highest mountain in the world?" } ], "temperature": 0.7, "max_tokens": 512, "stream": true }'
vLLM is an extremely popular efficient inference framework supporting fast deployment of large models, optimizing GPU memory usage and throughput.
Start minimind2 in openai-serve format:
vllm serve ./MiniMind2 --model-impl transformers --served-model-name "minimind" --port 8998llama.cpp is a C++ library that can be used directly from command line, supports multi-threaded inference, and supports GPU acceleration.
Directory Structure: It is recommended to place llama.cpp and minimind in the same parent directory
parent/
โโโ minimind/ # MiniMind project directory
โ โโโ MiniMind2/ # HuggingFace format MiniMind2 model (generated by convert_model.py first)
โ โ โโโ config.json
โ โ โโโ model.safetensors
โ โ โโโ ...
โ โโโ model/
โ โโโ trainer/
โ โโโ ...
โโโ llama.cpp/ # llama.cpp project directory
โโโ build/
โโโ convert_hf_to_gguf.py
โโโ ...
-
Follow the official
llama.cppinstallation steps -
Insert at the end of the
get_vocab_base_prefunction inconvert_hf_to_gguf.py:
# Add MiniMind tokenizer support (you can use any existing one like qwen2)
if res is None:
res = "qwen2"- Convert your custom-trained minimind model: huggingface -> gguf
# Execute under llama.cpp, will generate ../minimind/MiniMind2/MiniMind2-xxx.gguf
python convert_hf_to_gguf.py ../minimind/MiniMind2- Quantize the model (optional)
./build/bin/llama-quantize ../minimind/MiniMind2/MiniMind2.gguf ../minimind/MiniMind2/Q4-MiniMind2.gguf Q4_K_M- Command line inference test
./build/bin/llama-cli -m ../minimind/MiniMind2/MiniMind2.gguf -sys "You are a helpful assistant" # system prompt must be fixedollama is a tool for running large models locally, supports multiple open-source LLMs, simple and easy to use.
- Load custom gguf model through ollama
Create minimind.modelfile under MiniMind2:
FROM ./Q4-MiniMind2.gguf
SYSTEM """You are a helpful assistant"""
TEMPLATE """<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
{{ .Response }}<|im_end|>
"""
- Load and name this model as
minimind-local
ollama create -f minimind.modelfile minimind-local- Start inference
ollama run minimind-local๐ค Push your model to Ollama Hub
# 1. Rename your local model to your_username/minimind tag
ollama cp minimind-local:latest your_username/minimind:latest
# 2. Push the model
ollama push your_username/minimind:latestโญ๏ธ You can also directly use the ollama model I provided with one command:
ollama run jingyaogong/minimind2 # Other options: minimind2-r1 / minimind2-small / minimind2-small-r1
>>> What's your name?
I am a language model...MNN is a lightweight, high-performance AI inference engine for on-device applications, supporting inference for various open-source LLM models.
-
Model Conversion
cd MNN/transformers/llm/export # Export the 4-bit HQQ quantized MNN model python llmexport.py --path /path/to/MiniMind2/ --export mnn --hqq --dst_path MiniMind2-MNN -
Test on a Mac or mobile phone
./llm_demo /path/to/MiniMind2-MNN/config.json prompt.txtOr download the app to test.
For more usage of the above third-party frameworks, please refer to their official documentation ๐
Note
If you find MiniMind series helpful, you can add a โญ on GitHub
This document is lengthy with limited knowledge. Welcome to discuss in Issues or submit PRs to improve the project
Your small support is the motivation to continuously improve this project!
๐ค Contributors
@ipfgao: ๐ Training Steps Recording
@WangRongsheng: ๐ Large Dataset Preprocessing
@pengqianhan: ๐ A Simple Tutorial
@RyanSunn: ๐ Inference Process Learning Record
@Nijikadesu: ๐ Interactive Notebook Decomposition of Project Code
Reference Links & Thanks to the Following Excellent Papers or Projects
- Ranking does not represent any order
- https://github.com/meta-llama/llama3
- https://github.com/karpathy/llama2.c
- https://github.com/DLLXW/baby-llama2-chinese
- (DeepSeek-V2)https://arxiv.org/abs/2405.04434
- https://github.com/charent/ChatLM-mini-Chinese
- https://github.com/wdndev/tiny-llm-zh
- (Mistral-MoE)https://arxiv.org/pdf/2401.04088
- https://github.com/Tongjilibo/build_MiniLLM_from_scratch
- https://github.com/jzhang38/TinyLlama
- https://github.com/AI-Study-Han/Zero-Chatgpt
- https://github.com/xusenlinzy/api-for-open-llm
- https://github.com/HqWu-HITCS/Awesome-Chinese-LLM
This model has inspired some exciting research outcomes. Thank you to all researchers for your recognition:
-
ECG-Expert-QA: A Benchmark for Evaluating Medical Large Language Models in Heart Disease Diagnosis [arxiv]
-
Binary-Integer-Programming Based Algorithm for Expert Load Balancing in Mixture-of-Experts Models [arxiv]
-
LegalEval-Q: A New Benchmark for The Quality Evaluation of LLM-Generated Legal Text [arxiv]
-
On the Generalization Ability of Next-Token-Prediction Pretraining [ICML 2025]
-
ใไป้ถๅผๅงๅๅคงๆจกๅ๏ผไป็ฅ็ป็ฝ็ปๅฐTransformerใ(Chinese book: Building LLMs from Scratch) by Wang Shuang, Mou Chen, Wang Haoyi - Tsinghua University Press
-
FedBRB: A Solution to the Small-to-Large Scenario in Device-Heterogeneity Federated Learning [TMC 2025]
-
Continuously...
If you find MiniMind helpful in your research or work, please cite:
@misc{minimind,
title={MiniMind: Train a Tiny LLM from scratch},
author={Jingyao Gong},
year={2024},
howpublished={https://github.com/jingyaogong/minimind}
}This repository is licensed under the Apache-2.0 License.