Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
rl-verify
conversational
text-generation-inference
Instructions to use RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness") 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("RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness") model = AutoModelForCausalLM.from_pretrained("RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness", 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 RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness
- SGLang
How to use RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness 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 "RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness" \ --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": "RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness", "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 "RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness" \ --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": "RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness with Docker Model Runner:
docker model run hf.co/RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness
Download trainer_state.json from RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness: direct link, hf CLI and curl.
- Browser
- Download file 7.93 kB
-
https://huggingface.co/RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness/resolve/main/trainer_state.json
- Command line
-
hf download hf://RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/RyanFan/Qwen2-1.5B-Instruct-RLCR-pmdata-readiness/resolve/main/trainer_state.json
7.93 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9855072463768116, | |
| "eval_steps": 50, | |
| "global_step": 34, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.009375, | |
| "completions/max_length": 1421.6, | |
| "completions/max_terminated_length": 1060.8, | |
| "completions/mean_length": 251.61875, | |
| "completions/mean_terminated_length": 239.34337158203124, | |
| "completions/min_length": 79.4, | |
| "completions/min_terminated_length": 79.4, | |
| "epoch": 0.14492753623188406, | |
| "grad_norm": 0.42041119933128357, | |
| "learning_rate": 1e-06, | |
| "loss": 0.0214, | |
| "num_tokens": 708324.0, | |
| "reward": 0.6069940328598022, | |
| "reward_std": 0.2593126893043518, | |
| "rewards/accuracy_reward": 0.0390625, | |
| "rewards/brier_reward": 0.31242387294769286, | |
| "rewards/confidence_one_or_zero": 0.1171875, | |
| "rewards/format_reward": 0.8625, | |
| "rewards/mean_confidence_reward": 0.721567976474762, | |
| "step": 5 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.0171875, | |
| "completions/max_length": 1386.4, | |
| "completions/max_terminated_length": 1058.6, | |
| "completions/mean_length": 247.63125, | |
| "completions/mean_terminated_length": 225.28215637207032, | |
| "completions/min_length": 71.0, | |
| "completions/min_terminated_length": 71.0, | |
| "epoch": 0.2898550724637681, | |
| "grad_norm": 0.36987483501434326, | |
| "learning_rate": 1e-06, | |
| "loss": 0.0255, | |
| "num_tokens": 1434540.0, | |
| "reward": 0.6972500443458557, | |
| "reward_std": 0.2571786344051361, | |
| "rewards/accuracy_reward": 0.0875, | |
| "rewards/brier_reward": 0.383560973405838, | |
| "rewards/confidence_one_or_zero": 0.0953125, | |
| "rewards/format_reward": 0.9234375, | |
| "rewards/mean_confidence_reward": 0.7222430467605591, | |
| "step": 10 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.009375, | |
| "completions/max_length": 1118.2, | |
| "completions/max_terminated_length": 599.6, | |
| "completions/mean_length": 194.978125, | |
| "completions/mean_terminated_length": 182.34744262695312, | |
| "completions/min_length": 67.0, | |
| "completions/min_terminated_length": 67.0, | |
| "epoch": 0.43478260869565216, | |
| "grad_norm": 0.4234364330768585, | |
| "learning_rate": 1e-06, | |
| "loss": 0.0102, | |
| "num_tokens": 2107210.0, | |
| "reward": 0.7554357528686524, | |
| "reward_std": 0.21138001680374147, | |
| "rewards/accuracy_reward": 0.0828125, | |
| "rewards/brier_reward": 0.4499324679374695, | |
| "rewards/confidence_one_or_zero": 0.0921875, | |
| "rewards/format_reward": 0.978125, | |
| "rewards/mean_confidence_reward": 0.6967766165733338, | |
| "step": 15 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.003125, | |
| "completions/max_length": 1042.4, | |
| "completions/max_terminated_length": 569.6, | |
| "completions/mean_length": 167.0515625, | |
| "completions/mean_terminated_length": 162.76224060058593, | |
| "completions/min_length": 63.8, | |
| "completions/min_terminated_length": 63.8, | |
| "epoch": 0.5797101449275363, | |
| "grad_norm": 0.46815362572669983, | |
| "learning_rate": 1e-06, | |
| "loss": 0.0123, | |
| "num_tokens": 2777563.0, | |
| "reward": 0.8507023096084595, | |
| "reward_std": 0.22829608023166656, | |
| "rewards/accuracy_reward": 0.1375, | |
| "rewards/brier_reward": 0.5732782363891602, | |
| "rewards/confidence_one_or_zero": 0.078125, | |
| "rewards/format_reward": 0.990625, | |
| "rewards/mean_confidence_reward": 0.616986072063446, | |
| "step": 20 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.00625, | |
| "completions/max_length": 1114.8, | |
| "completions/max_terminated_length": 488.8, | |
| "completions/mean_length": 158.7921875, | |
| "completions/mean_terminated_length": 150.14754943847657, | |
| "completions/min_length": 58.2, | |
| "completions/min_terminated_length": 58.2, | |
| "epoch": 0.7246376811594203, | |
| "grad_norm": 0.33041155338287354, | |
| "learning_rate": 1e-06, | |
| "loss": 0.0136, | |
| "num_tokens": 3419758.0, | |
| "reward": 0.8955987334251404, | |
| "reward_std": 0.19381383955478668, | |
| "rewards/accuracy_reward": 0.128125, | |
| "rewards/brier_reward": 0.6771338224411011, | |
| "rewards/confidence_one_or_zero": 0.0953125, | |
| "rewards/format_reward": 0.9859375, | |
| "rewards/mean_confidence_reward": 0.4792247414588928, | |
| "step": 25 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.0, | |
| "completions/max_length": 318.2, | |
| "completions/max_terminated_length": 318.2, | |
| "completions/mean_length": 124.6, | |
| "completions/mean_terminated_length": 124.6, | |
| "completions/min_length": 51.4, | |
| "completions/min_terminated_length": 51.4, | |
| "epoch": 0.8695652173913043, | |
| "grad_norm": 0.22344355285167694, | |
| "learning_rate": 1e-06, | |
| "loss": 0.0017, | |
| "num_tokens": 4041286.0, | |
| "reward": 0.9700731754302978, | |
| "reward_std": 0.11841013431549072, | |
| "rewards/accuracy_reward": 0.128125, | |
| "rewards/brier_reward": 0.8135828733444214, | |
| "rewards/confidence_one_or_zero": 0.209375, | |
| "rewards/format_reward": 0.9984375, | |
| "rewards/mean_confidence_reward": 0.2868975430727005, | |
| "step": 30 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.0, | |
| "completions/max_length": 342.25, | |
| "completions/max_terminated_length": 342.25, | |
| "completions/mean_length": 104.64101600646973, | |
| "completions/mean_terminated_length": 104.64101600646973, | |
| "completions/min_length": 47.0, | |
| "completions/min_terminated_length": 47.0, | |
| "epoch": 0.9855072463768116, | |
| "num_tokens": 4536704.0, | |
| "reward": 0.9970973432064056, | |
| "reward_std": 0.06293923873454332, | |
| "rewards/accuracy_reward": 0.12109375, | |
| "rewards/brier_reward": 0.8730999976396561, | |
| "rewards/confidence_one_or_zero": 0.306640625, | |
| "rewards/format_reward": 1.0, | |
| "rewards/mean_confidence_reward": 0.1555468812584877, | |
| "step": 34, | |
| "total_flos": 0.0, | |
| "train_loss": 0.012820063487571828, | |
| "train_runtime": 632.9133, | |
| "train_samples_per_second": 1.744, | |
| "train_steps_per_second": 0.055 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 35, | |
| "num_input_tokens_seen": 4536704, | |
| "num_train_epochs": 1, | |
| "save_steps": 40, | |
| "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": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |