DDRO-Reference-Policies (SFT)
Collection
Step-2 SFT reference policies (ฯ_ref) used to initialize DDRO (MS MARCO / NQ; PQ and Title+URL DocIDs); use these for fair comparisons/ablations. โข 4 items โข Updated
How to use kiyam/ddro-msmarco-pq-sft with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kiyam/ddro-msmarco-pq-sft") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("kiyam/ddro-msmarco-pq-sft")
model = AutoModelForSeq2SeqLM.from_pretrained("kiyam/ddro-msmarco-pq-sft")How to use kiyam/ddro-msmarco-pq-sft with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kiyam/ddro-msmarco-pq-sft"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kiyam/ddro-msmarco-pq-sft",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/kiyam/ddro-msmarco-pq-sft
How to use kiyam/ddro-msmarco-pq-sft with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "kiyam/ddro-msmarco-pq-sft" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kiyam/ddro-msmarco-pq-sft",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "kiyam/ddro-msmarco-pq-sft" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kiyam/ddro-msmarco-pq-sft",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use kiyam/ddro-msmarco-pq-sft with Docker Model Runner:
docker model run hf.co/kiyam/ddro-msmarco-pq-sft
This repository contains the Step 2 (SFT) checkpoint used as the reference policy (ฯ_ref) / initialization for the DDRO training stage from Lightweight and Direct Document Relevance Optimization for Generative Information Retrieval.
kiyam/ddro-msmarco-pqfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM
repo = "kiyam/ddro-msmarco-pq-sft"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSeq2SeqLM.from_pretrained(repo)
Research and reproducibility. Please cite the DDRO paper if you use this checkpoint.