Image-Text-to-Text
GGUF
llama.cpp
qwen
qwen3.8
qwen3.8-flash-next
amd
rocm
gfx1151
ryzen-ai-max-395
strix-halo
mixture-of-experts
iu4
mtp
speculative-decoding
nvme
ple
long-context
local-inference
vision
conversational
Instructions to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0 # Run inference directly in the terminal: llama cli -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0 # Run inference directly in the terminal: llama cli -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Use Docker
docker model run hf.co/jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
- LM Studio
- Jan
- vLLM
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
- Ollama
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with Ollama:
ollama run hf.co/jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
- Unsloth Desktop
- Pi
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with Docker Model Runner:
docker model run hf.co/jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
- Lemonade
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Run and chat with the model
lemonade run user.Qwen3.8-Flash-CIRU-STRIX-IU4-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "jcbtc/Qwen3.8-Flash-CIRU-STRIX-IU4:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add original v2.0 prefill fixture and reproduction requests
Browse files- .gitattributes +1 -0
- benchmarks/v2.0/prefill-reproduction.zip +3 -0
- benchmarks/v2.0/prefill-reproduction/LICENSE +21 -0
- benchmarks/v2.0/prefill-reproduction/NOTICE.md +19 -0
- benchmarks/v2.0/prefill-reproduction/README.md +70 -0
- benchmarks/v2.0/prefill-reproduction/SHA256SUMS +6 -0
- benchmarks/v2.0/prefill-reproduction/fixture.json +67 -0
- benchmarks/v2.0/prefill-reproduction/make-request.py +41 -0
- benchmarks/v2.0/prefill-reproduction/real-source-131072.i32le.bin +3 -0
.gitattributes
CHANGED
|
@@ -6,3 +6,4 @@ assets/qwen38-flash-ciru-strix-iu4.jpg filter=lfs diff=lfs merge=lfs -text
|
|
| 6 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 7 |
|
| 8 |
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 6 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 7 |
|
| 8 |
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
benchmarks/v2.0/prefill-reproduction.zip filter=lfs diff=lfs merge=lfs -text
|
benchmarks/v2.0/prefill-reproduction.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e43504494bd19a0eb48543804d64d92132962660dd729da25a1702e0ce5c15cf
|
| 3 |
+
size 105895
|
benchmarks/v2.0/prefill-reproduction/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2023-2026 The ggml authors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
benchmarks/v2.0/prefill-reproduction/NOTICE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Source notices
|
| 2 |
+
|
| 3 |
+
The frozen token fixture contains pretokenized llama.cpp source code and documentation, including file-name separators. The project's MIT license is supplied in `LICENSE`: Copyright (c) 2023-2026 The ggml authors.
|
| 4 |
+
|
| 5 |
+
The included `common/base64.hpp` excerpt is public-domain software under the Unlicense. Its original notice is retained in the token sequence and reproduced below. Other original notices and attribution embedded in the source remain in the token sequence. CIRU's request generator and accompanying reproduction documentation are supplied under the included MIT license, Copyright (c) 2026 Ciru.
|
| 6 |
+
|
| 7 |
+
The original generator receipt records 365 source files and 4,195,525 bytes of assembled text before tokenization and truncation to 131,072 tokens. The exact source snapshot commit was not recorded in that receipt. The frozen token file and its published SHA-256, rather than regenerating from a later source checkout, define this benchmark input.
|
| 8 |
+
|
| 9 |
+
## Unlicense notice for common/base64.hpp
|
| 10 |
+
|
| 11 |
+
This is free and unencumbered software released into the public domain.
|
| 12 |
+
|
| 13 |
+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
|
| 14 |
+
|
| 15 |
+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
|
| 16 |
+
|
| 17 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 18 |
+
|
| 19 |
+
For more information, please refer to <http://unlicense.org>.
|
benchmarks/v2.0/prefill-reproduction/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CIRU v2.0 prefill benchmark input
|
| 2 |
+
|
| 3 |
+
The original frozen input used for the published CIRU / Agention-Laurent / Unsloth MTP-off context comparison. It contains 131,072 native Qwen token IDs; shorter rows use prefixes of this same file.
|
| 4 |
+
|
| 5 |
+
[Download the complete reproduction pack](../prefill-reproduction.zip) · [Token fixture](real-source-131072.i32le.bin) · [Checksums](SHA256SUMS) · [Recorded methodology](../METHODOLOGY.md) · [Recorded runtime settings](../runtime-recipes.json)
|
| 6 |
+
|
| 7 |
+
Fixture SHA-256:
|
| 8 |
+
|
| 9 |
+
```text
|
| 10 |
+
ca55a6b6f26a277bdf8c87ae9046f812253d6219d7f9e305075278b76a325e26
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
The file is 524,288 bytes: signed 32-bit little-endian token IDs. Send these IDs directly to `/completion`; no retokenization or chat-template wrapping is needed. The input consists of source code and documentation from llama.cpp. Its original source-file markers remain part of the token sequence. Source notices are included in [NOTICE.md](NOTICE.md) and [LICENSE](LICENSE).
|
| 14 |
+
|
| 15 |
+
## Prepare one context length
|
| 16 |
+
|
| 17 |
+
Download and extract the pack, then run:
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
cd prefill-reproduction
|
| 21 |
+
sha256sum -c SHA256SUMS
|
| 22 |
+
python3 make-request.py --tokens 8192 --out-dir requests-8192
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
This only writes JSON requests. It does not start inference. Supported prefix lengths are 512, 2048, 8192, 16384, 32768, 65536 and 131072. The script writes the original 512-token / 32-output warmup and one chosen prompt / 128-output measurement request.
|
| 26 |
+
|
| 27 |
+
## CIRU server settings
|
| 28 |
+
|
| 29 |
+
Use the CIRU runtime [v2.0 source](https://github.com/ciru-ai/Qwen3.8-Flash-CIRU-STRIX-IU4/tree/v2.0), the released target GGUF and all three PLE sidecars. From the runtime directory, launch with:
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
ENABLE_MTP=0 CONTEXT_SIZE=262144 PARALLEL_SLOTS=1 \
|
| 33 |
+
BUILD_DIR="$PWD/build-gfx1151-sdk" \
|
| 34 |
+
MODEL_DIR=/absolute/path/to/Qwen3.8-Flash-CIRU-STRIX-IU4 \
|
| 35 |
+
./scripts/ciru/run-server.sh
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
This uses batch 2048, microbatch 512, eight threads, F16 target KV, flash attention, a 4096 MiB PLE cache and 16 pager workers. The launcher also exports the production kernel settings, including `GGML_CUDA_Q41_MOE_FORCE_J=32`, `ROCBLAS_USE_HIPBLASLT=1` and `GGML_QSA_LONG_TOPK=1`. MTP must be disabled for comparison with the published MTP-off table; the startup `/slots` response should show one slot at 262144 context with `speculative: false`.
|
| 39 |
+
|
| 40 |
+
The original three-way sweep ran sequentially on Sozo, Ryzen AI Max+ 395 / Radeon 8060S, NixOS and ROCm 10 for CIRU, with CPU governors recorded as powersave and no locked GPU clocks. The comparator arms retained their own documented settings. Record your build/environment alongside the result.
|
| 41 |
+
|
| 42 |
+
## Send the requests
|
| 43 |
+
|
| 44 |
+
Use an idle one-slot server. From the reproduction-pack directory, send the excluded warmup once after loading the server:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
curl --fail-with-body -sS -X POST \
|
| 48 |
+
-H 'Content-Type: application/json' --data '{}' \
|
| 49 |
+
'http://127.0.0.1:8080/slots/0?action=erase'
|
| 50 |
+
curl --fail-with-body -sS -N http://127.0.0.1:8080/completion \
|
| 51 |
+
-H 'Content-Type: application/json' \
|
| 52 |
+
--data-binary @requests-8192/warmup.json > warmup-8192.sse
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Erase the slot again before the measured request:
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
curl --fail-with-body -sS -X POST \
|
| 59 |
+
-H 'Content-Type: application/json' --data '{}' \
|
| 60 |
+
'http://127.0.0.1:8080/slots/0?action=erase'
|
| 61 |
+
curl --fail-with-body -sS -N http://127.0.0.1:8080/completion \
|
| 62 |
+
-H 'Content-Type: application/json' \
|
| 63 |
+
--data-binary @requests-8192/prompt-8192.json > result-8192.sse
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
Use the final SSE event's `timings.prompt_per_second`. Verify `prompt_n=8192`, `cache_n=0`, `predicted_n=128` and zero drafted/accepted tokens (or absent counters when speculation is disabled). Keep the complete SSE and startup log. The request uses temperature 0, top-k 0, top-p 1, min-p 0, neutral penalties, seed 1234, EOS ignored and prompt reuse disabled.
|
| 67 |
+
|
| 68 |
+
For the historical full sweep, the measured lengths followed ascending order after the one warmup. Slot erasure clears prompt reuse; it does not reset the PLE cache or OS page cache. A standalone 8K check is useful, with that cache-history difference recorded. No full sweep is required to use this pack.
|
| 69 |
+
|
| 70 |
+
This pack adds the original input and an offline request generator. It does not change the published measurements, runtime or weights. The generator was checked against the retained request recipe without a new model run.
|
benchmarks/v2.0/prefill-reproduction/SHA256SUMS
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
94f29bbed6a22c35b992c5c6ebf0e7c92f13b836b90f36f461c9cf2f0f1d010d LICENSE
|
| 2 |
+
26cdb14cc1faaeb12adaa2a55c6c809f0eff32c9a543e3156b8afcaa401d4a86 NOTICE.md
|
| 3 |
+
981659c4cc9a0087069ea6b06507304a563d735b6bfafa886832bf41cb4dacc0 README.md
|
| 4 |
+
f1f7195d9f9fe8ab4cb7670c4469ceac1fcb09b790ca3d5d2d13150bd949a477 fixture.json
|
| 5 |
+
0a5edf87e409529aaab7be5c956b5bbd288ba9900d6263367b1abfa3b622f4ba make-request.py
|
| 6 |
+
ca55a6b6f26a277bdf8c87ae9046f812253d6219d7f9e305075278b76a325e26 real-source-131072.i32le.bin
|
benchmarks/v2.0/prefill-reproduction/fixture.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fixture": "real-source-131072.i32le.bin",
|
| 3 |
+
"sha256": "ca55a6b6f26a277bdf8c87ae9046f812253d6219d7f9e305075278b76a325e26",
|
| 4 |
+
"bytes": 524288,
|
| 5 |
+
"token_count": 131072,
|
| 6 |
+
"encoding": "signed int32 little-endian",
|
| 7 |
+
"tokenizer": "Qwen3.8-Flash released GGUF native vocabulary; token IDs are already encoded",
|
| 8 |
+
"prefixes": [
|
| 9 |
+
{
|
| 10 |
+
"tokens": 512,
|
| 11 |
+
"bytes": 2048,
|
| 12 |
+
"prefix_sha256": "6fd348a00bd55054d7b7714c0144f6050b1fbe4e0eef5c3f1e931b5241d276f6"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"tokens": 2048,
|
| 16 |
+
"bytes": 8192,
|
| 17 |
+
"prefix_sha256": "1599f52fa40b6ead53b6c63256ce711327707351541439c4c25e142557f5d893"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"tokens": 8192,
|
| 21 |
+
"bytes": 32768,
|
| 22 |
+
"prefix_sha256": "8bbea0041e87517b827be4a79da512a4038b4cd696e4a04770096e290c940dc2"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"tokens": 16384,
|
| 26 |
+
"bytes": 65536,
|
| 27 |
+
"prefix_sha256": "23d85d41b41f9e9cfe056c22d7ea1bba88d46a3ba58af193a6c240ae4759940b"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"tokens": 32768,
|
| 31 |
+
"bytes": 131072,
|
| 32 |
+
"prefix_sha256": "53b725a8322182962f2b9592a8f4904abfd13005f4426eb83f82ad0500dbbbbc"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"tokens": 65536,
|
| 36 |
+
"bytes": 262144,
|
| 37 |
+
"prefix_sha256": "a15da531248795a64918c7d3904926600aece5c8d1e8b76371d7ca1c2242a6f2"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"tokens": 131072,
|
| 41 |
+
"bytes": 524288,
|
| 42 |
+
"prefix_sha256": "ca55a6b6f26a277bdf8c87ae9046f812253d6219d7f9e305075278b76a325e26"
|
| 43 |
+
}
|
| 44 |
+
],
|
| 45 |
+
"request_settings": {
|
| 46 |
+
"stream": true,
|
| 47 |
+
"n_predict": 128,
|
| 48 |
+
"temperature": 0,
|
| 49 |
+
"top_k": 0,
|
| 50 |
+
"top_p": 1,
|
| 51 |
+
"min_p": 0,
|
| 52 |
+
"repeat_penalty": 1,
|
| 53 |
+
"presence_penalty": 0,
|
| 54 |
+
"frequency_penalty": 0,
|
| 55 |
+
"seed": 1234,
|
| 56 |
+
"cache_prompt": false,
|
| 57 |
+
"ignore_eos": true,
|
| 58 |
+
"return_tokens": true
|
| 59 |
+
},
|
| 60 |
+
"warmup": {
|
| 61 |
+
"prompt_tokens": 512,
|
| 62 |
+
"generated_tokens": 32
|
| 63 |
+
},
|
| 64 |
+
"source_type": "llama.cpp source code and documentation, sorted file concatenation followed by token-prefix truncation",
|
| 65 |
+
"source_snapshot_commit": null,
|
| 66 |
+
"identity_note": "Retained original bytes matching the pre-existing public hash; not regenerated from a later checkout."
|
| 67 |
+
}
|
benchmarks/v2.0/prefill-reproduction/make-request.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Write the retained native-token request; does not start a server or inference."""
|
| 3 |
+
import argparse
|
| 4 |
+
import hashlib
|
| 5 |
+
import json
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
import struct
|
| 8 |
+
|
| 9 |
+
FIXTURE_SHA256 = 'ca55a6b6f26a277bdf8c87ae9046f812253d6219d7f9e305075278b76a325e26'
|
| 10 |
+
LENGTHS = [512, 2048, 8192, 16384, 32768, 65536, 131072]
|
| 11 |
+
|
| 12 |
+
def request(raw, n, generated):
|
| 13 |
+
return {
|
| 14 |
+
'prompt': list(struct.unpack('<' + str(n) + 'i', raw[:n * 4])),
|
| 15 |
+
'stream': True, 'n_predict': generated, 'temperature': 0,
|
| 16 |
+
'top_k': 0, 'top_p': 1, 'min_p': 0, 'repeat_penalty': 1,
|
| 17 |
+
'presence_penalty': 0, 'frequency_penalty': 0, 'seed': 1234,
|
| 18 |
+
'cache_prompt': False, 'ignore_eos': True, 'return_tokens': True,
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
def main():
|
| 22 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 23 |
+
parser.add_argument('--tokens', type=int, choices=LENGTHS, default=8192)
|
| 24 |
+
parser.add_argument('--out-dir', type=Path, default=Path('requests'))
|
| 25 |
+
args = parser.parse_args()
|
| 26 |
+
raw = (Path(__file__).resolve().parent / 'real-source-131072.i32le.bin').read_bytes()
|
| 27 |
+
if len(raw) != 524288 or hashlib.sha256(raw).hexdigest() != FIXTURE_SHA256:
|
| 28 |
+
raise SystemExit('Fixture size/hash mismatch')
|
| 29 |
+
args.out_dir.mkdir(parents=True, exist_ok=True)
|
| 30 |
+
for filename, payload in [
|
| 31 |
+
('warmup.json', request(raw, 512, 32)),
|
| 32 |
+
(f'prompt-{args.tokens}.json', request(raw, args.tokens, 128)),
|
| 33 |
+
]:
|
| 34 |
+
path = args.out_dir / filename
|
| 35 |
+
if path.exists():
|
| 36 |
+
raise SystemExit(f'Refusing to overwrite {path}; choose a new --out-dir')
|
| 37 |
+
path.write_text(json.dumps(payload, separators=(',', ':')) + '\n')
|
| 38 |
+
print(path)
|
| 39 |
+
|
| 40 |
+
if __name__ == '__main__':
|
| 41 |
+
main()
|
benchmarks/v2.0/prefill-reproduction/real-source-131072.i32le.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca55a6b6f26a277bdf8c87ae9046f812253d6219d7f9e305075278b76a325e26
|
| 3 |
+
size 524288
|