Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
rl-swarm
grpo
gensyn
I am purring patterned prawn
trl
conversational
text-generation-inference
Instructions to use xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn") model = AutoModelForCausalLM.from_pretrained("xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn", 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 xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn
- SGLang
How to use xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn 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 "xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn" \ --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": "xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn", "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 "xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn" \ --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": "xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn with Docker Model Runner:
docker model run hf.co/xaobai/Qwen2.5-0.5B-Instruct-Gensyn-Swarm-purring_patterned_prawn
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9937888198757764, | |
| "eval_steps": 500, | |
| "global_step": 20, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "completion_length": 311.90625, | |
| "epoch": 0.09937888198757763, | |
| "grad_norm": 16.116872787475586, | |
| "kl": 0.0, | |
| "learning_rate": 4.965903258506806e-07, | |
| "loss": -0.0, | |
| "reward": 2.0880651086336, | |
| "reward_std": 0.6684938869730104, | |
| "rewards/concensus_correctness_reward_func": 0.3713750019669533, | |
| "rewards/consensus_reward_func": 0.3125, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.3125, | |
| "rewards/question_recreation_reward_func": 0.39662764465902, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.15625, | |
| "rewards/xmlcount_reward_func": 0.5388124994933605, | |
| "step": 2 | |
| }, | |
| { | |
| "completion_length": 187.03125, | |
| "epoch": 0.19875776397515527, | |
| "grad_norm": 20.159204483032227, | |
| "kl": 0.03585821596789174, | |
| "learning_rate": 4.698684378016222e-07, | |
| "loss": 0.0, | |
| "reward": 3.9214092064648867, | |
| "reward_std": 1.652882975889952, | |
| "rewards/concensus_correctness_reward_func": 0.9944375082850456, | |
| "rewards/consensus_reward_func": 0.5625, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.25, | |
| "rewards/question_recreation_reward_func": 0.5815029521472752, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.359375, | |
| "rewards/xmlcount_reward_func": 1.173593744635582, | |
| "step": 4 | |
| }, | |
| { | |
| "completion_length": 179.375, | |
| "epoch": 0.2981366459627329, | |
| "grad_norm": 26.64881134033203, | |
| "kl": 0.47550190216861665, | |
| "learning_rate": 4.193203929064353e-07, | |
| "loss": 0.0005, | |
| "reward": 3.2665678560733795, | |
| "reward_std": 1.333875675802119, | |
| "rewards/concensus_correctness_reward_func": 0.4598749987781048, | |
| "rewards/consensus_reward_func": 0.4375, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.375, | |
| "rewards/question_recreation_reward_func": 0.48253656178712845, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.390625, | |
| "rewards/xmlcount_reward_func": 1.121031254529953, | |
| "step": 6 | |
| }, | |
| { | |
| "completion_length": 206.5625, | |
| "epoch": 0.39751552795031053, | |
| "grad_norm": 28.57688331604004, | |
| "kl": 0.20366718503646553, | |
| "learning_rate": 3.5042385616324236e-07, | |
| "loss": 0.0002, | |
| "reward": 5.219966318458319, | |
| "reward_std": 2.007999164707144, | |
| "rewards/concensus_correctness_reward_func": 1.7436874955892563, | |
| "rewards/consensus_reward_func": 1.0625, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.3125, | |
| "rewards/question_recreation_reward_func": 0.6211538150673732, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.34375, | |
| "rewards/xmlcount_reward_func": 1.1363750025629997, | |
| "step": 8 | |
| }, | |
| { | |
| "completion_length": 169.3125, | |
| "epoch": 0.4968944099378882, | |
| "grad_norm": 44.238037109375, | |
| "kl": 1.7451796566601843, | |
| "learning_rate": 2.706448363680831e-07, | |
| "loss": 0.0017, | |
| "reward": 4.474540323019028, | |
| "reward_std": 1.2630424201197457, | |
| "rewards/concensus_correctness_reward_func": 1.2620625011622906, | |
| "rewards/consensus_reward_func": 0.625, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.5625, | |
| "rewards/question_recreation_reward_func": 0.6150090787559748, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.296875, | |
| "rewards/xmlcount_reward_func": 1.1130937486886978, | |
| "step": 10 | |
| }, | |
| { | |
| "completion_length": 206.59375, | |
| "epoch": 0.5962732919254659, | |
| "grad_norm": 45.16315841674805, | |
| "kl": 2.844578029587865, | |
| "learning_rate": 1.886286282148002e-07, | |
| "loss": 0.0028, | |
| "reward": 3.3002478405833244, | |
| "reward_std": 1.4689021888189018, | |
| "rewards/concensus_correctness_reward_func": 0.6563750021159649, | |
| "rewards/consensus_reward_func": 0.5, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.1875, | |
| "rewards/question_recreation_reward_func": 0.5149665717035532, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.328125, | |
| "rewards/xmlcount_reward_func": 1.11328125, | |
| "step": 12 | |
| }, | |
| { | |
| "completion_length": 199.78125, | |
| "epoch": 0.6956521739130435, | |
| "grad_norm": 703.441650390625, | |
| "kl": 30.634997794870287, | |
| "learning_rate": 1.1326296046939333e-07, | |
| "loss": 0.0306, | |
| "reward": 4.00101051479578, | |
| "reward_std": 2.141244651051238, | |
| "rewards/concensus_correctness_reward_func": 1.3625624813139439, | |
| "rewards/consensus_reward_func": 0.3125, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.3125, | |
| "rewards/question_recreation_reward_func": 0.5683229928836226, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.296875, | |
| "rewards/xmlcount_reward_func": 1.1482499986886978, | |
| "step": 14 | |
| }, | |
| { | |
| "completion_length": 189.5625, | |
| "epoch": 0.7950310559006211, | |
| "grad_norm": 22.315275192260742, | |
| "kl": 0.6838863966986537, | |
| "learning_rate": 5.271487265090163e-08, | |
| "loss": 0.0007, | |
| "reward": 5.960442878305912, | |
| "reward_std": 1.6150732710957527, | |
| "rewards/concensus_correctness_reward_func": 2.5391249880194664, | |
| "rewards/consensus_reward_func": 0.8125, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.625, | |
| "rewards/question_recreation_reward_func": 0.5619429536163807, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.328125, | |
| "rewards/xmlcount_reward_func": 1.09375, | |
| "step": 16 | |
| }, | |
| { | |
| "completion_length": 197.75, | |
| "epoch": 0.8944099378881988, | |
| "grad_norm": 52.568763732910156, | |
| "kl": 2.449893494369462, | |
| "learning_rate": 1.3545689574841341e-08, | |
| "loss": 0.0024, | |
| "reward": 4.1809456795454025, | |
| "reward_std": 2.145681773661636, | |
| "rewards/concensus_correctness_reward_func": 1.2196249850094318, | |
| "rewards/consensus_reward_func": 0.5625, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.3125, | |
| "rewards/question_recreation_reward_func": 0.582414451870136, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.359375, | |
| "rewards/xmlcount_reward_func": 1.14453125, | |
| "step": 18 | |
| }, | |
| { | |
| "completion_length": 247.875, | |
| "epoch": 0.9937888198757764, | |
| "grad_norm": 106.65875244140625, | |
| "kl": 6.712249951437116, | |
| "learning_rate": 0.0, | |
| "loss": 0.0067, | |
| "reward": 4.293041463941336, | |
| "reward_std": 1.9913227264769375, | |
| "rewards/concensus_correctness_reward_func": 1.4836874902248383, | |
| "rewards/consensus_reward_func": 0.4375, | |
| "rewards/cumulative_reward_2": 0.0, | |
| "rewards/final_correctness_reward_func": 0.5625, | |
| "rewards/question_recreation_reward_func": 0.5593539979308844, | |
| "rewards/soft_format_reward_func": 0.0, | |
| "rewards/strict_format_reward_func": 0.265625, | |
| "rewards/xmlcount_reward_func": 0.984375, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.9937888198757764, | |
| "step": 20, | |
| "total_flos": 0.0, | |
| "train_loss": 0.00457829560036771, | |
| "train_runtime": 805.5031, | |
| "train_samples_per_second": 0.397, | |
| "train_steps_per_second": 0.025 | |
| } | |
| ], | |
| "logging_steps": 2, | |
| "max_steps": 20, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 25, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 0.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |