Gustavosta/Stable-Diffusion-Prompts
Viewer • Updated • 81.9k • 7.67k • 526
How to use pszemraj/gpt-neo-125M-magicprompt-SD with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="pszemraj/gpt-neo-125M-magicprompt-SD") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("pszemraj/gpt-neo-125M-magicprompt-SD")
model = AutoModelForCausalLM.from_pretrained("pszemraj/gpt-neo-125M-magicprompt-SD", device_map="auto")How to use pszemraj/gpt-neo-125M-magicprompt-SD with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "pszemraj/gpt-neo-125M-magicprompt-SD"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "pszemraj/gpt-neo-125M-magicprompt-SD",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/pszemraj/gpt-neo-125M-magicprompt-SD
How to use pszemraj/gpt-neo-125M-magicprompt-SD with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "pszemraj/gpt-neo-125M-magicprompt-SD" \
--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": "pszemraj/gpt-neo-125M-magicprompt-SD",
"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 "pszemraj/gpt-neo-125M-magicprompt-SD" \
--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": "pszemraj/gpt-neo-125M-magicprompt-SD",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use pszemraj/gpt-neo-125M-magicprompt-SD with Docker Model Runner:
docker model run hf.co/pszemraj/gpt-neo-125M-magicprompt-SD
Generate/augment your prompt, stable diffusion style.
This model is a fine-tuned version of EleutherAI/gpt-neo-125M on the Gustavosta/Stable-Diffusion-Prompts dataset. It achieves the following results on the evaluation set:
refer to the Gustavosta/Stable-Diffusion-Prompts dataset.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.2189 | 0.99 | 33 | 3.0051 |
| 2.5466 | 1.99 | 66 | 2.5215 |
| 2.2791 | 2.99 | 99 | 2.2881 |
| 2.107 | 3.99 | 132 | 2.1322 |
| 1.9458 | 4.99 | 165 | 2.0270 |
| 1.8664 | 5.99 | 198 | 1.9580 |
| 1.8083 | 6.99 | 231 | 1.9177 |
| 1.7631 | 7.99 | 264 | 1.8964 |
| 1.7369 | 8.99 | 297 | 1.8885 |
| 1.766 | 9.99 | 330 | 1.8875 |
Base model
EleutherAI/gpt-neo-125m