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
check.sh: footgun-grep for VAR="$(cmd 2>/dev/null | filter)" silent-exit
Browse filesCaptures the heal-hf bug class (commit 385ed94) as a regression
guard. Pattern: top-level variable assignment whose `$(...)` body
both suppresses stderr (`2>/dev/null`) AND contains a pipe. Under
`set -euo pipefail`, the first command's failure propagates
through the pipeline (`pipefail`), set -e aborts on the
assignment, and any subsequent `[[ -z "${VAR}" ]]` empty-check
never runs — the user sees only `make: *** Error 1`.
The `2>/dev/null` is the load-bearing tell: a script author who
suppresses stderr knows the command can fail loudly. Combined
with a pipeline, that's the exact silent-exit footgun. Without
the `2>/dev/null`, the failing command would print its own error
and the user would have a clue; we don't flag those.
Regex: `^\s*[A-Za-z_][A-Za-z0-9_]*=("?)\$\([^)]*2>/dev/null[^|]*\|`
Walks scripts/*.sh via grep -R. Currently passes — the heal-hf
fix already uses the if-form.
Failure message points at the fix recipe:
if VAR="$(cmd 2>/dev/null)"; then
VAR2="$(filter <<<"${VAR}")"
fi
and at commit 385ed94 for the original incident.
Header comment at the top of check.sh updated to enumerate this
as check #6 (was 5 checks), parallel to the existing dash/dot
footgun (#5) that traces back to 6f2884f → 82677d0.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- CHANGELOG.md +14 -0
- scripts/check.sh +36 -1
|
@@ -7,6 +7,20 @@ and documentation**, not the underlying base model.
|
|
| 7 |
|
| 8 |
## [Unreleased]
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
### Fixed
|
| 11 |
- `scripts/heal_hf_pull.sh` silent-exit when the target tag isn't
|
| 12 |
pulled. The blob-locator line was
|
|
|
|
| 7 |
|
| 8 |
## [Unreleased]
|
| 9 |
|
| 10 |
+
### Added
|
| 11 |
+
- `scripts/check.sh` now greps for the `VAR="$(cmd 2>/dev/null | filter)"`
|
| 12 |
+
silent-exit pattern that bit `heal_hf_pull.sh` (commit 385ed94).
|
| 13 |
+
Pattern fires on any top-level assignment whose `$(...)` body
|
| 14 |
+
both suppresses stderr (`2>/dev/null`) and pipes through a
|
| 15 |
+
filter — the exact combination where `set -e + pipefail`
|
| 16 |
+
swallows the failure of the first command and aborts the script
|
| 17 |
+
before any explicit `[[ -z "${VAR}" ]]` check can run, leaving
|
| 18 |
+
the user staring at `make: *** [Makefile:N: <target>] Error 1`
|
| 19 |
+
with no diagnostic. Suggested fix in the failure message:
|
| 20 |
+
`if VAR=$(cmd 2>/dev/null); then VAR2=$(filter <<<"${VAR}"); fi`.
|
| 21 |
+
Currently passes (the heal-hf fix already uses the if-form);
|
| 22 |
+
pre-commit hook + `make check` now block regressions.
|
| 23 |
+
|
| 24 |
### Fixed
|
| 25 |
- `scripts/heal_hf_pull.sh` silent-exit when the target tag isn't
|
| 26 |
pulled. The blob-locator line was
|
|
@@ -9,6 +9,8 @@
|
|
| 9 |
# 4. python3 -m py_compile on every *.py (catches actual syntax errors)
|
| 10 |
# 5. grep -E for the dash/dot filename footgun (the one we shipped in 6f2884f
|
| 11 |
# and had to fix in 82677d0)
|
|
|
|
|
|
|
| 12 |
#
|
| 13 |
# Exit non-zero on any failure. Designed to run from .git/hooks/pre-commit.
|
| 14 |
#
|
|
@@ -118,7 +120,40 @@ else
|
|
| 118 |
echo " [ ok ] no stale dot-pattern matches"
|
| 119 |
fi
|
| 120 |
|
| 121 |
-
# ---- 6.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
#
|
| 123 |
# 'Modelfile' (consumed by 'ollama create -f Modelfile') and the root-level
|
| 124 |
# 'template' / 'system' / 'params' files (consumed by HF's Ollama bridge,
|
|
|
|
| 9 |
# 4. python3 -m py_compile on every *.py (catches actual syntax errors)
|
| 10 |
# 5. grep -E for the dash/dot filename footgun (the one we shipped in 6f2884f
|
| 11 |
# and had to fix in 82677d0)
|
| 12 |
+
# 6. grep -E for the VAR="$(cmd 2>/dev/null | filter)" silent-exit pattern
|
| 13 |
+
# under set -e + pipefail (the one we shipped in d87bc64 and fixed in 385ed94)
|
| 14 |
#
|
| 15 |
# Exit non-zero on any failure. Designed to run from .git/hooks/pre-commit.
|
| 16 |
#
|
|
|
|
| 120 |
echo " [ ok ] no stale dot-pattern matches"
|
| 121 |
fi
|
| 122 |
|
| 123 |
+
# ---- 6. footgun: VAR="$(cmd 2>/dev/null | filter)" silent-exit pattern -----
|
| 124 |
+
#
|
| 125 |
+
# Under `set -euo pipefail`, a direct command substitution like
|
| 126 |
+
# VAR="$(ollama show "${TAG}" 2>/dev/null | awk ...)"
|
| 127 |
+
# silently kills the script when ollama show fails: pipefail
|
| 128 |
+
# propagates the non-zero exit through the pipeline, set -e
|
| 129 |
+
# aborts on the assignment, and the explicit `[[ -z "${VAR}" ]]`
|
| 130 |
+
# check below it never runs. The user sees only
|
| 131 |
+
# make: *** [Makefile:N: <target>] Error 1
|
| 132 |
+
# with no diagnostic. We shipped this exact bug in
|
| 133 |
+
# scripts/heal_hf_pull.sh and only caught it this session by
|
| 134 |
+
# running `make heal-hf` against an empty store — see commit
|
| 135 |
+
# 385ed94 for the fix recipe: split the assignment with
|
| 136 |
+
# if VAR="$(cmd 2>/dev/null)"; then
|
| 137 |
+
# VAR2="$(filter <<<"${VAR}")"
|
| 138 |
+
# fi
|
| 139 |
+
# The `2>/dev/null` is the tell — its presence says "this command
|
| 140 |
+
# can fail loudly, we want to suppress the noise" — which is
|
| 141 |
+
# exactly the case where set -e + pipefail silently kills.
|
| 142 |
+
|
| 143 |
+
blue "[*] grep: forbidden VAR=\$(... 2>/dev/null | ...) silent-exit pattern"
|
| 144 |
+
if grep -RnE '^\s*[A-Za-z_][A-Za-z0-9_]*=("?)\$\([^)]*2>/dev/null[^|]*\|' \
|
| 145 |
+
--include='*.sh' \
|
| 146 |
+
--exclude-dir=.git \
|
| 147 |
+
scripts/ ; then
|
| 148 |
+
red " [FAIL] silent-exit substitution under set -e + pipefail."
|
| 149 |
+
red " Rewrite as 'if VAR=\$(cmd 2>/dev/null); then VAR2=\$(filter <<<\"\${VAR}\"); fi'."
|
| 150 |
+
red " See commit 385ed94 for the bug we shipped and the fix recipe."
|
| 151 |
+
FAIL=1
|
| 152 |
+
else
|
| 153 |
+
echo " [ ok ] no silent-exit substitution patterns"
|
| 154 |
+
fi
|
| 155 |
+
|
| 156 |
+
# ---- 7. Modelfile <-> bridge files sync -----------------------------------
|
| 157 |
#
|
| 158 |
# 'Modelfile' (consumed by 'ollama create -f Modelfile') and the root-level
|
| 159 |
# 'template' / 'system' / 'params' files (consumed by HF's Ollama bridge,
|