Text Generation
Transformers
Safetensors
Korean
English
glm4_moe_lite
glm
Mixture of Experts
pruning
reap
expert-pruning
experimental
code-calibration
baseline
conversational
Instructions to use RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code") model = AutoModelForCausalLM.from_pretrained("RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code
- SGLang
How to use RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code 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 "RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code" \ --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": "RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code", "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 "RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code" \ --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": "RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code with Docker Model Runner:
docker model run hf.co/RAS-LAB/GLM-4.7-Flash-24B-A3B-KREAP-Code
Align control comparisons with the KREAP-Code identity
Browse filesUse KREAP-Code consistently in benchmark and comparison labels
Constraint: Preserve the standard REAP control disclosure
Confidence: high
Scope-risk: narrow
Tested: Targeted editor replacements
Not-tested: Inference behavior
README.md
CHANGED
|
@@ -49,7 +49,7 @@ model.
|
|
| 49 |
|
| 50 |
## Benchmark results
|
| 51 |
|
| 52 |
-
| benchmark | base | KREAP 12.5% | KREAP force-fit 25% | KREAP force-fit 50% | **
|
| 53 |
|---|---:|---:|---:|---:|---:|
|
| 54 |
| **Korean (held-out harness)** | | | | | |
|
| 55 |
| KMMLU | 49.4 | 48.8 | 42.4 | 23.6 | 35.0 |
|
|
@@ -180,7 +180,7 @@ criteria do not apply because Korean hard protection was intentionally omitted.
|
|
| 180 |
- This is not a controlled single-variable comparison: the two checkpoints differ in both
|
| 181 |
calibration data and survivor-selection rules. It cannot isolate the causal effect of hard
|
| 182 |
protection.
|
| 183 |
-
- Machine-readable results include direct KREAP-48E versus
|
| 184 |
non-Korean binary/pass-fail tasks. Direct paired tests for the Korean benchmark set, aggregate
|
| 185 |
bootstrap confidence intervals, multiple-comparison correction, and repeated calibration seeds
|
| 186 |
are absent.
|
|
|
|
| 49 |
|
| 50 |
## Benchmark results
|
| 51 |
|
| 52 |
+
| benchmark | base | KREAP 12.5% | KREAP force-fit 25% | KREAP force-fit 50% | **KREAP-Code 25% (this checkpoint)** |
|
| 53 |
|---|---:|---:|---:|---:|---:|
|
| 54 |
| **Korean (held-out harness)** | | | | | |
|
| 55 |
| KMMLU | 49.4 | 48.8 | 42.4 | 23.6 | 35.0 |
|
|
|
|
| 180 |
- This is not a controlled single-variable comparison: the two checkpoints differ in both
|
| 181 |
calibration data and survivor-selection rules. It cannot isolate the causal effect of hard
|
| 182 |
protection.
|
| 183 |
+
- Machine-readable results include direct KREAP-48E versus KREAP-Code-48E McNemar tests for 11
|
| 184 |
non-Korean binary/pass-fail tasks. Direct paired tests for the Korean benchmark set, aggregate
|
| 185 |
bootstrap confidence intervals, multiple-comparison correction, and repeated calibration seeds
|
| 186 |
are absent.
|