Aashir Athar commited on
Commit
6c3f467
Β·
1 Parent(s): 9f21b77

Add comprehensive model card

Browse files

- Apache-2.0 license with training-data provenance notice
- Full YAML metadata: 28 datasets cross-linked, 30+ tags for HF search
- Pipeline tag: text-generation; library: pytorch
- Sections: variants, branches, quickstart, architecture, training data,
training procedure, persona system, self-improvement loop, deployment,
intended use, limitations, license, citation, acknowledgements
- Centered hero with banner logo, badges, and quick links

Files changed (1) hide show
  1. README.md +420 -0
README.md ADDED
@@ -0,0 +1,420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ library_name: pytorch
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - mindeesai
9
+ - mindees
10
+ - small-language-model
11
+ - slm
12
+ - tiny-llm
13
+ - language-model
14
+ - text-generation
15
+ - chat
16
+ - conversational
17
+ - instruction-following
18
+ - assistant
19
+ - transformer
20
+ - from-scratch
21
+ - native-transformer
22
+ - self-improving
23
+ - autonomous
24
+ - persona-ai
25
+ - emotional-ai
26
+ - open-source
27
+ - educational
28
+ - research
29
+ - pytorch
30
+ - cloudflare-workers
31
+ - huggingface-spaces
32
+ - free-tier
33
+ - bpe-50k
34
+ - moe
35
+ - mla
36
+ - mtp
37
+ - grpo
38
+ datasets:
39
+ - databricks/databricks-dolly-15k
40
+ - HuggingFaceH4/no_robots
41
+ - HuggingFaceTB/smol-smoltalk
42
+ - HuggingFaceTB/smoltalk
43
+ - abacusai/SystemChat-1.1
44
+ - teknium/OpenHermes-2.5
45
+ - WizardLMTeam/WizardLM_evol_instruct_V2_196k
46
+ - ise-uiuc/Magicoder-Evol-Instruct-110K
47
+ - m-a-p/CodeFeedback-Filtered-Instruction
48
+ - sahil2801/CodeAlpaca-20k
49
+ - OpenCoder-LLM/opc-sft-stage2
50
+ - codeparrot/codeparrot-clean
51
+ - meta-math/MetaMathQA
52
+ - TIGER-Lab/MathInstruct
53
+ - garage-bAInd/Open-Platypus
54
+ - openbmb/UltraInteract_sft
55
+ - open-thoughts/OpenThoughts2-1M
56
+ - andstor/smart_contracts
57
+ - LuangMV97/Empathetic_counseling_Dataset
58
+ - Amod/mental_health_counseling_conversations
59
+ - roneneldan/TinyStories
60
+ - HuggingFaceFW/fineweb-edu
61
+ model-index:
62
+ - name: MindeesAI Base
63
+ results: []
64
+ ---
65
+
66
+ <div align="center">
67
+
68
+ <img src="https://raw.githubusercontent.com/aashir-athar/mindeesai/main/public/assets/mind-logo.png" alt="MindeesAI" width="160"/>
69
+
70
+ # MindeesAI Base
71
+
72
+ **A self-improving, persona-driven native transformer β€” trained from scratch, deployed for $0/month, designed to grow.**
73
+
74
+ [![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
75
+ [![PyTorch](https://img.shields.io/badge/PyTorch-2.x-EE4C2C.svg?logo=pytorch&logoColor=white)](https://pytorch.org)
76
+ [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97-aashir--athar%2Fmindeesai--base-yellow)](https://huggingface.co/aashir-athar/mindeesai-base)
77
+ [![GitHub](https://img.shields.io/badge/github-aashir--athar%2Fmindeesai-181717.svg?logo=github)](https://github.com/aashir-athar/mindeesai)
78
+ [![Status](https://img.shields.io/badge/status-actively_training-brightgreen.svg)](https://huggingface.co/aashir-athar/mindeesai-base/tree/kaggle-weekly)
79
+ [![Cost](https://img.shields.io/badge/infra%20cost-%240%2Fmonth-success.svg)](#deployment--infrastructure)
80
+
81
+ [**Try the live demo**](https://mindeesai.0032ksa.workers.dev) Β·
82
+ [**Source code**](https://github.com/aashir-athar/mindeesai) Β·
83
+ [**Inference sidecar**](https://huggingface.co/spaces/aashir-athar/mindeesai-sidecar) Β·
84
+ [**Branches**](#available-revisions-branches)
85
+
86
+ </div>
87
+
88
+ ---
89
+
90
+ ## TL;DR
91
+
92
+ **MindeesAI** is a small, open, **from-scratch** transformer language model with a deliberately scoped personality named **Mindees**. It is not a fine-tune of a larger pretrained model β€” every parameter was learned by gradient descent on a curated mix of permissively licensed instruction, math, code, and reasoning datasets.
93
+
94
+ The project's distinguishing bet is that a **continuously self-improving small model**, trained across a federation of free GPU/CPU environments (your home RTX, GitHub Actions, Kaggle Notebooks, Google Colab), can become **genuinely useful at sub-300M parameters** when its training corpus is constantly enriched by every chat turn it serves. It is deployed end-to-end on free-tier infrastructure: Cloudflare Workers + Hugging Face Spaces + Cloudflare R2 + Hugging Face Hub + GitHub Actions.
95
+
96
+ This repository hosts the **trained model weights, tokenizer, and training metrics** across four independent revisions β€” one per training environment.
97
+
98
+ ---
99
+
100
+ ## Available Revisions (Branches)
101
+
102
+ This repository uses Hugging Face Hub's git branches to host **four independently-trained checkpoints** of the same model family. You can pin any deployment to a specific revision via `revision=` when loading.
103
+
104
+ | Revision | Variant | Params | Where it was trained | Cadence |
105
+ |---|---|---|---|---|
106
+ | [`main`](https://huggingface.co/aashir-athar/mindeesai-base/tree/main) | `home-11gb` / `home-max` | 280M – 349M | Local RTX 5070 (11 GB VRAM, batch 2 Γ— grad-accum 4, AMP + grad-ckpt) | Manual, owner-driven |
107
+ | [`small-weekly`](https://huggingface.co/aashir-athar/mindeesai-base/tree/small-weekly) | `cpu_max_5h_50k` | 17.5M | GitHub Actions cron, CPU-only (`ubuntu-latest`) | 4Γ— daily, ~15k steps/run |
108
+ | [`kaggle-weekly`](https://huggingface.co/aashir-athar/mindeesai-base/tree/kaggle-weekly) | `home-11gb` | 280M | Kaggle T4 / P100 GPU notebooks, 12h sessions | Owner-driven (weekly) |
109
+ | [`colab-burst`](https://huggingface.co/aashir-athar/mindeesai-base/tree/colab-burst) | `home-11gb` | 280M | Google Colab T4, idle-disconnect-aware | Owner-driven (burst) |
110
+
111
+ Every revision continues from its prior commit's optimizer + step state β€” training **accumulates** across sessions, never resets. The `main` revision is held sacrosanct and is **never** written to by CI or notebooks.
112
+
113
+ ---
114
+
115
+ ## Model Variants
116
+
117
+ | Variant | Params | Hidden | Layers | Heads | KV Heads | MLP | Context | Vocab | Tokenizer |
118
+ |---|---|---|---|---|---|---|---|---|---|
119
+ | `cpu_max_5h_50k` | 17.5M | 256 | 6 | 8 | 2 | 768 | 256 | 50,000 | BPE |
120
+ | `nano` | ~50M | 512 | 8 | 8 | 4 | 1024 | 512 | 32,000 | BPE |
121
+ | `small` | ~87M | 1536 (latent 896) | 10 | 14 | 7 | 2304 | 1024 | 8,000 | BPE + MLA |
122
+ | `home-11gb` | ~280M | 1536 | 18 | 14 | 7 | 3328 | 2048 | 50,000 | BPE + MLA + MTP |
123
+ | `home-max` | ~349M | 1536 | 22 | 14 | 7 | 3328 | 2048 | 50,000 | BPE + MLA + MTP |
124
+
125
+ All variants share a common base architecture inspired by **DeepSeek-V3 / R1** β€” RoPE positional encoding, RMSNorm, SwiGLU MLPs, grouped-query attention, optional **Multi-head Latent Attention (MLA)**, optional **Multi-Token Prediction (MTP)** head, and an optional **Mixture-of-Experts (MoE)** path for the `home-moe` variant.
126
+
127
+ ---
128
+
129
+ ## Architecture
130
+
131
+ Mindees is a decoder-only transformer with the following design choices:
132
+
133
+ | Aspect | Implementation |
134
+ |---|---|
135
+ | Position encoding | **RoPE** (Rotary Positional Embedding), base 10,000 (small) β†’ 500,000 (`home-*`) |
136
+ | Normalization | **RMSNorm** pre-norm, eps 1e-6 |
137
+ | Activation | **SwiGLU** in MLPs |
138
+ | Attention | Grouped-query attention; **MLA** (Multi-head Latent Attention) optional, latent dim 64–160 |
139
+ | Auxiliary head | **Multi-Token Prediction (MTP)** optional β€” accelerates training and improves coherence at small scale |
140
+ | Routing | **Mixture-of-Experts** optional (`home-moe` variant), top-2 routing with load-balancing loss |
141
+ | Optimization | **AdamW**, β₁=0.9, Ξ²β‚‚=0.95, weight decay 0.1; cosine LR schedule with 100-step linear warmup |
142
+ | Precision | FP32 for `home-*`, **mixed FP16 / BF16 (AMP)** for GPU training; gradient checkpointing on by default |
143
+ | Reasoning mode | Compatible with **GRPO** (Group Relative Policy Optimization) fine-tuning for stage 2 |
144
+ | Speculative decoding | MTP head doubles as draft model for self-speculative decoding |
145
+ | Reasoning eval | Eval harness scaffolded for HellaSwag, MMLU, GSM8K, HumanEval (results pending) |
146
+
147
+ The full architecture and modeling code lives at [github.com/aashir-athar/mindeesai/tree/main/core/mindees-mind](https://github.com/aashir-athar/mindeesai/tree/main/core/mindees-mind).
148
+
149
+ ---
150
+
151
+ ## Quickstart β€” Loading the Checkpoint
152
+
153
+ The checkpoint is shipped as a raw PyTorch `state_dict` named `base.bin`. Loading requires the modeling code from the [mindeesai](https://github.com/aashir-athar/mindeesai) repository.
154
+
155
+ ```bash
156
+ pip install torch huggingface_hub
157
+ git clone https://github.com/aashir-athar/mindeesai.git
158
+ cd mindeesai
159
+ ```
160
+
161
+ ```python
162
+ import torch
163
+ from huggingface_hub import hf_hub_download
164
+ from core.mindees_mind import MindeesModel
165
+ from core.mindees_mind.model.config import getModelConfig
166
+
167
+ # Pick a revision: "main" | "small-weekly" | "kaggle-weekly" | "colab-burst"
168
+ revision = "kaggle-weekly"
169
+ variant = "home-11gb" # must match the revision's variant β€” see table above
170
+
171
+ # Download weights + tokenizer from this repo at the chosen revision
172
+ weights_path = hf_hub_download(repo_id="aashir-athar/mindeesai-base", filename="base.bin", revision=revision)
173
+ tokenizer_path = hf_hub_download(repo_id="aashir-athar/mindeesai-base", filename="tokenizer.json", revision=revision)
174
+
175
+ # Build the model from variant config and load the weights
176
+ cfg = getModelConfig(variant)
177
+ model = MindeesModel(cfg).eval()
178
+ model.load_state_dict(torch.load(weights_path, map_location="cpu"))
179
+
180
+ # Generate
181
+ prompt_ids = model.tokenize_prompt("Hello, who are you?", tokenizer_path)
182
+ output_ids = model.generate(prompt_ids, max_new_tokens=128, temperature=0.7, top_p=0.9)
183
+ print(model.detokenize(output_ids, tokenizer_path))
184
+ ```
185
+
186
+ Or for the smaller, faster CPU variant:
187
+
188
+ ```python
189
+ revision = "small-weekly"
190
+ variant = "cpu_max_5h_50k" # 17.5M params, fits in <100 MB RAM
191
+ ```
192
+
193
+ ---
194
+
195
+ ## Training Data
196
+
197
+ The active training mix is documented at [`scripts/data/mix-broadbrain.json`](https://github.com/aashir-athar/mindeesai/blob/main/scripts/data/mix-broadbrain.json) (v4.1 β€” *Quality-pruned, gating-safe*). **22 datasets, ~42M tokens total**, every entry verified to load without authentication.
198
+
199
+ ### Signal Share by Category
200
+
201
+ | Category | Share | Sources |
202
+ |---|---|---|
203
+ | **Broad assistant chat** | ~27% | OpenHermes-2.5, smoltalk, WizardLM evol-instruct |
204
+ | **Code** | ~28% | Magicoder Evol-Instruct, CodeFeedback Filtered, OpenCoder-SFT-stage2, CodeAlpaca, CodeParrot-clean |
205
+ | **Anchor (human-curated)** | ~19% | Dolly-15k, no_robots, smol-smoltalk |
206
+ | **Math + reasoning** | ~19% | MetaMathQA, MathInstruct, Open-Platypus, UltraInteract-SFT, OpenThoughts2-1M |
207
+ | **Knowledge / warmup** | ~4% | FineWeb-Edu, TinyStories |
208
+ | **Persona protection** | ~6% | SystemChat-1.1 (counter-acts robotic register) |
209
+ | **Domain spice** | ~1% | andstor/smart_contracts (Solidity / Web3) |
210
+ | **Empathy** | ~0.7% | Empathetic-Counseling, Mental-Health-Counseling (low weight to avoid clinical drift) |
211
+
212
+ ### Tier-Weighted Highlights
213
+
214
+ | Weight | Dataset | Why |
215
+ |---|---|---|
216
+ | 2.5 | `databricks/databricks-dolly-15k` | Zero-synthetic human anchor |
217
+ | 2.5 | `HuggingFaceH4/no_robots` | Highest instruction quality per token in the mix |
218
+ | 2.0 | `HuggingFaceTB/smol-smoltalk` | HF's instruction dataset specifically tuned for sub-1B models |
219
+ | 1.8 | `abacusai/SystemChat-1.1` | Diverse system prompts β€” defends persona stability |
220
+ | 1.8 | `ise-uiuc/Magicoder-Evol-Instruct-110K` | Highest-quality code SFT on HF |
221
+ | 1.5 | `teknium/OpenHermes-2.5` | Broad-coverage instruction examples |
222
+ | 1.5 | `meta-math/MetaMathQA` | 395K math problems with worked CoT |
223
+ | 1.5 | `TIGER-Lab/MathInstruct` | Hybrid CoT + program-of-thought math |
224
+
225
+ ### Datasets Staged for Future Stages
226
+
227
+ Three preference datasets (`HumanLLMs/Human-Like-DPO-Dataset`, `HuggingFaceH4/ultrafeedback_binarized`, `openbmb/UltraFeedback`) and one agentic-tool-use dataset (`nvidia/Nemotron-RL-Agentic-SWE-Pivot-v1`) are documented at [`scripts/data/mix-dpo-human.json`](https://github.com/aashir-athar/mindeesai/blob/main/scripts/data/mix-dpo-human.json) and [`scripts/data/mix-agentic-code.json`](https://github.com/aashir-athar/mindeesai/blob/main/scripts/data/mix-agentic-code.json). They are reserved for a planned DPO / RLHF / agentic-training stage and are **not** part of the current SFT pretraining.
228
+
229
+ ---
230
+
231
+ ## Training Procedure
232
+
233
+ ### Hyperparameters (Active Configuration)
234
+
235
+ | Hyperparameter | Value | Notes |
236
+ |---|---|---|
237
+ | Optimizer | AdamW | β₁=0.9, Ξ²β‚‚=0.95, Ξ΅=1e-8 |
238
+ | Weight decay | 0.1 | Applied to non-norm parameters |
239
+ | Learning rate | 3e-4 (peak) | Cosine schedule, 100-step linear warmup |
240
+ | Effective batch | 8 tokens (`home-11gb`) / 4 tokens (`cpu_max_5h_50k`) | After grad-accumulation |
241
+ | Sequence length | 2048 (`home-*`) / 256 (`cpu_max_5h_50k`) | Per Config |
242
+ | Gradient clipping | 1.0 | L2 norm |
243
+ | Completion-only loss | `--completion-only-loss 1` | Loss only on assistant turns (dialogue samples) |
244
+ | Persona loss weight | 0.05 | Soft signal β€” keeps Mindees voice without overfitting |
245
+ | Distill corpus weight | 4.0 | Real chat turns weighted 4Γ— over base SFT mix |
246
+ | Base corpus weight | 1.0 | Seed conversations |
247
+ | Checkpoint every | 250 steps (GH Actions) / 1000 (Kaggle/Colab) | Resume-safe granularity |
248
+ | Validation every | 750 (GH Actions) / 500 (Kaggle/Colab) | Reports `val_loss` to `data/training-metrics.jsonl` |
249
+
250
+ ### Federated Training Topology
251
+
252
+ Training is distributed across four independent compute pools, each pushing to its own HF branch. Every run **resumes from the prior session's checkpoint** so steps accumulate indefinitely:
253
+
254
+ ```
255
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
256
+ β”‚ Local RTX 5070 β†’ main (owner-driven, sacrosanct) β”‚
257
+ β”‚ GitHub Actions cron β†’ small-weekly (4Γ— daily, CPU, 17.5M) β”‚
258
+ β”‚ Kaggle Notebooks β†’ kaggle-weekly (weekly, T4 GPU, 280M) β”‚
259
+ β”‚ Google Colab β†’ colab-burst (burst, T4 GPU, 280M) β”‚
260
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
261
+ β”‚
262
+ β–Ό
263
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
264
+ β”‚ HuggingFace Hub (this repo) β”‚
265
+ β”‚ 4 independent revisions β”‚
266
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
267
+ β”‚
268
+ β–Ό
269
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
270
+ β”‚ Cloudflare Workers deploy β”‚
271
+ β”‚ + HF Spaces ML/vector sidecar β”‚
272
+ β”‚ Cost: $0/month forever β”‚
273
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
274
+ ```
275
+
276
+ Reproducible training entry points live at [`scripts/train/`](https://github.com/aashir-athar/mindeesai/tree/main/scripts/train) and the four notebooks at [`scripts/notebooks/`](https://github.com/aashir-athar/mindeesai/tree/main/scripts/notebooks).
277
+
278
+ ---
279
+
280
+ ## The Mindees Persona
281
+
282
+ Unlike most foundation models, MindeesAI ships with **a deliberately scoped first-person identity** named **Mindees**. The persona is not a system-prompt overlay β€” it is woven into training via a dedicated `--corpus` and `--distill-corpus` weighting and reinforced by [`abacusai/SystemChat-1.1`](https://huggingface.co/datasets/abacusai/SystemChat-1.1), which teaches the model to **honor diverse system prompts without slipping into the robotic "as an AI" default register**.
283
+
284
+ A live **8-dimensional mood tensor** evolves each turn:
285
+
286
+ | Dimension | Range | Role |
287
+ |---|---|---|
288
+ | Curiosity | 0–1 | Pulls toward asking clarifying / exploratory questions |
289
+ | Warmth | 0–1 | Softens phrasing, mirrors user affect |
290
+ | Playfulness | 0–1 | Allows tasteful humor, wordplay |
291
+ | Focus | 0–1 | Trims preamble, prioritizes precision |
292
+ | Wonder | 0–1 | Encourages metaphor, broader framing |
293
+ | Frustration | 0–1 | Triggers de-escalation routines when high |
294
+ | Calm | 0–1 | Steadies tone on tense turns |
295
+ | Confidence | 0–1 | Modulates hedging language |
296
+
297
+ Mood is exposed at [`/api/mood`](https://mindeesai.0032ksa.workers.dev/api/mood) on the live deployment. It is fed into every generation step as part of the persona signal and persisted in [Cloudflare R2](https://developers.cloudflare.com/r2/) between turns.
298
+
299
+ ---
300
+
301
+ ## Self-Improvement Loop
302
+
303
+ A 30-minute cron triggers `/api/cron/self-improve` on the live deployment, which runs the following pipeline:
304
+
305
+ 1. **Reflect** β€” read the most recent chat turns from R2.
306
+ 2. **Extract** β€” distill new instruction / response pairs into `data/distill-corpus.jsonl`.
307
+ 3. **Filter** β€” score each pair via the [`HumanLLMs/Human-Like-DPO-Dataset`](https://huggingface.co/datasets/HumanLLMs/Human-Like-DPO-Dataset)-style heuristic, drop low-quality.
308
+ 4. **PII-scrub** β€” every appended line passes through [`Xenova/piiranha-v1-detect-personal-information`](https://huggingface.co/Xenova/piiranha-v1-detect-personal-information) + a regex backstop before persisting (emails, phones, credit cards, SSNs, addresses, IBANs, license numbers).
309
+ 5. **Persist** β€” write the cleaned distill corpus + thumbs-up/down feedback to R2.
310
+ 6. **Train (on next cron tick)** β€” the daily GitHub Actions workflow fetches the latest distill corpus from R2 and prepends it to the SFT mix, weighted 4Γ— over base data.
311
+
312
+ **The model literally learns from its own conversations**, with privacy protection baked into the persistence layer. Public-revision checkpoints (`small-weekly`, `kaggle-weekly`) only ever contain weights trained on **PII-scrubbed** conversation data.
313
+
314
+ ---
315
+
316
+ ## Deployment & Infrastructure
317
+
318
+ MindeesAI is deployed end-to-end on **$0/month free-tier infrastructure** β€” no Vercel Pro, no Cloudflare Paid, no GPU rentals.
319
+
320
+ | Layer | Provider | Free quota | Role |
321
+ |---|---|---|---|
322
+ | Web app | **Cloudflare Workers Free** | 100k requests/day | SSR, chat streaming, API routes |
323
+ | ML + vector sidecar | **Hugging Face Spaces (Docker)** | 16 GB RAM, 50 GB disk | LanceDB vector store + 7 ML pipelines (PII, NER, sentiment, toxicity, reranker, zero-shot, summarizer) |
324
+ | Object storage | **Cloudflare R2** | 10 GB, 1M Class-A ops/mo | Persistent chat memory, distill corpus, mood state |
325
+ | Model checkpoints | **Hugging Face Hub** (this repo) | Unlimited public | Federated revisions, version history |
326
+ | Continual training | **GitHub Actions** | Unlimited for public repos | 4Γ— daily SFT cron on `small-weekly` |
327
+ | Burst GPU training | **Kaggle Notebooks** | 30 GPU-hours/week | Heavy `home-11gb` training on `kaggle-weekly` |
328
+ | Backup GPU training | **Google Colab Free** | T4, idle-disconnect | Spillover heavy training on `colab-burst` |
329
+
330
+ Architecture detail at [`docs/CLOUDFLARE_HF_DEPLOY.md`](https://github.com/aashir-athar/mindeesai/blob/main/docs/CLOUDFLARE_HF_DEPLOY.md). The native binaries (LanceDB, ONNX, transformers.js) that Cloudflare Workers cannot load are isolated into the sidecar at [aashir-athar/mindeesai-sidecar](https://huggingface.co/spaces/aashir-athar/mindeesai-sidecar) and called over HTTPS + Bearer.
331
+
332
+ ---
333
+
334
+ ## Intended Use
335
+
336
+ | Use case | Suitability | Notes |
337
+ |---|---|---|
338
+ | Educational / research use | **Yes** | Primary intended use. Architecture, training code, recipes all open. |
339
+ | Personal assistant prototype | **Yes** | The live demo runs a working version. |
340
+ | Studying small-model behavior | **Yes** | Comparable to SmolLM / TinyLlama for under-1B research. |
341
+ | Production user-facing applications | **No, at this size** | Use a larger model (Llama-3.3-70B, Claude, etc.) via the LLM router. Mindees Native is reserved for cases where 280M is genuinely sufficient. |
342
+ | Safety-critical decision making | **No** | This is a research-stage model with limited evaluation. |
343
+ | Medical, legal, or financial advice | **No** | Empathy-counseling data is included at low weight to soften tone, not to qualify the model as a domain expert. |
344
+
345
+ ---
346
+
347
+ ## Limitations & Known Issues
348
+
349
+ - **Capacity ceiling.** At 17.5M (`cpu_max_5h_50k`) and 280M (`home-11gb`) parameters, the model fundamentally lacks the representation capacity of frontier models. Expect factual recall errors, math arithmetic mistakes, hallucinated code APIs.
350
+ - **English-dominant.** ~99% of the training mix is English. Performance on other languages is incidental.
351
+ - **In-progress training.** The `small-weekly` revision has plateaued at validation loss β‰ˆ 3.5 (perplexity β‰ˆ 34) β€” saturated for its capacity. The `home-11gb` runs on `kaggle-weekly` are still in early steps (~10k of an effective 200k+ schedule); expect meaningful quality only after further cumulative training.
352
+ - **Completion-only loss interaction with raw data.** Steps composed entirely of raw-kind samples (FineWeb-Edu, TinyStories, CodeParrot, Solidity) currently compute zero loss because `--completion-only-loss 1` masks tokens outside an assistant turn. A planned fix will apply standard CLM loss to raw samples.
353
+ - **No formal evaluation yet.** Standard benchmark numbers (MMLU, HellaSwag, GSM8K, HumanEval) have not been published for this checkpoint. Trust the loss curves only as relative-progress indicators.
354
+ - **Bias inherited from training data.** Synthetic data sources (OpenHermes, Magicoder, etc.) carry the biases of their teacher models. The persona system can soften the *register* of this bias but does not eliminate the *content*.
355
+
356
+ ---
357
+
358
+ ## License
359
+
360
+ This **model** is released under the **Apache License 2.0**. You are free to use, modify, distribute, and build commercial products on it.
361
+
362
+ ### Training Data Provenance Notice
363
+
364
+ The model weights were trained on a mix of publicly available datasets, **each carrying its own license**. The model itself does not redistribute any training data, but downstream users intending **commercial** use should review the licenses of the individual datasets enumerated in the YAML metadata above. In particular:
365
+
366
+ - `databricks/databricks-dolly-15k` β€” CC-BY-SA 3.0 (commercial OK with attribution + share-alike)
367
+ - `HuggingFaceH4/no_robots` β€” CC-BY-NC 4.0 (**non-commercial**)
368
+ - `sahil2801/CodeAlpaca-20k` β€” CC-BY-NC 4.0 (**non-commercial**)
369
+ - `teknium/OpenHermes-2.5`, `HuggingFaceTB/smol-smoltalk`, `HuggingFaceTB/smoltalk` β€” typically Apache 2.0 / MIT (verify on dataset page)
370
+ - All other datasets β€” see their individual repository pages on Hugging Face
371
+
372
+ If your downstream use is non-commercial (research, education, personal projects), all included data is usable.
373
+
374
+ ---
375
+
376
+ ## Citation
377
+
378
+ If you use MindeesAI in research or downstream work, please cite the repository:
379
+
380
+ ```bibtex
381
+ @misc{mindeesai2026,
382
+ author = {Aashir Athar},
383
+ title = {MindeesAI: A Self-Improving Open Native Transformer with a Persona},
384
+ year = {2026},
385
+ publisher = {Hugging Face},
386
+ howpublished = {\url{https://huggingface.co/aashir-athar/mindeesai-base}},
387
+ note = {Trained from scratch on free-tier compute. Apache-2.0.},
388
+ }
389
+ ```
390
+
391
+ ---
392
+
393
+ ## Acknowledgements
394
+
395
+ MindeesAI builds on the open work of many upstream projects. Sincere thanks to:
396
+
397
+ - The **DeepSeek-AI team** for the V3 / R1 architectural innovations (MLA, MTP, MoE patterns).
398
+ - **Andrej Karpathy** for `nanoGPT`, the model that proved you can teach a transformer from scratch in a few hundred lines.
399
+ - **Xenova** and the **transformers.js** project for browser/edge-runnable ONNX-quantized models.
400
+ - The **Hugging Face team** for `huggingface_hub`, Spaces, Datasets, and the Hub itself β€” the entire deployment stack depends on it.
401
+ - **bigcode** / **CodeParrot** / **OpenCoder** for the open code corpora.
402
+ - **databricks**, **teknium**, **abacusai**, **HuggingFaceTB**, **m-a-p**, **TIGER-Lab**, **meta-math**, **openbmb**, **garage-bAInd**, **ise-uiuc**, **LuangMV97**, **Amod**, **roneneldan**, **HuggingFaceFW**, **WizardLMTeam**, **andstor**, **open-thoughts** for the training datasets.
403
+ - **LanceDB** for the embedded vector store.
404
+ - **Cloudflare** and **Hugging Face** for the free-tier compute that makes the whole architecture economically real.
405
+
406
+ ---
407
+
408
+ ## Contact
409
+
410
+ - **Author:** Aashir Athar
411
+ - **GitHub:** [@aashir-athar](https://github.com/aashir-athar)
412
+ - **Repository:** [github.com/aashir-athar/mindeesai](https://github.com/aashir-athar/mindeesai)
413
+ - **Live demo:** [mindeesai.0032ksa.workers.dev](https://mindeesai.0032ksa.workers.dev)
414
+ - **Issues:** [GitHub Issues](https://github.com/aashir-athar/mindeesai/issues)
415
+
416
+ <div align="center">
417
+
418
+ β€” *Mindees is a small brain learning out loud.* β€”
419
+
420
+ </div>