Download scripts/verify_server.sh from Frosty40/Inkling-2-Mini-Turbo: direct link, hf CLI and curl.
- Browser
- Download file 2.63 kB
-
https://huggingface.co/Frosty40/Inkling-2-Mini-Turbo/resolve/main/scripts/verify_server.sh
- Command line
-
hf download hf://Frosty40/Inkling-2-Mini-Turbo/scripts/verify_server.sh
-
curl -L -o verify_server.sh https://huggingface.co/Frosty40/Inkling-2-Mini-Turbo/resolve/main/scripts/verify_server.sh
2.63 kB
| # Quick verification script for a running Inkling-2-Mini Turbo (Helios flare) endpoint. | |
| # Usage: bash scripts/verify_server.sh [http://127.0.0.1:8001/v1] [inkling-2-mini] | |
| set -euo pipefail | |
| BASE_URL="${1:-http://127.0.0.1:8001/v1}" | |
| MODEL="${2:-inkling-2-mini}" | |
| echo "==> 1. Checking /models on ${BASE_URL}" | |
| curl -fsS "${BASE_URL}/models" | python3 -c ' | |
| import json, sys | |
| d = json.load(sys.stdin) | |
| ids = [m["id"] for m in d.get("data", [])] | |
| assert ids, "No models returned" | |
| print(" Models:", ids) | |
| ' | |
| echo "==> 2. Checking short non-empty response with reasoning_effort=none at max_tokens=64" | |
| curl -fsS "${BASE_URL}/chat/completions" \ | |
| -H 'Content-Type: application/json' \ | |
| -d "{ | |
| \"model\": \"${MODEL}\", | |
| \"messages\": [{\"role\": \"user\", \"content\": \"Reply with exactly one word: ready\"}], | |
| \"max_tokens\": 64, | |
| \"reasoning_effort\": \"none\" | |
| }" | python3 -c ' | |
| import json, sys | |
| d = json.load(sys.stdin) | |
| msg = d["choices"][0]["message"] | |
| content = (msg.get("content") or "").strip() | |
| assert content, f"Empty content: {d}" | |
| print(" content:", repr(content), "usage:", d.get("usage")) | |
| ' | |
| echo "==> 3. Checking explicit thinking_token_budget=64 (Helios TMLv0 patch)" | |
| curl -fsS "${BASE_URL}/chat/completions" \ | |
| -H 'Content-Type: application/json' \ | |
| -d "{ | |
| \"model\": \"${MODEL}\", | |
| \"messages\": [{\"role\": \"user\", \"content\": \"Compute 17 * 23 and give the final integer.\"}], | |
| \"max_tokens\": 192, | |
| \"thinking_token_budget\": 64 | |
| }" | python3 -c ' | |
| import json, sys | |
| d = json.load(sys.stdin) | |
| msg = d["choices"][0]["message"] | |
| content = (msg.get("content") or "").strip() | |
| assert "391" in content, f"Expected 391 in response, got: {content!r}" | |
| print(" content:", repr(content), "finish_reason:", d["choices"][0]["finish_reason"]) | |
| ' | |
| echo "==> 4. Checking streaming SSE output" | |
| curl -fsSN "${BASE_URL}/chat/completions" \ | |
| -H 'Content-Type: application/json' \ | |
| -d "{ | |
| \"model\": \"${MODEL}\", | |
| \"messages\": [{\"role\": \"user\", \"content\": \"List the integers 1 through 5 separated by commas.\"}], | |
| \"max_tokens\": 128, | |
| \"reasoning_effort\": \"none\", | |
| \"stream\": true | |
| }" | python3 -c ' | |
| import json, sys | |
| chunks = [] | |
| for line in sys.stdin: | |
| if not line.startswith("data: "): | |
| continue | |
| payload = line[6:].strip() | |
| if payload == "[DONE]": | |
| break | |
| obj = json.loads(payload) | |
| delta = obj["choices"][0].get("delta", {}) | |
| if delta.get("content"): | |
| chunks.append(delta["content"]) | |
| text = "".join(chunks).strip() | |
| assert text, "Empty streamed content" | |
| print(" streamed:", repr(text)) | |
| ' | |
| echo "ALL CHECKS PASSED." | |