Salesforce/dialogstudio
Updated • 276 • 225
How to use mahimairaja/tweet-summarization-llama-2-finetuned with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mahimairaja/tweet-summarization-llama-2-finetuned") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mahimairaja/tweet-summarization-llama-2-finetuned")
model = AutoModelForCausalLM.from_pretrained("mahimairaja/tweet-summarization-llama-2-finetuned")How to use mahimairaja/tweet-summarization-llama-2-finetuned with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mahimairaja/tweet-summarization-llama-2-finetuned"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mahimairaja/tweet-summarization-llama-2-finetuned",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/mahimairaja/tweet-summarization-llama-2-finetuned
How to use mahimairaja/tweet-summarization-llama-2-finetuned with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mahimairaja/tweet-summarization-llama-2-finetuned" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mahimairaja/tweet-summarization-llama-2-finetuned",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "mahimairaja/tweet-summarization-llama-2-finetuned" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mahimairaja/tweet-summarization-llama-2-finetuned",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use mahimairaja/tweet-summarization-llama-2-finetuned with Docker Model Runner:
docker model run hf.co/mahimairaja/tweet-summarization-llama-2-finetuned
This model is a fine-tuned version of meta-llama/Llama-2-7b-hf on the Salesforce/dialogstudio 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.8996 | 1.0 | 55 | 1.9491 |
| 1.8415 | 2.0 | 110 | 1.8857 |
| 1.7693 | 3.0 | 165 | 1.8749 |
| 1.7136 | 4.0 | 220 | 1.8678 |
| 1.7533 | 5.0 | 275 | 1.8663 |
| 1.6182 | 6.0 | 330 | 1.8665 |
| 1.69 | 7.0 | 385 | 1.8672 |
Base model
meta-llama/Llama-2-7b-hf