davide221 commited on
Commit
34bf60a
·
verified ·
1 Parent(s): 9455d56

docs: add architecture, RTX 3090 perf, dflash/PFlash usage, blog links

Browse files
Files changed (1) hide show
  1. README.md +68 -2
README.md CHANGED
@@ -7,11 +7,14 @@ tags:
7
  - moe
8
  - code
9
  - quantized
 
 
 
10
  ---
11
 
12
  # Laguna-XS.2 GGUF (BF16 + Q4_K_M)
13
 
14
- GGUF conversions of [poolside/Laguna-XS.2](https://huggingface.co/poolside/Laguna-XS.2) for use with [lucebox-hub](https://github.com/Luce-Org/lucebox-hub).
15
 
16
  ## Files
17
 
@@ -21,6 +24,15 @@ GGUF conversions of [poolside/Laguna-XS.2](https://huggingface.co/poolside/Lagun
21
  | `laguna-xs2-Q4_K_M.gguf` | Q4_K_M | 20.3 GB | 4.85 | imatrix-calibrated, fits a single 24 GB GPU |
22
  | `laguna-xs2.imatrix` | imatrix | 188 MB | — | Bartowski calibration_datav3 (134 chunks, 68608 tokens) |
23
 
 
 
 
 
 
 
 
 
 
24
  ## Quality
25
 
26
  | Metric | BF16 | Q4_K_M | Δ |
@@ -31,4 +43,58 @@ Imatrix calibration uses Bartowski `calibration_datav3.txt` (multilingual + code
31
 
32
  Verified vs the official Poolside HF reference (BF16, eager attention, greedy decoding): logits match exactly for the first 30+ tokens on a B-tree explanation prompt; subsequent divergence is fp precision drift, not a graph bug.
33
 
34
- Tested on RTX 3090 24GB and A100 80GB. Inference ~155 tok/s on A100 SXM Q4_K_M.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  - moe
8
  - code
9
  - quantized
10
+ - laguna
11
+ - pflash
12
+ - dflash
13
  ---
14
 
15
  # Laguna-XS.2 GGUF (BF16 + Q4_K_M)
16
 
17
+ GGUF conversions of [poolside/Laguna-XS.2](https://huggingface.co/poolside/Laguna-XS.2), a 33B-A3B (3B active) MoE coding model from Poolside under Apache 2.0. Built for use with [lucebox-hub](https://github.com/Luce-Org/lucebox-hub) (dflash + PFlash) on consumer GPUs.
18
 
19
  ## Files
20
 
 
24
  | `laguna-xs2-Q4_K_M.gguf` | Q4_K_M | 20.3 GB | 4.85 | imatrix-calibrated, fits a single 24 GB GPU |
25
  | `laguna-xs2.imatrix` | imatrix | 188 MB | — | Bartowski calibration_datav3 (134 chunks, 68608 tokens) |
26
 
27
+ ## Architecture
28
+
29
+ - 40 layers, n_embd 2048, n_head_kv 8, head_dim 128
30
+ - Per-layer head count [48, 64, 64, 64] × 10 (4-layer SWA pattern: full, sw, sw, sw)
31
+ - 256 experts, top-8 routing, 1 always-on shared expert
32
+ - Sigmoid router, expert weights scale 2.5
33
+ - Sliding window 512, partial RoPE with YaRN (orig ctx 4096, factor 32)
34
+ - Vocab 100,352, BOS=2, EOS=2, PAD=9
35
+
36
  ## Quality
37
 
38
  | Metric | BF16 | Q4_K_M | Δ |
 
43
 
44
  Verified vs the official Poolside HF reference (BF16, eager attention, greedy decoding): logits match exactly for the first 30+ tokens on a B-tree explanation prompt; subsequent divergence is fp precision drift, not a graph bug.
45
 
46
+ ## Performance (RTX 3090 24 GB, Q4_K_M)
47
+
48
+ Measured with `bench_laguna_generate` from lucebox-hub (dflash autoregressive forward, no spec-decode draft yet):
49
+
50
+ | Workload | Throughput | Notes |
51
+ |----------|-----------|-------|
52
+ | Decode @ ctx=128 (greedy) | **113 tok/s** | n_gen=128 |
53
+ | Decode @ ctx=1K | 104 tok/s | |
54
+ | Decode @ ctx=4K | 60 tok/s | |
55
+ | llama.cpp tg128 (Q8_0 KV, FA on) | 165 tok/s | for comparison |
56
+ | 128K TTFT via dflash + PFlash | **15.91 s** | 5.4× faster than llama.cpp pp131072 (86.60 s) |
57
+ | Loader VRAM | 18.77 GiB | + 110 MiB tok_embd kept on CPU |
58
+
59
+ A100 SXM Q4_K_M: ~155 tok/s decode (single user, short ctx).
60
+
61
+ ## Usage
62
+
63
+ ### lucebox-hub (dflash + PFlash, recommended for 128K)
64
+
65
+ ```bash
66
+ git clone https://github.com/Luce-Org/lucebox-hub
67
+ cd lucebox-hub/dflash
68
+ cmake -B build -DCMAKE_CUDA_ARCHITECTURES=86 # 86 for 3090, 89 for 4090, 120 for 5090
69
+ cmake --build build -j
70
+
71
+ hf download Lucebox/Laguna-XS.2-GGUF laguna-xs2-Q4_K_M.gguf --local-dir models/
72
+ hf download poolside/Laguna-XS.2 chat_template.jinja tokenizer.json tokenizer_config.json special_tokens_map.json config.json --local-dir models/Laguna-XS-2
73
+
74
+ python3 scripts/server.py \
75
+ --target models/laguna-xs2-Q4_K_M.gguf \
76
+ --tokenizer models/Laguna-XS-2 \
77
+ --port 8000 --max-ctx 131072
78
+
79
+ curl http://localhost:8000/v1/chat/completions \
80
+ -H 'Content-Type: application/json' \
81
+ -d '{"model":"luce-dflash","messages":[{"role":"user","content":"hello"}],"stream":true}'
82
+ ```
83
+
84
+ ### llama.cpp
85
+
86
+ Requires llama.cpp with `laguna` arch support. The lucebox-hub fork at `dflash/deps/llama.cpp` adds it; upstream PR pending.
87
+
88
+ ```bash
89
+ ./llama-bench -m laguna-xs2-Q4_K_M.gguf -p 0 -n 128 -ctk q8_0 -ctv q8_0 -fa 1 -ngl 99
90
+ ```
91
+
92
+ ## License
93
+
94
+ Apache 2.0, inherited from upstream `poolside/Laguna-XS.2`.
95
+
96
+ ## See also
97
+
98
+ - [PFlash 128K speedup blog post](https://lucebox.com/blog/pflash)
99
+ - [DFlash on ggml blog post](https://lucebox.com/blog/dflash27b)
100
+ - [lucebox-hub on GitHub](https://github.com/Luce-Org/lucebox-hub)