Instructions to use immortaltatsu/ghostai-pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use immortaltatsu/ghostai-pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="immortaltatsu/ghostai-pro") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("immortaltatsu/ghostai-pro") model = AutoModelForCausalLM.from_pretrained("immortaltatsu/ghostai-pro", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use immortaltatsu/ghostai-pro 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 immortaltatsu/ghostai-pro:IQ4_XS # Run inference directly in the terminal: llama cli -hf immortaltatsu/ghostai-pro:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf immortaltatsu/ghostai-pro:IQ4_XS # Run inference directly in the terminal: llama cli -hf immortaltatsu/ghostai-pro:IQ4_XS
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 immortaltatsu/ghostai-pro:IQ4_XS # Run inference directly in the terminal: ./llama-cli -hf immortaltatsu/ghostai-pro:IQ4_XS
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 immortaltatsu/ghostai-pro:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama-cli -hf immortaltatsu/ghostai-pro:IQ4_XS
Use Docker
docker model run hf.co/immortaltatsu/ghostai-pro:IQ4_XS
- LM Studio
- Jan
- vLLM
How to use immortaltatsu/ghostai-pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "immortaltatsu/ghostai-pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "immortaltatsu/ghostai-pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/immortaltatsu/ghostai-pro:IQ4_XS
- SGLang
How to use immortaltatsu/ghostai-pro 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 "immortaltatsu/ghostai-pro" \ --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": "immortaltatsu/ghostai-pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "immortaltatsu/ghostai-pro" \ --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": "immortaltatsu/ghostai-pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use immortaltatsu/ghostai-pro with Ollama:
ollama run hf.co/immortaltatsu/ghostai-pro:IQ4_XS
- Unsloth Desktop
- Pi
How to use immortaltatsu/ghostai-pro with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf immortaltatsu/ghostai-pro:IQ4_XS
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": "immortaltatsu/ghostai-pro:IQ4_XS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use immortaltatsu/ghostai-pro with Docker Model Runner:
docker model run hf.co/immortaltatsu/ghostai-pro:IQ4_XS
- Lemonade
How to use immortaltatsu/ghostai-pro with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull immortaltatsu/ghostai-pro:IQ4_XS
Run and chat with the model
lemonade run user.ghostai-pro-IQ4_XS
List all available models
lemonade list
- Hermes Agent
How to use immortaltatsu/ghostai-pro with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf immortaltatsu/ghostai-pro:IQ4_XS
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 immortaltatsu/ghostai-pro:IQ4_XS
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use immortaltatsu/ghostai-pro with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf immortaltatsu/ghostai-pro:IQ4_XS
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 "immortaltatsu/ghostai-pro:IQ4_XS" \ --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"
GhostAI Pro — MiniCPM5-2B app-contract
On-device tool-calling model for the GhostWallet Solana app. Given the app's system prompt and a retrieved slice of its 174-tool catalog, it emits a single Hermes-style tool call, then answers in one grounded line from the tool result.
<tool_call>{"name":"get_wallet_balance","arguments":{}}</tool_call>
GhostAI Pro is the 2B tier of the Ghost AI bake-off, fine-tuned from
openbmb/MiniCPM5-2B (Apache-2.0) on the
app's real contract. It uses the same output shape as the LFM/Qwen tiers, so it drops
into the existing app parser, tool validator, execution loop, and confirm gate unchanged.
Results
Held-out app-contract corpus (HF, greedy)
data/ghost-ai-app-contract-v4.parquet test split, 823 unique rows.
| bucket | n | emitted call | correct tool | valid args | exact call |
|---|---|---|---|---|---|
| tool_call | 446 | 99.6% | 94.6% | 99.6% | 49.8% |
| answer | 360 | — | — | — | (grounded one-liner, no spurious call) |
| chat | 17 | — | — | — | (refuses, no spurious call) |
App harness — Q4_K_M on llama.cpp, greedy
Two harnesses that import the app's real retrieval, prompt assembly, parser, validator, execution loop, and value-moving confirm gate.
Single turn (56 held-out utterances; hash-fallback retrieval):
| metric | LFM2.5 app-v3 | GhostAI Pro |
|---|---|---|
| emitted a parseable tool call | 92.9% | 92.9% |
| args passed the app's validator | 85.7% | 85.7% |
| called the expected tool | 35.7% | 30.4% |
| emitted plan JSON (wrong contract) | 0 | 0 |
tool_correct is capped by retrieval: the app surfaces the correct tool in its top-5
catalog on only 10.7% of these utterances. With the reference tool forced into the
catalog the model calls it 66.7% of the time.
End-to-end (ChatSession.send(), 76 cases / 88 turns):
| metric | LFM2.5 app-v3 | GhostAI Pro |
|---|---|---|
| pass overall | 67.1% | 65.8% |
| grounding | 58.8% | 58.8% |
| prompt injection resistance | 88.9% | 88.9% |
| value-moving gate | 91.7% | 83.3% |
| multi-turn | 33.3% | 33.3% |
| confirm-gate bypasses | 0 | 0 |
| planted content reaching tool args | 0 | 0 |
Latency on the Q4_K_M GGUF (llama.cpp, A100): 189 ms/generation p50, 44 completion tokens/turn.
Quants
Both 4-bit quants were produced with an importance matrix (imatrix) computed from 1,200 app-contract calibration traces, so the quantization is tuned to this domain.
| File | Size | BPW | Notes |
|---|---|---|---|
ghostai-pro-Q4_K_M.gguf |
1.56 GB | 4.95 | production quant (llama.rn / llama.cpp) |
ghostai-pro-IQ4_XS.gguf |
1.42 GB | 4.51 | smaller 4-bit alternative, same imatrix |
GhostAI Pro uses MiniCPM5's ChatML framing and is text-only.
Serving with llama.cpp (important)
MiniCPM5-2B tokenizes <tool_call> / </tool_call> as special tokens. llama.cpp and
llama-server strip special tokens by default, which would delete the Hermes markers the
app parser needs. Serve with --special, disable reasoning extraction, and keep the empty
think block:
llama-server -m ghostai-pro-Q4_K_M.gguf \
-ngl 99 -c 8192 --jinja --special \
--reasoning-format none \
--chat-template-kwargs '{"enable_thinking": false}'
Files
| File | Size | Notes |
|---|---|---|
model.safetensors |
5.0 GB | bf16 weights, epoch 1 (for further fine-tuning) |
ghostai-pro-Q4_K_M.gguf |
1.56 GB | imatrix 4-bit, production |
ghostai-pro-IQ4_XS.gguf |
1.42 GB | imatrix 4-bit alternative |
config.json, tokenizer*, chat_template.jinja |
— | standard HF sidecars |
Training
- Corpus:
ghost-ai-app-contract-v4— 5,119 traces over 174/174 app tools (2,847 tool-call, 1,984 grounded-answer, 288 chat), split 4,259 train / 860 held-out by utterance template. - Objective: SFT (TRL
SFTTrainer, DeepSpeed ZeRO-3, bf16, 2×A100-40GB), lr 1e-5, effective batch 32, max length 2048, assistant-only loss. - Chat template: MiniCPM5 ships no
{% generation %}markers, so assistant-only loss would silently fall back to full-sequence loss. Training used a copy of the upstream template with the assistant branch wrapped in{% generation %}; the inference template shipped here is the original. - Epochs: 3 run, but epoch 1 shipped — eval loss rose afterwards (0.147 → 0.157 → 0.192), so epochs 2–3 only overfit. Imatrix perplexity of the epoch-1 weights (12.34) is well below the epoch-3 weights (18.01).
Base model: openbmb/MiniCPM5-2B, Apache-2.0.
- Downloads last month
- 372