Matthew Tchouikine commited on
Commit
fb64230
·
1 Parent(s): a8c24fc
Files changed (1) hide show
  1. README.md +25 -30
README.md CHANGED
@@ -3,7 +3,7 @@ license: apache-2.0
3
  base_model:
4
  - FirstPrinciplesLabs/quark
5
  base_model_relation: quantized
6
- pipeline_tag: image-text-to-text
7
  language:
8
  - en
9
  tags:
@@ -15,52 +15,47 @@ tags:
15
  - math
16
  ---
17
 
18
- # Quark GGUF
19
 
20
- 8-bit GGUF of [Quark](https://huggingface.co/FirstPrinciplesLabs/quark), a 9B reasoning model for physics,
21
- science and maths by [FirstPrinciples](https://firstprinciples.com/), for
22
  [llama.cpp](https://github.com/ggml-org/llama.cpp) and tools built on it (Ollama, LM Studio).
23
 
24
- | File | Contents | Quantization | Size |
25
  |---|---|---|---|
26
- | `quark-Q8_0.gguf` | language model | Q8_0 (8-bit) | 9.8 GB |
27
- | `mmproj-quark-BF16.gguf` | vision encoder, for image input | BF16 (16-bit) | 0.9 GB |
28
 
29
- ## Results and speed
 
30
 
31
- The Q8_0 GGUF matches the original model on GPQA Diamond, AIME 2025, MMLU-Pro Physics and Humanity's Last
32
- Exam. On the Quark model card: [benchmark scores](https://huggingface.co/FirstPrinciplesLabs/quark#results)
33
- and [speed with llama.cpp and vLLM](https://huggingface.co/FirstPrinciplesLabs/quark#speed) (Q8_0 vs bf16,
34
- on an NVIDIA H200 and a MacBook Pro).
 
 
 
35
 
36
  ## Usage
37
 
 
 
 
 
 
 
 
38
  ```bash
39
- # Full thinking budget (needs about 15 GB of GPU memory):
40
  llama-server -hf FirstPrinciplesLabs/quark-GGUF:Q8_0 --jinja -ngl 99 -c 135168
41
 
42
- # 16 GB Macs: a 32K context (answers longer than that are cut off)
43
  llama-server -hf FirstPrinciplesLabs/quark-GGUF:Q8_0 --jinja -ngl 99 -c 32768
44
  ```
45
 
46
- `--jinja` uses the chat template stored in the file, which handles thinking mode. `-ngl 99` puts all
47
- layers on the GPU. `-c` is the context size, prompt and answer together: 135,168 tokens leaves room for a
48
- 131,072-token answer plus the prompt.
49
-
50
- We recommend an output budget of up to 131,072 tokens and the sampling settings from the
51
- [Quark model card](https://huggingface.co/FirstPrinciplesLabs/quark#usage)
52
  (thinking mode: temperature 1.0, top_p 0.95, top_k 20, presence penalty 1.5).
53
 
54
- `-hf` also downloads the vision encoder, so the server accepts images (as `image_url` parts of a chat
55
- message, or attached in its web page). Add `--no-mmproj` for text only. With local files:
56
-
57
- ```bash
58
- llama-server -m quark-Q8_0.gguf --mmproj mmproj-quark-BF16.gguf --jinja -ngl 99 -c 32768
59
- ```
60
-
61
- Image input uses Qwen3.5-9B's vision encoder, which Quark's fine-tuning did not change. We checked it on
62
- simple images (text, labelled diagrams, charts) but did not benchmark it.
63
-
64
  ## License
65
 
66
  Apache 2.0
 
3
  base_model:
4
  - FirstPrinciplesLabs/quark
5
  base_model_relation: quantized
6
+ pipeline_tag: text-generation
7
  language:
8
  - en
9
  tags:
 
15
  - math
16
  ---
17
 
18
+ # Quark int8
19
 
20
+ [Quark](https://huggingface.co/FirstPrinciplesLabs/quark), a 9B reasoning model for physics, science and
21
+ maths by [FirstPrinciples](https://firstprinciples.com/), quantized to int8 for
22
  [llama.cpp](https://github.com/ggml-org/llama.cpp) and tools built on it (Ollama, LM Studio).
23
 
24
+ | File | Format | Size | Input |
25
  |---|---|---|---|
26
+ | `quark-Q8_0.gguf` | Q8_0 (int8) | 9.8 GB | text |
 
27
 
28
+ Q8_0 is llama.cpp's int8 format: weights are stored as 8-bit integers, with one scale shared by each
29
+ block of 32.
30
 
31
+ ## Results
32
+
33
+ The int8 version matches the original bf16 model on GPQA Diamond, AIME 2025, MMLU-Pro Physics and
34
+ Humanity's Last Exam, and generates faster. See the Quark model card for the
35
+ [benchmark scores](https://huggingface.co/FirstPrinciplesLabs/quark#results) and
36
+ [throughput](https://huggingface.co/FirstPrinciplesLabs/quark#throughput) on an NVIDIA H200 and a
37
+ MacBook Pro (M4, 16 GB).
38
 
39
  ## Usage
40
 
41
+ Install llama.cpp, which includes `llama-server`, following its
42
+ [installation guide](https://github.com/ggml-org/llama.cpp/blob/master/docs/install.md) (Homebrew,
43
+ winget, conda, Nix, and builds for NVIDIA GPUs).
44
+
45
+ Then start a server; it downloads the model on first run and serves an OpenAI-compatible API and a chat
46
+ page at `http://localhost:8080`:
47
+
48
  ```bash
49
+ # Full thinking budget (needs about 15 GB of GPU memory)
50
  llama-server -hf FirstPrinciplesLabs/quark-GGUF:Q8_0 --jinja -ngl 99 -c 135168
51
 
52
+ # 16 GB Macs: 32K context (longer answers are cut off)
53
  llama-server -hf FirstPrinciplesLabs/quark-GGUF:Q8_0 --jinja -ngl 99 -c 32768
54
  ```
55
 
56
+ Use the sampling settings from the [Quark model card](https://huggingface.co/FirstPrinciplesLabs/quark#usage)
 
 
 
 
 
57
  (thinking mode: temperature 1.0, top_p 0.95, top_k 20, presence penalty 1.5).
58
 
 
 
 
 
 
 
 
 
 
 
59
  ## License
60
 
61
  Apache 2.0