HuggingFaceH4/ultrachat_200k
Viewer • Updated • 515k • 70.9k • 707
How to use VictorNanka/phi-2-sft-lora with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="VictorNanka/phi-2-sft-lora", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("VictorNanka/phi-2-sft-lora", trust_remote_code=True, dtype="auto")How to use VictorNanka/phi-2-sft-lora with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "VictorNanka/phi-2-sft-lora"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "VictorNanka/phi-2-sft-lora",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/VictorNanka/phi-2-sft-lora
How to use VictorNanka/phi-2-sft-lora with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "VictorNanka/phi-2-sft-lora" \
--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": "VictorNanka/phi-2-sft-lora",
"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 "VictorNanka/phi-2-sft-lora" \
--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": "VictorNanka/phi-2-sft-lora",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use VictorNanka/phi-2-sft-lora with Docker Model Runner:
docker model run hf.co/VictorNanka/phi-2-sft-lora
This model is a fine-tuned version of microsoft/phi-2 on the HuggingFaceH4/ultrachat_200k 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 |
|---|---|---|---|
| 1.1971 | 0.05 | 10000 | 1.2409 |
| 1.1911 | 0.1 | 20000 | 1.2349 |
| 1.4103 | 0.14 | 30000 | 1.2317 |
| 1.192 | 0.19 | 40000 | 1.2295 |
| 1.4831 | 0.24 | 50000 | 1.2275 |
| 1.2857 | 0.29 | 60000 | 1.2266 |
| 1.014 | 0.34 | 70000 | 1.2256 |
| 1.2777 | 0.38 | 80000 | 1.2251 |
| 0.9019 | 0.43 | 90000 | 1.2241 |
| 1.1926 | 0.48 | 100000 | 1.2235 |
| 1.2298 | 0.53 | 110000 | 1.2233 |
| 1.1102 | 0.58 | 120000 | 1.2228 |
| 1.3166 | 0.63 | 130000 | 1.2219 |
| 1.1452 | 0.67 | 140000 | 1.2217 |
| 1.308 | 0.72 | 150000 | 1.2217 |
| 0.9096 | 0.77 | 160000 | 1.2215 |
| 1.2817 | 0.82 | 170000 | 1.2211 |
| 1.2904 | 0.87 | 180000 | 1.2211 |
| 0.9066 | 0.91 | 190000 | 1.2210 |
| 1.1807 | 0.96 | 200000 | 1.2210 |
Base model
microsoft/phi-2