Downloads · 30 days
16
1% of all-time downloads
Shrinkinator/nanowhale-100m-csa-fp8
nanowhale-100m-csa-fp8 is a text generation model from Shrinkinator. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A ~161M miniaturized DeepSeek-V4 clone that keeps the exact architecture and weight naming of the full model so it is a drop-in for vLLM (modeltype: deepseekv4, FP8). Purpose is inference-stack validation — exercising…
Downloads · 30 days
16
1% of all-time downloads
All-time downloads
1.4K
Public
Parameters
248M
1.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors453 MB · 98%
How the weights are stored.
BF16202M · 81%
From the Hugging Face model README
A ~161M miniaturized DeepSeek-V4 clone that keeps the exact architecture and weight naming of the
full model so it is a drop-in for vLLM (model_type: deepseek_v4, FP8). Purpose is inference-stack
validation — exercising the real fat attention path (Multi-head Latent Attention, Compressed Sparse
Attention + Lightning Indexer, Heavily-Compressed Attention, sliding-window, MoE, manifold
Hyper-Connections) at tiny scale — not generation quality.
⚠️ WORK IN PROGRESS — partially trained. This snapshot is an early pretraining checkpoint (~step 2000, train loss ≈ 4.2). Output is not coherent yet; it is published so the format/geometry can be loaded and tested in vLLM. A fully-trained (curriculum pretrain → SFT) version will replace it.
vLLM's deepseek_v4 backend uses hand-written CUDA kernels (FlashMLA, fused qnorm-rope-kv-insert, DeepGEMM
lightning indexer) that hardcode the production MLA geometry. To be a genuine drop-in, this clone must
match them exactly, shrinking only elsewhere:
| field | value | why |
|---|---|---|
head_dim | 512 | FlashMLA head_dim_v=512; get_supported_head_sizes()==[512] (nope 448 + rope 64) |
qk_rope_head_dim | 64 | rope dim hardcoded in the fused insert kernel |
index_n_heads | 32 | DeepGEMM fp8_fp4_mqa_logits asserts heads ∈ {32, 64} |
num_attention_heads | 6 | kernel zero-pads q to 64 heads at runtime, so real heads stay cheap |
hidden_size | 384 | all FP8 contraction dims must be % 128 |
| layers / experts | 8 / 8 (top-2) + 1 shared | shrunk freely |
| attention schedule | [swa, swa, CSA, CSA, HCA, CSA, swa, swa] | compress_ratios = [0,0,4,4,128,4,0,0] |
FP8: block-quantized e4m3 (128×128 blocks, ue8m0 scales), quantization_config.quant_method = "fp8".
from vllm import LLM, SamplingParams
llm = LLM(model="Shrinkinator/nanowhale-100m-csa-fp8",
kv_cache_dtype="fp8", enforce_eager=True, max_model_len=1024)
print(llm.generate(["The capital of France is"], SamplingParams(max_tokens=16))[0].outputs[0].text)
Needs a CUDA-13.0-matched toolchain for the DeepGEMM/TileLang JIT, and (for this miniaturized hidden size)
the mHC ops routed to their torch fallback. See the shrink project notes.