mikecovlee commited on
Commit
98fc327
Β·
1 Parent(s): 78a79f0

Unify model card: shared English template, remove internal identifiers

Browse files
Files changed (1) hide show
  1. README.md +129 -29
README.md CHANGED
@@ -1,51 +1,151 @@
1
  ---
2
  license: mit
3
- base_model: mikecovlee/tinymixtral
 
 
4
  tags:
5
  - tinymixtral
6
  - moe
 
7
  - instruction-tuned
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
- # tinymixtral-it
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- Instruction-tuned **TinyMixtral**: 477.5M total / 276.1M active parameters
13
- (MoE, top-2 of 4 experts), 2048 context, 32k SentencePiece vocab.
14
 
15
- Fine-tuned for one epoch from the public `mikecovlee/tinymixtral` base on
16
- 2,168,835 deduplicated and eval-decontaminated English instruction conversations
17
- blended from public sources (Tulu3, OpenHermes, SlimOrca, OpenOrca, UltraChat,
18
- MetaMath, OrcaMath, OpenMathInstruct-2, SQuAD2, TriviaQA).
19
- Sequence packing to 1024 tokens, bf16, AdamW, lr 2e-5 cosine with 100-step warmup.
20
 
21
- ## Load
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  ```python
24
  from transformers import AutoModelForCausalLM, AutoTokenizer
25
 
26
- model = AutoModelForCausalLM.from_pretrained(
27
- "mikecovlee/tinymixtral-it", trust_remote_code=True, dtype="bfloat16", device_map="cuda"
28
- )
29
- tokenizer = AutoTokenizer.from_pretrained("mikecovlee/tinymixtral-it")
 
 
 
 
30
  ```
31
 
32
- Conversational use via the bundled chat template
33
- (`tokenizer.apply_chat_template`); greedy decoding works well at this scale.
34
 
35
- ## Benchmarks (0-shot)
36
 
37
- | metric | score |
38
- |---|---|
39
- | Instruction following (IFEval, prompt-strict / inst-strict) | 0.170 / 0.280 |
40
- | Open-ended answer quality (LLM rubric, 4,955 held-out prompts, 0-100) | 15.0 Β± 0.3 |
41
- | GSM8K (strict / flexible) | 2.1% / 2.3% |
42
- | 8-task harness (canonical mean: hellaswag/piqa/arc_c/obqa acc_norm, rest acc) | 0.403 |
43
 
44
- Per-task harness: hellaswag 0.340, piqa 0.634, winogrande 0.528, arc_easy 0.448,
45
- arc_challenge 0.260, openbookqa 0.302, boolq 0.426, lambada 0.289.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- Note: relative to the base model, instruction following and open-ended answer
48
- quality improve substantially while multiple-choice common-sense accuracy drops
49
- (boolq is the most sensitive task). Arithmetic remains far below practical use.
50
 
51
- License: MIT (Copyright (C) 2026 Michael Lee).
 
1
  ---
2
  license: mit
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ language: en
6
  tags:
7
  - tinymixtral
8
  - moe
9
+ - mixture-of-experts
10
  - instruction-tuned
11
+ - sft
12
+ - text-generation
13
+ - custom_code
14
+ model_type: tinymixtral
15
+ base_model: mikecovlee/tinymixtral
16
+ datasets:
17
+ - allenai/tulu-3-sft-mixture
18
+ - teknium/OpenHermes-2.5
19
+ - Open-Orca/SlimOrca
20
+ - Open-Orca/OpenOrca
21
+ - HuggingFaceH4/ultrachat_200k
22
+ - meta-math/MetaMathQA
23
+ - microsoft/orca-math-word-problems-200k
24
+ - nvidia/OpenMathInstruct-2
25
+ - rajpurkar/squad_v2
26
+ - mandarjoshi/trivia_qa
27
  ---
28
 
