Instructions to use buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control") model = AutoModelForCausalLM.from_pretrained("buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control", device_map="auto") 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 Settings
- vLLM
How to use buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control
- SGLang
How to use buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control 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 "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control" \ --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": "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control", "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 "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control" \ --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": "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control with Docker Model Runner:
docker model run hf.co/buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control
GLM-4.7-Flash Same-Calibration REAP 56E Control
Public same-calibration standard-REAP control from the GLM-4.7-Flash K-Guard REAP study.
- Routed experts: 64 → 56 per MoE layer (12.5% pruning)
- Active experts per token: top-4 unchanged
- Base revision:
7dd20894a642a0aa287e9827cb1a1f7f91386b67 - Role: standard-REAP scoring control using the same calibration run
- Fine-tuning: none
- Precision: BF16
- Status: experimental;
release_eligible=false
This checkpoint exists to reduce a major confound in the main comparison: it uses the same calibration run and 56E budget as the K-Guard controls, while using standard REAP survivor scoring. It does not establish calibration-seed stability or production readiness.
B22 controlled benchmark
Values are percentages. LiveCodeBench uses v6, greedy n=1, so it is not
directly interchangeable with official n=10 leaderboard scores.
| Metric | Base 64E | SameCal REAP 56E | Soft K-Guard 56E |
|---|---|---|---|
| Korean MC macro | 68.79 | 66.79 | 66.79 |
| Academic 10-benchmark macro | 65.51 | 64.51 | 64.97 |
| Coding 3-benchmark macro | 58.28 | 57.54 | 58.38 |
The Korean macro difference between Soft K-Guard and this control was
approximately 0.00 pp with a paired stratified bootstrap 95% interval of
[-1.02, 1.03]. This controlled run did not support a Korean causal advantage
from soft protection.
Loading
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
Use a recent Transformers version that supports Glm4MoeLiteForCausalLM.
Limitations
- One calibration run and one 56E budget; calibration-seed stability is unknown.
- This is a research control, not a recommended production checkpoint.
- Top-4 routing is unchanged, so checkpoint reduction does not by itself prove higher decode throughput.
- The public weights support reproducibility; the experiment code and detailed manifests remain in the associated private research repository.
- Downloads last month
- 1
Model tree for buugiiiiii/GLM-4.7-Flash-SameCal-REAP-56E-Control
Base model
zai-org/GLM-4.7-Flash