Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
dapo
trl
conversational
text-generation-inference
Instructions to use kangdawei/DAPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kangdawei/DAPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kangdawei/DAPO") 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("kangdawei/DAPO") model = AutoModelForCausalLM.from_pretrained("kangdawei/DAPO", 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 kangdawei/DAPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kangdawei/DAPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kangdawei/DAPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kangdawei/DAPO
- SGLang
How to use kangdawei/DAPO 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 "kangdawei/DAPO" \ --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": "kangdawei/DAPO", "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 "kangdawei/DAPO" \ --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": "kangdawei/DAPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kangdawei/DAPO with Docker Model Runner:
docker model run hf.co/kangdawei/DAPO
Commit History
-
End of training
Verified signature9402ae2 -
Model save
Verified signature3939526 -
Training in progress, step 200
Verified signatureb69a83f -
Training in progress, step 190
Verified signature29fffb2 -
Training in progress, step 180
Verified signature83296de -
Training in progress, step 170
Verified signature750c5ae -
Training in progress, step 160
Verified signature9169781 -
Training in progress, step 150
Verified signature85fdeed -
Training in progress, step 140
Verified signature0761a36 -
Training in progress, step 130
Verified signature40d621a
-
Training in progress, step 120
Verified signature2069027 -
Training in progress, step 110
Verified signature5c5fc7e
-
End of training
Verified signature3ef9ef5 -
Model save
Verified signaturee9f5bcb -
Training in progress, step 100
Verified signaturec0a749c -
Training in progress, step 90
Verified signatured01a663 -
Training in progress, step 80
Verified signature9dc2921 -
Training in progress, step 70
Verified signaturea7b637e -
Training in progress, step 60
Verified signature2210dac -
Training in progress, step 50
Verified signature3bb27c6 -
Training in progress, step 40
Verified signature703a5e6
-
Training in progress, step 30
Verified signature799b4a3 -
Training in progress, step 20
Verified signature7a40a71 -
Training in progress, step 10
Verified signaturee574f97 -
initial commit
Verified signature0293f75