File size: 2,780 Bytes
7197abd
9ca8700
 
 
 
 
 
7197abd
9ca8700
 
 
 
73e905b
 
 
5426482
9ca8700
 
 
 
0d08cb9
7197abd
9ca8700
 
 
 
e4beea4
 
25d5454
9ca8700
 
 
 
 
0d08cb9
9ca8700
 
 
 
73e905b
b5a3fb0
9ca8700
5426482
ef3c5d9
 
7197abd
d87bc64
 
9ca8700
 
 
84d3da6
 
 
d344201
 
 
e4beea4
33458f7
e4beea4
9ca8700
 
 
25d5454
 
 
9ca8700
 
 
 
 
7197abd
9ca8700
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Thanatos-27B convenience Makefile.
#
# All work is delegated to scripts/* — this file just gives common
# operations short, discoverable names.
#
# Variables you can override on the command line:
#   QUANT     GGUF quant suffix       (default: Q4_K_M)
#   TAG       Ollama model tag        (default: thanatos-27b)
#   GGUF_PATH path to existing GGUF   (skip the download)
#   MODEL     model tag for smoke     (default: $(TAG))
#
# Examples:
#   make build                          # Q4_K_M from unsloth (qwen35-stamped, loads today)
#   make build QUANT=Q3_K_S             # smaller quant
#   make build GGUF_PATH=~/models/Qwen3.6-27B-Q4_K_M.gguf
#   make load-bundle                    # this repo's bundled GGUF -> local Ollama tag (smudge LFS if needed)
#   make smoke
#   make check
#   make clean

QUANT ?= Q4_K_M
TAG   ?= thanatos-27b
MODEL ?= $(TAG)

.DEFAULT_GOAL := help

PRECISION ?= F16

.PHONY: help build load-bundle heal-hf smoke smoke-tools bench check hooks mmproj verify-arch clean

help:  ## Show this help.
	@awk 'BEGIN {FS = ":.*##"; printf "Targets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf "  \033[36m%-12s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
	@echo
	@echo "Current settings:"
	@echo "  QUANT=$(QUANT) TAG=$(TAG) PRECISION=$(PRECISION)"
ifdef GGUF_PATH
	@echo "  GGUF_PATH=$(GGUF_PATH)"
endif

build:  ## Download qwen35-stamped GGUF from unsloth and run 'ollama create' (loads today).
	GGUF_PATH=$(GGUF_PATH) TAG=$(TAG) ./scripts/build.sh $(QUANT)

load-bundle:  ## Load THIS repo's bundled GGUF into a local Ollama tag (smudge LFS + ollama create).
	TAG=$(TAG) ./scripts/load_bundle.sh

heal-hf:  ## Heal an already-pulled hf.co/FoolDev/Thanatos-27B tag in-store (rebadge blob + manifest digest).
	./scripts/heal_hf_pull.sh

smoke:  ## Verify the model is reachable and round-trips.
	MODEL=$(MODEL) ./scripts/smoke_test.sh

smoke-tools:  ## smoke + end-to-end tool-call round-trip (~10s extra).
	MODEL=$(MODEL) TOOLS_TEST=1 ./scripts/smoke_test.sh

bench:  ## Measure tok/s using Ollama's eval timing (3 prompts).
	MODEL=$(MODEL) ./scripts/bench.sh

mmproj:  ## Fetch the vision projector for llama.cpp (Ollama vision is broken upstream).
	./scripts/fetch_vision.sh $(PRECISION)

check:  ## Lint shell + python files; block dot-pattern footgun.
	./scripts/check.sh

verify-arch:  ## Cross-check README "Architecture" bullets against GGUF metadata.
	./scripts/verify_arch.py

hooks:  ## Install scripts/check.sh as the git pre-commit hook.
	./scripts/install-hooks.sh

clean:  ## Remove local GGUF copies and ephemeral caches in this repo.
	@echo "[*] removing local GGUFs and ephemeral caches in $$PWD"
	@rm -f ./Qwen3.6-27B-*.gguf ./mmproj-*.gguf ./Thanatos-27B.*.qwen[0-9]*.gguf
	@rm -rf ./.cache __pycache__ examples/__pycache__
	@echo "[+] clean"