snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset
Viewer • Updated • 62.7k • 303 • 46
How to use wxzhang/selective-pairrm-33045197-mt0 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="wxzhang/selective-pairrm-33045197-mt0")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("wxzhang/selective-pairrm-33045197-mt0")
model = AutoModelForCausalLM.from_pretrained("wxzhang/selective-pairrm-33045197-mt0")
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]:]))How to use wxzhang/selective-pairrm-33045197-mt0 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "wxzhang/selective-pairrm-33045197-mt0"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "wxzhang/selective-pairrm-33045197-mt0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/wxzhang/selective-pairrm-33045197-mt0
How to use wxzhang/selective-pairrm-33045197-mt0 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "wxzhang/selective-pairrm-33045197-mt0" \
--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": "wxzhang/selective-pairrm-33045197-mt0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "wxzhang/selective-pairrm-33045197-mt0" \
--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": "wxzhang/selective-pairrm-33045197-mt0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use wxzhang/selective-pairrm-33045197-mt0 with Docker Model Runner:
docker model run hf.co/wxzhang/selective-pairrm-33045197-mt0
This model is a fine-tuned version of mistralai/Mistral-7B-Instruct-v0.2 on the snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.6786 | 0.32 | 100 | 0.6868 | -0.0869 | -0.1015 | 0.5547 | 0.0146 | -400.9028 | -386.8027 | -2.8786 | -2.8855 |
| 0.6615 | 0.64 | 200 | 0.6828 | -0.1851 | -0.2144 | 0.5938 | 0.0294 | -412.2021 | -396.6207 | -3.0607 | -3.0672 |
| 0.6539 | 0.96 | 300 | 0.6821 | -0.2322 | -0.2693 | 0.6055 | 0.0371 | -417.6892 | -401.3395 | -3.1645 | -3.1709 |
Base model
mistralai/Mistral-7B-Instruct-v0.2