AlazarM commited on
Commit
8a585ca
·
verified ·
1 Parent(s): ba24610

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +25 -11
README.md CHANGED
@@ -20,6 +20,8 @@ pipeline_tag: text-generation
20
 
21
  To our knowledge this is the **first working implementation of LongCat-Flash-Lite-Sparse in any framework** — no upstream serving stack (mlx-lm, vLLM, SGLang, llama.cpp) supports the `oe_embed_*` variant yet.
22
 
 
 
23
  ## What's in this checkpoint
24
  LongCat-Flash-Lite-Sparse adds three things vanilla LongCat-Flash lacks:
25
  - **LongCat Sparse Attention (LSA)** — a DeepSeek-style lightning indexer over MLA, with streaming-aware indexing (fixed sink + local window) and cross-layer index reuse (`cli_factor`). Native long context.
@@ -48,20 +50,32 @@ print(generate(model, processor, text, max_tokens=64, temperature=0.0))
48
  # -> The capital of France is Paris.
49
  ```
50
 
51
- ## Baseline (M5 Max, batch 1, greedy)
52
- Prefill (chunked at 512) and decode throughput vs. context length:
 
53
 
54
- | context | prefill tok/s | decode tok/s | peak mem |
 
55
  |--:|--:|--:|--:|
56
- | 512 | 1907 | 110.3 | 39.3 GB |
57
- | 1024 | 2724 | 99.0 | 39.4 GB |
58
- | 2048 | 1969 | 80.4 | 39.5 GB |
59
- | 4096 | 1781 | 82.5 | 39.8 GB |
60
- | 8192 | 1446 | 80.2 | 40.5 GB |
61
- | 16384 | 1067 | 76.7 | 41.8 GB |
62
- | 32768 | 571 | 72.6 | 44.2 GB |
 
 
 
 
 
 
 
 
 
 
63
 
64
- LSA's dynamic sparse selection activates once the KV length exceeds `index_topk` (2048), which keeps decode throughput nearly flat (110→73 tok/s) as context grows to 32k. Peak memory is the 4-bit weights (~36 GB) plus the MLA + indexer caches.
65
 
66
  ## License
67
  MIT, inherited from the base model.
 
20
 
21
  To our knowledge this is the **first working implementation of LongCat-Flash-Lite-Sparse in any framework** — no upstream serving stack (mlx-lm, vLLM, SGLang, llama.cpp) supports the `oe_embed_*` variant yet.
22
 
23
+ 4-bit (~36 GB of weights) is the smallest and fastest variant, for a 64 GB Mac. Also available: [6-bit](https://huggingface.co/AlazarM/LongCat-Flash-Lite-Sparse-6bit) (~52 GB, 96 GB Macs) and [8-bit](https://huggingface.co/AlazarM/LongCat-Flash-Lite-Sparse-8bit) (~68 GB, 128 GB Macs, near-lossless).
24
+
25
  ## What's in this checkpoint
26
  LongCat-Flash-Lite-Sparse adds three things vanilla LongCat-Flash lacks:
27
  - **LongCat Sparse Attention (LSA)** — a DeepSeek-style lightning indexer over MLA, with streaming-aware indexing (fixed sink + local window) and cross-layer index reuse (`cli_factor`). Native long context.
 
50
  # -> The capital of France is Paris.
51
  ```
52
 
53
+ ## Throughput (M5 Max, 128 GB, batch 1, greedy)
54
+
55
+ Same methodology across quantizations (chunk-512 prefill, warmed kernels).
56
 
57
+ **Decode tok/s**
58
+ | ctx | 4-bit | 6-bit | 8-bit |
59
  |--:|--:|--:|--:|
60
+ | 512 | 112 | 87 | 80 |
61
+ | 1024 | 101 | 83 | 75 |
62
+ | 2048 | 85 | 72 | 65 |
63
+ | 4096 | 84 | 72 | 65 |
64
+ | 8192 | 83 | 71 | 65 |
65
+ | 16384 | 79 | 66 | 64 |
66
+ | 32768 | 73 | 64 | 60 |
67
+
68
+ **Prefill tok/s**
69
+ | ctx | 4-bit | 6-bit | 8-bit |
70
+ |--:|--:|--:|--:|
71
+ | 512 | 3142 | 2581 | 2421 |
72
+ | 2048 | 2386 | 2366 | 1923 |
73
+ | 8192 | 1756 | 1627 | 1312 |
74
+ | 32768 | 623 | 504 | 492 |
75
+
76
+ **Footprint** — peak memory across 512→32k: 4-bit ~39–45 GB · 6-bit ~56–63 GB · 8-bit ~74–80 GB.
77
 
78
+ LSA's dynamic sparse selection activates once the KV length exceeds `index_topk` (2048), keeping decode nearly flat (4-bit 112→73 tok/s to 32k). Batch-1 decode is partly weight-bandwidth-bound, so lower precision is faster; higher precision trades that for quality — only ~3B params are active per token, so quant error has little room to hide.
79
 
80
  ## License
81
  MIT, inherited from the base model.