Instructions to use RLMIA/GRPO-GLM4-9B-MATH with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RLMIA/GRPO-GLM4-9B-MATH with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RLMIA/GRPO-GLM4-9B-MATH") 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("RLMIA/GRPO-GLM4-9B-MATH") model = AutoModelForCausalLM.from_pretrained("RLMIA/GRPO-GLM4-9B-MATH", 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 RLMIA/GRPO-GLM4-9B-MATH with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RLMIA/GRPO-GLM4-9B-MATH" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RLMIA/GRPO-GLM4-9B-MATH", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RLMIA/GRPO-GLM4-9B-MATH
- SGLang
How to use RLMIA/GRPO-GLM4-9B-MATH 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 "RLMIA/GRPO-GLM4-9B-MATH" \ --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": "RLMIA/GRPO-GLM4-9B-MATH", "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 "RLMIA/GRPO-GLM4-9B-MATH" \ --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": "RLMIA/GRPO-GLM4-9B-MATH", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RLMIA/GRPO-GLM4-9B-MATH with Docker Model Runner:
docker model run hf.co/RLMIA/GRPO-GLM4-9B-MATH
GLM-4-9B MATH GRPO checkpoint
A GLM-4-9B-0414 model fine-tuned on MATH with GRPO for the model-family extension in Auditing Data Membership in Reinforcement Learning With Verifiable Rewards (NDSS 2027).
- Reference: zai-org/GLM-4-9B-0414.
- Export: the final matched-setting run, iteration 1,139 (1,140 completed training steps; 60 epochs under the recorded schedule).
- Format: merged Transformers Glm4ForCausalLM weights, six BF16 safetensors shards and tokenizer.
- Recorded training settings: 64 prompts/rollout batch, 8 samples/prompt, global batch size 512, response cap 8,192 tokens, temperature 1.0, learning rate 1e-6, KL coefficient 0.001.
- Training input: the 1,269-prompt MATH member split represented by dataset/math-mia/train_half_test_only.parquet in the code repository.
These settings describe this exported checkpoint. They are separate from the audit-time sampling settings.
Code and audit commands: Y-L-LIU/Divergence-in-Behavior-Attack.
This release contains the model and tokenizer only. Optimizer state, intermediate checkpoints, and experiment logs are excluded. Membership-audit performance should be evaluated with the matching member/nonmember data and reference checkpoint.
- Downloads last month
- 14
Model tree for RLMIA/GRPO-GLM4-9B-MATH
Base model
zai-org/GLM-4-9B-0414