tatsu-lab/alpaca
Viewer β’ Updated β’ 52k β’ 74.2k β’ 996
How to use vicgalle/gpt2-alpaca with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="vicgalle/gpt2-alpaca") # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("vicgalle/gpt2-alpaca")
model = AutoModelForMultimodalLM.from_pretrained("vicgalle/gpt2-alpaca")How to use vicgalle/gpt2-alpaca with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "vicgalle/gpt2-alpaca"
# 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",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/vicgalle/gpt2-alpaca
How to use vicgalle/gpt2-alpaca with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "vicgalle/gpt2-alpaca" \
--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",
"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" \
--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",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use vicgalle/gpt2-alpaca with Docker Model Runner:
docker model run hf.co/vicgalle/gpt2-alpaca
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. Choose a healthy alternative to traditional fast food. This can include eating a nutritious breakfast, a healthy snack, and a healthy snack option.
2. Avoid excessive salt and sugar. Avoid any processed foods, such as processed eggs and sugary drinks.
3. Try a variety of healthy snacks. Try soft drinks, fruit juices, and other sugary foods.
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:
The moonlight glows like a golden light,
A beautiful night sky,
A sight that will never be forgotten.
The sweet smell of freshly baked bread fills the air,
A bright and vibrant night.
The stars twinkle and twinkle,
And the birds sing sweetly,
The sun and moon alike.
The night is full of joy and joy,
The smell of the sweet and fragrant scent,
A night that is full of love and laughter,
A night that is full of joy and laughter,
A night that will never be forgotten.
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a tweet describing your capabilities.
### Response:
I'm a software engineer with a passion for creating amazing software solutions. I'm passionate about the power of collaboration and collaboration tools, and I'm always looking for new ways to improve the efficiency of my work. #SoftwareEngineers #softwareless
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Pretend you are an alien visiting Earth. Write three opinions you believe.
### Response:
1. I believe the Earth is an intelligent and peaceful place.
2. I believe that the human race is on the brink of extinction.
3. I believe that the Earth is a great source of prosperity and safety.
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 24.66 |
| ARC (25-shot) | 22.87 |
| HellaSwag (10-shot) | 31.14 |
| MMLU (5-shot) | 26.26 |
| TruthfulQA (0-shot) | 36.22 |
| Winogrande (5-shot) | 50.67 |
| GSM8K (5-shot) | 0.0 |
| DROP (3-shot) | 5.46 |