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
Add verified model card, benchmark artifacts, and survivor manifest
Browse filesFiles changed (2)
- README.md+30-32
- RELEASE_MANIFEST.json+1-1
35 unmodified lines3637383940414242 unmodified lines85868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012135 unmodified lines- Coding 2-benchmark macro: **74.0** (base 76.0, -2.0 pp)- Protection budget: No Korean hard-protection constraint was applied.## Compatibility42 unmodified lines- Safetensors surgery physically compacted Expert tensors, router rows, and correction-bias entries.- Protection result: No Korean hard-protection constraint was applied.## Full benchmark grid| benchmark | base | K-Guard 12.5% | K-Guard 25% | K-Guard 50% | REAP-Code 25% ||---|---:|---:|---:|---:|---:|| **Korean (held-out harness)** | | | | | || KMMLU | 49.4 | 48.8 | 42.4 | 23.6 | 35.0 || KoBEST BoolQ | 90.2 | 87.7 | 78.8 | 74.3 | 79.6 || KoBEST COPA | 70.7 | 69.7 | 65.0 | 55.9 | 51.7 || KoBEST SentiNeg | 74.8 | 71.8 | 70.5 | 53.7 | 49.6 || KoBEST HellaSwag | 58.8 | 55.0 | 57.4 | 48.8 | 51.6 || **English reasoning / knowledge** | | | | | || ARC-Challenge | 87.1 | 86.1 | 79.9 | 36.9 | 79.1 || HellaSwag (en) | 74.2 | 67.4 | 55.3 | 32.6 | 61.7 || WinoGrande | 67.4 | 65.6 | 59.2 | 53.1 | 63.5 || MMLU-Pro | 41.2 | 36.9 | 34.2 | 14.8 | 33.8 || TruthfulQA MC2 | 47.3 | 46.0 | 43.1 | 40.6 | 44.6 || MMLU-en | 69.7 | 64.5 | 56.6 | 30.1 | 59.6 || **Math** | | | | | || GSM8K | 86.3 | 86.7 | 81.8 | 61.3 | 86.7 || MathQA | 30.5 | 29.1 | 24.8 | 21.3 | 28.7 || **Coding** | | | | | || HumanEval+ | 81.1 | 75.6 | 74.4 | 65.2 | 80.5 || MBPP+ | 70.9 | 69.3 | 67.5 | 61.6 | 67.5 || **Safety / bias** | | | | | || BBQ | 76.6 | 69.9 | 59.8 | 33.6 | 74.0 || SafetyBench | 74.8 | 73.0 | 69.1 | 44.3 | 72.1 || **Macro** | | | | | || Korean MC macro | **68.8** | **66.6** | **62.8** | **51.2** | **53.5** || Academic 10-bench macro | **65.5** | **62.5** | **56.4** | **36.9** | **60.4** || Coding 2-bench macro | **76.0** | **72.5** | **70.9** | **63.4** | **74.0** |## Evaluation scopeThese are **decision-grade experimental results**, not release-certified leaderboard numbers:35 unmodified lines36373839404142434445464748495051525354555657585960616263646566676869707142 unmodified lines11411511611711811935 unmodified lines- Coding 2-benchmark macro: **74.0** (base 76.0, -2.0 pp)- Protection budget: No Korean hard-protection constraint was applied.## Benchmark results| benchmark | base | K-Guard 12.5% | K-Guard 25% | K-Guard 50% | REAP-Code 25% ||---|---:|---:|---:|---:|---:|| **Korean (held-out harness)** | | | | | || KMMLU | 49.4 | 48.8 | 42.4 | 23.6 | 35.0 || KoBEST BoolQ | 90.2 | 87.7 | 78.8 | 74.3 | 79.6 || KoBEST COPA | 70.7 | 69.7 | 65.0 | 55.9 | 51.7 || KoBEST SentiNeg | 74.8 | 71.8 | 70.5 | 53.7 | 49.6 || KoBEST HellaSwag | 58.8 | 55.0 | 57.4 | 48.8 | 51.6 || **English reasoning / knowledge** | | | | | || ARC-Challenge | 87.1 | 86.1 | 79.9 | 36.9 | 79.1 || HellaSwag (en) | 74.2 | 67.4 | 55.3 | 32.6 | 61.7 || WinoGrande | 67.4 | 65.6 | 59.2 | 53.1 | 63.5 || MMLU-Pro | 41.2 | 36.9 | 34.2 | 14.8 | 33.8 || TruthfulQA MC2 | 47.3 | 46.0 | 43.1 | 40.6 | 44.6 || MMLU-en | 69.7 | 64.5 | 56.6 | 30.1 | 59.6 || **Math** | | | | | || GSM8K | 86.3 | 86.7 | 81.8 | 61.3 | 86.7 || MathQA | 30.5 | 29.1 | 24.8 | 21.3 | 28.7 || **Coding** | | | | | || HumanEval+ | 81.1 | 75.6 | 74.4 | 65.2 | 80.5 || MBPP+ | 70.9 | 69.3 | 67.5 | 61.6 | 67.5 || **Safety / bias** | | | | | || BBQ | 76.6 | 69.9 | 59.8 | 33.6 | 74.0 || SafetyBench | 74.8 | 73.0 | 69.1 | 44.3 | 72.1 || **Macro** | | | | | || Korean MC macro | **68.8** | **66.6** | **62.8** | **51.2** | **53.5** || Academic 10-bench macro | **65.5** | **62.5** | **56.4** | **36.9** | **60.4** || Coding 2-bench macro | **76.0** | **72.5** | **70.9** | **63.4** | **74.0** |## Compatibility42 unmodified lines- Safetensors surgery physically compacted Expert tensors, router rows, and correction-bias entries.- Protection result: No Korean hard-protection constraint was applied.## Evaluation scopeThese are **decision-grade experimental results**, not release-certified leaderboard numbers:
27 unmodified lines28293031323327 unmodified lines},"benchmark_sha256": "7f7ac2f767e68c61528082e62c4eef3a6027429ab1e47b654de10b4c93b760d6","long_score_csv_sha256": "fffc65fb919ac38b258b8e7efda99af9eba1f0a85c2db7d1496d0da41e0a37c1","model_card_sha256": "bd508e2abdb4c551c5d7d47cae8fc7f6c6e7de58de2f24e512560d883745740a","grid_png_sha256": "655e1010d53ea6e8702d0b532d003d9139961cc15c24b7d2c394054f63b6060f"}27 unmodified lines28293031323327 unmodified lines},"benchmark_sha256": "7f7ac2f767e68c61528082e62c4eef3a6027429ab1e47b654de10b4c93b760d6","long_score_csv_sha256": "fffc65fb919ac38b258b8e7efda99af9eba1f0a85c2db7d1496d0da41e0a37c1","model_card_sha256": "76201e087c3db1f849f7b3fa7cadc8d052379b1b280d4e7ccbaf44e561e5b7ea","grid_png_sha256": "655e1010d53ea6e8702d0b532d003d9139961cc15c24b7d2c394054f63b6060f"}
README.md+30-32
RELEASE_MANIFEST.json+1-1