Text Generation
Transformers
ONNX
Safetensors
mistral
trl
sft
optimum
danbooru
text-generation-inference
Instructions to use p1atdev/dart-v2-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use p1atdev/dart-v2-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="p1atdev/dart-v2-sft")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("p1atdev/dart-v2-sft") model = AutoModelForCausalLM.from_pretrained("p1atdev/dart-v2-sft") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use p1atdev/dart-v2-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "p1atdev/dart-v2-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "p1atdev/dart-v2-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/p1atdev/dart-v2-sft
- SGLang
How to use p1atdev/dart-v2-sft 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 "p1atdev/dart-v2-sft" \ --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": "p1atdev/dart-v2-sft", "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 "p1atdev/dart-v2-sft" \ --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": "p1atdev/dart-v2-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use p1atdev/dart-v2-sft with Docker Model Runner:
docker model run hf.co/p1atdev/dart-v2-sft
Update README.md
Browse files
README.md
CHANGED
|
@@ -150,7 +150,7 @@ prompt = (
|
|
| 150 |
- `very_long`: totally generates 40~ number of tags.
|
| 151 |
|
| 152 |
- **Identity tag**: `<|identity:none|>`, `<|identity:lax|>`, `<|identity:strict|>`
|
| 153 |
-
- This tag
|
| 154 |
- `none`: recommended if the specified general tags are very few. It generates tags very creatively, but sometimes ignores the condition of the general tags.
|
| 155 |
- `lax`: recommended if you want to keep the identity of charaacters or subjects in the general tags. This tag tries not to generate tags which conflict with the input general tags.
|
| 156 |
- `strict`: recommended if you strongly want to keep the identity of charaacters or subjects in the general tags. This tag tries not to generate tags which conflict with the input general tags more strictly than `lax`. But this is less creative, so if you don't like the result with `strict`, please try `lax` or `none`.
|
|
|
|
| 150 |
- `very_long`: totally generates 40~ number of tags.
|
| 151 |
|
| 152 |
- **Identity tag**: `<|identity:none|>`, `<|identity:lax|>`, `<|identity:strict|>`
|
| 153 |
+
- This tag specifies how strictly to preserve identity of character or subject in provided tags.
|
| 154 |
- `none`: recommended if the specified general tags are very few. It generates tags very creatively, but sometimes ignores the condition of the general tags.
|
| 155 |
- `lax`: recommended if you want to keep the identity of charaacters or subjects in the general tags. This tag tries not to generate tags which conflict with the input general tags.
|
| 156 |
- `strict`: recommended if you strongly want to keep the identity of charaacters or subjects in the general tags. This tag tries not to generate tags which conflict with the input general tags more strictly than `lax`. But this is less creative, so if you don't like the result with `strict`, please try `lax` or `none`.
|