Text Generation
Transformers
Safetensors
MLX
English
Chinese
glm4_moe
abliteration
SOTA Abliteration Pipeline - PRISM
glm
quantized
finetuned
uncensored
abliterated
mlx-my-repo
conversational
6-bit
Instructions to use cs2764/GLM-4.7-PRISM-mlx-6Bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cs2764/GLM-4.7-PRISM-mlx-6Bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cs2764/GLM-4.7-PRISM-mlx-6Bit") model = AutoModelForCausalLM.from_pretrained("cs2764/GLM-4.7-PRISM-mlx-6Bit") 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]:])) - MLX
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit 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-4.7-PRISM-mlx-6Bit") 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) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- vLLM
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cs2764/GLM-4.7-PRISM-mlx-6Bit" # 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-4.7-PRISM-mlx-6Bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cs2764/GLM-4.7-PRISM-mlx-6Bit
- SGLang
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit 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-4.7-PRISM-mlx-6Bit" \ --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-4.7-PRISM-mlx-6Bit", "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-4.7-PRISM-mlx-6Bit" \ --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-4.7-PRISM-mlx-6Bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi new
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit 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-4.7-PRISM-mlx-6Bit"
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-4.7-PRISM-mlx-6Bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit 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-4.7-PRISM-mlx-6Bit"
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-4.7-PRISM-mlx-6Bit
Run Hermes
hermes
- MLX LM
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit 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-4.7-PRISM-mlx-6Bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "cs2764/GLM-4.7-PRISM-mlx-6Bit" # 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-4.7-PRISM-mlx-6Bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use cs2764/GLM-4.7-PRISM-mlx-6Bit with Docker Model Runner:
docker model run hf.co/cs2764/GLM-4.7-PRISM-mlx-6Bit
Add files using upload-large-folder tool
Browse files- model-00022-of-00054.safetensors +3 -0
- model-00025-of-00054.safetensors +3 -0
- model-00027-of-00054.safetensors +3 -0
- model-00028-of-00054.safetensors +3 -0
- model-00030-of-00054.safetensors +3 -0
- model-00031-of-00054.safetensors +3 -0
- model-00032-of-00054.safetensors +3 -0
- model-00033-of-00054.safetensors +3 -0
- model-00034-of-00054.safetensors +3 -0
- model-00035-of-00054.safetensors +3 -0
- model-00036-of-00054.safetensors +3 -0
- model-00038-of-00054.safetensors +3 -0
model-00022-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db853bbc754d61bbaa403086a8fa2b4b1c49a4bd05465de8757293b3ecc48d1a
|
| 3 |
+
size 5363247173
|
model-00025-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f4bb075065dad915729f60ff0ff94c2c4a7479f23e8ebf4661f5b025e6260f3
|
| 3 |
+
size 5363247193
|
model-00027-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:991648eedd4287e1918b97af3dbc6d27ac5c1852dbb00382ad89ffff4c282c57
|
| 3 |
+
size 5335722916
|
model-00028-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee8140097666ecf9c1108ec95137e37477abdf06a754d31343f701389c79c464
|
| 3 |
+
size 5363247169
|
model-00030-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0bad3499dac77be7e6ea2c917078542e542893b03ebd5946c0cd4dd0c214cc86
|
| 3 |
+
size 5335722970
|
model-00031-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4f7e7117b52b0d8a75569b5030d751276dc305cafc02d193d98e9c312e9f489
|
| 3 |
+
size 5363247195
|
model-00032-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:622fcb16bf8b597c3b47d5b4d68d2d5ac6e9348b51b734b4ee2e9b3bb4cc33ae
|
| 3 |
+
size 5294546489
|
model-00033-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fabdb7557c4fb24a6f692b46f51510fd83a08f7935f8ca183864ee02958a571
|
| 3 |
+
size 5335722968
|
model-00034-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89d1b37c7d8d31220691eff48f61dc8efa87b6ee95ea49f793059214631161dc
|
| 3 |
+
size 5363247173
|
model-00035-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc456084a3077500ad570a8a2ef9bd048ea57a291a200a3a137f1959304a7f29
|
| 3 |
+
size 5294546489
|
model-00036-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:866f0f7a555b80b07289821e5808666c0a45c639269f917de40d2b97541bd47a
|
| 3 |
+
size 5335722910
|
model-00038-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57d16868f71b37b511481706fad04dc32e2cda7974c07f14df6d593ef081e60e
|
| 3 |
+
size 5294546491
|