Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
grpo
conversational
text-generation-inference
Instructions to use quantumfr/Qwen-2.5-7B-Simple-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use quantumfr/Qwen-2.5-7B-Simple-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="quantumfr/Qwen-2.5-7B-Simple-RL") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("quantumfr/Qwen-2.5-7B-Simple-RL") model = AutoModelForCausalLM.from_pretrained("quantumfr/Qwen-2.5-7B-Simple-RL", 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 quantumfr/Qwen-2.5-7B-Simple-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "quantumfr/Qwen-2.5-7B-Simple-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quantumfr/Qwen-2.5-7B-Simple-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/quantumfr/Qwen-2.5-7B-Simple-RL
- SGLang
How to use quantumfr/Qwen-2.5-7B-Simple-RL 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 "quantumfr/Qwen-2.5-7B-Simple-RL" \ --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": "quantumfr/Qwen-2.5-7B-Simple-RL", "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 "quantumfr/Qwen-2.5-7B-Simple-RL" \ --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": "quantumfr/Qwen-2.5-7B-Simple-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use quantumfr/Qwen-2.5-7B-Simple-RL with Docker Model Runner:
docker model run hf.co/quantumfr/Qwen-2.5-7B-Simple-RL
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9893390191897654, | |
| "eval_steps": 100, | |
| "global_step": 58, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 594.6719055175781, | |
| "epoch": 0.017057569296375266, | |
| "grad_norm": 0.39137744903564453, | |
| "kl": 0.0, | |
| "learning_rate": 5e-07, | |
| "loss": -0.0015, | |
| "reward": 0.5937500223517418, | |
| "reward_std": 0.36258383840322495, | |
| "rewards/accuracy_reward": 0.5937500223517418, | |
| "rewards/format_reward": 0.0, | |
| "step": 1 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 607.5834541320801, | |
| "epoch": 0.08528784648187633, | |
| "grad_norm": 1.0777415037155151, | |
| "kl": 0.00038692355155944824, | |
| "learning_rate": 2.5e-06, | |
| "loss": 0.0259, | |
| "reward": 0.5962611874565482, | |
| "reward_std": 0.36695866473019123, | |
| "rewards/accuracy_reward": 0.5962611874565482, | |
| "rewards/format_reward": 0.0, | |
| "step": 5 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 606.7803886413574, | |
| "epoch": 0.17057569296375266, | |
| "grad_norm": 1.1746565103530884, | |
| "kl": 0.010793495178222656, | |
| "learning_rate": 2.956412726139078e-06, | |
| "loss": 0.048, | |
| "reward": 0.6758928880095482, | |
| "reward_std": 0.30583293717354537, | |
| "rewards/accuracy_reward": 0.6758928880095482, | |
| "rewards/format_reward": 0.0, | |
| "step": 10 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 602.4096214294434, | |
| "epoch": 0.255863539445629, | |
| "grad_norm": 0.1635478436946869, | |
| "kl": 0.008692169189453125, | |
| "learning_rate": 2.7836719084521715e-06, | |
| "loss": 0.0619, | |
| "reward": 0.755357176065445, | |
| "reward_std": 0.22135366648435592, | |
| "rewards/accuracy_reward": 0.755357176065445, | |
| "rewards/format_reward": 0.0, | |
| "step": 15 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 593.5116325378418, | |
| "epoch": 0.3411513859275053, | |
| "grad_norm": 0.3694714605808258, | |
| "kl": 0.00950794219970703, | |
| "learning_rate": 2.4946839873611927e-06, | |
| "loss": 0.0543, | |
| "reward": 0.7654018238186836, | |
| "reward_std": 0.2084361480548978, | |
| "rewards/accuracy_reward": 0.7654018238186836, | |
| "rewards/format_reward": 0.0, | |
| "step": 20 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 603.0078392028809, | |
| "epoch": 0.42643923240938164, | |
| "grad_norm": 0.21624431014060974, | |
| "kl": 0.004351234436035157, | |
| "learning_rate": 2.1156192081791355e-06, | |
| "loss": 0.0513, | |
| "reward": 0.7598214641213417, | |
| "reward_std": 0.19899208266288043, | |
| "rewards/accuracy_reward": 0.7598214641213417, | |
| "rewards/format_reward": 0.0, | |
| "step": 25 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 605.0727897644043, | |
| "epoch": 0.511727078891258, | |
| "grad_norm": 0.26695239543914795, | |
| "kl": 0.005370330810546875, | |
| "learning_rate": 1.6808050203829845e-06, | |
| "loss": 0.0455, | |
| "reward": 0.7566964611411094, | |
| "reward_std": 0.18958494029939174, | |
| "rewards/accuracy_reward": 0.7566964611411094, | |
| "rewards/format_reward": 0.0, | |
| "step": 30 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 592.4431076049805, | |
| "epoch": 0.5970149253731343, | |
| "grad_norm": 0.12381298094987869, | |
| "kl": 0.004366302490234375, | |
| "learning_rate": 1.2296174432791415e-06, | |
| "loss": 0.0353, | |
| "reward": 0.747098246216774, | |
| "reward_std": 0.18222492672502993, | |
| "rewards/accuracy_reward": 0.747098246216774, | |
| "rewards/format_reward": 0.0, | |
| "step": 35 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 583.5830627441406, | |
| "epoch": 0.6823027718550106, | |
| "grad_norm": 0.15292133390903473, | |
| "kl": 0.003928375244140625, | |
| "learning_rate": 8.029152419343472e-07, | |
| "loss": 0.0394, | |
| "reward": 0.7667411059141159, | |
| "reward_std": 0.1841550744138658, | |
| "rewards/accuracy_reward": 0.7667411059141159, | |
| "rewards/format_reward": 0.0, | |
| "step": 40 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 599.4895347595215, | |
| "epoch": 0.767590618336887, | |
| "grad_norm": 0.2122126966714859, | |
| "kl": 0.004204940795898437, | |
| "learning_rate": 4.3933982822017883e-07, | |
| "loss": 0.0305, | |
| "reward": 0.7553571775555611, | |
| "reward_std": 0.1827343128155917, | |
| "rewards/accuracy_reward": 0.7553571775555611, | |
| "rewards/format_reward": 0.0, | |
| "step": 45 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 596.6477951049804, | |
| "epoch": 0.8528784648187633, | |
| "grad_norm": 0.10254240781068802, | |
| "kl": 0.007993698120117188, | |
| "learning_rate": 1.718159615201853e-07, | |
| "loss": 0.0327, | |
| "reward": 0.7506696820259094, | |
| "reward_std": 0.19283948028460146, | |
| "rewards/accuracy_reward": 0.7506696820259094, | |
| "rewards/format_reward": 0.0, | |
| "step": 50 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 590.7453369140625, | |
| "epoch": 0.9381663113006397, | |
| "grad_norm": 0.22994418442249298, | |
| "kl": 0.00672760009765625, | |
| "learning_rate": 2.4570139579284723e-08, | |
| "loss": 0.0323, | |
| "reward": 0.7854911103844643, | |
| "reward_std": 0.18603479415178298, | |
| "rewards/accuracy_reward": 0.7854911103844643, | |
| "rewards/format_reward": 0.0, | |
| "step": 55 | |
| }, | |
| { | |
| "clip_ratio": 0.0, | |
| "completion_length": 583.9811820983887, | |
| "epoch": 0.9893390191897654, | |
| "kl": 0.004169464111328125, | |
| "reward": 0.7682292014360428, | |
| "reward_std": 0.18959872238337994, | |
| "rewards/accuracy_reward": 0.7682292014360428, | |
| "rewards/format_reward": 0.0, | |
| "step": 58, | |
| "total_flos": 0.0, | |
| "train_loss": 0.04025471127784715, | |
| "train_runtime": 12294.0923, | |
| "train_samples_per_second": 0.61, | |
| "train_steps_per_second": 0.005 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 58, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": false, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 0.0, | |
| "train_batch_size": 16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |