Instructions to use promzeus/gh0stx-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use promzeus/gh0stx-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="promzeus/gh0stx-bf16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("promzeus/gh0stx-bf16") model = AutoModelForCausalLM.from_pretrained("promzeus/gh0stx-bf16") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use promzeus/gh0stx-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "promzeus/gh0stx-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "promzeus/gh0stx-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/promzeus/gh0stx-bf16
- SGLang
How to use promzeus/gh0stx-bf16 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "promzeus/gh0stx-bf16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "promzeus/gh0stx-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "promzeus/gh0stx-bf16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "promzeus/gh0stx-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use promzeus/gh0stx-bf16 with Docker Model Runner:
docker model run hf.co/promzeus/gh0stx-bf16
gh0stx-bf16
Expert-pruned BF16 derivative of Qwen3.5-397B-A17B. Full-precision weights — portable to any CUDA stack; quantize to whatever your hardware needs.
Specs
- Base: Qwen3.5-397B-A17B (hybrid GatedDeltaNet + sparse MoE + periodic full-attention)
- Prune: expert-pruned 512 → 174 experts with a domain-calibrated keep-set (routing-frequency over a balanced corpus, not raw router-norm) → ~141B total / ~17B active
- Format: BF16, ~280 GB (16 shards)
- Context: up to 131K (native up to 256K)
Hardware
BF16 needs ~280 GB → multi-GPU, or quantize first:
- 8× H100/A100 80GB (TP=8) — runs BF16 directly.
- Fewer / smaller cards — quantize: AWQ / GPTQ (INT4) ≈ 75–90 GB, or FP8 (H100) ≈ ~140 GB (
llm-compressor/ AutoAWQ). - Single NVIDIA Blackwell card (GB10 / DGX Spark) → use the NVFP4 sibling
promzeus/gh0stx-nvfp4(fits in 128 GB, DFlash ~17 tok/s).
Serve (vLLM, BF16, tensor-parallel)
vllm serve promzeus/gh0stx-bf16 \
--served-model-name gh0stx --tensor-parallel-size 8 \
--trust-remote-code --max-model-len 131072 \
--gpu-memory-utilization 0.90 \
--enable-chunked-prefill --enable-prefix-caching \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder
Set --tensor-parallel-size to your GPU count. Requires a vLLM build with Qwen3.5-MoE support.
Speculative decoding (recommended: DFlash)
DFlash is the fastest path and is format-agnostic — the drafter is an external ~0.8B model, no file surgery on this repo. Add to the serve command:
--mamba-cache-dtype float32 \
--speculative-config '{"method":"dflash","model":"z-lab/Qwen3.5-397B-A17B-DFlash","num_speculative_tokens":10}'
- Drafter:
z-lab/Qwen3.5-397B-A17B-DFlash(auto-downloads, matches this model's base → healthy acceptance). --mamba-cache-dtype float32is required with DFlash on this hybrid (GatedDeltaNet) model: in fp16 the Mamba KV page size doesn't reconcile with the drafter's sliding-window page size and engine init fails inunify_kv_cache_spec_page_size. Use n=10 (n≥12 is crash-correlated on the validated stack).- On a single Blackwell card this yields ~17 tok/s (see the NVFP4 sibling); on multi-GPU BF16 the acceptance win carries over, absolute t/s depends on your interconnect.
Alternative: built-in MTP head. A grafted qwen3_5_mtp head is shipped in the NVFP4 sibling in NVFP4 form (Blackwell-only). For BF16/other hardware, DFlash above is the recommended accelerator.
Notes
- KV cache: keep BF16. Do not set
--kv-cache-dtypefp8 — unstable with the linear-attention + spec-decode path (and mandatory BF16 for the DFlash drafter). - Thinking mode is ON by default (Qwen3.5). Disable per request with
chat_template_kwargs: {"enable_thinking": false}— recommended for agentic/tool use.
Credits
- Qwen for Qwen3.5-397B-A17B.
- z-lab for DFlash and the
Qwen3.5-397B-A17B-DFlashdrafter. - AEON-7 for the DGX-Spark /
sm_121aDFlash recipe (the--mamba-cache-dtype float32unlock).
Sibling
promzeus/gh0stx-nvfp4— NVFP4 (W4A4) for a single Blackwell card (GB10), with DFlash (17 tok/s @ 65K) and a built-in NVFP4 MTP head (11–13 tok/s @ 131K).
- Downloads last month
- 1,082
Model tree for promzeus/gh0stx-bf16
Base model
Qwen/Qwen3.5-397B-A17B