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
smoke_test: assert tools capability is exposed (regression guard)
Browse filesThe Modelfile TEMPLATE work (commit 80f4494) wired up tool calling by
making Ollama's capability detector see .Tools / .ToolCalls. Nothing
in CI guards against a future Modelfile change silently stripping or
breaking that TEMPLATE — the round-trip and token-leakage checks both
still pass on a TEMPLATE-less model, just without the `tools`
capability.
Hit /api/show, parse the capabilities list, fail if `tools` isn't
there. Catches the regression at make-smoke time instead of letting it
surface as a `does not support tools` 400 when someone tries to use
it.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- CHANGELOG.md +6 -0
- scripts/smoke_test.sh +20 -2
|
@@ -39,6 +39,12 @@ and documentation**, not the underlying base model.
|
|
| 39 |
output that motivated the stop-token fix above. The smoke test now
|
| 40 |
fails hard if `<|im_start|>`, `<|im_end|>`, or `<|endoftext|>` appear
|
| 41 |
verbatim in the response.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
### Removed
|
| 44 |
- `Modelfile.z13` and the `z13` build profile. The Z13-specific tuning
|
|
|
|
| 39 |
output that motivated the stop-token fix above. The smoke test now
|
| 40 |
fails hard if `<|im_start|>`, `<|im_end|>`, or `<|endoftext|>` appear
|
| 41 |
verbatim in the response.
|
| 42 |
+
- `scripts/smoke_test.sh`: tools-capability guard. Hits `/api/show` and
|
| 43 |
+
asserts `tools` is in the capabilities list before running the
|
| 44 |
+
round-trip. Locks in the Modelfile `TEMPLATE` work — if a future
|
| 45 |
+
change strips or breaks the TEMPLATE so Ollama no longer detects
|
| 46 |
+
`.Tools` / `.ToolCalls`, `make smoke` fails before the user discovers
|
| 47 |
+
it via a `does not support tools` 400.
|
| 48 |
|
| 49 |
### Removed
|
| 50 |
- `Modelfile.z13` and the `z13` build profile. The Z13-specific tuning
|
|
@@ -4,7 +4,9 @@
|
|
| 4 |
# Verifies:
|
| 5 |
# 1. The Ollama server is reachable.
|
| 6 |
# 2. The target model is loaded / loadable.
|
| 7 |
-
# 3.
|
|
|
|
|
|
|
| 8 |
#
|
| 9 |
# Usage:
|
| 10 |
# ./scripts/smoke_test.sh # uses MODEL=janus-27b
|
|
@@ -46,7 +48,23 @@ if ! curl -fsS "${HOST}/api/tags" | jq -e --arg m "${MODEL}" '.models[] | select
|
|
| 46 |
fi
|
| 47 |
green "[+] model present"
|
| 48 |
|
| 49 |
-
# 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
blue "[*] sending test prompt..."
|
| 51 |
RESP="$(curl -fsS "${HOST}/api/chat" \
|
| 52 |
-H 'Content-Type: application/json' \
|
|
|
|
| 4 |
# Verifies:
|
| 5 |
# 1. The Ollama server is reachable.
|
| 6 |
# 2. The target model is loaded / loadable.
|
| 7 |
+
# 3. The model exposes the `tools` capability (Modelfile TEMPLATE wired).
|
| 8 |
+
# 4. A single chat round-trip succeeds and produces non-empty output.
|
| 9 |
+
# 5. No chat-template control tokens leak into the response.
|
| 10 |
#
|
| 11 |
# Usage:
|
| 12 |
# ./scripts/smoke_test.sh # uses MODEL=janus-27b
|
|
|
|
| 48 |
fi
|
| 49 |
green "[+] model present"
|
| 50 |
|
| 51 |
+
# 3. Capability guard: the Modelfile TEMPLATE must expose .Tools / .ToolCalls
|
| 52 |
+
# so Ollama lists `tools` under capabilities. Without it, /api/chat with a
|
| 53 |
+
# tools array returns 400 "does not support tools" even though plain chat
|
| 54 |
+
# works. Catches Modelfile regressions that strip or break the TEMPLATE.
|
| 55 |
+
CAPS="$(curl -fsS "${HOST}/api/show" -H 'Content-Type: application/json' \
|
| 56 |
+
-d "$(jq -n --arg m "${MODEL}" '{name: $m}')" | jq -r '.capabilities[]?')"
|
| 57 |
+
if ! grep -qx -- 'tools' <<<"${CAPS}"; then
|
| 58 |
+
red "[!] model missing capability: tools"
|
| 59 |
+
red " Modelfile likely missing TEMPLATE that references .Tools / .ToolCalls."
|
| 60 |
+
echo "----- present capabilities -----"
|
| 61 |
+
echo "${CAPS:-<none>}"
|
| 62 |
+
echo "--------------------------------"
|
| 63 |
+
exit 1
|
| 64 |
+
fi
|
| 65 |
+
green "[+] capabilities include: tools"
|
| 66 |
+
|
| 67 |
+
# 4. Round-trip
|
| 68 |
blue "[*] sending test prompt..."
|
| 69 |
RESP="$(curl -fsS "${HOST}/api/chat" \
|
| 70 |
-H 'Content-Type: application/json' \
|