Text Generation
Safetensors
GGUF
English
mixture-of-experts
Mixture of Experts
deepseek
multi-head-latent-attention
mla
from-scratch
tiny
chat
instruction-tuned
conversational
Instructions to use edededdy/ShallowSeek-mini-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use edededdy/ShallowSeek-mini-it with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf edededdy/ShallowSeek-mini-it:F16 # Run inference directly in the terminal: llama cli -hf edededdy/ShallowSeek-mini-it:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf edededdy/ShallowSeek-mini-it:F16 # Run inference directly in the terminal: llama cli -hf edededdy/ShallowSeek-mini-it:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf edededdy/ShallowSeek-mini-it:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf edededdy/ShallowSeek-mini-it:F16
Use Docker
docker model run hf.co/edededdy/ShallowSeek-mini-it:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use edededdy/ShallowSeek-mini-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "edededdy/ShallowSeek-mini-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "edededdy/ShallowSeek-mini-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/edededdy/ShallowSeek-mini-it:F16
- Ollama
How to use edededdy/ShallowSeek-mini-it with Ollama:
ollama run hf.co/edededdy/ShallowSeek-mini-it:F16
- Unsloth Desktop
- Docker Model Runner
How to use edededdy/ShallowSeek-mini-it with Docker Model Runner:
docker model run hf.co/edededdy/ShallowSeek-mini-it:F16
- Lemonade
How to use edededdy/ShallowSeek-mini-it with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull edededdy/ShallowSeek-mini-it:F16
Run and chat with the model
lemonade run user.ShallowSeek-mini-it-F16
List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- .gitattributes +2 -0
- README.md +108 -0
- ShallowSeek-mini-it-f16.gguf +3 -0
- ShallowSeek-mini-it-q8_0.gguf +3 -0
- chat_template.jinja +1 -0
- config.json +30 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +14 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ 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 |
+
ShallowSeek-mini-it-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
ShallowSeek-mini-it-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
base_model: edededdy/ShallowSeek-mini-base
|
| 7 |
+
base_model_relation: finetune
|
| 8 |
+
datasets:
|
| 9 |
+
- HuggingFaceFW/fineweb-edu
|
| 10 |
+
- HuggingFaceTB/smol-smoltalk
|
| 11 |
+
tags:
|
| 12 |
+
- mixture-of-experts
|
| 13 |
+
- moe
|
| 14 |
+
- deepseek
|
| 15 |
+
- multi-head-latent-attention
|
| 16 |
+
- mla
|
| 17 |
+
- gguf
|
| 18 |
+
- from-scratch
|
| 19 |
+
- tiny
|
| 20 |
+
- chat
|
| 21 |
+
- instruction-tuned
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
# ShallowSeek-mini-it
|
| 25 |
+
|
| 26 |
+
`ShallowSeek-mini-it` is the **instruction-tuned (chat) version of [ShallowSeek-mini-base](https://huggingface.co/edededdy/ShallowSeek-mini-base)**, a tiny DeepSeek-V3-style Mixture-of-Experts model trained from scratch on a laptop CPU. It has **11.0M parameters**, of which **6.3M are active per token**.
|
| 27 |
+
|
| 28 |
+
*Part of the ShallowSeek family. Not affiliated with DeepSeek.*
|
| 29 |
+
|
| 30 |
+
It answers in a chat format and stops when it's done, but it's still an **11M-parameter 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.
|
| 31 |
+
|
| 32 |
+
## Chat format
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
+
<|system|>You are a helpful assistant.<|end|><|user|>What causes the seasons?<|end|><|assistant|>
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
The model writes its reply and ends it with `<|end|>`. The GGUF embeds this template, and the GGUF repo includes Ollama `template` and `params` files.
|
| 39 |
+
|
| 40 |
+
## Fine-tuning (SFT)
|
| 41 |
+
|
| 42 |
+
| | |
|
| 43 |
+
|---|---|
|
| 44 |
+
| Base model | [ShallowSeek-mini-base](https://huggingface.co/edededdy/ShallowSeek-mini-base) (pretrained on 286M FineWeb-Edu tokens) |
|
| 45 |
+
| Conversations | 16,347 (15,530 train / 817 validation), 1.62M assistant tokens trained on |
|
| 46 |
+
| Grounded Q&A (~36% of assistant tokens) | ~10.6K single-turn question/answer pairs generated by **Qwen3.8-9B** from FineWeb-Edu documents **in ShallowSeek's own pretraining data**, so answers concern text the model saw. About 2% of pairs still refer to "the document"; these were left in |
|
| 47 |
+
| General chat (~64%) | 5,684 conversations from **HuggingFaceTB/smol-smoltalk**: all 1,994 everyday-conversations (small talk, multi-turn), plus openhermes, smol-constraints and smol-magpie-ultra-short (capped at 15% of assistant tokens), filtered to remove code and to fit 1,024 tokens |
|
| 48 |
+
| Loss | On assistant replies and their closing `<|end|>` only; prompts and padding are masked |
|
| 49 |
+
| Schedule | 1942 steps, batch 16, 2 epochs, AdamW, LR 1.5e-4 → 1.5e-5 cosine (about 10% of the pretraining peak) |
|
| 50 |
+
| MoE routing | Load-balancing biases **frozen** at their pretrained values during SFT, with padding excluded from the expert-load statistics |
|
| 51 |
+
|
| 52 |
+
Validation loss on 817 held-out conversations (assistant tokens only): **3.779 → 2.949**.
|
| 53 |
+
|
| 54 |
+
## Evaluation: base vs IT
|
| 55 |
+
|
| 56 |
+
Both are scored on the same raw-text prompts, without the chat template, so the numbers are directly comparable. Chance on MMLU is 25%.
|
| 57 |
+
|
| 58 |
+
| Metric | Base | **IT** |
|
| 59 |
+
|---|---|---|
|
| 60 |
+
| Probes top-5 | 28.6% | 35.7% |
|
| 61 |
+
| Mean answer log-prob | -5.68 | -5.40 |
|
| 62 |
+
| True-vs-false pairs won | 58.3% | 66.7% |
|
| 63 |
+
| MMLU (letter) | 24.9% | 25.6% |
|
| 64 |
+
| MMLU (cloze) | 25.5% | 25.6% |
|
| 65 |
+
| MMLU biology & medicine (cloze) | 27.8% | 27.7% |
|
| 66 |
+
|
| 67 |
+
SFT mainly teaches format, turn-taking and when to stop, and MMLU is essentially unchanged. The factual probes improved slightly, plausibly because the grounded Q&A restates facts from documents the model pretrained on. With 14 probes and 12 pairs, treat that as a modest effect rather than a large one.
|
| 68 |
+
|
| 69 |
+
## Usage
|
| 70 |
+
|
| 71 |
+
**Ollama** (uses the bundled chat template):
|
| 72 |
+
|
| 73 |
+
```sh
|
| 74 |
+
ollama run hf.co/edededdy/ShallowSeek-mini-it-GGUF:Q8_0
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
**llama.cpp:**
|
| 78 |
+
|
| 79 |
+
```sh
|
| 80 |
+
llama-cli -m ShallowSeek-mini-it-q8_0.gguf -cnv --temp 0.7 --top-p 0.9 --repeat-penalty 1.15
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
**PyTorch:** see `chat.py` in [the training code](https://github.com/EdmundMartin/DeepseekStyleMOE):
|
| 84 |
+
|
| 85 |
+
```sh
|
| 86 |
+
python chat.py --ckpt mini-sft.pt --temperature 0.7 --rep-penalty 1.15
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Files
|
| 90 |
+
|
| 91 |
+
| File | Contents |
|
| 92 |
+
|---|---|
|
| 93 |
+
| `model.safetensors` | PyTorch weights (including the MTP module), our own parameter names |
|
| 94 |
+
| `config.json` | `ModelConfig` for `deepseek_moe` |
|
| 95 |
+
| `tokenizer.json` | Byte-level BPE tokenizer (Hugging Face `tokenizers` format) |
|
| 96 |
+
| `chat_template.jinja` | Chat template (Jinja), the same one embedded in the GGUF |
|
| 97 |
+
| `tokenizer_config.json` | Special tokens (`<|end|>` = end of turn), chat template, context length |
|
| 98 |
+
| `ShallowSeek-mini-it-f16.gguf` | GGUF (f16) for llama.cpp / Ollama / LM Studio |
|
| 99 |
+
| `ShallowSeek-mini-it-q8_0.gguf` | GGUF (q8_0) for llama.cpp / Ollama / LM Studio |
|
| 100 |
+
|
| 101 |
+
## Acknowledgements
|
| 102 |
+
|
| 103 |
+
- Architecture after **DeepSeek-V3** (DeepSeek-AI, 2024).
|
| 104 |
+
- Pretraining data: **FineWeb-Edu** (Hugging Face, ODC-BY 1.0).
|
| 105 |
+
- Chat data: **smol-smoltalk** (Hugging Face, Apache-2.0).
|
| 106 |
+
- Synthetic Q&A written by **Qwen3.8-9B**.
|
| 107 |
+
|
| 108 |
+
*Card generated 2026-10-01 by `prepare_release.py`.*
|
ShallowSeek-mini-it-f16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:203e631c451a5ca6a6a0fca59eba5a2c60f2d5bbd3b797d6412576854014b612
|
| 3 |
+
size 22261248
|
ShallowSeek-mini-it-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf25938add988eb9eab8115a6e189a908b500d54af744b8dadd87d0df8a88ebe
|
| 3 |
+
size 12306560
|
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,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"vocab_size": 8196,
|
| 3 |
+
"max_seq_len": 1024,
|
| 4 |
+
"dim": 192,
|
| 5 |
+
"n_layers": 8,
|
| 6 |
+
"n_dense_layers": 1,
|
| 7 |
+
"dense_hidden_dim": 512,
|
| 8 |
+
"norm_eps": 1e-06,
|
| 9 |
+
"init_std": 0.02,
|
| 10 |
+
"n_heads": 6,
|
| 11 |
+
"q_lora_rank": 0,
|
| 12 |
+
"kv_lora_rank": 48,
|
| 13 |
+
"qk_nope_head_dim": 24,
|
| 14 |
+
"qk_rope_head_dim": 16,
|
| 15 |
+
"v_head_dim": 24,
|
| 16 |
+
"rope_theta": 10000.0,
|
| 17 |
+
"n_routed_experts": 12,
|
| 18 |
+
"n_shared_experts": 1,
|
| 19 |
+
"n_activated_experts": 3,
|
| 20 |
+
"moe_hidden_dim": 128,
|
| 21 |
+
"n_expert_groups": 3,
|
| 22 |
+
"n_limited_groups": 2,
|
| 23 |
+
"route_scale": 1.0,
|
| 24 |
+
"bias_update_speed": 0.001,
|
| 25 |
+
"seq_aux_loss_alpha": 0.0001,
|
| 26 |
+
"n_mtp_modules": 1,
|
| 27 |
+
"mtp_loss_weight": 0.3,
|
| 28 |
+
"use_fp8": false,
|
| 29 |
+
"fp8_block_size": 128
|
| 30 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5077be3d36d17bf234b6713185ed7652e48d3aae1052702c3db3729bc1d8344
|
| 3 |
+
size 48462392
|
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 |
+
}
|