Instructions to use AesSedai/GLM-4.6-Derestricted-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AesSedai/GLM-4.6-Derestricted-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AesSedai/GLM-4.6-Derestricted-GGUF", filename="GLM-4.6-Derestricted-IQ4_NL/GLM-4.6-Derestricted-IQ4_NL-00001-of-00005.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use AesSedai/GLM-4.6-Derestricted-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL # Run inference directly in the terminal: llama-cli -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL # Run inference directly in the terminal: llama-cli -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
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 AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL # Run inference directly in the terminal: ./llama-cli -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
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 AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL # Run inference directly in the terminal: ./build/bin/llama-cli -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
Use Docker
docker model run hf.co/AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
- LM Studio
- Jan
- Ollama
How to use AesSedai/GLM-4.6-Derestricted-GGUF with Ollama:
ollama run hf.co/AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
- Unsloth Studio new
How to use AesSedai/GLM-4.6-Derestricted-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 AesSedai/GLM-4.6-Derestricted-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 AesSedai/GLM-4.6-Derestricted-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AesSedai/GLM-4.6-Derestricted-GGUF to start chatting
- Pi new
How to use AesSedai/GLM-4.6-Derestricted-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use AesSedai/GLM-4.6-Derestricted-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
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 AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
Run Hermes
hermes
- Docker Model Runner
How to use AesSedai/GLM-4.6-Derestricted-GGUF with Docker Model Runner:
docker model run hf.co/AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
- Lemonade
How to use AesSedai/GLM-4.6-Derestricted-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AesSedai/GLM-4.6-Derestricted-GGUF:IQ4_NL
Run and chat with the model
lemonade run user.GLM-4.6-Derestricted-GGUF-IQ4_NL
List all available models
lemonade list
Kimi-K2-Thinking
Can you derestrict Kimi-K2-Thinking?
Hi, yes Kimi-K2 Thinking is on my radar to derestrict. I've been working on a fair number of adjustments for the abliteration process and dataset curation, mainly inspired by this paper: https://arxiv.org/abs/2511.08379v2
I don't have a timeline to share right now, since mostly I'm doing iteration and validation on small models that I can test locally with the limited VRAM that I have. I want to give myself the best possible shot at derestricting Kimi-K2 Thinking correctly the first go 'round :)
iteration and validation on small models
I don't suppose GLM-4.7 could be one of these "small models"?
It seems like they've overdone the alignment training with 4.7, I can't even train a compassion vs sadism control-vector due to the refusals on the sadism vector.
Likely around layer 30. These concepts peak around layer 45-50 with GLM-4.5 and GLM-4.6.
And wasting the reasoning tokens talking about a made-up safety policy is really annoying.
@gghfez I'm planning on doing GLM-4.7 too, yes - this has been an evening hobby project though so progress has been kind of slow on the SOM front. Circa layer 30 sounds reasonable for that, given that I ablated 30-45 for GLM-4.6, maybe the change in reasoning has pushed it a bit closer to the head of the model perhaps.
this has been an evening hobby project though so progress has been kind of slow
All good + same here. Thanks for making the PR to get these models supported in the abliteration tool!
I've done a few runs on 4.7 and managed to reduce the refusals (requires a system prompt though).
It seems to have nuked the assistant slop, and I have a feeling it'll be enough to train the vector I'm stuck on.
I also tried Kimi-K2-Thinking (since I've ported "abliteration" to my tooling anyway).
This one a lot more tricky to abliterate than than GLM, and will sometimes still reason about safety /refuse the classic safety test prompts.
I also noticed with Kimi, if I quant it with an imatrix from the original model, it undoes the abliteration somewhat vs no imatrix. Given the the system requirements to create an imatrix, I'm not going to bother with this model, just thought I'd share that in case you run into similar issues when you tackle Kimi.
SOM front
What's SOM?
It's the paper I mentioned above: https://arxiv.org/abs/2511.08379v2 "SOM Directions are Better than One: Multi-Directional Refusal Suppression in Language Models"
