styal commited on
Commit
6d3175c
·
verified ·
1 Parent(s): 0ed4d17

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +14 -7
README.md CHANGED
@@ -17,19 +17,26 @@ Head/embedding are tied and cut on both sides. The stock model puts
17
  ## GGUF for llama.cpp
18
 
19
  `lfm3-1.7b-cascade-30-Q8_0.gguf` (1.71 GB) runs this checkpoint in llama.cpp with the cascade FFN,
20
- using [styalai/leffm-llamacpp](https://github.com/styalai/leffm-llamacpp). The vocabulary is already
21
- cut, so the tokenizer and the head are stock for that fork — no extra flags.
22
 
23
  ```sh
24
- # the operating point: 5120 candidate units, 2304 of them gathered
25
- LLAMA_CASCADE=5120,2304 llama-cli -m lfm3-1.7b-cascade-30-Q8_0.gguf -nr -p "..." -n 128
26
  ```
27
 
28
- - `-nr` (`--no-repack`) is **required**: the cascade reads `ffn_up` / `ffn_down` as Q8_0 in their
29
- stored layout. The whole model is Q8_0 (same tensor-type profile as the stock
30
- `LFM3-1.7B-Q8_0.gguf`), including the gate and the two gathered matrices.
 
 
 
 
 
31
  - `LLAMA_CASCADE=7680,7680` reproduces the dense FFN: greedy output is identical to running the model
32
  without the cascade (checked on Metal and CPU for this file; the CUDA kernels pass the same gate).
 
 
33
  - Batch 1 only — the cascade is a single-token decode path. `llama-perplexity -ub 1` does exercise it.
34
 
35
  **Perplexity in llama.cpp** (held-out slice of `styal/calib-data`, 64 sequences / 115,159 bytes,
 
17
  ## GGUF for llama.cpp
18
 
19
  `lfm3-1.7b-cascade-30-Q8_0.gguf` (1.71 GB) runs this checkpoint in llama.cpp with the cascade FFN,
20
+ using [styalai/leffm-llamacpp](https://github.com/styalai/leffm-llamacpp). Everything the runtime needs
21
+ is in the file:
22
 
23
  ```sh
24
+ # no environment variables, no vocabulary file, no --no-repack
25
+ llama-cli -m lfm3-1.7b-cascade-30-Q8_0.gguf -p "..." -n 128
26
  ```
27
 
28
+ - The operating point (`c = 5120` candidate units, `k = 2304` gathered) ships as GGUF metadata
29
+ (`lfm3.cascade.c` / `lfm3.cascade.k`), and the loader disables the Q8_0 repack for it. `llama-cli`
30
+ logs `cascade FFN: c = 5120, k = 2304 (model metadata)` at load.
31
+ - The vocabulary is already cut to 65,536 and the cut tokenizer is embedded, so
32
+ `LLAMA_CASCADE_VOCAB` does not apply — that flag exists only to trim the head of the stock 128k
33
+ model at load time.
34
+ - The whole model is Q8_0, same tensor-type profile as the stock `LFM3-1.7B-Q8_0.gguf` (133 F32 /
35
+ 154 Q8_0), including the gate and the two gathered matrices.
36
  - `LLAMA_CASCADE=7680,7680` reproduces the dense FFN: greedy output is identical to running the model
37
  without the cascade (checked on Metal and CPU for this file; the CUDA kernels pass the same gate).
38
+ `LLAMA_CASCADE=0,0` runs the same weights with the ordinary dense FFN, which is how the perplexity
39
+ arms below were taken.
40
  - Batch 1 only — the cascade is a single-token decode path. `llama-perplexity -ub 1` does exercise it.
41
 
42
  **Perplexity in llama.cpp** (held-out slice of `styal/calib-data`, 64 sequences / 115,159 bytes,