Skip to content

Instantly share code, notes, and snippets.

llama-server \
-hf bartowski/cerebras_GLM-4.5-Air-REAP-82B-A12B-GGUF:Q6_K \
-a glm/glm-air-4.5 \
--chat-template-file glm-chat-template.jinja \
--jinja \
--host 0.0.0.0 \
--port 11434 \
--ctx-size 145000 \
--no-mmap \
-fa on \
@mdierolf
mdierolf / gist:1f3c43f48f6fbd9b2497e9f538ae42e7
Created November 5, 2025 04:57
GLM 4.6 Air Chat Template with working tool calling
{%- macro visible_text(content) -%}
{%- if content is string -%}
{{- content }}
{%- elif content is iterable and content is not mapping -%}
{%- for item in content -%}
{%- if item is mapping and item.type == 'text' -%}
{{- item.text }}
{%- elif item is string -%}
{{- item }}
{%- endif -%}
INFO 09-22 10:52:06 [__init__.py:216] Automatically detected platform cuda.
(APIServer pid=1200988) INFO 09-22 10:52:07 [api_server.py:1801] vLLM API server version 0.10.2rc3.dev236+g38db529f6
(APIServer pid=1200988) INFO 09-22 10:52:07 [utils.py:328] non-default args: {'model_tag': 'Qwen/Qwen3-Next-80B-A3B-Instruct-FP8', 'port': 11434, 'enable_auto_tool_choice': True, 'tool_call_parser': 'hermes', 'model': 'Qwen/Qwen3-Next-80B-A3B-Instruct-FP8', 'trust_remote_code': True, 'max_model_len': 262144, 'gpu_memory_utilization': 0.92}
(APIServer pid=1200988) The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
(APIServer pid=1200988) INFO 09-22 10:52:27 [__init__.py:710] Resolved architecture: Qwen3NextForCausalLM
(APIServer pid=1200988) `torch_dtype` is deprecated! Use `dtype` instead!
(APIServer pid=1200988) INFO 09-22 10:52:27 [__init__.py:1769] Using max model len 262144
(APIServer pid=1200988) INFO 09-22 10:52:31 [scheduler.py:222] Chunked prefill is enabled w
@mdierolf
mdierolf / spotify.preload.c
Last active January 20, 2022 14:32
An LD_PRELOAD fix for a really stupid spotify problem
// Save this file somewhere as spotify.preload.c
// Then build the library:
// gcc -fPIC -shared -o ~/spotify.preload.so spotify.preload.c -ldl
// When you execute spotify, you need to preload this library, which wraps the "setsockopt" function call with another function that gives spotify the results it expects:
// LD_PRELOAD=~/spotify.preload.so spotify
// To make the desktop icon work, edit: /usr/share/applications/spotify.desktop
// Change Exec=... to: