Downloads · 30 days
40
3% of all-time downloads
pszemraj/distilgpt2-magicprompt-SD
distilgpt2-magicprompt-SD is a text generation model from pszemraj. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
[](https://colab.research.google.com/gist/pszemraj/bdddf9c3fe92d1ac2654730016d64c80/demo-distilgpt2-magicprompt.ipynb)
Downloads · 30 days
40
3% of all-time downloads
All-time downloads
1.4K
Public
Parameters
88.2M
2.7 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin334 MB · 50%
How the weights are stored.
F3281.9M · 93%
From the Hugging Face model README
Generate/augment your prompt, stable diffusion style.
This model is a fine-tuned version of distilgpt2 on the Gustavosta/Stable-Diffusion-Prompts dataset. It achieves the following results on the evaluation set:
Results in (DALL-E, but you get the idea):

this distilgpt2 version is probably small/fast enough to be used locally on CPU!
install transformers as needed:
pip install -U transformers
load and query through a pipeline object:
from transformers import pipeline
model_tag = "pszemraj/distilgpt2-magicprompt-SD"
generator = pipeline(
"text-generation",
model=model_tag,
)
prompt = "The Answer to Why"
result = generator(
prompt,
max_new_tokens=24,
) # generate, adjust/add kwargs as needed
print(result[0]["generated_text"])
refer to the Gustavosta/Stable-Diffusion-Prompts dataset.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.7061 | 0.99 | 33 | 2.5859 |
| 2.08 | 1.99 | 66 | 1.9965 |
| 1.7623 | 2.99 | 99 | 1.7248 |
| 1.5408 | 3.99 | 132 | 1.5449 |
| 1.4147 | 4.99 | 165 | 1.4437 |
| 1.3593 | 5.99 | 198 | 1.3768 |
| 1.2703 | 6.99 | 231 | 1.3362 |
| 1.2528 | 7.99 | 264 | 1.3175 |
| 1.1981 | 8.99 | 297 | 1.3091 |
| 1.2117 | 9.99 | 330 | 1.3089 |