Text Generation
MLX
Safetensors
Transformers
glm_moe_dsa
quantization
dq4
conversational
4-bit precision
Instructions to use cs2764/GLM-5-abliterated-dq4-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use cs2764/GLM-5-abliterated-dq4-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("cs2764/GLM-5-abliterated-dq4-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Transformers
How to use cs2764/GLM-5-abliterated-dq4-mlx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cs2764/GLM-5-abliterated-dq4-mlx") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cs2764/GLM-5-abliterated-dq4-mlx") model = AutoModelForCausalLM.from_pretrained("cs2764/GLM-5-abliterated-dq4-mlx") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- vLLM
How to use cs2764/GLM-5-abliterated-dq4-mlx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cs2764/GLM-5-abliterated-dq4-mlx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cs2764/GLM-5-abliterated-dq4-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs2764/GLM-5-abliterated-dq4-mlx
- SGLang
How to use cs2764/GLM-5-abliterated-dq4-mlx with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cs2764/GLM-5-abliterated-dq4-mlx" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cs2764/GLM-5-abliterated-dq4-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cs2764/GLM-5-abliterated-dq4-mlx" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cs2764/GLM-5-abliterated-dq4-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use cs2764/GLM-5-abliterated-dq4-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "cs2764/GLM-5-abliterated-dq4-mlx"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "cs2764/GLM-5-abliterated-dq4-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use cs2764/GLM-5-abliterated-dq4-mlx with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "cs2764/GLM-5-abliterated-dq4-mlx"
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 cs2764/GLM-5-abliterated-dq4-mlx
Run Hermes
hermes
- MLX LM
How to use cs2764/GLM-5-abliterated-dq4-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "cs2764/GLM-5-abliterated-dq4-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "cs2764/GLM-5-abliterated-dq4-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cs2764/GLM-5-abliterated-dq4-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use cs2764/GLM-5-abliterated-dq4-mlx with Docker Model Runner:
docker model run hf.co/cs2764/GLM-5-abliterated-dq4-mlx
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- model-00080-of-00106.safetensors +3 -0
- model-00081-of-00106.safetensors +3 -0
- model-00082-of-00106.safetensors +3 -0
- model-00083-of-00106.safetensors +3 -0
- model-00084-of-00106.safetensors +3 -0
- model-00085-of-00106.safetensors +3 -0
- model-00086-of-00106.safetensors +3 -0
- model-00087-of-00106.safetensors +3 -0
- model-00088-of-00106.safetensors +3 -0
- model-00089-of-00106.safetensors +3 -0
- model-00090-of-00106.safetensors +3 -0
- model-00092-of-00106.safetensors +3 -0
- tokenizer.json +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
model-00080-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c4d5a06f98289ccfc79e345feb5feeb3dac850c10eae26fae2aa4774b3ccc5c
|
| 3 |
+
size 3852460443
|
model-00081-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:255f7b497c72f4da464a0aa7e7ce354bfcef1f1532e0bc9d42f2d3479ff28c65
|
| 3 |
+
size 3623879446
|
model-00082-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d2b02cef1b47a5388d31c2f8593703eca4483222ce6d7a9a8641a664af563c0
|
| 3 |
+
size 4255113743
|
model-00083-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb30412da478803bb94e9a5f9c4587b08179ffb3e591d6f88c5726e3e01acbd8
|
| 3 |
+
size 3852460449
|
model-00084-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13ca2c2273e20c1eb1c24964607f3b3ad3002feecc16199a9146c62fe60f7a75
|
| 3 |
+
size 5335155736
|
model-00085-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a5802cb079ba7f6226917f8aad2d138200bd9c2407e35648e0550fecaec4647
|
| 3 |
+
size 3953123973
|
model-00086-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:775c5c8f89b786a6725089641e6e7de21fe4b32909e7accd293620749e2d958f
|
| 3 |
+
size 3852460563
|
model-00087-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:419cb6404e09db728564ae1eb427d741965ae8a5671ca950934ed280889c112c
|
| 3 |
+
size 3852460449
|
model-00088-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ef3d47f6543b886324e28519320c967d42961bd74d6dfb8b07b423e5b546689
|
| 3 |
+
size 3623879448
|
model-00089-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98ee942b7ca2cf3923b235dfa04a6bccf4b4c8fe5fa2f58b9a017651b6938329
|
| 3 |
+
size 4255113745
|
model-00090-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61092aeac4e4810f2b78949a97493d46f6434429fde92f6e7b836585bcb6201a
|
| 3 |
+
size 3852460383
|
model-00092-of-00106.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dba0db7e4186837be051060c0fdbd818f5502185bcbf2a4ab0066c64ae87dc58
|
| 3 |
+
size 3953123977
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d
|
| 3 |
+
size 20217442
|