Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
dapo
trl
conversational
text-generation-inference
Instructions to use kangdawei/DAPO-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kangdawei/DAPO-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kangdawei/DAPO-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kangdawei/DAPO-7B") model = AutoModelForCausalLM.from_pretrained("kangdawei/DAPO-7B") 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]:])) - Inference
- Local Apps Settings
- vLLM
How to use kangdawei/DAPO-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kangdawei/DAPO-7B" # 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-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kangdawei/DAPO-7B
- SGLang
How to use kangdawei/DAPO-7B 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-7B" \ --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-7B", "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-7B" \ --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-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kangdawei/DAPO-7B with Docker Model Runner:
docker model run hf.co/kangdawei/DAPO-7B
Training in progress, step 110
Browse files- adapter_config.json +4 -4
- adapter_model.safetensors +2 -2
- config.json +2 -1
- dynamic_sampling_log.txt +80 -0
- generation_config.json +4 -1
- model-00001-of-00004.safetensors +1 -1
- model-00002-of-00004.safetensors +1 -1
- model-00003-of-00004.safetensors +1 -1
- tokenizer.json +2 -2
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -29,13 +29,13 @@
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"q_proj",
|
| 33 |
-
"gate_proj",
|
| 34 |
"v_proj",
|
| 35 |
-
"
|
| 36 |
"o_proj",
|
| 37 |
"up_proj",
|
| 38 |
-
"
|
|
|
|
|
|
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
|
|
|
| 32 |
"v_proj",
|
| 33 |
+
"down_proj",
|
| 34 |
"o_proj",
|
| 35 |
"up_proj",
|
| 36 |
+
"q_proj",
|
| 37 |
+
"k_proj",
|
| 38 |
+
"gate_proj"
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e29f20fde548c0097042b6cdacfabace5e93fd257e1e6b96007e508248fc830a
|
| 3 |
+
size 323014560
|
config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"Qwen2ForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
-
"bos_token_id":
|
| 7 |
"dtype": "bfloat16",
|
| 8 |
"eos_token_id": 151643,
|
| 9 |
"hidden_act": "silu",
|
|
@@ -46,6 +46,7 @@
|
|
| 46 |
"num_attention_heads": 28,
|
| 47 |
"num_hidden_layers": 28,
|
| 48 |
"num_key_value_heads": 4,
|
|
|
|
| 49 |
"rms_norm_eps": 1e-06,
|
| 50 |
"rope_scaling": null,
|
| 51 |
"rope_theta": 10000,
|
|
|
|
| 3 |
"Qwen2ForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 151646,
|
| 7 |
"dtype": "bfloat16",
|
| 8 |
"eos_token_id": 151643,
|
| 9 |
"hidden_act": "silu",
|
|
|
|
| 46 |
"num_attention_heads": 28,
|
| 47 |
"num_hidden_layers": 28,
|
| 48 |
"num_key_value_heads": 4,
|
| 49 |
+
"pad_token_id": 151643,
|
| 50 |
"rms_norm_eps": 1e-06,
|
| 51 |
"rope_scaling": null,
|
| 52 |
"rope_theta": 10000,
|
dynamic_sampling_log.txt
CHANGED
|
@@ -803,3 +803,83 @@ Step Attempts Total Prompts Valid Prompts Efficiency
|
|
| 803 |
99 3 18 6 33.3 %
|
| 804 |
99 2 12 6 50.0 %
|
| 805 |
99 3 18 6 33.3 %
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 803 |
99 3 18 6 33.3 %
|
| 804 |
99 2 12 6 50.0 %
|
| 805 |
99 3 18 6 33.3 %
|
| 806 |
+
100 4 24 6 25.0 %
|
| 807 |
+
100 3 18 6 33.3 %
|
| 808 |
+
100 4 24 6 25.0 %
|
| 809 |
+
100 2 12 6 50.0 %
|
| 810 |
+
100 3 18 6 33.3 %
|
| 811 |
+
100 7 42 6 14.3 %
|
| 812 |
+
100 3 18 6 33.3 %
|
| 813 |
+
100 3 18 6 33.3 %
|
| 814 |
+
101 5 30 6 20.0 %
|
| 815 |
+
101 2 12 6 50.0 %
|
| 816 |
+
101 2 12 6 50.0 %
|
| 817 |
+
101 3 18 6 33.3 %
|
| 818 |
+
101 4 24 6 25.0 %
|
| 819 |
+
101 4 24 6 25.0 %
|
| 820 |
+
101 3 18 6 33.3 %
|
| 821 |
+
101 8 48 6 12.5 %
|
| 822 |
+
102 4 24 6 25.0 %
|
| 823 |
+
102 5 30 6 20.0 %
|
| 824 |
+
102 4 24 6 25.0 %
|
| 825 |
+
102 3 18 6 33.3 %
|
| 826 |
+
102 3 18 6 33.3 %
|
| 827 |
+
102 2 12 6 50.0 %
|
| 828 |
+
102 5 30 6 20.0 %
|
| 829 |
+
102 4 24 6 25.0 %
|
| 830 |
+
103 1 6 6 100.0 %
|
| 831 |
+
103 4 24 6 25.0 %
|
| 832 |
+
103 3 18 6 33.3 %
|
| 833 |
+
103 2 12 6 50.0 %
|
| 834 |
+
103 2 12 6 50.0 %
|
| 835 |
+
103 9 54 6 11.1 %
|
| 836 |
+
103 6 36 6 16.7 %
|
| 837 |
+
103 2 12 6 50.0 %
|
| 838 |
+
104 2 12 6 50.0 %
|
| 839 |
+
104 1 6 6 100.0 %
|
| 840 |
+
104 8 48 6 12.5 %
|
| 841 |
+
104 4 24 6 25.0 %
|
| 842 |
+
104 6 36 6 16.7 %
|
| 843 |
+
104 2 12 6 50.0 %
|
| 844 |
+
104 2 12 6 50.0 %
|
| 845 |
+
104 8 48 6 12.5 %
|
| 846 |
+
105 4 24 6 25.0 %
|
| 847 |
+
105 3 18 6 33.3 %
|
| 848 |
+
105 3 18 6 33.3 %
|
| 849 |
+
105 7 42 6 14.3 %
|
| 850 |
+
105 1 6 6 100.0 %
|
| 851 |
+
105 2 12 6 50.0 %
|
| 852 |
+
105 1 6 6 100.0 %
|
| 853 |
+
105 8 48 6 12.5 %
|
| 854 |
+
106 2 12 6 50.0 %
|
| 855 |
+
106 3 18 6 33.3 %
|
| 856 |
+
106 1 6 6 100.0 %
|
| 857 |
+
106 2 12 6 50.0 %
|
| 858 |
+
106 2 12 6 50.0 %
|
| 859 |
+
106 3 18 6 33.3 %
|
| 860 |
+
106 7 42 6 14.3 %
|
| 861 |
+
106 3 18 6 33.3 %
|
| 862 |
+
107 1 6 6 100.0 %
|
| 863 |
+
107 2 12 6 50.0 %
|
| 864 |
+
107 6 36 6 16.7 %
|
| 865 |
+
107 2 12 6 50.0 %
|
| 866 |
+
107 3 18 6 33.3 %
|
| 867 |
+
107 2 12 6 50.0 %
|
| 868 |
+
107 3 18 6 33.3 %
|
| 869 |
+
107 2 12 6 50.0 %
|
| 870 |
+
108 1 6 6 100.0 %
|
| 871 |
+
108 5 30 6 20.0 %
|
| 872 |
+
108 4 24 6 25.0 %
|
| 873 |
+
108 2 12 6 50.0 %
|
| 874 |
+
108 2 12 6 50.0 %
|
| 875 |
+
108 8 48 6 12.5 %
|
| 876 |
+
108 2 12 6 50.0 %
|
| 877 |
+
108 2 12 6 50.0 %
|
| 878 |
+
109 1 6 6 100.0 %
|
| 879 |
+
109 3 18 6 33.3 %
|
| 880 |
+
109 6 36 6 16.7 %
|
| 881 |
+
109 4 24 6 25.0 %
|
| 882 |
+
109 3 18 6 33.3 %
|
| 883 |
+
109 3 18 6 33.3 %
|
| 884 |
+
109 2 12 6 50.0 %
|
| 885 |
+
109 6 36 6 16.7 %
|
generation_config.json
CHANGED
|
@@ -2,7 +2,10 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 151646,
|
| 4 |
"do_sample": true,
|
| 5 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.95,
|
| 8 |
"transformers_version": "4.57.1"
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 151646,
|
| 4 |
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151643
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 151643,
|
| 9 |
"temperature": 0.6,
|
| 10 |
"top_p": 0.95,
|
| 11 |
"transformers_version": "4.57.1"
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4877660776
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7acf113b5afb31f6c395014a5891df9213109fa76ea978fd940f523c445b39c0
|
| 3 |
size 4877660776
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4932751008
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57e38c04cca6a418ed413c932e303eec1886922e960cd068410e821338ad7178
|
| 3 |
size 4932751008
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4330865200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2ac7350e0ef280872dc11072e1a5ab14b8123b0347c603b525523a92b2091be
|
| 3 |
size 4330865200
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4256422650d141f228fe954acee98679da412984c29a569877eefd3af69315a
|
| 3 |
+
size 11422959
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 8760
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d047cbc55cda44b752f416d36e3a69e56abc0bd3f8f2902b298452f531a4525
|
| 3 |
size 8760
|