Instructions to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF 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 bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF 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 bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF: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 bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF: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 bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
Use Docker
docker model run hf.co/bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF", "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/bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
- Ollama
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with Ollama:
ollama run hf.co/bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_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": "bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with Docker Model Runner:
docker model run hf.co/bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
- Lemonade
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF: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 bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_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 "bartowski/ServiceNow-AI_Apriel-1.6-15b-Thinker-GGUF:Q4_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"
Updated Prompt Template
This template from the ServiceNow page for their GGUF version works flawlessly:
{# ---------------------------------------------------------------------- #}
{# ƛƬ Default setup and flags #}
{# ---------------------------------------------------------------------- #}
{# FIX: Use "is defined" check BEFORE accessing the variable #}
{%- set messages = messages if (messages is defined and messages) else [] -%}
{%- set tools = tools if (tools is defined and tools) else [] -%}
{%- set add_generation_prompt = add_generation_prompt if (add_generation_prompt is defined) else false -%}
{%- set available_tool_string, add_tool_id = '', true -%}
{%- set add_thoughts = false -%} {# whether to include reasoning blocks #}
{%- set add_generation_prompt = true -%} {# whether to emit reasoning starter before assistant response #}
{# Optional token placeholders (safe defaults) #}
{%- set bos_token = bos_token if (bos_token is defined) else '' -%}
{%- set eos_token = eos_token if (eos_token is defined) else '' -%}
{# ---------------------------------------------------------------------- #}
{# Core reasoning prompt and assistant reasoning prefix #}
{# ---------------------------------------------------------------------- #}
{%- set reasoning_prompt =
'You are a thoughtful, systematic AI assistant from ServiceNow Language Models (SLAM) lab. '
'Analyze each question carefully, present your reasoning step-by-step, then provide the final '
'response after the marker [BEGIN FINAL RESPONSE].'
-%}
{%- set reasoning_asst_turn_start = 'Here are my reasoning steps:\n' -%}
{# ---------------------------------------------------------------------- #}
{# Tool list and tool call output format #}
{# ---------------------------------------------------------------------- #}
{%- if tools|length > 0 -%}
{%- set available_tool_string -%}
You are provided with function signatures within XML tags.
You may call one or more functions to assist with the user query.
Don't make assumptions about the arguments. You should infer the argument values from previous
user responses and the system message.
Here are the available tools:
{% for tool in tools %}{{ tool|string }}{% endfor %}
</available_tools>.
Return all function calls as a list of JSON objects within <tool_calls></tool_calls> XML tags.
Each JSON object should contain a function name and arguments as follows:
<tool_calls>[
{"name": <function-name-1>, "arguments": <args-dict-1>},
{"name": <function-name-2>, "arguments": <args-dict-2>},
...
]</tool_calls>
{%- endset -%}
{%- endif -%}
{# ---------------------------------------------------------------------- #}
{# Start system block if first message is not system #}
{# ---------------------------------------------------------------------- #}
{%- if messages|length > 0 and messages[0]['role'] != 'system' -%}
{%- if tools|length > 0 -%}
{{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' + available_tool_string + '\n' }}
{%- else -%}
{{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' }}
{%- endif -%}
{%- endif -%}
{# ---------------------------------------------------------------------- #}
{# Iterate through messages #}
{# ---------------------------------------------------------------------- #}
{%- for message in messages -%}
{# ---------------- USER MESSAGE ---------------- #}
{%- if message['role'] == 'user' -%}
{{ '<|begin_user|>\n' }}
{%- if message['content'] is not string -%}
{%- for chunk in message['content'] -%}
{%- if chunk['type'] == 'text' -%}
{{ chunk['text'] }}
{%- elif chunk['type'] in ['image', 'image_url'] -%}
{{ '[IMG]' }}
{%- else -%}
{{ raise_exception('Unrecognized content type!') }}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{{ message['content'] }}
{%- endif -%}
{# ---------------- SYSTEM MESSAGE ---------------- #}
{%- elif message['role'] == 'system' -%}
{%- set sys_content = message.get('content', '') -%}
{%- if sys_content and sys_content|length > 0 -%}
{%- if sys_content is string -%}
{%- set system_message = sys_content -%}
{%- else -%}
{%- set system_message = sys_content[0]['text'] -%}
{%- endif -%}
{%- else -%}
{%- set system_message = '' -%}
{%- endif -%}
{%- if tools|length > 0 -%}
{{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' + system_message + '\n' + available_tool_string + '\n' }}
{%- else -%}
{{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' + system_message + '\n' }}
{%- endif -%}
{# ---------------- ASSISTANT MESSAGE ---------------- #}
{%- elif message['role'] == 'assistant' -%}
{%- if loop.last -%}
{%- set add_tool_id = false -%}
{%- endif -%}
{{ '\n<|begin_assistant|>\n' }}
{%- if add_thoughts and message.get('thought') -%}
<thinking>{{ message['thought'] }}</thinking>
{%- endif -%}
{%- set asst_content = message.get('content', '') -%}
{%- if asst_content and asst_content|length > 0 -%}
{%- if asst_content is not string -%}
{%- set asst_text = asst_content[0]['text'] -%}
{%- else -%}
{%- set asst_text = asst_content -%}
{%- endif -%}
{# For historical turns (not the last), strip reasoning and keep only final response #}
{%- if not loop.last and '[BEGIN FINAL RESPONSE]' in asst_text -%}
{{- asst_text.split('[BEGIN FINAL RESPONSE]')[-1] | trim -}}
{%- else -%}
{{- asst_text -}}
{%- endif -%}
{%- elif message.get('chosen') and message['chosen']|length > 0 -%}
{{ message['chosen'][0] }}
{%- endif -%}
{# Tool call output #}
{%- set tool_calls = message.get('tool_calls', []) -%}
{%- if tool_calls and tool_calls|length > 0 -%}
{{ '\n<tool_calls>[' }}
{%- for tool_call in tool_calls -%}
{{ '{"name": "' + tool_call['function']['name'] + '", "arguments": ' + tool_call['function']['arguments']|string }}
{%- if add_tool_id == true and 'id' in tool_call -%}
{{ ', "id": "' + tool_call['id'] + '"' }}
{%- endif -%}
{{ '}' }}
{%- if not loop.last -%}{{ ', ' }}{%- endif -%}
{%- endfor -%}
{{ ']</tool_calls>' }}
{%- endif -%}
{%- set training_prompt = training_prompt if (training_prompt is defined) else false -%}
{%- if not loop.last or training_prompt -%}
{{ '\n<|end|>\n' }}
{%- endif -%}
{# ---------------- TOOL RESULT MESSAGE ---------------- #}
{%- elif message['role'] == 'tool' -%}
{%- set tool_content = message.get('content', '') -%}
{%- if tool_content is string -%}
{%- set tool_message = tool_content -%}
{%- else -%}
{%- set tool_message = tool_content[0]['text'] if tool_content else '' -%}
{%- endif -%}
{{ '<|begin_tool_result|>\n' + tool_message|string + '\n' }}
{# ---------------- CONTENT MESSAGE ---------------- #}
{%- elif message['role'] == 'content' -%}
{%- set msg_content = message.get('content', '') -%}
{%- if msg_content is not string -%}
{{ '<|begin_content|>\n' + msg_content[0]['text'] + '\n' }}
{%- else -%}
{{ '<|begin_content|>\n' + msg_content + '\n' }}
{%- endif -%}
{%- endif -%}
{# ---------------- REASONING PROMPT BEFORE NEXT ASSISTANT ---------------- #}
{%- if loop.last and add_generation_prompt and message['role'] != 'assistant' -%}
{{ '\n<|begin_assistant|>\n' + reasoning_asst_turn_start }}
{%- endif -%}
{%- endfor -%}