Text Generation
Transformers
Safetensors
GGUF
English
llama-3.2-1B-Instruct
llama.cpp
conversational
cycloevan commited on
Commit
7c697d6
·
verified ·
1 Parent(s): 31fb51f

Model card: expand measured performance with end-to-end runtime comparison (PyTorch vs llama.cpp) and bandwidth/compute-bound explanation

Browse files
Files changed (1) hide show
  1. README.md +15 -2
README.md CHANGED
@@ -155,7 +155,9 @@ Quantization does not degrade benchmark quality — Q8_0 and Q4_K_M match or sli
155
 
156
  Note: these absolute numbers are not directly comparable to the "Evaluation Results" table above, which used a different sampling/decoding protocol.
157
 
158
- ### Measured performance (Apple M1, Metal, `llama-bench`)
 
 
159
 
160
  | Variant | Prompt processing (pp512) | Generation (tg128) |
161
  |---------|--------------------------:|-------------------:|
@@ -163,7 +165,18 @@ Note: these absolute numbers are not directly comparable to the "Evaluation Resu
163
  | GGUF Q8_0 | 618 t/s | 29.4 t/s |
164
  | GGUF Q4_K_M | 504 t/s | 42.3 t/s |
165
 
166
- Q4_K_M generates **2.2× faster than F16** (generation is memory-bandwidth-bound, so smaller weights win; prompt processing is compute-bound and favors F16). End-to-end on the 100-sample eval batch, llama.cpp Q4_K_M finished in 53 s vs 138 s for `transformers` fp16 on MPS (**2.6× faster**). Weight memory footprint: 2.48 GB (F16) → 0.81 GB (Q4_K_M).
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  ### Run with llama.cpp
169
 
 
155
 
156
  Note: these absolute numbers are not directly comparable to the "Evaluation Results" table above, which used a different sampling/decoding protocol.
157
 
158
+ ### Measured performance (Apple M1, Metal)
159
+
160
+ `llama-bench` (pp512 = prompt processing, tg128 = generation):
161
 
162
  | Variant | Prompt processing (pp512) | Generation (tg128) |
163
  |---------|--------------------------:|-------------------:|
 
165
  | GGUF Q8_0 | 618 t/s | 29.4 t/s |
166
  | GGUF Q4_K_M | 504 t/s | 42.3 t/s |
167
 
168
+ Generation is memory-bandwidth-bound, so smaller weights decode faster: **Q4_K_M generates 2.2× faster than F16**. Prompt processing is compute-bound and favors F16 (dequantization overhead), but at 500+ t/s a typical prompt is prefilled in well under a second end-to-end latency is dominated by generation, so Q4_K_M is the fastest overall.
169
+
170
+ End-to-end wall-clock on the identical 100-sample eval batch (greedy, `n_predict=128`, same prompts):
171
+
172
+ | Runtime | Batch time | Speedup |
173
+ |---------|-----------:|--------:|
174
+ | `transformers` fp16 (PyTorch, MPS) | 138 s | 1.0× |
175
+ | llama.cpp GGUF F16 | 96 s | 1.4× |
176
+ | llama.cpp GGUF Q8_0 | 57 s | 2.4× |
177
+ | llama.cpp GGUF Q4_K_M | 53 s | **2.6×** |
178
+
179
+ Weight memory footprint: 2.48 GB (F16) → 1.32 GB (Q8_0) → 0.81 GB (Q4_K_M).
180
 
181
  ### Run with llama.cpp
182