Instructions to use pearsonkyle/ArtPrompter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pearsonkyle/ArtPrompter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pearsonkyle/ArtPrompter")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pearsonkyle/ArtPrompter") model = AutoModelForCausalLM.from_pretrained("pearsonkyle/ArtPrompter") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use pearsonkyle/ArtPrompter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pearsonkyle/ArtPrompter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pearsonkyle/ArtPrompter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pearsonkyle/ArtPrompter
- SGLang
How to use pearsonkyle/ArtPrompter 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 "pearsonkyle/ArtPrompter" \ --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": "pearsonkyle/ArtPrompter", "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 "pearsonkyle/ArtPrompter" \ --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": "pearsonkyle/ArtPrompter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pearsonkyle/ArtPrompter with Docker Model Runner:
docker model run hf.co/pearsonkyle/ArtPrompter
Commit ·
e895e2a
1
Parent(s): 2daa44d
ArtPrompter
Browse files- config.json +6 -1
- pytorch_model.bin +1 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -30,7 +30,12 @@
|
|
| 30 |
"task_specific_params": {
|
| 31 |
"text-generation": {
|
| 32 |
"do_sample": true,
|
| 33 |
-
"max_length": 50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
},
|
| 36 |
"torch_dtype": "float32",
|
|
|
|
| 30 |
"task_specific_params": {
|
| 31 |
"text-generation": {
|
| 32 |
"do_sample": true,
|
| 33 |
+
"max_length": 50,
|
| 34 |
+
"penalty_alpha": 0.65,
|
| 35 |
+
"prompt": "A painting of a",
|
| 36 |
+
"repetition_penalty": 1.25,
|
| 37 |
+
"temperature": 0.95,
|
| 38 |
+
"top_k": 40
|
| 39 |
}
|
| 40 |
},
|
| 41 |
"torch_dtype": "float32",
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 510398013
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89112bbd76ed5932cd7599cc3aa108f0b5a3e705f22233f20c901c26d23e898a
|
| 3 |
size 510398013
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3387
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18a27025cf71c7e411b1bc0a4ca446e11706a2b1f62ac13776c9eeee325c51b0
|
| 3 |
size 3387
|