data-is-better-together/10k_prompts_ranked
Viewer • Updated • 10.3k • 1.14k • 168
How to use argilla/zephyr-7b-spin-iter0-v0 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="argilla/zephyr-7b-spin-iter0-v0")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("argilla/zephyr-7b-spin-iter0-v0")
model = AutoModelForCausalLM.from_pretrained("argilla/zephyr-7b-spin-iter0-v0")
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 argilla/zephyr-7b-spin-iter0-v0 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "argilla/zephyr-7b-spin-iter0-v0"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "argilla/zephyr-7b-spin-iter0-v0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/argilla/zephyr-7b-spin-iter0-v0
How to use argilla/zephyr-7b-spin-iter0-v0 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "argilla/zephyr-7b-spin-iter0-v0" \
--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": "argilla/zephyr-7b-spin-iter0-v0",
"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 "argilla/zephyr-7b-spin-iter0-v0" \
--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": "argilla/zephyr-7b-spin-iter0-v0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use argilla/zephyr-7b-spin-iter0-v0 with Docker Model Runner:
docker model run hf.co/argilla/zephyr-7b-spin-iter0-v0
This model is a fine-tuned model with SPIN starting with alignment-handbook/zephyr-7b-sft-full on the argilla/10k_prompts_SPIN_iter0_zephyr_top dataset.
It achieves the following results on the evaluation set:
| Model | 1st Turn Score | 2nd Turn Score | Average Score |
|---|---|---|---|
| zephyr-7b-sft-full | 6.6625 | 6.0250 | 6.34375 |
| zephyr-7b-spin-iter0-v0 | 6.64375 | 6.1750 | 6.409375 |
| zephyr-7b-spin-iter1-v0 | 6.90625 | 6.3000 | 6.603125 |
| zephyr-7b-spin-iter2-v0 | 7.1375 | 6.3125 | 6.725000 |
| zephyr-7b-spin-iter3-v0 | 7.09375 | 6.4500 | 6.771875 |
More information needed
More information needed
SPIN
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Rewards/real | Rewards/generated | Rewards/accuracies | Rewards/margins | Logps/generated | Logps/real | Logits/generated | Logits/real |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.3011 | 0.96 | 25 | 0.2442 | 1.1606 | -0.9851 | 0.9792 | 2.1457 | -310.6989 | -306.6157 | -2.7644 | -2.7641 |
| 0.0376 | 1.92 | 50 | 0.2359 | 1.3255 | -0.8966 | 0.9792 | 2.2221 | -309.8145 | -304.9670 | -2.7558 | -2.7547 |
Base model
mistralai/Mistral-7B-v0.1