Syed-Hasan-8503/orpo-40k-train-test
Viewer • Updated • 44.2k • 113
How to use Syed-Hasan-8503/Llama-3-8b-instruct-SimPO with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Syed-Hasan-8503/Llama-3-8b-instruct-SimPO")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Syed-Hasan-8503/Llama-3-8b-instruct-SimPO")
model = AutoModelForCausalLM.from_pretrained("Syed-Hasan-8503/Llama-3-8b-instruct-SimPO")
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 Syed-Hasan-8503/Llama-3-8b-instruct-SimPO with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Syed-Hasan-8503/Llama-3-8b-instruct-SimPO"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Syed-Hasan-8503/Llama-3-8b-instruct-SimPO",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Syed-Hasan-8503/Llama-3-8b-instruct-SimPO
How to use Syed-Hasan-8503/Llama-3-8b-instruct-SimPO with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Syed-Hasan-8503/Llama-3-8b-instruct-SimPO" \
--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": "Syed-Hasan-8503/Llama-3-8b-instruct-SimPO",
"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 "Syed-Hasan-8503/Llama-3-8b-instruct-SimPO" \
--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": "Syed-Hasan-8503/Llama-3-8b-instruct-SimPO",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Syed-Hasan-8503/Llama-3-8b-instruct-SimPO with Docker Model Runner:
docker model run hf.co/Syed-Hasan-8503/Llama-3-8b-instruct-SimPO
This model is a fine-tuned version of meta-llama/Meta-Llama-3-8B-Instruct on the Syed-Hasan-8503/orpo-40k-train-test 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.645 | 0.0140 | 50 | 1.2563 | -2.7945 | -3.7325 | 0.7027 | 0.9380 | -1.4930 | -1.1178 | -1.3468 | -1.1841 |
| 0.8722 | 0.0280 | 100 | 1.0619 | -3.0769 | -4.7343 | 0.7320 | 1.6574 | -1.8937 | -1.2308 | -1.3817 | -1.2196 |
| 1.0404 | 0.0419 | 150 | 0.9883 | -3.4545 | -5.6160 | 0.7545 | 2.1615 | -2.2464 | -1.3818 | -1.3639 | -1.2082 |
| 1.4672 | 0.0559 | 200 | 0.9751 | -3.4539 | -5.6604 | 0.7613 | 2.2065 | -2.2642 | -1.3816 | -1.3683 | -1.2117 |
Base model
meta-llama/Meta-Llama-3-8B-Instruct