xdavxd commited on
Commit
a97b311
·
verified ·
1 Parent(s): 506a7b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +99 -112
README.md CHANGED
@@ -22,8 +22,7 @@ required_cli_args:
22
  - '--reasoning-parser gemma4'
23
  - '--enable-prefix-caching'
24
  default-chat-template-kwargs: '{"enable_thinking": true}'
25
- chat_template_file_name: None
26
- chat_template_path: None
27
  tool_call_parser: gemma4
28
  validated_tasks:
29
  - tool-calling
@@ -84,13 +83,15 @@ vllm serve xdavxd/gemma-4-26B-A4B-it-qat-heretic-ega \
84
  --enable-auto-tool-choice \
85
  --reasoning-parser gemma4 \
86
  --tool-call-parser gemma4 \
87
- --chat-template examples/tool_chat_template_gemma4.jinja \
88
  --default-chat-template-kwargs '{"enable_thinking": true}' \
89
- --limit-mm-per-prompt '{"image": 4, "audio": 1}' \
90
- --async-scheduling
 
91
  ```
92
 
93
- > **Tip:** For text-only workloads, pass `--limit-mm-per-prompt '{"image": 0, "audio": 0}'` to skip vision encoder memory allocation and free up GPU memory for a longer context window.
 
 
94
 
95
  2. Send requests to the server:
96
 
@@ -149,7 +150,7 @@ Settings passed to heretic: `offload_outputs_to_cpu=False`, `device_map={"": 0}`
149
 
150
  ## Evaluation
151
 
152
- This model was evaluated on GSM8K Platinum, MMLU-Pro, IFEval, MATH-500, and GPQA Diamond using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) and [lighteval](https://github.com/huggingface/lighteval), served with [vLLM](https://docs.vllm.ai/en/latest/) (OpenAI-compatible API).
153
 
154
  ### Performance
155
 
@@ -164,9 +165,13 @@ Cross-dataset audit: JailbreakBench 3/100, tulu-harmbench 3/320, NousResearch/Re
164
 
165
  ### Accuracy
166
 
167
- I ran these to confirm that abliterating the QAT base and quantizing experts-only didn't cost capability. It's a sanity check with single seeds, not a statistically rigorous comparison. The result: quantization is lossless on every measured task, and the only cost is a 4-point increase in non-terminating traces under greedy decoding with thinking enabled.
168
 
169
- Three columns: the original model, Google's QAT release, the abliterated QAT base (this checkpoint). NVFP4 quant is coming soon and will be reported on its own model card. Recovery is this model divided by the QAT base (abliteration cost only).
 
 
 
 
170
 
171
  **With thinking**
172
 
@@ -352,132 +357,114 @@ The results were obtained using the following commands:
352
 
353
  <details>
354
 
355
- Each benchmark was run 1 time with same judgmental seed (1234).
356
 
357
- Ran using a docker image, you will need to tweak these for your own environment. Parameters similar to the RedHatAI runs.
358
 
359
- **vLLM server (all benchmarks):**
360
- ```
361
- sudo docker run --rm -it \
362
- --gpus all \
363
- --ipc=host \
364
- --network host \
365
  -v ~/models/abl/gemma-4-26B-qat-ega:/models/qat-ega:ro \
 
366
  -e VLLM_USE_V2_MODEL_RUNNER=1 \
367
  ghcr.io/timothystewart6/vllm-gb10:latest \
368
  vllm serve /models/qat-ega \
369
  --host 0.0.0.0 --port 8001 \
370
  --served-model-name qat-ega \
371
- --max-model-len 69632 \
372
- --gpu-memory-utilization 0.50 \
 
 
 
373
  --enable-auto-tool-choice \
374
  --reasoning-parser gemma4 \
375
  --tool-call-parser gemma4 \