29
+ # tinymixtral-it β€” instruction-tuned MoE
30
+
31
+ `tinymixtral-it` (a.k.a. **v3.0-it**) is the **instruction-tuned** version of the MoE flagship
32
+ [`mikecovlee/tinymixtral`](https://huggingface.co/mikecovlee/tinymixtral): 477.5M total / 276.1M
33
+ active parameters (top-2 of 4 experts), 2048 context, 32k SentencePiece vocabulary.
34
+
35
+ It is the MoE counterpart of the dense
36
+ [`mikecovlee/tinymistral-276m-it`](https://huggingface.co/mikecovlee/tinymistral-276m-it): the
37
+ **exact same 3M-tier SFT recipe** (same data, hyper-parameters and schedule) is applied to both
38
+ the MoE and the dense base, so the two instruction-tuned models can be compared at the same
39
+ active-parameter count and the same SFT budget.
40
+
41
+ ## Model details
42
+
43
+ | Parameter | Value |
44
+ |-----------|-------|
45
+ | hidden_size | 1024 |
46
+ | num_layers | 16 |
47
+ | Attention | Grouped Query Attention (16 heads / 4 KV heads) |
48
+ | Head dim | 64 |
49
+ | RoPE theta | 1,000,000 |
50
+ | Norm | RMSNorm + per-head QK-Norm (pre-RoPE) |
51
+ | Experts | 4 routed (top-2), aux loss 1e-3 |
52
+ | Expert FFN | SwiGLU, intermediate = 2048 |
53
+ | Vocab size | 32,000 (tied embeddings) |
54
+ | Max position | 2,048 |
55
+ | **Total params** | **~477.5M** |
56
+ | **Active params** | **~276.1M** |
57
+
58
+ ## Training
59
+
60
+ - **Initialization:** the public base `mikecovlee/tinymixtral` (v3.0).
61
+ - **Data:** 2,168,835 deduplicated and eval-decontaminated English instruction conversations,
62
+ blended from 10 public sources (Tulu3, OpenHermes, SlimOrca, OpenOrca, UltraChat, MetaMath,
63
+ OrcaMath, OpenMathInstruct-2, SQuAD2, TriviaQA).
64
+ - **Recipe:** 1 epoch, sequence packing to 1024 tokens, batch 24, bf16, AdamW, lr 2e-5
65
+ (cosine, 100-step warmup), weight decay 0.1, seed 42.
66
+
67
+ ## Evaluation
68
+
69
+ Measured with `lm-evaluation-harness` v0.4.12, 0-shot (cuda, bf16).
70
+
71
+ Harness = mean of the 7 primary metrics (hellaswag acc_norm, piqa acc, winogrande acc,
72
+ arc_easy acc, arc_challenge acc_norm, openbookqa acc_norm, lambada acc).
73
+
74
+ | Model | 7-task harness | 7-task all-acc | GSM8K strict / flex | IFEval prompt / inst |
75
+ |---|---|---|---|---|
76
+ | **`tinymixtral-it`** (MoE + 3M SFT) | **0.3994** | 0.3691 | 0.0182 / 0.0205 | 0.1756 / 0.2782 |
77
+ | `tinymixtral` (MoE base) | 0.3992 | β€” | 0.0000 / 0.0159 | β€” |
78
+ | `tinymistral-276m-it` (dense + 3M SFT) | 0.3892 | 0.3631 | 0.0174 / 0.0205 | 0.1460 / 0.2602 |
79
+ | `tinymistral-276m` (dense base) | 0.3904 | 0.3890 | 0.0000 / 0.0136 | β€” |
80
 
81
+ > **Harness note.** Means quoted here use the **7-task** harness (excludes BoolQ); the base
82
+ > v1.0/v3.0 cards report an **8-task** mean (includes BoolQ). The two are not directly comparable.
83
 
84
+ Per-task (`tinymixtral-it`): hellaswag 0.340, piqa 0.634, winogrande 0.528, arc_easy 0.448,
85
+ arc_challenge 0.260, openbookqa 0.302, lambada 0.289 β€” plus **BoolQ 0.426**, reported separately
86
+ (BoolQ is excluded from the 7-task mean above, to match the dense iso-active comparison).
 
 
87
 
88
+ Additional metric:
89
+
90
+ | Metric | Score |
91
+ |---|---|
92
+ | Open-ended answer quality (LLM rubric, 4,955 held-out prompts, 0–100) | 15.0 Β± 0.3 |
93
+
94
+ Note: relative to the base model, instruction following and open-ended answer quality improve
95
+ substantially while multiple-choice common-sense accuracy drops (BoolQ is the most sensitive task).
96
+ Arithmetic remains far below practical use. The dense counterpart receives the same SFT recipe and
97
+ lands close on the 7-task harness (0.3892 vs 0.3994) but is less steerable (IFEval 0.1460 / 0.2602).
98
+
99
+ ## Usage
100
 
101
  ```python
102
  from transformers import AutoModelForCausalLM, AutoTokenizer
103
 
104
+ model_id = "mikecovlee/tinymixtral-it"
105
+ tok = AutoTokenizer.from_pretrained(model_id)
106
+ model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, dtype="bfloat16", device_map="auto")
107
+
108
+ messages = [{"role": "user", "content": "What is 12% of 250?"}]
109
+ ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
110
+ out = model.generate(ids, max_new_tokens=256, do_sample=False)
111
+ print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
112
  ```
113
 
114
+ Conversational use via the bundled chat template (`tokenizer.apply_chat_template`); greedy
115
+ decoding works well at this scale.
116
 
117
+ ## Limitations
118
 
119
+ - Absolute numbers are bounded by the 477.5M MoE total / 276.1M active scale and the
120
+ 8.05B-token pretraining budget; arithmetic remains far below practical use.
121
+ - English-centric, no safety alignment.
122
+ - Multiple-choice common-sense accuracy drops slightly after SFT (BoolQ most sensitive).
 
 
123
 
124
+ ## Family
125
+
126
+ - [`mikecovlee/tinymixtral`](https://huggingface.co/mikecovlee/tinymixtral) β€” 477.5M MoE base (v3.0 flagship)
127
+ - **`mikecovlee/tinymixtral-it`** β€” this model (MoE instruction-tuned, v3.0-it, 3M SFT)
128
+ - [`mikecovlee/tinymistral-276m`](https://huggingface.co/mikecovlee/tinymistral-276m) β€” 276M dense base (iso-active ablation)
129
+ - [`mikecovlee/tinymistral-276m-it`](https://huggingface.co/mikecovlee/tinymistral-276m-it) β€” 276M dense instruction-tuned (3M SFT)
130
+ - [`mikecovlee/tinymixtral-v1.1-1b`](https://huggingface.co/mikecovlee/tinymixtral-v1.1-1b) β€” 1B MoE (earlier flagship)
131
+ - [`mikecovlee/tinymixtral-v1.1-0.5b`](https://huggingface.co/mikecovlee/tinymixtral-v1.1-0.5b) β€” 0.5B-class MoE (data-quality ablation)
132
+ - [`mikecovlee/tinymixtral-v2.0-beta`](https://huggingface.co/mikecovlee/tinymixtral-v2.0-beta) β€” shared-expert experiment (beta)
133
+ - [`mikecovlee/tinymixtral-v1.0`](https://huggingface.co/mikecovlee/tinymixtral-v1.0) β€” legacy (C4)
134
+
135
+ > **Naming.** The MoE family is published under `tinymixtral`; the dense 276M iso-active
136
+ > ablation companions use the `tinymistral` spelling. Both belong to the same project.
137
+
138
+ ## Citation
139
+
140
+ ```bibtex
141
+ @misc{tinymixtralit2026,
142
+ title = {TinyMixtral: a small Mixture-of-Experts language-model family},
143
+ author = {Michael Lee},
144
+ year = {2026},
145
+ howpublished = {\url{https://huggingface.co/mikecovlee/tinymixtral-it}}
146
+ }
147
+ ```
148
 
149
+ ## License
 
 
150
 
151
+ MIT (Copyright (C) 2026 Michael Lee).