edededdy commited on
Commit
e17d413
·
verified ·
1 Parent(s): a75b2ac

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ little_kedi.jpg filter=lfs diff=lfs merge=lfs -text
37
+ LittleKedi-tiny-instruct-f16.gguf filter=lfs diff=lfs merge=lfs -text
38
+ LittleKedi-tiny-instruct-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
LittleKedi-tiny-instruct-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77369781414494db5fcb4c258e794eea7d071e30ad79b2bd049ba75345f2f4e0
3
+ size 6367232
LittleKedi-tiny-instruct-q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7ce65ee25544f185ca8119a2491fcd2e05e3d1909a7e75165938650bd79ad7e
3
+ size 3528512
README.md ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ datasets:
7
+ - HuggingFaceFW/fineweb-edu
8
+ - HuggingFaceTB/cosmopedia
9
+ - HuggingFaceTB/finemath
10
+ - HuggingFaceTB/smoltalk
11
+ - codeparrot/github-code-clean
12
+ base_model: edededdy/LittleKedi-tiny-base
13
+ base_model_relation: finetune
14
+ tags:
15
+ - mixture-of-experts
16
+ - moe
17
+ - deepseek
18
+ - multi-head-latent-attention
19
+ - mla
20
+ - from-scratch
21
+ - tiny
22
+ - littlekedi
23
+ - chat
24
+ - instruction-tuned
25
+ ---
26
+
27
+ <p align="center"><img src="little_kedi.jpg" alt="LittleKedi logo" width="640"></p>
28
+
29
+ # LittleKedi-tiny-instruct
30
+
31
+ `LittleKedi-tiny-instruct` is the **instruction-tuned (chat) version of [LittleKedi-tiny-base](https://huggingface.co/edededdy/LittleKedi-tiny-base)**, a **small DeepSeek-V3-style Mixture-of-Experts language model trained from scratch**. It has
32
+ **2.0M parameters** in total, of which **1.5M are active per token**
33
+ (0.50M excluding the embedding table). It was pretrained on a 1,000M-token mix (FineWeb-Edu, Cosmopedia (Stanford), Cosmopedia (OpenStax), Cosmopedia (WikiHow), Cosmopedia (Khan Academy), FineMath 4+, SmolTalk, github-code-clean).
34
+
35
+ *Part of the LittleKedi family. Not affiliated with DeepSeek.*
36
+
37
+ This is the **instruction-tuned (chat) model**. It answers in a chat format and stops when it's done, but it's still a very small model: answers are fluent and on-topic but often **wrong or vague**, and it **invents facts confidently**. It's an educational and research artifact; don't use it for anything that matters.
38
+
39
+ ## Chat format
40
+
41
+ ```
42
+ <|system|>You are a helpful assistant.<|end|><|user|>What causes the seasons?<|end|><|assistant|>
43
+ ```
44
+
45
+ The model writes its reply and ends it with `<|end|>`. The system turn is optional. The GGUF files embed this
46
+ template, and `chat_template.jinja` / `tokenizer_config.json` carry it for other tools.
47
+
48
+ ## The LittleKedi family
49
+
50
+ LittleKedi is a family of small DeepSeek-V3-style Mixture-of-Experts language models trained from
51
+ scratch. Every size comes in three variants that differ in **how sparse** they are: how many routed experts
52
+ they have, and what share of their parameters a token actually passes through.
53
+
54
+ | Variant | Routed experts |
55
+ |---|---|
56
+ | **standard** (`<size>`) | a few wide experts; the densest variant |
57
+ | **sparse** (`<size>-sparse`) | many narrower, fine-grained experts, more of them active per token |
58
+ | **wide-sparse** (`<size>-wide-sparse`) | more experts again; the largest total and smallest active share |
59
+
60
+ More experts means more total capacity to store knowledge, but each expert
61
+ sees fewer tokens (tokens × top-k ÷ experts per layer), so sparser variants need more training data before
62
+ their experts are well trained. The variants of a size share a tokenizer and dataset, so they can be
63
+ compared directly. Shapes change as the family scales; the table below is generated from the current
64
+ presets.
65
+
66
+ This card is for **`tiny`**, the **standard** tiny model: 1.5M of its 2.0M parameters (78%) are active per token. Its siblings are `tiny-sparse` and `tiny-wide-sparse`.
67
+
68
+ | Model | Variant | Vocab | Total | Active | Active non-emb. | Active % | Routed experts |
69
+ |---|---|---|---|---|---|---|---|
70
+ | **`tiny` ← this model** | **standard** | **8K** | **2.0M** | **1.5M** | **0.5M** | **78%** | **8 × 64, top-2** |
71
+ | `tiny-sparse` | sparse | 8K | 2.6M | 1.6M | 0.5M | 60% | 32 × 32, top-4 |
72
+ | `tiny-wide-sparse` | wide-sparse | 8K | 3.8M | 1.6M | 0.5M | 42% | 64 × 32, top-4 |
73
+ | `mini` | standard | 8K | 9.4M | 4.8M | 3.2M | 51% | 12 × 128, top-3 |
74
+ | `mini-sparse` | sparse | 8K | 19.8M | 4.8M | 3.2M | 24% | 64 × 64, top-6 |
75
+ | `mini-wide-sparse` | wide-sparse | 8K | 36.4M | 4.9M | 3.3M | 13% | 128 × 64, top-6 |
76
+ | `small` | standard | 8K | 12.2M | 6.3M | 4.2M | 52% | 16 × 128, top-4 |
77
+ | `small-sparse` | sparse | 8K | 24.1M | 6.4M | 4.3M | 27% | 80 × 64, top-8 |
78
+ | `small-wide-sparse` | wide-sparse | 8K | 43.9M | 6.5M | 4.4M | 15% | 160 × 64, top-8 |
79
+ | `moderate` | standard | 16K | 49.8M | 18.8M | 12.5M | 38% | 24 × 192, top-4 |
80
+ | `moderate-sparse` | sparse | 16K | 105.8M | 19.1M | 12.8M | 18% | 120 × 96, top-8 |
81
+ | `moderate-wide-sparse` | wide-sparse | 16K | 199.0M | 19.4M | 13.1M | 10% | 240 × 96, top-8 |
82
+ | `medium` | standard | 16K | 85.9M | 30.8M | 22.4M | 36% | 24 × 256, top-4 |
83
+ | `medium-sparse` | sparse | 16K | 185.3M | 31.2M | 22.8M | 17% | 120 × 128, top-8 |
84
+ | `medium-wide-sparse` | wide-sparse | 16K | 350.9M | 31.6M | 23.2M | 9% | 240 × 128, top-8 |
85
+ | `base` | standard | 32K | 258.7M | 105.4M | 80.2M | 41% | 32 × 256, top-6 |
86
+ | `base-sparse` | sparse | 32K | 542.8M | 106.3M | 81.2M | 20% | 160 × 128, top-12 |
87
+ | `base-wide-sparse` | wide-sparse | 32K | 1015.9M | 107.6M | 82.4M | 11% | 320 × 128, top-12 |
88
+
89
+ "Active" counts everything a token passes through: embeddings, attention, the dense layer, shared
90
+ experts and its top-k routed experts. "Active non-embedding" leaves out the embedding table (tied with the
91
+ output head), which costs memory but almost no compute; it's the fair number for comparing compute
92
+ between models.
93
+
94
+ ## Architecture
95
+
96
+ | Component | This model |
97
+ |---|---|
98
+ | Parameters | 1.99M total, 1.55M active per token (78%), 0.50M active non-embedding |
99
+ | Layers / hidden size | 4 / 128 (layer 0 has a dense SwiGLU FFN of 352; layers 1–3 are MoE) |
100
+ | Attention | **Multi-head Latent Attention (MLA)**: 4 heads, KV latent 32, decoupled RoPE dim 16, head dims 16+16 (q/k) and 16 (v). The KV cache stores only the 32-dim latent plus a 16-dim RoPE key per token |
101
+ | MoE | **DeepSeekMoE**: 8 routed experts (SwiGLU, 64 hidden), top-2, plus 1 shared expert; sigmoid gating |
102
+ | Load balancing | **Auxiliary-loss-free** bias balancing (update speed 0.001) plus a small sequence-wise loss (α = 0.0001). Over the second half of training the median batch put 1.07× the mean load on the busiest expert (1.08× in the worst layer), and 0.00% of expert assignments were dropped for capacity. |
103
+ | Expert dispatch | Training: fixed capacity (capacity factor 2.0; overflow assignments are dropped). Inference is always dropless |
104
+ | Embeddings | Input embedding and output head **tied** |
105
+ | Context | 1,024 tokens |
106
+
107
+ ## Training
108
+
109
+ | | |
110
+ |---|---|
111
+ | Data | 1,000M tokens, 801,792 documents (~502 tokens per parameter, ~646 per active parameter), one pass, sources interleaved throughout (mix below) |
112
+ | Tokenizer | Byte-level BPE, 8,196 tokens (~3.75 bytes/token on this mix); digits not split (v1 tokenizer); chat special tokens built in |
113
+ | Steps | 15,258 × 65,536 tokens (batch 16 × 1024 × 4 accumulation) |
114
+ | Optimizer | **Muon** (momentum 0.95, Nesterov, 5 Newton-Schulz steps; each expert's matrix orthogonalized separately) for hidden matrices, AdamW (β = 0.9, 0.95) for embeddings, norms and the router; weight decay 0.1, gradient clipping 1.0 |
115
+ | Learning rate | 2e-3 peak; **WSD**: 200 warm-up steps, constant, then linear decay to 0 over the last 20% of steps (schedule set for 15,258 steps) |
116
+ | Precision | bf16 autocast, `torch.compile` |
117
+ | Compute | ~3e15 FLOPs (6 × active non-embedding parameters × tokens) |
118
+ | Hardware | One AMD Radeon 890M integrated GPU (Ryzen AI 300 laptop), ROCm on Windows: about 8.9 hours at a median ~31.1K tokens/s |
119
+
120
+ | Source | What it is | Tokens | Share |
121
+ |---|---|---|---|
122
+ | FineWeb-Edu `sample/10BT` | educational web pages | 700M | 70% |
123
+ | Cosmopedia (Stanford) | synthetic textbooks | 70M | 7% |
124
+ | Cosmopedia (OpenStax) | synthetic textbooks | 30M | 3% |
125
+ | Cosmopedia (WikiHow) | synthetic how-to articles | 30M | 3% |
126
+ | Cosmopedia (Khan Academy) | synthetic lessons | 20M | 2% |
127
+ | FineMath 4+ | maths web pages | 80M | 8% |
128
+ | SmolTalk | chat conversations | 50M | 5% |
129
+ | github-code-clean | source code | 20M | 2% |
130
+
131
+ ## Fine-tuning (SFT)
132
+
133
+ | | |
134
+ |---|---|
135
+ | Base model | [LittleKedi-tiny-base](https://huggingface.co/edededdy/LittleKedi-tiny-base) |
136
+ | Conversations | 6,730 (6,730 train / 451 validation), 611.6K assistant tokens trained on |
137
+ | Data | ~3,950 single-turn question/answer pairs (~28% of assistant tokens) written by **Gemma 4 E4B** from 1,499 documents sampled from **this model's own pretraining data**, so every question concerns text it saw; filtered to drop questions that refer back to the source document. Plus ~2,780 general conversations from **HuggingFaceTB/smol-smoltalk** (everyday small talk in full, plus capped samples of openhermes-50k, smol-constraints and smol-magpie-ultra-short), filtered to remove code and to fit 1,024 tokens. 301 grounded pairs (whole documents) and 150 conversations held out as the test set. |
138
+ | Loss | On assistant replies and their closing `<|end|>` only; prompts and padding are masked |
139
+ | Schedule | 842 steps, batch 16, 2 epochs, Muon + AdamW, peak LR 2e-4, cosine decay |
140
+ | MoE routing | Load-balancing biases **frozen** at their pretrained values, with padding excluded from expert-load statistics; experts run dropless |
141
+
142
+ Validation loss on 451 held-out conversations (assistant tokens only): **4.154 → 3.303**.
143
+
144
+ ## Evaluation
145
+
146
+ ### Zero-shot benchmarks (`evals.py`)
147
+
148
+ | Task | acc_norm | acc | Items | Chance |
149
+ |---|---|---|---|---|
150
+ | SciQ | 55.9% ± 1.6% | 57.5% | 1,000 | 25% |
151
+ | ARC-Easy | 32.2% ± 1.0% | 32.8% | 2,376 | 25% |
152
+ | HellaSwag | 26.8% ± 0.4% | 26.5% | 10,042 | 25% |
153
+
154
+ Each answer choice is scored by the log-probability of its text after the prompt, using lm-evaluation-harness
155
+ prompts (SciQ includes its supporting passage). **acc_norm** divides by the answer's length in characters;
156
+ **acc** doesn't. Splits: SciQ test, ARC-Easy test, HellaSwag validation.
157
+
158
+ ### MMLU (`mmlu_eval.py`)
159
+
160
+ | Format | Accuracy | Questions scored | Average few-shot examples |
161
+ |---|---|---|---|
162
+ | letter | 25.6% | 14,037 (skipped 5) | 4.5 |
163
+ | cloze | 25.5% | 14,037 (skipped 5) | 0.0 |
164
+
165
+ | Category | Subjects | Questions | Letter | Cloze |
166
+ |---|---|---|---|---|
167
+ | STEM | 19 | 3,153 | 27.1% | 24.0% |
168
+ | Humanities | 13 | 4,705 | 25.2% | 25.4% |
169
+ | Social Sciences | 12 | 3,077 | 22.7% | 26.0% |
170
+ | Other | 13 | 3,102 | 27.6% | 26.7% |
171
+
172
+ **Biology & medicine (cloze): 27.1% on 2,089 questions**, +2.1 points against 25% chance (about 2.2 standard errors, significant). This pools the 10 life-science and health subjects; it isn't an official MMLU category.
173
+
174
+ In the **letter** format the model compares " A"–" D", with same-subject examples added while they fit the
175
+ context. In the **cloze** format each answer's text is scored by log-probability per byte; at this size the
176
+ cloze results are the meaningful ones. Chance is 25%.
177
+
178
+ ### Base vs instruct
179
+
180
+ Both are scored on the same raw-text prompts, without the chat template, so the numbers are directly comparable. SFT mainly teaches format, turn-taking and when to stop, so large changes in knowledge benchmarks aren't expected. Chance on the multiple-choice tasks is 25%.
181
+
182
+ | Metric | Base | **Instruct** |
183
+ |---|---|---|
184
+ | SciQ (acc_norm) | 56.3% | 55.9% |
185
+ | ARC-Easy (acc_norm) | 32.7% | 32.2% |
186
+ | HellaSwag (acc_norm) | 26.7% | 26.8% |
187
+ | MMLU (letter) | 25.4% | 25.6% |
188
+ | MMLU (cloze) | 25.8% | 25.5% |
189
+ | MMLU biology & medicine (cloze) | 28.4% | 27.1% |
190
+
191
+ ### Compared with its siblings and other small models
192
+
193
+ | | **This model** | `tiny-wide-sparse` | [Pythia-70M](https://huggingface.co/EleutherAI/pythia-70m) | [GPT-2](https://huggingface.co/openai-community/gpt2) | [Supra-50M](https://huggingface.co/SupraLabs/Supra-50M-Base) |
194
+ |---|---|---|---|---|---|
195
+ | Parameters (total) | 2.0M | 3.8M | 70.4M | 124.4M | 51.8M |
196
+ | Active non-embedding parameters | 0.5M | 0.5M | 18.9M | 85.1M | 35.4M |
197
+ | Training tokens | 1,000M | 1,000M | 300B (the Pile) | undisclosed (WebText) | 20B (FineWeb-Edu) |
198
+ | SciQ (acc_norm) | 55.9% | 53.9% | 55.2% | 53.2% | 77.2% |
199
+ | ARC-Easy (acc_norm) | 32.2% | 32.4% | 35.0% | 42.0% | 52.2% |
200
+ | HellaSwag (acc_norm) | 26.8% | 26.3% | – | 29.5% | 31.8% |
201
+ | MMLU (cloze) | 25.5% | 25.7% | – | – | – |
202
+ | MMLU biology & medicine (cloze) | 27.1% | 27.8% | – | – | – |
203
+ | Validation loss (held-out mix) | – | 3.736 | – | – | – |
204
+
205
+ LittleKedi columns are measured with this repo's `evals.py` and `mmlu_eval.py` on the checkpoints named. Validation
206
+ losses are only comparable between models that share a tokenizer and validation set. The other columns are
207
+ **published figures**: Pythia-70M from EleutherAI's evaluations as quoted on the
208
+ [Wisp-15M card](https://huggingface.co/DedeProGames/Wisp-15M), GPT-2 and Supra-50M from the
209
+ [Supra-50M-Base card](https://huggingface.co/SupraLabs/Supra-50M-Base). Their prompts may differ from ours,
210
+ so treat gaps of a few points as noise.
211
+
212
+ ## What it can and can't do
213
+
214
+ This is a **0.5M active non-embedding parameter chat model**: fine-tuning taught it the shape of a conversation,
215
+ but it has almost no knowledge to put in it. It's a research artifact for studying instruction tuning at the
216
+ smallest scale, not an assistant.
217
+
218
+ **What it does**
219
+
220
+ - ✅ Replies in the chat format: one short paragraph, then it stops by emitting `<|end|>` (it did on every one of
221
+ our test prompts).
222
+ - ✅ Writes grammatical English in the register of an answer ("This process can help…", "It also reduces the
223
+ risk of…").
224
+ - ✅ Occasionally picks up the topic's vocabulary (asked about stress, it mentions reducing stress and anxiety).
225
+
226
+ **What it can't do**
227
+
228
+ - ❌ **Answer the question asked.** Most replies are unrelated to the prompt: *"Hi! How are you today?"* →
229
+ *"Analyzing aids in food is crucial for maintaining healthy eating habits…"*.
230
+ - ❌ **Facts.** Even on questions about text from its own pretraining data, answers are invented. Treat every name,
231
+ date and number as made up.
232
+ - ❌ **Arithmetic.** *"What is 7 + 6?"* → *"Yes, it's about 8."*
233
+ - ❌ **Creative requests, instructions, multi-turn follow-up, code.**
234
+
235
+ **Benchmarks:** fine-tuning leaves them where the base model was (SciQ 55.9%, ARC-Easy 32.2%), as expected:
236
+ instruction tuning changes the format, not what the model knows.
237
+
238
+ **Decoding:** temperature ≈ 0.7, top-p ≈ 0.9, repetition penalty ≈ 1.15 (the GGUF files carry these as defaults).
239
+
240
+ ## Usage
241
+
242
+ **llama.cpp** (GGUF, llama.cpp's built-in `deepseek2` architecture; the chat template is embedded):
243
+
244
+ ```sh
245
+ llama-cli -m LittleKedi-tiny-instruct-q8_0.gguf -cnv --temp 0.7 --top-p 0.9 --repeat-penalty 1.15
246
+ ```
247
+
248
+ **Ollama** (uses the bundled `template` and `params` files): `ollama run hf.co/edededdy/LittleKedi-tiny-instruct:Q8_0`
249
+
250
+ **PyTorch** (needs the `littlekedi` package from [the training code](https://github.com/EdmundMartin/LittleKedi)):
251
+
252
+ ```python
253
+ import json, torch
254
+ from safetensors.torch import load_file
255
+ from littlekedi import LittleKediModel, ModelConfig
256
+ from littlekedi.chat import END, render_prompt
257
+ from littlekedi.tokenizer import BPETokenizer
258
+
259
+ model = LittleKediModel(ModelConfig.from_dict(json.load(open("config.json")))).eval()
260
+ model.load_state_dict(load_file("model.safetensors"))
261
+ tok = BPETokenizer.from_file("tokenizer.json")
262
+ ids = torch.tensor([render_prompt(tok, [{"role": "user", "content": "What causes the seasons?"}])])
263
+ out = model.generate(ids, 200, temperature=0.7, top_p=0.9, repetition_penalty=1.15, stop_ids={tok.token_to_id(END)})
264
+ print(tok.decode(out[0, ids.shape[1]:].tolist()).replace(END, "").strip())
265
+ ```
266
+
267
+ Or in a terminal: `python chat.py --ckpt <checkpoint>.pt`.
268
+
269
+ ## Files
270
+
271
+ | File | Contents |
272
+ |---|---|
273
+ | `model.safetensors` | PyTorch weights (embedding tied with the output head), `littlekedi` parameter names |
274
+ | `config.json` | `ModelConfig` for `littlekedi` |
275
+ | `tokenizer.json` | Byte-level BPE tokenizer (Hugging Face `tokenizers` format) |
276
+ | `chat_template.jinja` | Chat template (Jinja), the same one embedded in the GGUF files |
277
+ | `tokenizer_config.json` | Special tokens (`<|end|>` = end of turn), chat template, context length |
278
+ | `template` | Ollama chat template |
279
+ | `params` | Ollama stop tokens and sampling defaults |
280
+ | `LittleKedi-tiny-instruct-f16.gguf` | GGUF (f16) for llama.cpp / Ollama / LM Studio |
281
+ | `LittleKedi-tiny-instruct-q8_0.gguf` | GGUF (q8_0) for llama.cpp / Ollama / LM Studio |
282
+ | `little_kedi.jpg` | The LittleKedi logo |
283
+
284
+ ## Acknowledgements
285
+
286
+ - The architecture follows **DeepSeek-V3** (DeepSeek-AI, 2024): MLA, DeepSeekMoE and auxiliary-loss-free balancing.
287
+ - **Muon** (Keller Jordan et al., 2024) with Moonlight's update scaling (Liu et al., 2025).
288
+ - Pretraining data: **FineWeb-Edu** (ODC-BY 1.0).
289
+ - Pretraining data: **Cosmopedia** (Apache 2.0).
290
+ - Pretraining data: **FineMath 4+** (ODC-BY 1.0).
291
+ - Pretraining data: **SmolTalk** (Apache 2.0 for its new subsets, with the datasets it includes under their own licenses).
292
+ - Pretraining data: **github-code-clean** (Apache 2.0, with each file under its own open-source license).
293
+ - Chat data: see the SFT table above for its sources, each under its own license.
294
+
295
+ *Card generated 2026-10-13 by `prepare_release.py` from `tiny-sft.pt` (step 15257).*
chat_template.jinja ADDED
@@ -0,0 +1 @@
 
 
1
+ {% for m in messages %}{% if m['role'] == 'system' %}<|system|>{{ m['content'] }}<|end|>{% elif m['role'] == 'user' %}<|user|>{{ m['content'] }}<|end|>{% elif m['role'] == 'assistant' %}<|assistant|>{{ m['content'] }}<|end|>{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>{% endif %}
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 8196,
3
+ "max_seq_len": 1024,
4
+ "dim": 128,
5
+ "n_layers": 4,
6
+ "n_dense_layers": 1,
7
+ "dense_hidden_dim": 352,
8
+ "norm_eps": 1e-06,
9
+ "init_std": 0.02,
10
+ "tie_embeddings": true,
11
+ "n_heads": 4,
12
+ "q_lora_rank": 0,
13
+ "kv_lora_rank": 32,
14
+ "qk_nope_head_dim": 16,
15
+ "qk_rope_head_dim": 16,
16
+ "v_head_dim": 16,
17
+ "rope_theta": 10000.0,
18
+ "n_routed_experts": 8,
19
+ "n_shared_experts": 1,
20
+ "n_activated_experts": 2,
21
+ "moe_hidden_dim": 64,
22
+ "n_expert_groups": 1,
23
+ "n_limited_groups": 1,
24
+ "route_scale": 1.0,
25
+ "bias_update_speed": 0.001,
26
+ "seq_aux_loss_alpha": 0.0001,
27
+ "moe_backend": "capacity",
28
+ "capacity_factor": 2.0
29
+ }
little_kedi.jpg ADDED

Git LFS Details

  • SHA256: 2eaa8b24fd3885aad7a44660c49fb4625027d375bbb00fb448e6579b23985310
  • Pointer size: 132 Bytes
  • Size of remote file: 1.87 MB
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49496e1e999c2dcedcb31e2b7ceef0b5d43c60e601b3b2c92496f84f1d14936e
3
+ size 7971200
params ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "stop": [
3
+ "<|end|>",
4
+ "<|user|>",
5
+ "<|endoftext|>"
6
+ ],
7
+ "temperature": 0.7,
8
+ "top_p": 0.9,
9
+ "repeat_penalty": 1.15,
10
+ "num_ctx": 1024
11
+ }
template ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {{- range .Messages }}
2
+ {{- if eq .Role "system" }}<|system|>{{ .Content }}<|end|>
3
+ {{- else if eq .Role "user" }}<|user|>{{ .Content }}<|end|>
4
+ {{- else if eq .Role "assistant" }}<|assistant|>{{ .Content }}<|end|>
5
+ {{- end }}
6
+ {{- end }}<|assistant|>
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tokenizer_class": "PreTrainedTokenizerFast",
3
+ "chat_template": "{% for m in messages %}{% if m['role'] == 'system' %}<|system|>{{ m['content'] }}<|end|>{% elif m['role'] == 'user' %}<|user|>{{ m['content'] }}<|end|>{% elif m['role'] == 'assistant' %}<|assistant|>{{ m['content'] }}<|end|>{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>{% endif %}",
4
+ "bos_token": null,
5
+ "add_bos_token": false,
6
+ "eos_token": "<|end|>",
7
+ "pad_token": "<|endoftext|>",
8
+ "additional_special_tokens": [
9
+ "<|system|>",
10
+ "<|user|>",
11
+ "<|assistant|>"
12
+ ],
13
+ "model_max_length": 1024
14
+ }