20 Downloads Updated 4 days ago
ollama run byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama launch claude --model byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama launch codex-app --model byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama launch openclaw --model byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama launch hermes --model byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama launch codex --model byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama launch opencode --model byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
A compact text-only build of GLM-4.7 Flash 30B, prepared for local use with Ollama.
This model supports tool calling and is intended for agentic workflows, coding, automation, structured tasks and general-purpose text generation.
It uses Q3_K_XL quantization and is optimized for systems with approximately 16 GB of VRAM. The model supports a maximum context window of 202,752 tokens. In suitable configurations, the practical context size that fits within the target VRAM is approximately 136,000 tokens.
byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
ollama run byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
Flash Attention and a quantized KV cache can significantly reduce memory usage and allow a larger practical context window:
OLLAMA_FLASH_ATTENTION=1 \
OLLAMA_KV_CACHE_TYPE=q4_0 \
OLLAMA_CONTEXT_LENGTH=136000 \
OLLAMA_NUM_PARALLEL=1 \
ollama serve
Then run the model in another terminal:
ollama run byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b
You can verify whether the model is fully loaded on the GPU with:
ollama ps
The PROCESSOR column should ideally report 100% GPU.
curl http://localhost:11434/api/chat -d '{
"model": "byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b",
"messages": [
{
"role": "user",
"content": "Analyze this task and choose the appropriate tool."
}
],
"options": {
"num_ctx": 136000
},
"stream": false
}'
Install the Ollama Python package:
pip install ollama
from ollama import chat
def get_weather(city: str) -> str:
"""Return a mock weather report for a city."""
return f"The weather in {city} is sunny."
response = chat(
model="byczech/glm-4.7-flash-16G-UD-Q3_K_XL:30b",
messages=[
{
"role": "user",
"content": "What is the weather in Prague?",
}
],
tools=[get_weather],
)
print(response.message)
Tool execution is handled by the client application. The model selects a tool and generates its arguments, while your application remains responsible for executing the function and returning the result.
For tool-calling and agentic workflows, the following sampling parameters are recommended:
temperature 0.7
top_p 1.0
min_p 0.01
repeat_penalty 1.0
These settings provide more consistent and reliable tool selection and argument generation than the default general-purpose configuration.
The model defaults are tuned for broader conversational and text-generation use:
temperature 1.0
top_p 0.95
min_p 0.01
repeat_penalty 1.0
Use the lower temperature and top_p 1.0 configuration when predictable tool calls are more important than response diversity.
The model architecture supports up to 202,752 tokens, but the practical context that fits fully within GPU memory depends on the quantization and runtime configuration.
For this build, the expected practical context within approximately 16 GB of VRAM is approximately 136,000 tokens.
The exact maximum may vary depending on:
If the model does not fit fully on the GPU, reduce OLLAMA_CONTEXT_LENGTH or the per-request num_ctx value (or you can create your own Modelfile with num_ctx parameter).
The Q3_K_XL quantization was selected to balance model quality, VRAM usage and available context length.
Using a Q4_0 KV cache further reduces memory consumption and allows a significantly larger context window than the default F16 KV cache. For higher KV-cache precision, use q8_0, but expect higher VRAM use and a smaller practical context.
OLLAMA_NUM_PARALLEL=1 for the lowest memory usage.