Skip to content
CAI
Software that uses CAICheck a score

jingyaogong/minimind

44.6

Weak · 14 November 2026

4.1k

lines of production code

Python

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Initial project scaffolding and documentation

The repository is initialized with essential project infrastructure, including a \.gitignore\ file to exclude build artifacts and local directories, a \CODE\_OF\_CONDUCT.md\ establishing community standards, and an \Apache 2.0\ license file defining usage terms. Comprehensive project documentation is added via \README.md\ (Chinese) and \README\_en.md\ (English), detailing the MiniMind lightweight language model architecture, training pipelines, and model versions. Additionally, \eval\_llm.py\ is introduced as a command-line tool for model inference and evaluation, supporting features like LoRA weight loading, RoPE scaling, and speed monitoring.

(repo-wide) · high confidence

Introduce MiniMind model with LoRA support and MoE capabilities

This change adds the MiniMind model architecture, including a configuration class, attention and feed-forward layers, and a Mixture-of-Experts (MoE) implementation. It also introduces a new LoRA module that allows applying low-rank adaptation to linear layers, with functions to save, load, and merge LoRA weights. Additionally, a tokenizer configuration and vocabulary file are included to support text processing for the model.

model · high confidence

New MiniMind utility scripts for model conversion, API serving, and evaluation

Added several new scripts to the \scripts/\ directory: \chat\_api.py\ provides a simple CLI client for the OpenAI-compatible API; \serve\_openai\_api.py\ implements a FastAPI-based server supporting streaming, tool calls, and reasoning content; \convert\_model.py\ handles conversion between MiniMind, Transformers, and PyTorch formats, including LoRA merging and compatibility fixes for Transformers 5.0; \eval\_toolcall.py\ offers a tool-use evaluation harness with mock tools and local/API backends; and \web\_demo.py\ adds a Streamlit-based web interface with multi-language support, tool selection, and thinking mode visualization.

scripts · high confidence

New RL training scripts and SGLang-accelerated rollout engine

The trainer module now includes new scripts for RL training (train\_grpo.py, train\_agent.py) and alignment (train\_dpo.py, train\_distillation.py), alongside a new rollout\_engine.py that supports high-performance generation via an SGLang HTTP API in addition to native PyTorch inference. This enables users to perform Group Relative Policy Optimization (GRPO) and Direct Preference Optimization (DPO) with tool-use capabilities and distributed training support.

trainer · high confidence

New dataset loaders for pretraining, SFT, and DPO with reasoning-content support

The dataset module now includes dedicated PyTorch Dataset classes for pretraining, supervised fine-tuning (SFT), and direct preference optimization (DPO). The SFT and DPO loaders support conversations containing explicit reasoning content (reasoning\_content field) and tool-use metadata, applying configurable probability-based system prompt injection and optional removal of empty thinking tags during preprocessing. The DPO loader aligns chosen and rejected responses and generates loss masks that weight only the assistant's output tokens for training.

dataset · high confidence

Dependencies

Initial dependency specification for Python environment

The project now includes a requirements.txt file that defines the Python package dependencies, including libraries for data processing (datasets, datasketch, nltk), model serving and APIs (Flask, FastAPI, uvicorn), machine learning frameworks (transformers, sentence\_transformers, scikit\_learn), and monitoring/tracking (wandb, swanlab, modelscope). Several packages are pinned to specific versions, while others such as torch, torchvision, peft, and matplotlib are currently commented out.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 44 → 45 (+0.2)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 69 → 60 (-8.2)
  • Architecture 96 → 94 (-2.6)
  • Maturity 56 → 60 (+3.2)
  • Readiness 15 → 15 (+0.0)
  • Security 88 → 100 (+11.9)
  • Performance 100 → 100 (+0.0)

Resolved (11)

  • Change coupling: train_grpo.py ↔ train_ppo.py (trainer/train_grpo.py)
  • Duplicated block (5 lines × 2) (eval_llm.py)
  • Duplicated block (5 lines × 2) (eval_llm.py)
  • No tests found
  • Repeated repair: scripts/serve_openai_api.py (scripts/serve_openai_api.py)
  • eval_toolcall.chat_api (cognitive 42) (scripts/eval_toolcall.py)
  • eval_toolcall.chat_api (cyclomatic 16) (scripts/eval_toolcall.py)
  • eval_toolcall.run_case (cognitive 24) (scripts/eval_toolcall.py)
  • serve_openai_api.generate_stream_response (cognitive 31) (scripts/serve_openai_api.py)
  • web_demo.main (cognitive 34) (scripts/web_demo.py)
  • web_demo.main (cyclomatic 18) (scripts/web_demo.py)

New (9)

  • Change coupling clique: train_agent.py, train_grpo.py, train_ppo.py (trainer/train_agent.py)
  • Duplicated block (5 lines × 2) (eval_llm.py)
  • Duplicated block (6 lines × 2) (trainer/train_agent.py)
  • Edited copies of one member (3 members, 3+ corresponding lines) (trainer/train_agent.py)
  • Edited copy of a member (16 corresponding lines) (dataset/lm_dataset.py)
  • Edited copy of a member (18 corresponding lines) (eval_llm.py)
  • Edited copy of a member (24 corresponding lines) (trainer/train_grpo.py)
  • Edited copy of a member (7 corresponding lines) (dataset/lm_dataset.py)
  • Near-duplicate member pair (29 shared lines) (trainer/train_agent.py)

Changes since last survey

  • 9 commits — 5 feature/other, 4 fixes

By area

  • (repo) — 6 commits
  • (root) — 1 commit
  • scripts/serve_openai_api.py — 1 commit
  • trainer/trainer_utils.py — 1 commit

Notable commits

  • fix: Merge pull request #882 from Yi-111-a/fix/train-agent-malformed-tool-call
  • fix: Merge pull request #889 from fjvbn2003/fix-load-from-model-dir
  • fix: Merge pull request #896 from Vincent-Huang-2000/fix/resume-ckpt-fp32
  • fix: [fix] keep resume checkpoint weights in fp32
  • change: Merge pull request #883 from cyanseek/codex/stream-tool-content
  • change: Merge pull request #886 from Yi-111-a/docs/grpo-policy-loss-interpretation
  • change: Merge pull request #894 from BBqBuleberry/feat/lora-rank-arg
  • change: [update] trim merged pr leftovers
  • change: feat(lora): make LoRA rank configurable in train_lora.py and eval_llm.py

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

jingyaogong/minimind was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 233d00fa068ec2b8c0d4f07b703934d6391a5a73 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.