Text Generation
Transformers
PyTorch
Safetensors
opt
Generated from Trainer
text generation
stable diffusion
midjourney
text2image
text to image
prompt augment
prompt engineering
text-generation-inference
Instructions to use pszemraj/opt-350m-multiprompt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pszemraj/opt-350m-multiprompt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pszemraj/opt-350m-multiprompt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pszemraj/opt-350m-multiprompt") model = AutoModelForCausalLM.from_pretrained("pszemraj/opt-350m-multiprompt") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use pszemraj/opt-350m-multiprompt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pszemraj/opt-350m-multiprompt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pszemraj/opt-350m-multiprompt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pszemraj/opt-350m-multiprompt
- SGLang
How to use pszemraj/opt-350m-multiprompt with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "pszemraj/opt-350m-multiprompt" \ --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/opt-350m-multiprompt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
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/opt-350m-multiprompt" \ --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/opt-350m-multiprompt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pszemraj/opt-350m-multiprompt with Docker Model Runner:
docker model run hf.co/pszemraj/opt-350m-multiprompt
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,11 +2,31 @@
|
|
| 2 |
license: other
|
| 3 |
tags:
|
| 4 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
datasets:
|
| 6 |
- pszemraj/text2image-prompts-multi
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 2 |
license: other
|
| 3 |
tags:
|
| 4 |
- generated_from_trainer
|
| 5 |
+
- text generation
|
| 6 |
+
- stable diffusion
|
| 7 |
+
- midjourney
|
| 8 |
+
- text2image
|
| 9 |
+
- text to image
|
| 10 |
datasets:
|
| 11 |
- pszemraj/text2image-prompts-multi
|
| 12 |
+
widget:
|
| 13 |
+
- text: "morning sun over Jakarta"
|
| 14 |
+
example_title: "morning sun"
|
| 15 |
+
- text: "WARNING: pip is"
|
| 16 |
+
example_title: "pip"
|
| 17 |
+
- text: "sentient cheese"
|
| 18 |
+
example_title: "sentient cheese"
|
| 19 |
+
- text: "cheeps are"
|
| 20 |
+
example_title: "cheeps"
|
| 21 |
+
- text: "avocado armchair"
|
| 22 |
+
example_title: "creative prompt"
|
| 23 |
+
- text: "Landscape of"
|
| 24 |
+
example_title: "landscape"
|
| 25 |
+
parameters:
|
| 26 |
+
min_length: 16
|
| 27 |
+
max_length: 96
|
| 28 |
+
no_repeat_ngram_size: 1
|
| 29 |
+
do_sample: True
|
| 30 |
---
|
| 31 |
|
| 32 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|