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
scripts: add rename_arch.py + gitignore qwen-suffixed rebadges
Browse filesPromotes the previously-untracked rename_arch.py to a committed tool.
It walks a GGUF's KV section and renames general.architecture (and
every <old_arch>.* namespaced key) to a new arch string while leaving
tensor data byte-identical. Used once for the Janus-35B qwen35moe ->
qwen36moe rebadge (commit 40cafdb in FoolDev/Janus-35B, since reverted
in ee40cb2 because no released ollama/llama.cpp recognized qwen36moe).
Also adds an ignore pattern for Thanatos-27B.*.qwen[0-9]*.gguf so
local rebadge outputs from this script don't accidentally get
committed/pushed to the LFS layer the HF Ollama bridge serves.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- .gitignore +4 -0
- scripts/rename_arch.py +77 -0
|
@@ -11,6 +11,10 @@ venv/
|
|
| 11 |
# "Use this model" widget (ollama run hf.co/FoolDev/thanatos-27b).
|
| 12 |
*.gguf
|
| 13 |
!Thanatos-27B.*.gguf
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
*.safetensors
|
| 15 |
*.bin
|
| 16 |
|
|
|
|
| 11 |
# "Use this model" widget (ollama run hf.co/FoolDev/thanatos-27b).
|
| 12 |
*.gguf
|
| 13 |
!Thanatos-27B.*.gguf
|
| 14 |
+
# Local-only rebadge experiments produced by scripts/rename_arch.py.
|
| 15 |
+
# These re-stamp general.architecture and are not loadable by current
|
| 16 |
+
# ollama / llama.cpp; don't track or push them.
|
| 17 |
+
Thanatos-27B.*.qwen[0-9]*.gguf
|
| 18 |
*.safetensors
|
| 19 |
*.bin
|
| 20 |
|
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Rename GGUF architecture (and all arch-namespaced KV keys)."""
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
import sys
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
from tqdm import tqdm
|
| 10 |
+
|
| 11 |
+
from gguf import GGUFReader, GGUFValueType, GGUFWriter
|
| 12 |
+
from gguf.constants import Keys
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def rename(src: Path, dst: Path, old_arch: str, new_arch: str) -> None:
|
| 16 |
+
reader = GGUFReader(src, "r")
|
| 17 |
+
cur = reader.get_field(Keys.General.ARCHITECTURE)
|
| 18 |
+
if cur is None:
|
| 19 |
+
sys.exit(f"no {Keys.General.ARCHITECTURE} in {src}")
|
| 20 |
+
cur_val = str(bytes(cur.parts[cur.data[0]]), encoding="utf-8")
|
| 21 |
+
if cur_val != old_arch:
|
| 22 |
+
sys.exit(f"expected arch={old_arch!r}, found {cur_val!r}")
|
| 23 |
+
|
| 24 |
+
writer = GGUFWriter(dst, new_arch, endianess=reader.endianess)
|
| 25 |
+
|
| 26 |
+
renamed_keys = 0
|
| 27 |
+
for field in reader.fields.values():
|
| 28 |
+
# GGUFWriter writes general.architecture from the `arch` ctor arg
|
| 29 |
+
if field.name == Keys.General.ARCHITECTURE or field.name.startswith("GGUF."):
|
| 30 |
+
continue
|
| 31 |
+
|
| 32 |
+
new_name = field.name
|
| 33 |
+
if field.name.startswith(f"{old_arch}."):
|
| 34 |
+
new_name = f"{new_arch}." + field.name[len(old_arch) + 1 :]
|
| 35 |
+
renamed_keys += 1
|
| 36 |
+
|
| 37 |
+
val_type = field.types[0]
|
| 38 |
+
sub_type = field.types[-1] if val_type == GGUFValueType.ARRAY else None
|
| 39 |
+
writer.add_key_value(new_name, field.contents(), val_type, sub_type=sub_type)
|
| 40 |
+
|
| 41 |
+
total_bytes = 0
|
| 42 |
+
for tensor in reader.tensors:
|
| 43 |
+
total_bytes += tensor.n_bytes
|
| 44 |
+
writer.add_tensor_info(
|
| 45 |
+
tensor.name,
|
| 46 |
+
tensor.data.shape,
|
| 47 |
+
tensor.data.dtype,
|
| 48 |
+
tensor.data.nbytes,
|
| 49 |
+
tensor.tensor_type,
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
print(f"[*] renamed {renamed_keys} {old_arch}.* keys -> {new_arch}.*")
|
| 53 |
+
print(f"[*] writing {dst}")
|
| 54 |
+
|
| 55 |
+
bar = tqdm(desc="Writing", total=total_bytes, unit="B", unit_scale=True)
|
| 56 |
+
writer.write_header_to_file()
|
| 57 |
+
writer.write_kv_data_to_file()
|
| 58 |
+
writer.write_ti_data_to_file()
|
| 59 |
+
for tensor in reader.tensors:
|
| 60 |
+
writer.write_tensor_data(tensor.data, tensor_endianess=reader.endianess)
|
| 61 |
+
bar.update(tensor.n_bytes)
|
| 62 |
+
writer.close()
|
| 63 |
+
bar.close()
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def main() -> None:
|
| 67 |
+
p = argparse.ArgumentParser()
|
| 68 |
+
p.add_argument("input", type=Path)
|
| 69 |
+
p.add_argument("output", type=Path)
|
| 70 |
+
p.add_argument("--from-arch", default="qwen35")
|
| 71 |
+
p.add_argument("--to-arch", default="qwen36")
|
| 72 |
+
args = p.parse_args()
|
| 73 |
+
rename(args.input, args.output, args.from_arch, args.to_arch)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
if __name__ == "__main__":
|
| 77 |
+
main()
|