376
- --limit-mm-per-prompt '{"image":0,"audio":0}' \
377
- --kv-cache-dtype fp8 \
378
- --max-num-seqs 32 \
379
- --async-scheduling
380
  ```
381
 
382
- #### GSM8K Platinum (lm-eval, 0-shot, 1 repetition)
383
- ```
384
- for SEED in 1234 2345 3456; do
385
- lm_eval --model local-chat-completions \
386
- --tasks gsm8k_platinum_cot_llama \
387
- --model_args "model=qat-ega,max_length=36096,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=2400" \
388
- --num_fewshot 0 \
389
- --apply_chat_template \
390
- --output_path "results_gsm8k_seed${SEED}.json" \
391
- --seed $SEED \
392
- --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=${SEED}"
393
- echo "Seed $SEED complete"
394
- done
395
- ```
396
 
397
- #### MMLU-Pro (lm-eval, 0-shot, 1 repetition)
398
- ```
399
- for SEED in 1234 2345 3456; do
400
- lm-eval run --model local-chat-completions \
401
- --tasks mmlu_pro \
402
- --model_args "model=qat-ega,max_length=36096,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=2400" \
403
- --num_fewshot 0 \
404
- --apply_chat_template \
405
- --output_path "results_mmlu_pro_seed${SEED}.json" \
406
- --seed $SEED \
407
- --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=${SEED}"
408
- echo "MMLU-Pro seed $SEED complete"
409
- done
410
  ```
411
 
412
- #### IFEval (lm-eval, 0-shot, 1 repetition)
413
- ```
414
- for SEED in 1234; do
415
- lm_eval --model local-chat-completions \
416
- --tasks ifeval \
417
- --model_args "model=qat-ega,max_length=36096,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=2400" \
418
- --num_fewshot 0 \
419
- --apply_chat_template \
420
- --output_path "results_ifeval_seed${SEED}.json" \
421
- --seed $SEED \
422
- --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=${SEED}"
423
- echo "IFEval seed $SEED complete"
424
- done
425
  ```
426
 
427
- #### MATH-500, AIME 2025, GPQA Diamond (lighteval, 1 repetition)
428
-
429
- **litellm_config.yaml:**
430
- ```yaml
431
- model_parameters:
432
- provider: hosted_vllm
433
- model_name: hosted_vllm/qat-ega
434
- base_url: http://0.0.0.0:8001/v1
435
- api_key: ''
436
- timeout: 7200
437
- concurrent_requests: 32
438
- generation_parameters:
439
- temperature: 1.0
440
- max_new_tokens: 65536
441
- top_p: 0.95
442
- top_k: 64
443
- seed: 1234
444
  ```
445
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  ```
447
- # GPQA Diamond (1 seed)
448
- for SEED in 1234; do
449
- sed -i "s/seed: .*/seed: $SEED/" litellm_config.yaml
450
- lighteval endpoint litellm litellm_config.yaml 'gpqa:diamond|0' \
451
- --output-dir "results_gpqa_seed${SEED}/" --save-details
452
- echo "GPQA Diamond seed $SEED complete"
453
- done
454
-
455
- # MATH-500 (1 seed)
456
- for SEED in 1234; do
457
- sed -i "s/seed: .*/seed: $SEED/" litellm_config.yaml
458
- lighteval endpoint litellm litellm_config.yaml 'math_500|0' \
459
- --output-dir "results_math500_seed${SEED}/" --save-details
460
- echo "MATH-500 seed $SEED complete"
461
- done
462
  ```
463
 
464
- #### LiveCodeBench v6 (lighteval, 3 repetitions)
465
-
466
- **litellm_config.yaml:**
467
- ```yaml
468
- model_parameters:
469
- provider: hosted_vllm
470
- model_name: hosted_vllm/qat-ega
471
- base_url: http://0.0.0.0:8001/v1
472
- api_key: ''
473
- timeout: 7200
474
- concurrent_requests: 32
475
- generation_parameters:
476
- temperature: 1.0
477
- max_new_tokens: 32768
478
- top_p: 0.95
479
- top_k: 64
480
- seed: 1234
481
  ```
482
 
 
 
 
 
 
 
483
  </details>
 
22
  - '--reasoning-parser gemma4'
23
  - '--enable-prefix-caching'
24
  default-chat-template-kwargs: '{"enable_thinking": true}'
25
+ chat_template_file_name: chat_template.jinja
 
26
  tool_call_parser: gemma4
27
  validated_tasks:
28
  - tool-calling
 
83
  --enable-auto-tool-choice \
84
  --reasoning-parser gemma4 \
85
  --tool-call-parser gemma4 \
 
86
  --default-chat-template-kwargs '{"enable_thinking": true}' \
87
+ --limit-mm-per-prompt '{"image": 4}' \
88
+ --async-scheduling \
89
+ --speculative-config '{"method":"mtp","model":"google/gemma-4-26B-A4B-it-qat-q4_0-unquantized-assistant","num_speculative_tokens":3}'
90
  ```
91
 
92
+ > **MTP:** use the QAT-specific drafter `google/gemma-4-26B-A4B-it-qat-q4_0-unquantized-assistant`, not the vanilla one. On reasoning workloads it accepts ~78% of drafts vs ~53% for the vanilla drafter, a 2.2× vs 1.6× speedup. Lossless in distribution.
93
+ >
94
+ > **Tip:** For text-only workloads, pass `--language-model-only` to skip vision encoder memory allocation and free up GPU memory for a longer context window.
95
 
96
  2. Send requests to the server:
97
 
 
150
 
151
  ## Evaluation
152
 
