Instructions to use pottokao/Z-Image-Engineer-V6-DFlash-b16 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 pottokao/Z-Image-Engineer-V6-DFlash-b16 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 pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M # Run inference directly in the terminal: llama cli -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M # Run inference directly in the terminal: llama cli -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
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 pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
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 pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
Use Docker
docker model run hf.co/pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use pottokao/Z-Image-Engineer-V6-DFlash-b16 with Ollama:
ollama run hf.co/pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
- Unsloth Desktop
- Pi
How to use pottokao/Z-Image-Engineer-V6-DFlash-b16 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
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": "pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use pottokao/Z-Image-Engineer-V6-DFlash-b16 with Docker Model Runner:
docker model run hf.co/pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
- Lemonade
How to use pottokao/Z-Image-Engineer-V6-DFlash-b16 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
Run and chat with the model
lemonade run user.Z-Image-Engineer-V6-DFlash-b16-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use pottokao/Z-Image-Engineer-V6-DFlash-b16 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
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 pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use pottokao/Z-Image-Engineer-V6-DFlash-b16 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M
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 "pottokao/Z-Image-Engineer-V6-DFlash-b16:Q4_K_M" \ --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"
Z-Image-Engineer-V6 DFlash draft (b16)
A DFlash block-diffusion draft head for Z-Image-Engineer V6 with the Master Style prompt-rewrite LoRA attached
(pottokao/zeng-v6_master-pe_lora_v4.1-r32-ep2_20260928),
i.e. the Master Style role-play system prompt + style card workload on the rewrite (PE) role of the ComfyUI-DualHead-Dragon
node. Started from z-lab/Qwen3-4B-DFlash-b16; same architecture and tensor names (5 layers, block 16, target layers
1/9/17/25/33).
It is specialised: it only speeds up that workload. On other prompts it still gives correct output (speculative decoding never changes what the target produces) but guesses less often.
Files
| file | MB | use |
|---|---|---|
model.safetensors + config.json + dflash.pyโฆ |
1075 | z-lab / transformers / vLLM format |
gguf/z-image-engineer-v6-dflash-b16-bf16.gguf |
1081 | llama.cpp reference |
gguf/z-image-engineer-v6-dflash-b16-Q8_0.gguf |
577 | near-lossless |
gguf/z-image-engineer-v6-dflash-b16-Q6_K.gguf |
447 | recommended |
gguf/z-image-engineer-v6-dflash-b16-Q4_K_M.gguf |
323 | smallest; same speed as Q6_K |
The GGUFs were converted with convert_hf_to_gguf.py --target-model-dir <V6 HF> and quantized with llama-quantize
from the bf16 file. The draft shares the target's token embedding and output head, so the files hold only the 5 draft layers.
llama-server -m <V6 gguf> --lora <master PE LoRA gguf> -md gguf/z-image-engineer-v6-dflash-b16-Q6_K.gguf \
--spec-type draft-dflash --spec-draft-n-max 15 -fa on -np 1
Single sequence only: upstream draft-dflash acceptance collapses with many parallel sequences (llama.cpp #27117).
--spec-draft-n-max 15: llama.cpp verifies 9โ16 tokens at almost the cost of one, 5โ8 is the expensive range.
Results
Offline, 120 held-out prompts, K=15:
| z-lab original | this head | |
|---|---|---|
| tau (tokens advanced per verify, incl. bonus) | 2.096 | 3.977 |
| position 1..8 accuracy | .58 .40 .29 .22 .18 .15 .14 .12 | .78 .65 .54 .46 .40 .35 .31 .28 |
llama.cpp (native draft-dflash, K=15), target V6 DHQ 2.9 GB + master PE LoRA v4.1 (f16), 10 Master Style prompts with different cards, greedy, 1000 new tokens max, one RTX 5060 Ti 16 GB:
| draft | tok/s | speed-up | acceptance |
|---|---|---|---|
| none | 87.0 | 1.00ร | - |
| bf16 | 151.5 | 1.74ร | 16.8% |
| Q8_0 | 159.3 | 1.83ร | 16.7% |
| Q6_K | 161.2 | 1.85ร | 16.7% |
| Q4_K_M | 162.4 | 1.87ร | 16.6% |
bf16 / Q8_0 / Q6_K give identical outputs on all 10 prompts, Q4_K_M on 9 of 10 (one greedy near-tie). With the LoRA merged into the target instead of attached at runtime: 107.4 โ 209.0 tok/s (Q6_K draft, 2.40ร over the LoRA-attached baseline).
Training
- Data: 9,072 Master Style prompts regenerated with V6 + the master PE LoRA (v4) (vLLM, temp 0.7 / top_p 0.8 / top_k 20, thinking off); 326 held out.
- Target features: V6 bf16 with the LoRA merged. anchors 128 / 2 epochs / lr 1e-4 cosine / 4 seqs per step /
position-decay gamma 7 / 8-bit AdamW; 4,532 steps (
train_dflash_v6.py, 2x RTX 5060 Ti, 4.56 s/step).
sha256
model.safetensors52bee0ee736c70a3f672e7ab741606ae453b5fd74d607cd1dcd1dbcfad47ccb4- bf16 gguf d9a7aac5af73d7047751a7b3a40cdde6e9ce9d69cd5f7a8a4f61d4f70175cd9b
- Q8_0 gguf 3b66ee8e7b29eeca3452ce57b6f1080f498332c5f5c990a08ae1e4d19d460cba
- Q6_K gguf 251ffb5b431f3eb3af7a02721e5f544365ceebb39ca1a82ba9019b5a688072c2
- Q4_K_M gguf 2a35df57a79be2f6a8c883d691f8581b61aa2ed994a191a84bc60514855ba7a8
License
CC BY-NC 4.0 (non-commercial, free); commercial use needs a separate license from the author. It covers only these weights: the base model and the image models (DiTs) keep their own licenses. Details and upstream notices: LICENSE.md.
- Downloads last month
- 672
Model tree for pottokao/Z-Image-Engineer-V6-DFlash-b16
Base model
z-lab/Qwen3-4B-DFlash-b16