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
| # Thanatos-27B — repo-local sanity checks. | |
| # | |
| # Runs everything that's cheap and catches a real-world bug we've already hit: | |
| # | |
| # 1. bash -n on every *.sh (catches syntax errors) | |
| # 2. shellcheck on every *.sh, if installed (catches quoting/SC2086 bugs) | |
| # 3. python3 -m pyflakes on every *.py (catches NameError, unused imports) | |
| # 4. python3 -m py_compile on every *.py (catches actual syntax errors) | |
| # 5. grep -E for the dash/dot filename footgun (the one we shipped in 6f2884f | |
| # and had to fix in 82677d0) | |
| # 6. grep -E for the VAR="$(cmd 2>/dev/null | filter)" silent-exit pattern | |
| # under set -e + pipefail (the one we shipped in d87bc64 and fixed in 385ed94) | |
| # | |
| # Exit non-zero on any failure. Designed to run from .git/hooks/pre-commit. | |
| # | |
| # Usage: | |
| # ./scripts/check.sh # one-shot | |
| # ./scripts/install-hooks.sh # install as pre-commit hook | |
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | |
| cd "${ROOT}" | |
| red() { printf "\033[31m%s\033[0m\n" "$*"; } | |
| green() { printf "\033[32m%s\033[0m\n" "$*"; } | |
| yellow() { printf "\033[33m%s\033[0m\n" "$*"; } | |
| blue() { printf "\033[34m%s\033[0m\n" "$*"; } | |
| FAIL=0 | |
| # ---- collect targets ------------------------------------------------------- | |
| # Find every shell script and every python file, ignoring vendored / hidden dirs. | |
| mapfile -t SH_FILES < <(find . -type f -name '*.sh' -not -path './.git/*') | |
| mapfile -t PY_FILES < <(find . -type f -name '*.py' -not -path './.git/*' -not -path '*/__pycache__/*') | |
| blue "[*] checking ${#SH_FILES[@]} shell file(s) and ${#PY_FILES[@]} python file(s)" | |
| # ---- 1. bash -n ------------------------------------------------------------ | |
| if (( ${#SH_FILES[@]} )); then | |
| blue "[*] bash -n" | |
| for f in "${SH_FILES[@]}"; do | |
| if ! bash -n "$f" 2>/dev/null; then | |
| red " [FAIL] bash -n $f" | |
| bash -n "$f" || true | |
| FAIL=1 | |
| else | |
| echo " [ ok ] $f" | |
| fi | |
| done | |
| fi | |
| # ---- 2. shellcheck (optional) --------------------------------------------- | |
| if command -v shellcheck >/dev/null 2>&1; then | |
| blue "[*] shellcheck" | |
| for f in "${SH_FILES[@]}"; do | |
| if ! shellcheck -S warning "$f"; then | |
| red " [FAIL] shellcheck $f" | |
| FAIL=1 | |
| else | |
| echo " [ ok ] $f" | |
| fi | |
| done | |
| else | |
| yellow "[~] shellcheck not installed (skip). Install with: apt install shellcheck" | |
| fi | |
| # ---- 3. pyflakes ----------------------------------------------------------- | |
| if (( ${#PY_FILES[@]} )); then | |
| if python3 -c 'import pyflakes' 2>/dev/null; then | |
| blue "[*] pyflakes" | |
| for f in "${PY_FILES[@]}"; do | |
| if ! python3 -m pyflakes "$f"; then | |
| red " [FAIL] pyflakes $f" | |
| FAIL=1 | |
| else | |
| echo " [ ok ] $f" | |
| fi | |
| done | |
| else | |
| yellow "[~] pyflakes not installed (skip). Install with: pip install pyflakes" | |
| fi | |
| fi | |
| # ---- 4. py_compile --------------------------------------------------------- | |
| if (( ${#PY_FILES[@]} )); then | |
| blue "[*] python3 -m py_compile" | |
| for f in "${PY_FILES[@]}"; do | |
| if ! python3 -m py_compile "$f" 2>&1; then | |
| red " [FAIL] py_compile $f" | |
| FAIL=1 | |
| else | |
| echo " [ ok ] $f" | |
| fi | |
| done | |
| # py_compile leaves __pycache__ artifacts; clean them up. | |
| find . -type d -name __pycache__ -not -path './.git/*' -exec rm -rf {} + 2>/dev/null || true | |
| fi | |
| # ---- 5. footgun: dot-vs-dash filename ------------------------------------- | |
| # | |
| # Upstream unsloth/Qwen3.6-27B-GGUF uses dashes (Qwen3.6-27B-Q4_K_M.gguf). | |
| # Earlier commits used the wrong dot-separated pattern, which 404s. | |
| # Block re-introduction. | |
| blue "[*] grep: forbidden Qwen3.6-27B.Q* filename pattern" | |
| if grep -RnE 'Qwen3\.6-27B\.Q[0-9A-Z_]+\.gguf' \ | |
| --include='*.sh' --include='*.py' --include='*.md' \ | |
| --include='Modelfile*' --include='*.cff' \ | |
| --exclude-dir=.git --exclude-dir=__pycache__ \ | |
| . ; then | |
| red " [FAIL] found banned dot pattern (use 'Qwen3.6-27B-Q*.gguf')" | |
| FAIL=1 | |
| else | |
| echo " [ ok ] no stale dot-pattern matches" | |
| fi | |
| # ---- 6. footgun: VAR="$(cmd 2>/dev/null | filter)" silent-exit pattern ----- | |
| # | |
| # Under `set -euo pipefail`, a direct command substitution like | |
| # VAR="$(ollama show "${TAG}" 2>/dev/null | awk ...)" | |
| # silently kills the script when ollama show fails: pipefail | |
| # propagates the non-zero exit through the pipeline, set -e | |
| # aborts on the assignment, and the explicit `[[ -z "${VAR}" ]]` | |
| # check below it never runs. The user sees only | |
| # make: *** [Makefile:N: <target>] Error 1 | |
| # with no diagnostic. We shipped this exact bug in | |
| # scripts/heal_hf_pull.sh and only caught it this session by | |
| # running `make heal-hf` against an empty store — see commit | |
| # 385ed94 for the fix recipe: split the assignment with | |
| # if VAR="$(cmd 2>/dev/null)"; then | |
| # VAR2="$(filter <<<"${VAR}")" | |
| # fi | |
| # The `2>/dev/null` is the tell — its presence says "this command | |
| # can fail loudly, we want to suppress the noise" — which is | |
| # exactly the case where set -e + pipefail silently kills. | |
| blue "[*] grep: forbidden VAR=\$(... 2>/dev/null | ...) silent-exit pattern" | |
| if grep -RnE '^\s*[A-Za-z_][A-Za-z0-9_]*=("?)\$\([^)]*2>/dev/null[^|]*\|' \ | |
| --include='*.sh' \ | |
| --exclude-dir=.git \ | |
| scripts/ ; then | |
| red " [FAIL] silent-exit substitution under set -e + pipefail." | |
| red " Rewrite as 'if VAR=\$(cmd 2>/dev/null); then VAR2=\$(filter <<<\"\${VAR}\"); fi'." | |
| red " See commit 385ed94 for the bug we shipped and the fix recipe." | |
| FAIL=1 | |
| else | |
| echo " [ ok ] no silent-exit substitution patterns" | |
| fi | |
| # ---- 7. Modelfile <-> bridge files sync ----------------------------------- | |
| # | |
| # 'Modelfile' (consumed by 'ollama create -f Modelfile') and the root-level | |
| # 'template' / 'system' / 'params' files (consumed by HF's Ollama bridge, | |
| # which does NOT read Modelfile) must stay in sync. If they drift, hf.co/... | |
| # users and 'make build' users get different behaviour. | |
| if [[ -f "${ROOT}/Modelfile" && -f "${ROOT}/template" \ | |
| && -f "${ROOT}/system" && -f "${ROOT}/params" ]]; then | |
| blue "[*] python: Modelfile <-> bridge files sync" | |
| if ! python3 "${ROOT}/scripts/check_bridge_sync.py"; then | |
| FAIL=1 | |
| fi | |
| else | |
| yellow "[~] bridge files missing; skipping sync check" | |
| fi | |
| # ---- result ---------------------------------------------------------------- | |
| echo | |
| if (( FAIL )); then | |
| red "[!] FAIL" | |
| exit 1 | |
| fi | |
| green "[+] all checks passed" | |