Text Generation
Transformers
Safetensors
English
qwen2
dpo
graph-rag
qwen2.5
graphdancer
conversational
text-generation-inference
Instructions to use yuyangbai/graphdancer-dpo-iter1-seed167 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuyangbai/graphdancer-dpo-iter1-seed167 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuyangbai/graphdancer-dpo-iter1-seed167") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yuyangbai/graphdancer-dpo-iter1-seed167") model = AutoModelForCausalLM.from_pretrained("yuyangbai/graphdancer-dpo-iter1-seed167") 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 yuyangbai/graphdancer-dpo-iter1-seed167 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuyangbai/graphdancer-dpo-iter1-seed167" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuyangbai/graphdancer-dpo-iter1-seed167", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yuyangbai/graphdancer-dpo-iter1-seed167
- SGLang
How to use yuyangbai/graphdancer-dpo-iter1-seed167 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 "yuyangbai/graphdancer-dpo-iter1-seed167" \ --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": "yuyangbai/graphdancer-dpo-iter1-seed167", "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 "yuyangbai/graphdancer-dpo-iter1-seed167" \ --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": "yuyangbai/graphdancer-dpo-iter1-seed167", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yuyangbai/graphdancer-dpo-iter1-seed167 with Docker Model Runner:
docker model run hf.co/yuyangbai/graphdancer-dpo-iter1-seed167
GraphDancer-DPO Iter-1 (seed 167) — best single-seed Rouge-L
This is the highest-Rouge-L single-seed result from the GraphDancer iter-1 DPO refinement of yuyangbai/GraphDancer-Qwen2.5-3B-Instruct-Curriculum-PPO.
Headline numbers (full GRBench eval, 890 queries, T=0.7 single-sample)
| domain | N | EM | Rouge-L |
|---|---|---|---|
| amazon | 200 | 0.4350 | 0.4983 |
| biomedical | 270 | 0.2667 | 0.3279 |
| goodreads | 240 | 0.4500 | 0.4924 |
| legal | 180 | 0.4167 | 0.4570 |
| AVG | — | 0.3923 | 0.4439 |
vs paper PPO baseline 0.4062 → +0.0377 R-L AVG (single seed).
Distribution context (across 11 seeds with the same recipe)
- All-11 mean R-L AVG: 0.4265 ± 0.0079
- This seed (167) is the maximum (0.4439); seed 109 is the minimum (0.4156).
- 1-sample t-test of all-11 mean vs paper-PPO 0.4062: t=8.48, df=10, p<0.001.
Recipe
- Base = π_ref =
yuyangbai/GraphDancer-Qwen2.5-3B-Instruct-Curriculum-PPO - Phase 0: K=8 trajectories sampled from π_ref (verl + vLLM, T=1.0, top_p=0.95, max_turns=10)
- Pair builder: lex tuple v1 =
(em, eh, vf, -loop, -invalid_tool, -n_graph_rounds), strategyextreme - Trainer: TRL 0.19.1
DPOTrainer(subclass with agent-token mask), β=0.1, lr=2e-7, 100 steps, global batch 64, warmup 0.05 - Curriculum: paper-faithful E2HGaussian (q=[0.5,0.5,0], η 0.2→0.8, β=3, σ=0.75)
- Seed: 167
See dpo_iter1_full_config.md and dpo_iter1_top5_summary.md in the GraphDancer-Codebases repo for full details and the 11-seed distribution.
- Downloads last month
- 2