vicgalle/alpaca-gpt4
Viewer β’ Updated β’ 52k β’ 4.79k β’ 324
How to use vicgalle/gpt2-alpaca-gpt4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="vicgalle/gpt2-alpaca-gpt4") # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("vicgalle/gpt2-alpaca-gpt4")
model = AutoModelForMultimodalLM.from_pretrained("vicgalle/gpt2-alpaca-gpt4")How to use vicgalle/gpt2-alpaca-gpt4 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "vicgalle/gpt2-alpaca-gpt4"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vicgalle/gpt2-alpaca-gpt4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/vicgalle/gpt2-alpaca-gpt4
How to use vicgalle/gpt2-alpaca-gpt4 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "vicgalle/gpt2-alpaca-gpt4" \
--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": "vicgalle/gpt2-alpaca-gpt4",
"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 "vicgalle/gpt2-alpaca-gpt4" \
--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": "vicgalle/gpt2-alpaca-gpt4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use vicgalle/gpt2-alpaca-gpt4 with Docker Model Runner:
docker model run hf.co/vicgalle/gpt2-alpaca-gpt4
The following samples were generated with {"temperature" : 0.7, "top_p" : 0.92, "top_k" : 0}:
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Give three tips for a good meal.
### Response:
1. **Serve fresh, locally grown produce:** Fresh produce is a great way to eat healthy and to enjoy a healthy meal. Try to choose a variety of fruits, vegetables, and whole grains, and experiment with the variety to find the perfect balance. Make sure to bring plenty of fresh fruits, vegetables, and whole grains throughout the meal.
2. **Strive for a quick and easy meal:** The key is to make a meal that is quick and easy to prepare. Take a break from the food, grab some snacks, and enjoy a delicious meal. Make sure to cook the ingredients beforehand, and avoid overcooking or filling the food up.
3. **Determine the time and place:** If you're eating a lot of food, it can be tempting to make a time and place for it. This will help you stay organized and get your ingredients in the right order. Make sure to set up a timer and avoid rushing to the grocery store. If possible, make sure to follow the recipe for your specific dish and avoid leaving the refrigerator unattended for too long.
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a poem about a delicious night.
### Response:
As the sky above me fluttered with the gentle breeze,
The moon was in its soft, gentle embrace,
The night was full of cheer and joy,
A perfect night's night.
The sun shone bright, the stars twinkled,
The colors were pure and true,
As if in the presence of a master.
But the night was not without its troubles.
A stormy night, it rained heavily,
A dark and stormy night, it raged with fire.
But one thing was certain, it was in the air,
The scent of the sweet scent of a sweet sweet night.
The night was filled with joy, with a sense of peace and satisfaction.
The stars twinkled, the moon was in its soft, gentle embrace,
The night was full of cheer and joy,
A perfect night's night.
The night was full of laughter, with the gentle breeze,
The colors were pure and true,
As if in the presence of a master.
But the night was full of worries, with the fierce tempest.
But the night was filled with hope, with a sense of hope that could not be ignored.
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a tweet describing your capabilities.
### Response:
"Empowering your creativity, skills, and abilities through my technology-driven approach. My team of professionals will help you achieve your goals, stay ahead of the curve, and contribute to your success. #Diversity"
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 24.98 |
| ARC (25-shot) | 22.61 |
| HellaSwag (10-shot) | 31.17 |
| MMLU (5-shot) | 25.76 |
| TruthfulQA (0-shot) | 38.04 |
| Winogrande (5-shot) | 52.17 |
| GSM8K (5-shot) | 0.3 |
| DROP (3-shot) | 4.83 |