Card for FastFlowLM 1.0.11: images, 32,768-token input, current accuracy and speed
Browse files- MANIFEST.sha256 +1 -1
- README.md +44 -17
MANIFEST.sha256
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 2 |
b1f8d5da5bd599029de424b307a979abc0bfc60500e95018c6cd5c8caf3de970 NOTICE
|
| 3 |
-
|
| 4 |
273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja
|
| 5 |
7e59d9fda4eb32509e0f306a826e0a64cf4ccb5099f446550f1a58b9f17fb833 config.json
|
| 6 |
30b6095b945d5a93697868afdf9be9123ea892085fbaff3078112c48da20dc6b decision_config.json
|
|
|
|
| 1 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 2 |
b1f8d5da5bd599029de424b307a979abc0bfc60500e95018c6cd5c8caf3de970 NOTICE
|
| 3 |
+
944edd2a82fb0ec05991f7ae5b7515111f019c64fb9cfc05a8673154a3553f43 README.md
|
| 4 |
273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja
|
| 5 |
7e59d9fda4eb32509e0f306a826e0a64cf4ccb5099f446550f1a58b9f17fb833 config.json
|
| 6 |
30b6095b945d5a93697868afdf9be9123ea892085fbaff3078112c48da20dc6b decision_config.json
|
README.md
CHANGED
|
@@ -13,9 +13,10 @@ tags:
|
|
| 13 |
# D3-Lite-NPU2
|
| 14 |
|
| 15 |
[vllm-sr/d3-lite](https://huggingface.co/vllm-sr/d3-lite) `v3.1.3` (Decision 3.0, the decision model of vLLM Semantic
|
| 16 |
-
Router) for AMD Ryzen AI NPUs, served by [FastFlowLM](https://github.com/ROCm/FastFlowLM) 1.0.
|
| 17 |
-
It answers *System One* requests -- choice, yes / no and score questions about a state, with
|
| 18 |
-
option -- over the same `POST /v1/systemone` API as the upstream package.
|
|
|
|
| 19 |
|
| 20 |
```shell
|
| 21 |
flm serve --decision d3:lite # optionally next to a chat model: flm serve qwen3.5:4b --decision d3:lite
|
|
@@ -24,38 +25,64 @@ curl -s http://127.0.0.1:52625/v1/systemone -H "Content-Type: application/json"
|
|
| 24 |
"criteria": {"returns": "Refunds and replacements", "billing": "Payments", "general": null}}}}'
|
| 25 |
```
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
## What was changed
|
| 28 |
|
| 29 |
- **Weights:** the Qwen3.5 text tower quantized to FastFlowLM's Q4NX format: every projection Q4_K with
|
| 30 |
GPTQ-calibrated rounding (calibration: 300 Decision Index prompts, none of them in the evaluation
|
| 31 |
sets below), token embedding Q8_0, norms and the Gated DeltaNet parameters unquantized. `vision_weight.q4nx` holds
|
| 32 |
-
the vision tower
|
| 33 |
- **Unchanged:** `readout.safetensors`, `decision_config.json`, `tokenizer.json`, `tokenizer_config.json`,
|
| 34 |
`chat_template.jinja` and `LICENSE` are the upstream files byte for byte (`MANIFEST.sha256`).
|
| 35 |
- **Same contract:** prompts, token ids and answer objects are byte-identical to the upstream runtime (checked on every
|
| 36 |
-
FastFlowLM build against 1,
|
|
|
|
| 37 |
|
| 38 |
## Accuracy (against the upstream BF16 model)
|
| 39 |
|
| 40 |
| | this package on the NPU | upstream BF16 |
|
| 41 |
|---|---|---|
|
| 42 |
-
| Decision Index public-suite subset, gold accuracy (6,824 questions, 35 benchmarks) | 60.
|
| 43 |
-
| Top-1 agreement with BF16 on the same questions | 90.
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
Paired gold accuracy, upstream BF16 minus this package: +0.
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
## Speed (AMD Ryzen AI MAX+ PRO 395 (Strix Halo, XDNA 2 NPU), 128 GB, Ubuntu 24.04, XRT)
|
| 48 |
|
| 49 |
| request | median latency |
|
| 50 |
|---|---|
|
| 51 |
-
| 1 question, 128 tokens |
|
| 52 |
-
| 1 question, 330 tokens |
|
| 53 |
-
| 1 question, 1,024 tokens |
|
| 54 |
-
| 1 question, 4,096 tokens |
|
| 55 |
-
|
|
| 56 |
-
|
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
## License
|
| 61 |
|
|
|
|
| 13 |
# D3-Lite-NPU2
|
| 14 |
|
| 15 |
[vllm-sr/d3-lite](https://huggingface.co/vllm-sr/d3-lite) `v3.1.3` (Decision 3.0, the decision model of vLLM Semantic
|
| 16 |
+
Router) for AMD Ryzen AI NPUs, served by [FastFlowLM](https://github.com/ROCm/FastFlowLM) 1.0.11+.
|
| 17 |
+
It answers *System One* requests -- choice, yes / no and score questions about a state, optionally with images, with a
|
| 18 |
+
probability for every option -- over the same `POST /v1/systemone` API as the upstream package. Up to 32,768 input
|
| 19 |
+
tokens per question.
|
| 20 |
|
| 21 |
```shell
|
| 22 |
flm serve --decision d3:lite # optionally next to a chat model: flm serve qwen3.5:4b --decision d3:lite
|
|
|
|
| 25 |
"criteria": {"returns": "Refunds and replacements", "billing": "Payments", "general": null}}}}'
|
| 26 |
```
|
| 27 |
|
| 28 |
+
Images go in an `images` list of base64 data URLs (PNG, JPEG or WebP; each at most 8 MB and 16 MP, resized to at most
|
| 29 |
+
1.6 MP), shared by every question of the request:
|
| 30 |
+
|
| 31 |
+
```shell
|
| 32 |
+
curl -sLo panda.png https://raw.githubusercontent.com/ROCm/FastFlowLM/main/src/tb_files/panda.png
|
| 33 |
+
printf '{"questions": {"animal": {"type": "choice", "instructions": "Which animal is in the photo?",
|
| 34 |
+
"criteria": {"dog": "A dog", "panda": "A panda", "cat": "A cat"}}},
|
| 35 |
+
"images": ["data:image/png;base64,%s"]}' "$(base64 -w0 panda.png)" > image_request.json
|
| 36 |
+
curl -s http://127.0.0.1:52625/v1/systemone -H "Content-Type: application/json" -d @image_request.json
|
| 37 |
+
# ... "choice":"panda", "panda":0.999 ...
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
More in the [FastFlowLM d3 guide](https://fastflowlm.com/docs/models/d3/).
|
| 41 |
+
|
| 42 |
## What was changed
|
| 43 |
|
| 44 |
- **Weights:** the Qwen3.5 text tower quantized to FastFlowLM's Q4NX format: every projection Q4_K with
|
| 45 |
GPTQ-calibrated rounding (calibration: 300 Decision Index prompts, none of them in the evaluation
|
| 46 |
sets below), token embedding Q8_0, norms and the Gated DeltaNet parameters unquantized. `vision_weight.q4nx` holds
|
| 47 |
+
the vision tower (BF16), used from FastFlowLM 1.0.11 for requests with images.
|
| 48 |
- **Unchanged:** `readout.safetensors`, `decision_config.json`, `tokenizer.json`, `tokenizer_config.json`,
|
| 49 |
`chat_template.jinja` and `LICENSE` are the upstream files byte for byte (`MANIFEST.sha256`).
|
| 50 |
- **Same contract:** prompts, token ids and answer objects are byte-identical to the upstream runtime (checked on every
|
| 51 |
+
FastFlowLM build against 1,365 upstream-rendered requests, 57 of them with images); image grids and input token
|
| 52 |
+
counts equal upstream's, and the image pixels are within 2 grey levels of the upstream processor's.
|
| 53 |
|
| 54 |
## Accuracy (against the upstream BF16 model)
|
| 55 |
|
| 56 |
| | this package on the NPU | upstream BF16 |
|
| 57 |
|---|---|---|
|
| 58 |
+
| Decision Index public-suite subset, gold accuracy (6,824 questions, 35 benchmarks) | 60.5% | 61.2% |
|
| 59 |
+
| Top-1 agreement with BF16 on the same questions (7,226) | 90.6% | -- |
|
| 60 |
+
| Decision Index public vision suite, gold accuracy (600 questions, 10 benchmarks) | 61.7% | 60.2% |
|
| 61 |
+
| Top-1 agreement with BF16 on the same image questions | 84.5% | -- |
|
| 62 |
|
| 63 |
+
Paired gold accuracy, upstream BF16 minus this package: text +0.67 pt (95% CI [+0.08, +1.27] pt); images -1.50 pt
|
| 64 |
+
(95% CI [-3.92, +0.92] pt). The vision suite leaves out Winoground (gated); per-benchmark numbers are on the
|
| 65 |
+
[FastFlowLM d3 benchmark page](https://fastflowlm.com/docs/benchmarks/d3_results/).
|
| 66 |
|
| 67 |
+
## Speed (AMD Ryzen AI MAX+ PRO 395 (Strix Halo, XDNA 2 NPU), 128 GB, Ubuntu 24.04, XRT, FastFlowLM 1.0.11)
|
| 68 |
|
| 69 |
| request | median latency |
|
| 70 |
|---|---|
|
| 71 |
+
| 1 question, 128 tokens | 109 ms |
|
| 72 |
+
| 1 question, 330 tokens | 151 ms |
|
| 73 |
+
| 1 question, 1,024 tokens | 430 ms |
|
| 74 |
+
| 1 question, 4,096 tokens | 1,587 ms |
|
| 75 |
+
| 1 question, 16,384 tokens | 8,425 ms |
|
| 76 |
+
| 1 question, 32,768 tokens | 22,696 ms |
|
| 77 |
+
| 4 questions, 330 tokens each | 536 ms |
|
| 78 |
+
| 16 questions, 330 tokens each | 2,067 ms |
|
| 79 |
+
| 1 question + a 640 x 480 image (398 tokens) | 393 ms |
|
| 80 |
+
| 1 question + a 1.6 MP image (1,698 tokens) | 1,529 ms |
|
| 81 |
+
| 8 questions + one 1.6 MP image (one image encoding) | 6,368 ms |
|
| 82 |
+
|
| 83 |
+
From 1,536 tokens attention runs on the NPU's attention kernel (below that the CPU is faster). Prompts over 32,768
|
| 84 |
+
tokens are answered with `max_length_exceeded` (nothing is truncated). Image rows were measured over HTTP; the others
|
| 85 |
+
at the engine (HTTP adds about a millisecond).
|
| 86 |
|
| 87 |
## License
|
| 88 |
|