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
docs: add safetensors mirror of Qwen/Qwen3.6-27B
Browse filesTransformers-loadable safetensors are now mirrored in this repo via
`hf upload-large-folder`. Tensor data byte-identical to upstream.
- README: new rows in "What's here" for shards/configs/tokenizer;
"If you want safetensors" pointer replaced with a one-paragraph
note that they're now in this repo; "Related models" row notes
the mirror.
- examples/README.md: transformers row description updated.
- examples/transformers_quickstart.py: MODEL_ID defaults to
FoolDev/Thanatos-27B; docstring rewritten.
- CHANGELOG: new "Added" entry under [Unreleased].
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- CHANGELOG.md +18 -0
- README.md +12 -2
- examples/README.md +1 -1
- examples/transformers_quickstart.py +9 -6
|
@@ -7,6 +7,24 @@ and documentation**, not the underlying base model.
|
|
| 7 |
|
| 8 |
## [Unreleased]
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
### Changed (4th round trip β qwen36 β qwen35, friction concretely tested)
|
| 11 |
- **Bundle re-stamped `general.architecture: 'qwen36'` β `'qwen35'`**
|
| 12 |
in `hf upload` commit `978798f` (HF). Fourth stamp flip on the
|
|
|
|
| 7 |
|
| 8 |
## [Unreleased]
|
| 9 |
|
| 10 |
+
### Added (safetensors mirror)
|
| 11 |
+
- **Mirrored Qwen/Qwen3.6-27B's transformers-loadable safetensors
|
| 12 |
+
set into this repo.** 15 sharded `.safetensors` files (~58 GB
|
| 13 |
+
total) + `model.safetensors.index.json` + tokenizer files
|
| 14 |
+
(`tokenizer.json`, `tokenizer_config.json`, `vocab.json`,
|
| 15 |
+
`merges.txt`) + configs (`config.json`, `configuration.json`,
|
| 16 |
+
`generation_config.json`, `preprocessor_config.json`,
|
| 17 |
+
`video_preprocessor_config.json`) + `chat_template.jinja`.
|
| 18 |
+
Tensor data byte-identical to upstream; the mirror saves a
|
| 19 |
+
second `hf download` for users who want both GGUF + safetensors
|
| 20 |
+
in one place. `.gitignore` was updated separately (commit
|
| 21 |
+
`0c5bee4`) to whitelist the Qwen sharded naming pattern before
|
| 22 |
+
the upload's preupload check ran (HF reads the destination
|
| 23 |
+
repo's `.gitignore` to decide `shouldIgnore` per file).
|
| 24 |
+
- `examples/transformers_quickstart.py` now defaults `MODEL_ID`
|
| 25 |
+
to `FoolDev/Thanatos-27B` so a fresh user only needs to pull
|
| 26 |
+
this repo to get a working transformers entry point.
|
| 27 |
+
|
| 28 |
### Changed (4th round trip β qwen36 β qwen35, friction concretely tested)
|
| 29 |
- **Bundle re-stamped `general.architecture: 'qwen36'` β `'qwen35'`**
|
| 30 |
in `hf upload` commit `978798f` (HF). Fourth stamp flip on the
|
|
@@ -125,6 +125,9 @@ The 27B is **dense**: every parameter participates in every forward pass. It's s
|
|
| 125 |
| `scripts/verify_arch.py` | Cross-checks the README "Architecture" forward-pass bullets (layer count, head counts, hidden / FFN dims, RoPE factor, SSM dims, vocab, context) against the actual GGUF metadata keys. Run as `make verify-arch`. Handles both `qwen35`- and `qwen36`-stamped bundles; exit non-zero if any value mismatches. Not part of `make check` because it loads the 17 GB GGUF (LFS smudge required); run on demand. |
|
| 126 |
| `scripts/install-hooks.sh` | Installs `check.sh` as a git pre-commit hook |
|
| 127 |
| `Makefile` | Convenience wrapper β `make help` lists targets |
|
|
|
|
|
|
|
|
|
|
| 128 |
| `LICENSE`, `CITATION.cff` | Apache-2.0 license and citation metadata |
|
| 129 |
| `CHANGELOG.md` | Versioned tooling/docs changes |
|
| 130 |
| `README.md` | This file |
|
|
@@ -138,7 +141,14 @@ local-build path applies this repo's `Modelfile`; the `hf.co/...`
|
|
| 138 |
path applies the root-level `template`, `system`, and `params`
|
| 139 |
files (kept in sync with the `Modelfile`).
|
| 140 |
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
## Architecture
|
| 144 |
|
|
@@ -551,7 +561,7 @@ python examples/ollama_chat.py # section 3 runs a real round-trip
|
|
| 551 |
|
| 552 |
| Model | Notes |
|
| 553 |
|---|---|
|
| 554 |
-
| [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) | Upstream base, safetensors |
|
| 555 |
| [unsloth/Qwen3.6-27B-GGUF](https://huggingface.co/unsloth/Qwen3.6-27B-GGUF) | Recommended GGUF source |
|
| 556 |
| [FoolDev/Janus-35B](https://huggingface.co/FoolDev/Janus-35B) | 35B-A3B MoE sibling. More capacity, more memory pressure. |
|
| 557 |
| [Crownelius/Crow-9B-HERETIC-4.6](https://huggingface.co/Crownelius/Crow-9B-HERETIC-4.6) | 9B starter model when 27B/35B is too heavy |
|
|
|
|
| 125 |
| `scripts/verify_arch.py` | Cross-checks the README "Architecture" forward-pass bullets (layer count, head counts, hidden / FFN dims, RoPE factor, SSM dims, vocab, context) against the actual GGUF metadata keys. Run as `make verify-arch`. Handles both `qwen35`- and `qwen36`-stamped bundles; exit non-zero if any value mismatches. Not part of `make check` because it loads the 17 GB GGUF (LFS smudge required); run on demand. |
|
| 126 |
| `scripts/install-hooks.sh` | Installs `check.sh` as a git pre-commit hook |
|
| 127 |
| `Makefile` | Convenience wrapper β `make help` lists targets |
|
| 128 |
+
| `model-*-of-00015.safetensors` (15 files, ~58 GB) + `model.safetensors.index.json` | Transformers-loadable safetensors mirror of `Qwen/Qwen3.6-27B`. Byte-identical to upstream. |
|
| 129 |
+
| `config.json`, `configuration.json`, `generation_config.json`, `preprocessor_config.json`, `video_preprocessor_config.json`, `chat_template.jinja` | Model + processor + chat-template configs mirrored from upstream β what `from_pretrained` needs. |
|
| 130 |
+
| `tokenizer.json`, `tokenizer_config.json`, `vocab.json`, `merges.txt` | Tokenizer files mirrored from upstream. |
|
| 131 |
| `LICENSE`, `CITATION.cff` | Apache-2.0 license and citation metadata |
|
| 132 |
| `CHANGELOG.md` | Versioned tooling/docs changes |
|
| 133 |
| `README.md` | This file |
|
|
|
|
| 141 |
path applies the root-level `template`, `system`, and `params`
|
| 142 |
files (kept in sync with the `Modelfile`).
|
| 143 |
|
| 144 |
+
The transformers safetensors set is mirrored in this repo
|
| 145 |
+
(15 sharded `.safetensors` files + index + tokenizer + configs
|
| 146 |
+
+ chat template), so `AutoModelForCausalLM.from_pretrained(
|
| 147 |
+
"FoolDev/Thanatos-27B")` works directly. Tensor data is
|
| 148 |
+
byte-identical to upstream [`Qwen/Qwen3.6-27B`](https://huggingface.co/Qwen/Qwen3.6-27B);
|
| 149 |
+
the mirror exists so consumers don't need a second pull from
|
| 150 |
+
two repos to assemble the full toolkit (GGUF + safetensors +
|
| 151 |
+
mmproj reference).
|
| 152 |
|
| 153 |
## Architecture
|
| 154 |
|
|
|
|
| 561 |
|
| 562 |
| Model | Notes |
|
| 563 |
|---|---|
|
| 564 |
+
| [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) | Upstream base, safetensors (this repo mirrors them) |
|
| 565 |
| [unsloth/Qwen3.6-27B-GGUF](https://huggingface.co/unsloth/Qwen3.6-27B-GGUF) | Recommended GGUF source |
|
| 566 |
| [FoolDev/Janus-35B](https://huggingface.co/FoolDev/Janus-35B) | 35B-A3B MoE sibling. More capacity, more memory pressure. |
|
| 567 |
| [Crownelius/Crow-9B-HERETIC-4.6](https://huggingface.co/Crownelius/Crow-9B-HERETIC-4.6) | 9B starter model when 27B/35B is too heavy |
|
|
@@ -5,7 +5,7 @@ Four minimal entry points. Pick the one that matches how you run models.
|
|
| 5 |
| File | Backend | When to use |
|
| 6 |
|---|---|---|
|
| 7 |
| `ollama_chat.py` | Ollama HTTP API | You already have `ollama serve` running and the `thanatos-27b` model created from the project `Modelfile`. **Text + tool calling** β vision via Ollama is broken upstream for this arch. |
|
| 8 |
-
| `transformers_quickstart.py` | Hugging Face Transformers | You want to run the
|
| 9 |
| `llama_cpp_quickstart.py` | llama-cpp-python | You want to invoke a local GGUF directly without a daemon (CI, batch jobs, scripts). Text only. |
|
| 10 |
| `llama_cpp_vision.py` | llama-cpp-python + mmproj | **Image input.** Loads a text GGUF + `mmproj-F16.gguf` and answers questions about an image. The only working vision path right now. |
|
| 11 |
|
|
|
|
| 5 |
| File | Backend | When to use |
|
| 6 |
|---|---|---|
|
| 7 |
| `ollama_chat.py` | Ollama HTTP API | You already have `ollama serve` running and the `thanatos-27b` model created from the project `Modelfile`. **Text + tool calling** β vision via Ollama is broken upstream for this arch. |
|
| 8 |
+
| `transformers_quickstart.py` | Hugging Face Transformers | You want to run the safetensors on GPU (this repo mirrors them from `Qwen/Qwen3.6-27B`), optionally in 4-bit via bitsandbytes. |
|
| 9 |
| `llama_cpp_quickstart.py` | llama-cpp-python | You want to invoke a local GGUF directly without a daemon (CI, batch jobs, scripts). Text only. |
|
| 10 |
| `llama_cpp_vision.py` | llama-cpp-python + mmproj | **Image input.** Loads a text GGUF + `mmproj-F16.gguf` and answers questions about an image. The only working vision path right now. |
|
| 11 |
|
|
@@ -2,11 +2,14 @@
|
|
| 2 |
"""
|
| 3 |
Thanatos-27B β Hugging Face Transformers quickstart.
|
| 4 |
|
| 5 |
-
Loads the
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
Requirements:
|
| 12 |
pip install --upgrade "transformers>=4.45" accelerate sentencepiece bitsandbytes
|
|
@@ -36,7 +39,7 @@ except ImportError as e: # pragma: no cover
|
|
| 36 |
)
|
| 37 |
|
| 38 |
|
| 39 |
-
MODEL_ID = "
|
| 40 |
|
| 41 |
THANATOS_SYSTEM = (
|
| 42 |
"You are Thanatos, a precise and capable assistant for reasoning, writing, "
|
|
|
|
| 2 |
"""
|
| 3 |
Thanatos-27B β Hugging Face Transformers quickstart.
|
| 4 |
|
| 5 |
+
Loads the Qwen 3.6 27B safetensors from this repo (a byte-identical
|
| 6 |
+
mirror of Qwen/Qwen3.6-27B's transformers set) and runs a single
|
| 7 |
+
chat turn using its embedded chat template. Applies the same
|
| 8 |
+
Thanatos system prompt the Modelfile / bridge `system` file uses.
|
| 9 |
+
|
| 10 |
+
`MODEL_ID` defaults to "FoolDev/Thanatos-27B" so the safetensors and
|
| 11 |
+
chat template come from this repo in one pull; flip it back to
|
| 12 |
+
"Qwen/Qwen3.6-27B" to source directly from upstream.
|
| 13 |
|
| 14 |
Requirements:
|
| 15 |
pip install --upgrade "transformers>=4.45" accelerate sentencepiece bitsandbytes
|
|
|
|
| 39 |
)
|
| 40 |
|
| 41 |
|
| 42 |
+
MODEL_ID = "FoolDev/Thanatos-27B"
|
| 43 |
|
| 44 |
THANATOS_SYSTEM = (
|
| 45 |
"You are Thanatos, a precise and capable assistant for reasoning, writing, "
|