Instructions to use FoolDev/Thanatos-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FoolDev/Thanatos-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="FoolDev/Thanatos-27B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("FoolDev/Thanatos-27B", dtype="auto") - llama-cpp-python
How to use FoolDev/Thanatos-27B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="FoolDev/Thanatos-27B", filename="Thanatos-27B.Q4_K_M.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use FoolDev/Thanatos-27B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf FoolDev/Thanatos-27B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf FoolDev/Thanatos-27B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf FoolDev/Thanatos-27B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf FoolDev/Thanatos-27B: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 FoolDev/Thanatos-27B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf FoolDev/Thanatos-27B: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 FoolDev/Thanatos-27B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf FoolDev/Thanatos-27B:Q4_K_M
Use Docker
docker model run hf.co/FoolDev/Thanatos-27B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use FoolDev/Thanatos-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FoolDev/Thanatos-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FoolDev/Thanatos-27B", "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/FoolDev/Thanatos-27B:Q4_K_M
- SGLang
How to use FoolDev/Thanatos-27B 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 "FoolDev/Thanatos-27B" \ --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": "FoolDev/Thanatos-27B", "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 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 "FoolDev/Thanatos-27B" \ --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": "FoolDev/Thanatos-27B", "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" } } ] } ] }' - Ollama
How to use FoolDev/Thanatos-27B with Ollama:
ollama run hf.co/FoolDev/Thanatos-27B:Q4_K_M
- Unsloth Studio new
How to use FoolDev/Thanatos-27B 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 FoolDev/Thanatos-27B 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 FoolDev/Thanatos-27B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for FoolDev/Thanatos-27B to start chatting
- Pi new
How to use FoolDev/Thanatos-27B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf FoolDev/Thanatos-27B:Q4_K_M
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": "FoolDev/Thanatos-27B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use FoolDev/Thanatos-27B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf FoolDev/Thanatos-27B: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 FoolDev/Thanatos-27B:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use FoolDev/Thanatos-27B with Docker Model Runner:
docker model run hf.co/FoolDev/Thanatos-27B:Q4_K_M
- Lemonade
How to use FoolDev/Thanatos-27B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull FoolDev/Thanatos-27B:Q4_K_M
Run and chat with the model
lemonade run user.Thanatos-27B-Q4_K_M
List all available models
lemonade list
Fix GGUF filename pattern + correct architecture description
Browse files- Upstream unsloth/Qwen3.6-27B-GGUF uses dashes (Qwen3.6-27B-Q4_K_M.gguf),
not dots. Without this, scripts/build.sh 404s on first run. Updated
Modelfile, Modelfile.z13, examples/README, examples/llama_cpp_quickstart,
and scripts/build.sh.
- scripts/build.sh: list known-good quant suffixes in a comment so people
don't typo Q4_KM, q4_k_m, etc.
- README architecture section: replace pure-GQA description with the
actual hybrid Gated DeltaNet + Gated Attention layout from the upstream
Qwen3.6 docs; add MTP note and YaRN ~1M ceiling.
- README comparison table: reflect actual Q4_K_M size (17 GB), add Q3_K_S
row, and qualify min-host-memory by quant + context.
- Modelfile +1 -1
- Modelfile.z13 +2 -2
- README.md +9 -5
- examples/README.md +3 -3
- examples/llama_cpp_quickstart.py +1 -1
- scripts/build.sh +7 -1
|
@@ -13,7 +13,7 @@
|
|
| 13 |
#
|
| 14 |
# Replace the path below with wherever you keep the GGUF.
|
| 15 |
|
| 16 |
-
FROM ./Qwen3.6-27B
|
| 17 |
|
| 18 |
# Sampling tuned for reasoning + general use. See README "Recommended sampling"
|
| 19 |
# for creative/RP alternatives.
|
|
|
|
| 13 |
#
|
| 14 |
# Replace the path below with wherever you keep the GGUF.
|
| 15 |
|
| 16 |
+
FROM ./Qwen3.6-27B-Q4_K_M.gguf
|
| 17 |
|
| 18 |
# Sampling tuned for reasoning + general use. See README "Recommended sampling"
|
| 19 |
# for creative/RP alternatives.
|
|
@@ -8,7 +8,7 @@
|
|
| 8 |
# and we compensate with top_k instead.
|
| 9 |
#
|
| 10 |
# Recommended base GGUF for this profile:
|
| 11 |
-
# https://huggingface.co/unsloth/Qwen3.6-27B-GGUF -> Qwen3.6-27B
|
| 12 |
#
|
| 13 |
# Usage:
|
| 14 |
# ollama create janus-27b-z13 -f Modelfile.z13
|
|
@@ -20,7 +20,7 @@
|
|
| 20 |
# export OLLAMA_NUM_PARALLEL=1 # don't fan out across requests
|
| 21 |
# export HSA_OVERRIDE_GFX_VERSION=11.5.1 # if ROCm doesn't auto-detect gfx1150
|
| 22 |
|
| 23 |
-
FROM ./Qwen3.6-27B
|
| 24 |
|
| 25 |
PARAMETER temperature 0.6
|
| 26 |
PARAMETER top_p 0.95
|
|
|
|
| 8 |
# and we compensate with top_k instead.
|
| 9 |
#
|
| 10 |
# Recommended base GGUF for this profile:
|
| 11 |
+
# https://huggingface.co/unsloth/Qwen3.6-27B-GGUF -> Qwen3.6-27B-Q3_K_S.gguf
|
| 12 |
#
|
| 13 |
# Usage:
|
| 14 |
# ollama create janus-27b-z13 -f Modelfile.z13
|
|
|
|
| 20 |
# export OLLAMA_NUM_PARALLEL=1 # don't fan out across requests
|
| 21 |
# export HSA_OVERRIDE_GFX_VERSION=11.5.1 # if ROCm doesn't auto-detect gfx1150
|
| 22 |
|
| 23 |
+
FROM ./Qwen3.6-27B-Q3_K_S.gguf
|
| 24 |
|
| 25 |
PARAMETER temperature 0.6
|
| 26 |
PARAMETER top_p 0.95
|
|
@@ -71,8 +71,9 @@ The 27B is **dense**: every parameter participates in every forward pass. It's s
|
|
| 71 |
| Active params per token | 27 B | ~3 B |
|
| 72 |
| Layers | 64 | 40 |
|
| 73 |
| Hidden size | 5120 | 2048 |
|
| 74 |
-
| Q4_K_M GGUF size | ~
|
| 75 |
-
|
|
|
|
|
| 76 |
| Multimodal | Yes (vision) | Yes (vision) |
|
| 77 |
| Max context | 262 144 | 262 144 |
|
| 78 |
|
|
@@ -96,11 +97,14 @@ If you want the safetensors for `transformers`, fetch them from [`Qwen/Qwen3.6-2
|
|
| 96 |
## Architecture
|
| 97 |
|
| 98 |
- Qwen 3.6 dense, 27B parameters, 64 transformer layers
|
| 99 |
-
-
|
| 100 |
-
-
|
|
|
|
|
|
|
| 101 |
- Vocab 248,320 (shared with 35B-A3B sibling)
|
| 102 |
-
-
|
| 103 |
- Vision + video support via upstream `mmproj` (not in this repo)
|
|
|
|
| 104 |
|
| 105 |
## Quick start
|
| 106 |
|
|
|
|
| 71 |
| Active params per token | 27 B | ~3 B |
|
| 72 |
| Layers | 64 | 40 |
|
| 73 |
| Hidden size | 5120 | 2048 |
|
| 74 |
+
| Q4_K_M GGUF size | ~17 GB | ~19 GB |
|
| 75 |
+
| Q3_K_S GGUF size | ~12 GB | n/a |
|
| 76 |
+
| Min host memory @ Q4 / 8K ctx | ~22 GB | ~38 GB |
|
| 77 |
| Multimodal | Yes (vision) | Yes (vision) |
|
| 78 |
| Max context | 262 144 | 262 144 |
|
| 79 |
|
|
|
|
| 97 |
## Architecture
|
| 98 |
|
| 99 |
- Qwen 3.6 dense, 27B parameters, 64 transformer layers
|
| 100 |
+
- **Hybrid attention stack**: 16 repeats of `[3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN)]`
|
| 101 |
+
- Gated DeltaNet (linear attention): 48 V-heads, 16 QK-heads, head_dim 128
|
| 102 |
+
- Gated Attention (softmax): 24 Q-heads, 4 KV-heads (GQA), head_dim 256, partial RoPE (factor 0.25)
|
| 103 |
+
- Hidden size 5120, FFN intermediate 17408 (~3.4× ratio)
|
| 104 |
- Vocab 248,320 (shared with 35B-A3B sibling)
|
| 105 |
+
- 262 144 native context, extensible to ~1 M with YaRN
|
| 106 |
- Vision + video support via upstream `mmproj` (not in this repo)
|
| 107 |
+
- Multi-token prediction (MTP) head trained for speculative decoding
|
| 108 |
|
| 109 |
## Quick start
|
| 110 |
|
|
@@ -18,9 +18,9 @@ be consistent across backends modulo quantization noise.
|
|
| 18 |
|
| 19 |
```bash
|
| 20 |
# 1. Pull a Qwen 3.6 27B GGUF, e.g. unsloth/Qwen3.6-27B-GGUF
|
| 21 |
-
hf download unsloth/Qwen3.6-27B-GGUF Qwen3.6-27B
|
| 22 |
|
| 23 |
-
# 2. Edit ../Modelfile -> FROM ./Qwen3.6-27B
|
| 24 |
|
| 25 |
# 3. Build the model
|
| 26 |
ollama create janus-27b -f ../Modelfile
|
|
@@ -42,7 +42,7 @@ python transformers_quickstart.py --no-4bit # bf16, ~54 GB VRAM
|
|
| 42 |
|
| 43 |
```bash
|
| 44 |
pip install llama-cpp-python # CPU-only build
|
| 45 |
-
python llama_cpp_quickstart.py /path/to/Qwen3.6-27B
|
| 46 |
```
|
| 47 |
|
| 48 |
For GPU offload, rebuild llama-cpp-python with the matching backend — see
|
|
|
|
| 18 |
|
| 19 |
```bash
|
| 20 |
# 1. Pull a Qwen 3.6 27B GGUF, e.g. unsloth/Qwen3.6-27B-GGUF
|
| 21 |
+
hf download unsloth/Qwen3.6-27B-GGUF Qwen3.6-27B-Q4_K_M.gguf --local-dir .
|
| 22 |
|
| 23 |
+
# 2. Edit ../Modelfile -> FROM ./Qwen3.6-27B-Q4_K_M.gguf
|
| 24 |
|
| 25 |
# 3. Build the model
|
| 26 |
ollama create janus-27b -f ../Modelfile
|
|
|
|
| 42 |
|
| 43 |
```bash
|
| 44 |
pip install llama-cpp-python # CPU-only build
|
| 45 |
+
python llama_cpp_quickstart.py /path/to/Qwen3.6-27B-Q4_K_M.gguf --gpu-layers 99
|
| 46 |
```
|
| 47 |
|
| 48 |
For GPU offload, rebuild llama-cpp-python with the matching backend — see
|
|
@@ -14,7 +14,7 @@ For GPU offload (CUDA / Metal / ROCm), install with the matching extras:
|
|
| 14 |
CMAKE_ARGS="-DGGML_HIPBLAS=on" pip install llama-cpp-python --no-binary :all:
|
| 15 |
|
| 16 |
Usage:
|
| 17 |
-
python llama_cpp_quickstart.py /path/to/Qwen3.6-27B
|
| 18 |
python llama_cpp_quickstart.py /path/to/file.gguf --gpu-layers 99
|
| 19 |
python llama_cpp_quickstart.py /path/to/file.gguf --prompt "..."
|
| 20 |
"""
|
|
|
|
| 14 |
CMAKE_ARGS="-DGGML_HIPBLAS=on" pip install llama-cpp-python --no-binary :all:
|
| 15 |
|
| 16 |
Usage:
|
| 17 |
+
python llama_cpp_quickstart.py /path/to/Qwen3.6-27B-Q4_K_M.gguf
|
| 18 |
python llama_cpp_quickstart.py /path/to/file.gguf --gpu-layers 99
|
| 19 |
python llama_cpp_quickstart.py /path/to/file.gguf --prompt "..."
|
| 20 |
"""
|
|
@@ -14,7 +14,13 @@ QUANT="${1:-${QUANT:-Q4_K_M}}"
|
|
| 14 |
PROFILE="${2:-${PROFILE:-default}}"
|
| 15 |
|
| 16 |
REPO_ID="${REPO_ID:-unsloth/Qwen3.6-27B-GGUF}"
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
| 19 |
GGUF_PATH="${ROOT}/${GGUF_NAME}"
|
| 20 |
|
|
|
|
| 14 |
PROFILE="${2:-${PROFILE:-default}}"
|
| 15 |
|
| 16 |
REPO_ID="${REPO_ID:-unsloth/Qwen3.6-27B-GGUF}"
|
| 17 |
+
# Upstream uses dashes, e.g. Qwen3.6-27B-Q4_K_M.gguf. Quants known to exist
|
| 18 |
+
# at unsloth/Qwen3.6-27B-GGUF (as of 2026-04):
|
| 19 |
+
# Q3_K_S Q3_K_M Q4_0 Q4_1 Q4_K_S Q4_K_M Q5_K_S Q5_K_M Q6_K Q8_0
|
| 20 |
+
# IQ4_XS IQ4_NL
|
| 21 |
+
# UD-IQ2_XXS UD-IQ2_M UD-Q2_K_XL UD-IQ3_XXS UD-Q3_K_XL UD-Q4_K_XL
|
| 22 |
+
# UD-Q5_K_XL UD-Q6_K_XL UD-Q8_K_XL
|
| 23 |
+
GGUF_NAME="Qwen3.6-27B-${QUANT}.gguf"
|
| 24 |
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
| 25 |
GGUF_PATH="${ROOT}/${GGUF_NAME}"
|
| 26 |
|