# Diagrams — Deep-Dive FTDD-01: MiniCPM Family (OpenBMB)

**Deep-Dive**: FTDD-01 — MiniCPM Family (OpenBMB)
**Diagram count**: 4
**Tool**: Mermaid (primary). Each diagram validated in [Mermaid Live Editor](https://mermaid.live).

---

## Diagram 1 — The MiniCPM Family (modality axis)

**Type**: Linear family tree
**Purpose**: The single diagram that maps the four MiniCPM variants to the modality gap each fills. Read it as a progression: text → denser text → +vision → +audio/full-duplex.
**Reading the diagram**: Left = the 1B on-ramp. Each step right adds either capability or modality. SigLip-400M is the load-bearing component that turns a text base into MiniCPM-V.

```mermaid
flowchart LR
  A["MiniCPM5-1B\n~1.08B · text\non-ramp hero"]
  B["MiniCPM3-4B\n4B · text\nmid-size reasoning"]
  C["MiniCPM-V 4.6\n+ SigLip-400M\nvision-language"]
  D["MiniCPM-o 4.5\nomni-modal\nfull-duplex streaming"]

  A -->|"adds: density"| B
  B -->|"adds: vision encoder"| C
  C -->|"adds: audio + duplex"| D

  style A fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style B fill:#14141f,stroke:rgba(94,234,212,0.6),color:#e4e4e8
  style C fill:#14141f,stroke:rgba(94,234,212,0.6),color:#e4e4e8
  style D fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
```

---

## Diagram 2 — The Ultra\* Datasets → Steering Layer Map

**Type**: Mapping (dataset → stack layer → course module)
**Purpose**: Show why the Ultra\* datasets are the course's data reference. Each dataset maps to a specific steering layer (FT00's stack) and a specific course module — open data lets you point at the signal.
**Reading the diagram**: Three rows, one per dataset. Each row names the dataset, the steering technique it enables, and the course module that uses it as the worked example.

```mermaid
flowchart TB
  subgraph DATA["THE Ultra* OPEN DATASETS"]
    UC["UltraChat\nmulti-turn dialogue"]
    UF["UltraFeedback\npreference / feedback pairs\n(arXiv:2310.01377)"]
    UFW["Ultra-FineWeb\ncurated web pretraining mix"]
  end
  subgraph STEER["STEERING LAYER (FT00 stack)"]
    S1["Layer 3 — SFT\ninstruction format"]
    S2["Layer 3 — DPO\npreference signal"]
    S3["Layer 1 / CPT\nbase distribution"]
  end
  subgraph MOD["COURSE MODULE"]
    M1["FT04, FT12"]
    M2["FT05, FT13"]
    M3["FT06"]
  end

  UC --> S1 --> M1
  UF --> S2 --> M2
  UFW --> S3 --> M3

  style DATA fill:#14141f,stroke:rgba(94,234,212,0.5),color:#e4e4e8
  style STEER fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style MOD fill:#08080c,stroke:rgba(255,255,255,0.12),color:#9494a0
  style UC fill:#08080c,stroke:rgba(94,234,212,0.4),color:#e4e4e8
  style UF fill:#08080c,stroke:rgba(94,234,212,0.4),color:#e4e4e8
  style UFW fill:#08080c,stroke:rgba(94,234,212,0.4),color:#e4e4e8
```

---

## Diagram 3 — Why MiniCPM Is the Teaching Vehicle (three properties)

**Type**: Three-pillar
**Purpose**: The three properties that make MiniCPM the course's default base, each mapped to the course need it satisfies. This is the diagram that justifies the choice of base pedagogically.
**Reading the diagram**: Three pillars supporting one claim — "the ideal teaching base." Each pillar is a property (cheap iteration, auditable, Apache-2.0) and each maps to a concrete course requirement.

```mermaid
flowchart TB
  P1["CHEAP ITERATION\n1B fine-tunes in minutes\non a consumer GPU"]
  P2["AUDITABLE PROVENANCE\nopen weights + data + recipe\npoint at every byte"]
  P3["APACHE-2.0\nno MAU / field-of-use\nno license friction"]

  CLAIM["THE IDEAL TEACHING BASE\na model you can break,\nreset, and break again"]

  P1 --> CLAIM
  P2 --> CLAIM
  P3 --> CLAIM

  style P1 fill:#14141f,stroke:rgba(94,234,212,0.6),color:#e4e4e8
  style P2 fill:#14141f,stroke:rgba(94,234,212,0.6),color:#e4e4e8
  style P3 fill:#14141f,stroke:rgba(94,234,212,0.6),color:#e4e4e8
  style CLAIM fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#5eead4
```

---

## Diagram 4 — SWIFT vs LLaMA-Factory (the fine-tuning decision)

**Type**: Two-track comparison
**Purpose**: The decision diagram for choosing a MiniCPM fine-tuning framework. The deciding factor is modality — text models are a toss-up; vision/omni models favor SWIFT.
**Reading the diagram**: Top track = SWIFT (first-party). Bottom track = LLaMA-Factory (general). The annotation marks the deciding factor.

```mermaid
flowchart TB
  subgraph SWIFT["SWIFT (ModelBest / OpenBMB — first-party)"]
    direction TB
    S1["Native support for ALL MiniCPM variants"]
    S2["First-party chat templates & modality handlers"]
    S3["Center of gravity = OpenBMB ecosystem"]
    S1 --> S2 --> S3
  end
  subgraph LF["LLaMA-Factory (general-purpose)"]
    direction TB
    L1["Unified interface for dozens of model families"]
    L2["Add MiniCPM as a config change in a multi-model pipeline"]
    L3["Vision/omni support lags SWIFT by weeks-months"]
    L1 --> L2 --> L3
  end

  DECISION{"Base modality?\ntext vs vision/omni"}

  DECISION -->|"MiniCPM-V / MiniCPM-o\n(first-party modality)"| SWIFT
  DECISION -->|"MiniCPM5-1B / 3-4B\n(multi-model pipeline)"| LF

  style SWIFT fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style LF fill:#14141f,stroke:rgba(94,234,212,0.5),color:#e4e4e8
  style DECISION fill:#08080c,stroke:rgba(240,168,104,0.5),stroke-dasharray: 4 2,color:#f0a868
  style S1 fill:#08080c,stroke:rgba(94,234,212,0.3),color:#e4e4e8
  style S2 fill:#08080c,stroke:rgba(94,234,212,0.3),color:#e4e4e8
  style S3 fill:#08080c,stroke:rgba(94,234,212,0.3),color:#e4e4e8
  style L1 fill:#08080c,stroke:rgba(94,234,212,0.3),color:#e4e4e8
  style L2 fill:#08080c,stroke:rgba(94,234,212,0.3),color:#e4e4e8
  style L3 fill:#08080c,stroke:rgba(240,168,104,0.3),color:#f0a868
```

---

## Validation notes

- All four diagrams use the course design system colors: `#14141f` panel fill, `#5eead4` accent for primary, `rgba(255,255,255,0.12)` for secondary borders, `#e4e4e8` / `#9494a0` for text. The warn tone (`#f0a868`) marks the decision node and the lagging-support caveat.
- Paste each into [Mermaid Live Editor](https://mermaid.live) to render. All use stable Mermaid syntax (`flowchart LR/TB`, `subgraph`) supported in current Mermaid (v10.4+).
- For the slide deck (artifact 03), these are rendered as static SVG/PNG captures from Mermaid Live, inlined into reveal.js.
