Instructions to use giannisan/Hy3-ds4-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use giannisan/Hy3-ds4-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="giannisan/Hy3-ds4-gguf", filename="Hy3-ds4-IQ2XXS-AttnQ8-fromBF16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use giannisan/Hy3-ds4-gguf 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 giannisan/Hy3-ds4-gguf:BF16 # Run inference directly in the terminal: llama cli -hf giannisan/Hy3-ds4-gguf:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf giannisan/Hy3-ds4-gguf:BF16 # Run inference directly in the terminal: llama cli -hf giannisan/Hy3-ds4-gguf:BF16
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 giannisan/Hy3-ds4-gguf:BF16 # Run inference directly in the terminal: ./llama-cli -hf giannisan/Hy3-ds4-gguf:BF16
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 giannisan/Hy3-ds4-gguf:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf giannisan/Hy3-ds4-gguf:BF16
Use Docker
docker model run hf.co/giannisan/Hy3-ds4-gguf:BF16
- LM Studio
- Jan
- Ollama
How to use giannisan/Hy3-ds4-gguf with Ollama:
ollama run hf.co/giannisan/Hy3-ds4-gguf:BF16
- Unsloth Studio
How to use giannisan/Hy3-ds4-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for giannisan/Hy3-ds4-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for giannisan/Hy3-ds4-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for giannisan/Hy3-ds4-gguf to start chatting
- Pi
How to use giannisan/Hy3-ds4-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf giannisan/Hy3-ds4-gguf:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "giannisan/Hy3-ds4-gguf:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use giannisan/Hy3-ds4-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf giannisan/Hy3-ds4-gguf:BF16
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 giannisan/Hy3-ds4-gguf:BF16
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use giannisan/Hy3-ds4-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf giannisan/Hy3-ds4-gguf:BF16
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 "giannisan/Hy3-ds4-gguf:BF16" \ --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"
- Docker Model Runner
How to use giannisan/Hy3-ds4-gguf with Docker Model Runner:
docker model run hf.co/giannisan/Hy3-ds4-gguf:BF16
- Lemonade
How to use giannisan/Hy3-ds4-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull giannisan/Hy3-ds4-gguf:BF16
Run and chat with the model
lemonade run user.Hy3-ds4-gguf-BF16
List all available models
lemonade list
Hy3 (295B) GGUF for pulsar / ds4 / NeutronStar (SSD streaming, CUDA)
Mixed-precision GGUF of tencent/Hy3 (295B total / 21B active MoE, Apache 2.0) built for SSD-streaming inference engines: routed experts live on disk and stream per token, so the model runs on GPUs that cannot hold it.
Runs on pulsar (Rust + CUDA,
recommended) and the NeutronStar
hy3 branch (C, a CUDA port of antirez/ds4).
Measured decode, greedy, warm cache:
| engine | hardware | tok/s |
|---|---|---|
| pulsar | RTX 5060 Ti 16GB + RTX 4060 Ti 16GB, Gen5 NVMe | 7.2 |
| pulsar | RTX 4060 Ti 16GB, Gen4 NVMe | 2.6 |
| NeutronStar/ds4 | RTX 4060 Ti 16GB, Gen4 NVMe | 0.6-1.8 |
Per token only 8 of 192 experts per layer are read (~3GB/token at this quant); attention, shared experts, and the router stay resident.
Files
| file | provenance | recommendation |
|---|---|---|
Hy3-ds4-IQ2XXS-AttnQ8-fromBF16.gguf |
single quantization straight from the BF16 checkpoint | use this one |
Hy3-ds4-IQ2XXS-AttnQ8.gguf |
requantized from an IQ4 intermediate (see below) | kept for continuity |
Both use the identical recipe and the same importance matrix; they differ only in what the quantizer saw as input.
fromBF16 (new): tencent/Hy3 BF16 (598GB) converted to a q8_0
intermediate with the AngelSlim
llama.cpp patches (proper hy_v3 architecture support), then quantized
with the imatrix in one step. q8_0 is effectively lossless as an
intermediate, so the routed experts see exactly one lossy quantization.
original: built before the BF16 pipeline existed here, from the IQ4-UD edition of YanissAmz/Hy3-295B-A21B-GGUF. The tensors this recipe keeps at Q8_0 passed through essentially lossless, but the routed experts went through two lossy steps (IQ4_XS/IQ3_S to IQ2_XXS). At a 2-bit target the 2-bit noise dominates, so the gap is small, but the fromBF16 file removes it entirely.
Recipe
The layout targets a streaming expert cache: routed experts must be uniform fixed-size slabs, and everything that makes decisions stays high precision. Same design as antirez's GLM-5.2 ds4 build, including the MTP layer riding at Q2_K because importance matrices never cover the draft layer (imatrix generation runs normal forwards, which skip it).
| Tensors | Type | Why |
|---|---|---|
| routed experts, layers 1-79 (gate/up/down) | IQ2_XXS (imatrix) | streamed from disk per token; uniform slabs |
| routed experts, layer 80 (MTP) | Q2_K | no imatrix coverage exists for the draft layer |
| attention q/k/v/output, all layers | Q8_0 | resident, paid once |
| shared expert + dense layer 0 FFN | Q8_0 | resident |
| nextn.eh_proj (MTP glue) | Q8_0 | tiny, no imatrix coverage |
| token embeddings, output head | Q8_0 | ds4 embed kernel contract |
| router (ffn_gate_inp), expert bias, all norms | F32 | decision makers stay exact |
imatrix: the 125-chunk general-purpose matrix published with the source repo of the original build, reused for the fromBF16 build.
Usage
pulsar (recommended)
git clone https://github.com/giannisanni/pulsar
cd pulsar
CXX=g++-12 cargo build --release -p engine
./target/release/pulsar-cli -m Hy3-ds4-IQ2XXS-AttnQ8-fromBF16.gguf \
-p "The capital of France is" -n 64
# or interactive chat: --chat
# or OpenAI-compatible API: cargo build --release -p serve
Zero-config multi-GPU: pulsar measures each card's PCIe bandwidth at
startup, streams experts over the fastest link, and fills spare GPUs with
resident hot experts. First run is cold; a .warm sidecar makes every
later run start hot. Main knob: PULSAR_CACHE_GB (host expert cache,
defaults to measured free RAM minus a reserve).
NeutronStar / ds4
git clone -b hy3 https://github.com/giannisanni/neutronstar
cd neutronstar && make ds4
./ds4 -m Hy3-ds4-IQ2XXS-AttnQ8-fromBF16.gguf --cuda --ssd-streaming \
--ssd-streaming-cache-experts 64 --ctx 4096 --nothink
Useful knobs: DS4_CUDA_HOST_EXPERT_CACHE_GB=16 (host expert cache, the
main speed lever) and DS4_CUDA_PARALLEL_FETCH_THREADS=16.
MTP note
blk.80 (the MTP draft layer) is present in both files. pulsar wires it
behind PULSAR_MTP=1 (opt-in): drafts verify correctly at 44 percent
acceptance, but measurements show speculative decoding only pays when the
verify pass is fully cache-resident, which a 30GB-RAM box cannot deliver.
Tencent's own AngelSlim deployment guidance reaches the same conclusion,
enabling MTP only from 2x H20 (192GB) upward. Keep it off for speed; it
is there for bigger boxes.
- Downloads last month
- 8,514
16-bit
Model tree for giannisan/Hy3-ds4-gguf
Base model
tencent/Hy3