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
| #!/usr/bin/env python3 | |
| """ | |
| Thanatos-27B — verify the README "Architecture" forward-pass bullets | |
| against the actual GGUF metadata. | |
| Reads either the qwen35- or qwen36-stamped bundle (or any GGUF that | |
| declares one of those `general.architecture` values), prints each | |
| README claim alongside the metadata key it derives from, and exits | |
| non-zero if any value mismatches the expected README claim. Useful | |
| as a manual audit after the bundle is re-stamped or after upstream | |
| re-conversion. | |
| Usage: | |
| python3 scripts/verify_arch.py # default bundle | |
| python3 scripts/verify_arch.py Thanatos-27B.Q4_K_M.gguf | |
| python3 scripts/verify_arch.py /path/to/some-other.gguf | |
| Exit code 0 = all claims verify, 1 = at least one mismatch. | |
| Note: this does NOT verify the 27B parameter count directly (no such | |
| KV in the GGUF) — that comes from llama.cpp's `case 64: LLM_TYPE_27B` | |
| branch in `src/models/qwen35.cpp`, not from the file itself. | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| from gguf import GGUFReader | |
| EXPECTED = { | |
| "block_count": (64, "64 transformer layers"), | |
| "context_length": (262144, "262 144 native context"), | |
| "embedding_length": (5120, "Hidden size 5120"), | |
| "feed_forward_length": (17408, "FFN intermediate 17408"), | |
| "attention.head_count": (24, "Gated Attention: 24 Q-heads"), | |
| "attention.head_count_kv": (4, "Gated Attention: 4 KV-heads (GQA)"), | |
| "attention.key_length": (256, "Gated Attention: head_dim 256 (key)"), | |
| "attention.value_length": (256, "Gated Attention: head_dim 256 (value)"), | |
| "rope.dimension_count": (64, "Partial RoPE: 64 of 256 dims (factor 0.25)"), | |
| "full_attention_interval": (4, "Hybrid stack: every 4th layer is full attention (16 cycles)"), | |
| "ssm.state_size": (128, "Gated DeltaNet: head_dim 128"), | |
| "ssm.time_step_rank": (48, "Gated DeltaNet: 48 V-heads"), | |
| "ssm.group_count": (16, "Gated DeltaNet: 16 QK-heads"), | |
| } | |
| EXPECTED_VOCAB = 248320 | |
| EXPECTED_ARCHS = {"qwen35", "qwen36"} | |
| def read_scalar(reader: GGUFReader, key: str): | |
| f = reader.fields.get(key) | |
| if f is None: | |
| return None | |
| arr = f.parts[f.data[0]] | |
| val = arr.tolist() if hasattr(arr, "tolist") else arr | |
| if isinstance(val, list) and len(val) == 1: | |
| return val[0] | |
| return val | |
| def read_arch(reader: GGUFReader) -> str: | |
| f = reader.fields["general.architecture"] | |
| return bytes(f.parts[f.data[0]]).decode() | |
| def main() -> int: | |
| if len(sys.argv) > 2: | |
| print(f"usage: {sys.argv[0]} [path/to/Thanatos-27B.Q4_K_M.gguf]", file=sys.stderr) | |
| return 2 | |
| root = Path(__file__).resolve().parent.parent | |
| default_paths = [ | |
| root / "Thanatos-27B.Q4_K_M.qwen35.gguf", | |
| root / "Thanatos-27B.Q4_K_M.qwen36.gguf", | |
| root / "Thanatos-27B.Q4_K_M.gguf", | |
| ] | |
| if len(sys.argv) == 2: | |
| path = Path(sys.argv[1]) | |
| else: | |
| path = next((p for p in default_paths if p.exists() and p.stat().st_size > 1024), None) | |
| if path is None: | |
| print("[!] no Thanatos-27B GGUF found in repo root; pass a path explicitly", file=sys.stderr) | |
| return 2 | |
| print(f"[*] reading: {path}") | |
| reader = GGUFReader(str(path), "r") | |
| arch = read_arch(reader) | |
| if arch not in EXPECTED_ARCHS: | |
| print(f"[!] unexpected general.architecture: {arch!r} (expected one of {EXPECTED_ARCHS})", file=sys.stderr) | |
| return 1 | |
| print(f"[*] general.architecture: {arch}") | |
| print() | |
| mismatches = 0 | |
| fmt = " {marker} {claim:55s} {key:35s} = {actual}" | |
| for suffix, (expected, claim) in EXPECTED.items(): | |
| key = f"{arch}.{suffix}" | |
| actual = read_scalar(reader, key) | |
| ok = actual == expected | |
| marker = "[ ok ]" if ok else "[FAIL]" | |
| print(fmt.format(marker=marker, claim=claim, key=key, actual=actual)) | |
| if not ok: | |
| mismatches += 1 | |
| # Vocab count comes from the tokenizer tokens array length, not a scalar KV. | |
| f = reader.fields.get("tokenizer.ggml.tokens") | |
| vocab_actual = len(f.data) if f is not None else None | |
| ok = vocab_actual == EXPECTED_VOCAB | |
| marker = "[ ok ]" if ok else "[FAIL]" | |
| print(fmt.format(marker=marker, claim=f"Vocab {EXPECTED_VOCAB}", key="tokenizer.ggml.tokens (length)", actual=vocab_actual)) | |
| if not ok: | |
| mismatches += 1 | |
| print() | |
| if mismatches: | |
| print(f"[!] {mismatches} mismatch(es) — README Architecture claims disagree with GGUF metadata.") | |
| return 1 | |
| print("[+] all Architecture claims verify against GGUF metadata.") | |
| return 0 | |
| if __name__ == "__main__": | |
| sys.exit(main()) | |