153
+ This model was evaluated on IFEval, GSM8K Platinum, MATH-500, GPQA Diamond, WikiText-2, TruthfulQA-MC2, a 300-problem GSM8K termination split, and a needle-in-haystack long-context test using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness), served with [vLLM](https://docs.vllm.ai/en/latest/) (OpenAI-compatible API).
154
 
155
  ### Performance
156
 
 
165
 
166
  ### Accuracy
167
 
168
+ Three columns: the original model, Google's QAT release, and this checkpoint. All measured on the same hardware (NVIDIA GB10), same vLLM build, same server config, same seed, with the QAT-specific MTP drafter on every server. The difference between the first two is the cost of QAT; between the last two is the cost of abliteration. Recovery is this model divided by the QAT base (abliteration cost only). Protocol follows [RedHatAI](https://huggingface.co/RedHatAI/gemma-4-26B-A4B-it-NVFP4)'s: 0-shot, temperature 1.0, top-p 0.95, top-k 64, `max_gen_toks=32000`, seed 1234, 1 repetition.
169
 
170
+ The vanilla and QAT columns are complete for round 1 (IFEval, wikitext, TruthfulQA, GSM8K split) and show the two bases are equivalent on every chat-templated task; they differ only on raw-text perplexity, where vanilla scores 24% worse for reasons not yet explained. Round 2 (Platinum, MATH-500, GPQA, no-think) was run against QAT as the reference base and not repeated on vanilla.
171
+
172
+ I ran these to confirm that abliterating the QAT base didn't cost capability. It's a sanity check with single seeds, not a statistically rigorous comparison. The result: abliteration costs about 5 points on TruthfulQA and 2–4 points on MATH-500, and is within noise everywhere else. Termination and long-context retrieval are unaffected. The NVFP4 quant of this checkpoint is reported on its own model card.
173
+
174
+ One 26B-specific observation: MATH-500 scores higher *without* thinking on all three models (QAT 86.8 vs 83.8, EGA 83.2 vs 81.8). The MoE's reasoning traces cost it a few points on this benchmark.
175
 
176
  **With thinking**
177
 
 
357
 
358
  <details>
359
 
360
+ Single seed (1234) per benchmark. All three models served on NVIDIA GB10 with the same vLLM build and identical server flags apart from the model path.
361
 
362
+ **vLLM server:**
363
 
364
+ `ghcr.io/timothystewart6/vllm-gb10:latest` (`v0.28.1.dev0+g2cf0a6915.d20260828`, transformers 5.16.1). The QAT-specific MTP drafter is lossless under rejection sampling and only affects throughput.
365
+
366
+ ```shell
367
+ docker run --rm -it \
368
+ --gpus all --ipc=host --network host \
 
369
  -v ~/models/abl/gemma-4-26B-qat-ega:/models/qat-ega:ro \
370
+ -v ~/.cache/huggingface:/root/.cache/huggingface \
371
  -e VLLM_USE_V2_MODEL_RUNNER=1 \
372
  ghcr.io/timothystewart6/vllm-gb10:latest \
373
  vllm serve /models/qat-ega \
374
  --host 0.0.0.0 --port 8001 \
375
  --served-model-name qat-ega \
376
+ --max-model-len 65536 \
377
+ --gpu-memory-utilization 0.75 \
378
+ --max-num-seqs 32 \
379
+ --max-num-batched-tokens 8192 \
380
+ --language-model-only \
381
  --enable-auto-tool-choice \
382
  --reasoning-parser gemma4 \
383
  --tool-call-parser gemma4 \
384
+ --async-scheduling \
385
+ --default-chat-template-kwargs '{"enable_thinking": true}' \
386
+ --speculative-config '{"method":"mtp","model":"google/gemma-4-26B-A4B-it-qat-q4_0-unquantized-assistant","num_speculative_tokens":3}'
 
387
  ```
388
 
389
+ > To reproduce the without-thinking results, remove `--default-chat-template-kwargs '{"enable_thinking": true}'`.
390
+ >
391
+ > **Deviations from RedHatAI's protocol:** `--max-model-len 65536` rather than 32768 — with `max_gen_toks=32000`, a 32768 ceiling leaves 768 tokens for the prompt and MATH-500 has longer problems, which vLLM rejects with HTTP 400. `timeout=3600` rather than 1200 — BF16 on GB10 needs ~31 minutes to exhaust a 32000-token budget. `until=[]` on all tasks — the default stop sequences truncate thinking traces mid-reasoning. Model's shipped chat template rather than `examples/tool_chat_template_gemma4.jinja`. `max_retries=6`.
 
 
 
 
 
 
 
 
 
 
 
392
 
393
+ #### GSM8K Platinum (lm-eval, 0-shot)
394
+ ```shell
395
+ lm_eval --model local-chat-completions \
396
+ --tasks gsm8k_platinum_cot_llama \
397
+ --model_args "model=qat-ega,max_length=65536,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=6,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
398
+ --num_fewshot 0 --apply_chat_template \
399
+ --output_path results/qat-ega_gsm8k_platinum \
400
+ --seed 1234 \
401
+ --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=1234,until=[]"
 
 
 
 
402
  ```
403
 
404
+ #### IFEval (lm-eval, 0-shot)
405
+ ```shell
406
+ lm_eval --model local-chat-completions \
407
+ --tasks ifeval \
408
+ --model_args "model=qat-ega,max_length=65536,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=6,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
409
+ --num_fewshot 0 --apply_chat_template \
410
+ --output_path results/qat-ega_ifeval \
411
+ --seed 1234 \
412
+ --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=1234,until=[]"
 
 
 
 
413
  ```
414
 
415
+ #### MATH-500 (lm-eval `minerva_math500`, 0-shot)
416
+
417
+ Requires `pip install 'lm-eval[math]'` and `antlr4-python3-runtime==4.11`. Same 500-problem subset as lighteval's `math_500`, scored with sympy-based answer equivalence (`math_verify`). The `exact_match` filter reports 0 on thinking-mode output and is not the reported number.
418
+
419
+ ```shell
420
+ lm_eval --model local-chat-completions \
421
+ --tasks minerva_math500 \
422
+ --model_args "model=qat-ega,max_length=65536,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=6,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
423
+ --num_fewshot 0 --apply_chat_template \
424
+ --output_path results/qat-ega_math500 \
425
+ --seed 1234 \
426
+ --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=1234,until=[]"
 
 
 
 
 
427
  ```
428
 
429
+ #### GPQA Diamond (lm-eval `gpqa_diamond_cot_zeroshot`, 0-shot)
430
+
431
+ Dataset is gated; requires an HF token that has accepted the terms for `Idavidrein/gpqa`. `flexible-extract` is the reported number.
432
+
433
+ ```shell
434
+ lm_eval --model local-chat-completions \
435
+ --tasks gpqa_diamond_cot_zeroshot \
436
+ --model_args "model=qat-ega,max_length=65536,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=32,max_retries=6,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
437
+ --num_fewshot 0 --apply_chat_template \
438
+ --output_path results/qat-ega_gpqa \
439
+ --seed 1234 \
440
+ --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=32000,seed=1234,until=[]"
441
  ```
442
+
443
+ #### WikiText-2 and TruthfulQA-MC2 (lm-eval, loglikelihood)
444
+ ```shell
445
+ lm_eval --model local-completions \
446
+ --model_args "model=qat-ega,base_url=http://0.0.0.0:8001/v1/completions,tokenizer=/path/to/checkpoint,num_concurrent=8,max_retries=3,tokenized_requests=True" \
447
+ --tasks wikitext --num_fewshot 0 --batch_size 1
448
+
449
+ lm_eval --model local-completions \
450
+ --model_args "model=qat-ega,base_url=http://0.0.0.0:8001/v1/completions,tokenizer=/path/to/checkpoint,num_concurrent=8,max_retries=3,tokenized_requests=True" \
451
+ --tasks truthfulqa_mc2 --num_fewshot 0 --apply_chat_template
 
 
 
 
 
452
  ```
453
 
454
+ #### GSM8K three-number split (lm-eval, 0-shot, temperature 0, 300-problem subset)
455
+ ```shell
456
+ lm_eval --model local-chat-completions \
457
+ --tasks gsm8k \
458
+ --model_args "model=qat-ega,base_url=http://0.0.0.0:8001/v1/chat/completions,num_concurrent=16,max_retries=3,timeout=3600" \
459
+ --num_fewshot 0 --limit 300 --apply_chat_template \
460
+ --gen_kwargs "max_gen_toks=8192,until=[]" \
461
+ --output_path results/qat-ega_gsm8k_300 --log_samples
 
 
 
 
 
 
 
 
 
462
  ```
463
 
464
+ Rescored from the samples file: a response is *empty* if it contains no content (thinking never terminated); *headline* is correct / total; *answered-only* is correct / (total − empty). Extraction takes the last number in the response after stripping markdown and thousands separators, since lm-eval's flexible-extract filter returns `[invalid]` on this model's bolded answer formatting.
465
+
466
+ #### Needle-in-a-haystack
467
+
468
+ Custom script: single needle (a random vault code) buried in WikiText-2 filler at depths 0/0.25/0.5/0.75/1.0 for context lengths 4k/8k/16k/32k/64k, thinking off, temperature 0, exact-match on the code. 25 requests per model.
469
+
470
  </details>