Instructions to use rafw007/glm-4.7-flash-opencode-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use rafw007/glm-4.7-flash-opencode-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="rafw007/glm-4.7-flash-opencode-GGUF", filename="glm-4.7-flash-opencode-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use rafw007/glm-4.7-flash-opencode-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf rafw007/glm-4.7-flash-opencode-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 rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf rafw007/glm-4.7-flash-opencode-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 rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
Use Docker
docker model run hf.co/rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use rafw007/glm-4.7-flash-opencode-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rafw007/glm-4.7-flash-opencode-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rafw007/glm-4.7-flash-opencode-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
- Ollama
How to use rafw007/glm-4.7-flash-opencode-GGUF with Ollama:
ollama run hf.co/rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
- Unsloth Studio
How to use rafw007/glm-4.7-flash-opencode-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for rafw007/glm-4.7-flash-opencode-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for rafw007/glm-4.7-flash-opencode-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for rafw007/glm-4.7-flash-opencode-GGUF to start chatting
- Docker Model Runner
How to use rafw007/glm-4.7-flash-opencode-GGUF with Docker Model Runner:
docker model run hf.co/rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
- Lemonade
How to use rafw007/glm-4.7-flash-opencode-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull rafw007/glm-4.7-flash-opencode-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.glm-4.7-flash-opencode-GGUF-Q4_K_M
List all available models
lemonade list
GLM-4.7-Flash Coder — local family for agentic harnesses
A family of custom models built on GLM-4.7-Flash (MoE, 30B total / 3B active), tuned to act as autonomous coding agents — each variant targeting a specific harness (opencode, codex, and Claude Code soon). The models speak native tool-calling, so they fully run agentic coding tools locally — your code never leaves your machine, and your cloud token cost drops to zero.
In thinking mode the base GLM-4.7-Flash is very slow on Apple Silicon (several minutes for a simple reply). This family separates reasoning from output: thinking goes into a dedicated thinking field, while content carries only the clean answer and tool calls. The result: the model responds immediately instead of monologuing, and the output is clean for the harness parser.
Models in the family
| Model | Base | Context | Purpose |
|---|---|---|---|
glm-4.7-flash-opencode |
GLM-4.7-Flash (MoE 30B / 3B active) | 64K | Published. Coding agent tuned for opencode (also works in codex). Clean content, no hallucinations, real tool-calling. |
glm-4.7-flash-claude-code |
GLM-4.7-Flash | 64K | In progress. Variant for Claude Code (CC overrides thinking control — needs a dedicated renderer/template). |
What it's for
- Agentic work in opencode / codex with native tool-calling.
- Writing and editing agent code — files, edits, full agent loops.
- Sysadmin/DevOps tasks in the terminal (disk, network, scripts).
- Full privacy and offline operation — no code is sent to the cloud.
Quick start
ollama run rafw007/glm-4.7-flash-opencode
In opencode:
ollama launch opencode rafw007/glm-4.7-flash-opencode
Behavior tuning
- Thinking out of the content.
/nothinktogether with our SYSTEM prompt moves reasoning into a separate field — no monologue leaks intocontent. - No hallucinations. The model reports only values actually present in the tool output — no invented hosts, hardware, or numbers.
- Acts, doesn't ask. Inspect / scan / check / measure → it runs the command; its output is the answer.
- macOS-aware. Uses
df -h,du,nmap,system_profilerinstead of Linux-only commands.
Sampling / context
- temperature 1.0, num_ctx 65536 (64K).
- GLM-4.7-Flash natively carries 128K context — you can raise it further on stronger hardware.
Test hardware
- Mac Studio M2 (Apple Silicon), 32 GB class, macOS — performance reference.
- Mac Mini M4, 32 GB RAM — works, though slower.
- Ollama 0.24, GPU inference (Metal).
Measured behavior
| Task | Verdict |
|---|---|
du / df |
Read the real disk output, no fabrication. |
nmap |
Handled permission limits and returned 22 real hosts. |
| Tetris | Full, working implementation — 396 lines (score, levels, next-piece preview, controls, game-over screen). |
Performance (measured, same model, 64K context, 100% GPU, ~25 GB in memory):
| Hardware | Generation | Prompt eval |
|---|---|---|
| Mac Studio M2 (32 GB) | ~46 tok/s | ~494 tok/s |
| Mac Mini M4 (32 GB) | ~25 tok/s | ~250 tok/s |
The Studio is nearly 2× faster at identical quality — the difference comes from memory bandwidth, not the model.
Limitations
- Claude Code incompatible — CC overrides thinking control and hangs the base build. A dedicated
-claude-codevariant is in the works. - In opencode the
</tool_call>tag is sometimes printed as text (parser mismatch on the harness side).
How they were made
Designed, built, and tested with Claude Opus — the idea: the world's best coding model builds smaller models in its own image that take over the work right on your desk. The system prompts, parameter choices, and context configuration come directly from that work.
License
MIT (inherited from the base GLM-4.7-Flash).
© 2026 rafw007
- Downloads last month
- 165
4-bit