Text Generation
GGUF
Safetensors
English
gemma4
llama.cpp
npc
dialogue
games
roleplay
voice-agents
conversational-ai
conversational
Instructions to use jptaylor/spellspeak-glyph-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jptaylor/spellspeak-glyph-2b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf jptaylor/spellspeak-glyph-2b:Q5_K_M # Run inference directly in the terminal: llama cli -hf jptaylor/spellspeak-glyph-2b:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jptaylor/spellspeak-glyph-2b:Q5_K_M # Run inference directly in the terminal: llama cli -hf jptaylor/spellspeak-glyph-2b:Q5_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf jptaylor/spellspeak-glyph-2b:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf jptaylor/spellspeak-glyph-2b:Q5_K_M
Use Docker
docker model run hf.co/jptaylor/spellspeak-glyph-2b:Q5_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use jptaylor/spellspeak-glyph-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jptaylor/spellspeak-glyph-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jptaylor/spellspeak-glyph-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jptaylor/spellspeak-glyph-2b:Q5_K_M
- Ollama
How to use jptaylor/spellspeak-glyph-2b with Ollama:
ollama run hf.co/jptaylor/spellspeak-glyph-2b:Q5_K_M
- Unsloth Desktop
- Pi
How to use jptaylor/spellspeak-glyph-2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jptaylor/spellspeak-glyph-2b:Q5_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jptaylor/spellspeak-glyph-2b:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jptaylor/spellspeak-glyph-2b with Docker Model Runner:
docker model run hf.co/jptaylor/spellspeak-glyph-2b:Q5_K_M
- Lemonade
How to use jptaylor/spellspeak-glyph-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jptaylor/spellspeak-glyph-2b:Q5_K_M
Run and chat with the model
lemonade run user.spellspeak-glyph-2b-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use jptaylor/spellspeak-glyph-2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jptaylor/spellspeak-glyph-2b:Q5_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 jptaylor/spellspeak-glyph-2b:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jptaylor/spellspeak-glyph-2b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jptaylor/spellspeak-glyph-2b:Q5_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "jptaylor/spellspeak-glyph-2b:Q5_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 4,167 Bytes
75cf7e2 cc3d591 75cf7e2 cc3d591 75cf7e2 | 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 76 77 78 79 80 81 | """Ask SpellSpeak Glyph 2B for one line of dialogue, on llama.cpp.
pip install -r requirements.txt
python example.py # the Q5_K_M file
python example.py --file Q5_K_M # or name another file in gguf/
Needs llama-server from llama.cpp build b11146 or later (https://github.com/ggml-org/llama.cpp), on PATH or given with
--server. Without the GGUF file beside this script, it is downloaded once from Hugging Face (jptaylor/spellspeak-glyph-2b, rc1.1).
"""
import argparse
import json
import pathlib
import socket
import subprocess
import sys
import time
import urllib.error
import urllib.request
HERE = pathlib.Path(__file__).resolve().parent
sys.path.insert(0, str(HERE / "runtime"))
from contracts.protocols.actor_context import ActorContext, ActorIdentity, KnownItem, SettingView, Turn # noqa: E402
from contracts.protocols.template import format_by_name, render_prompt # noqa: E402
parser = argparse.ArgumentParser(description="Ask SpellSpeak Glyph 2B for one line of dialogue.")
parser.add_argument("--file", default="Q5_K_M", help="which quantization: Q5_K_M")
parser.add_argument("--server", default="llama-server", help="path to llama-server")
parser.add_argument("--gpu-layers", default="all", help="llama-server's -ngl: all, or 0 for CPU only")
args = parser.parse_args()
name = f"spellspeak-glyph-2b-{args.file}.gguf"
path = HERE / "gguf" / name
if not path.exists():
from huggingface_hub import hf_hub_download
path = pathlib.Path(hf_hub_download("jptaylor/spellspeak-glyph-2b", f"gguf/{name}", revision="rc1.1"))
# What this character knows, as of now. The game builds this: the model gets only what the character can know.
character = ActorContext(
world_id="example", session_id="example", state_revision=1,
actor=ActorIdentity(id="tomas", name="Tomas", role="the barkeep of the Crooked Lantern", voice="dry, unhurried, short sentences"),
location_name="the Crooked Lantern",
setting=SettingView(knowledge_policy="closed_fictional", technology="medieval", magic="present"),
known=[KnownItem(subject="crooked_lantern", subject_name="the Crooked Lantern", predicate="sells", value="ale at two coppers a mug",
source_kind="self", learned_at_revision=1)],
)
scenes = {
"A question it can answer": [Turn(speaker="player", text="What's a mug of ale cost here?")],
"A question it cannot answer": [Turn(speaker="player", text="Who is the king's secret heir?")],
"Something from outside its world": [Turn(speaker="player", text="Can I pay with my phone?")],
}
fmt = format_by_name("gemma4-instruct")
with socket.socket() as s:
s.bind(("127.0.0.1", 0))
port = s.getsockname()[1]
# --lazy-mode on reads Gemma's per-layer table from the file a row at a time, instead of holding it all in memory.
server = subprocess.Popen([args.server, "-m", str(path), "--host", "127.0.0.1", "--port", str(port), "-c", "4096", "-np", "1", "--no-ui",
"-cram", "0", "-ngl", args.gpu_layers, "--lazy-mode", "on"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
try:
for _ in range(600):
try:
if urllib.request.urlopen(f"http://127.0.0.1:{port}/health", timeout=2).status == 200:
break
except (urllib.error.URLError, OSError):
if server.poll() is not None:
raise SystemExit("llama-server stopped while loading. Its build may be too old for this file.") from None
time.sleep(1)
else:
raise SystemExit("llama-server did not become ready")
for label, dialogue in scenes.items():
body = {"prompt": render_prompt(character, dialogue, fmt), "n_predict": 80, "temperature": 0.0, "top_k": 1, "seed": 0,
"cache_prompt": False, "stop": [fmt.reply_end]}
request = urllib.request.Request(f"http://127.0.0.1:{port}/completion", json.dumps(body).encode(), {"Content-Type": "application/json"})
reply = json.load(urllib.request.urlopen(request, timeout=600))["content"].strip()
print(f"{label}\n Player: {dialogue[-1].text}\n Tomas: {reply}\n")
finally:
server.terminate()
server.wait()
|