data-is-better-together/10k_prompts_ranked
Viewer • Updated • 10.3k • 1.28k • 168
How to use argilla/zephyr-7b-spin-iter2-v0 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="argilla/zephyr-7b-spin-iter2-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-iter2-v0")
model = AutoModelForCausalLM.from_pretrained("argilla/zephyr-7b-spin-iter2-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-iter2-v0 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "argilla/zephyr-7b-spin-iter2-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-iter2-v0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/argilla/zephyr-7b-spin-iter2-v0
How to use argilla/zephyr-7b-spin-iter2-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-iter2-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-iter2-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-iter2-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-iter2-v0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use argilla/zephyr-7b-spin-iter2-v0 with Docker Model Runner:
docker model run hf.co/argilla/zephyr-7b-spin-iter2-v0
This model is a fine-tuned version of argilla/zephyr-7b-spin-iter1-v0 on the argilla/10k_prompts_SPIN_iter2_zephyr_top and the argilla/10k_prompts_SPIN_iter1_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
More information needed
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.8769 | 0.49 | 25 | 0.1890 | -0.1680 | -2.9833 | 0.9375 | 2.8153 | -719.6649 | -274.2817 | -2.7940 | -2.8382 |
| 0.1202 | 0.97 | 50 | 0.1440 | -0.4164 | -4.2256 | 0.9479 | 3.8092 | -732.0879 | -276.7652 | -2.8395 | -2.8439 |
| 0.0754 | 1.46 | 75 | 0.1298 | -0.5468 | -4.7565 | 0.9583 | 4.2097 | -737.3973 | -278.0700 | -2.8411 | -2.8388 |
| 0.0621 | 1.94 | 100 | 0.1253 | -0.5683 | -4.9538 | 0.9479 | 4.3854 | -739.3701 | -278.2851 | -2.8430 | -2.8375 |
Base model
mistralai/Mistral-7B-v0.1