GLM-4.7-REAP-40p
3
1
license:apache-2.0
by
0xSero
Language Model
OTHER
New
3 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
Compression Pipelinetext
zai-org/GLM-4.7 (358B, 668GB BF16)
↓ REAP Pruning (40%)
GLM-4.7-REAP-40p (218B, 407GB)
↓ AutoRound W4A16
GLM-4.7-REAP-40p-W4A16-AutoRound (108GB) ← Recommended for inferenceUsagepythontransformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "0xSero/GLM-4.7-REAP-40p"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
)
messages = [{"role": "user", "content": "Write a Python function to check if a number is prime."}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.