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
Upload 2 files
Browse files- model_quantized.onnx +3 -0
- ort_config.json +35 -0
model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee6a15a31068abb5946d061c42edf39dcc7e866ceb7c724e3ff0bed01ed21e74
|
| 3 |
+
size 115679339
|
ort_config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"one_external_file": true,
|
| 3 |
+
"opset": null,
|
| 4 |
+
"optimization": {},
|
| 5 |
+
"optimum_version": "1.19.1",
|
| 6 |
+
"quantization": {
|
| 7 |
+
"activations_dtype": "QUInt8",
|
| 8 |
+
"activations_symmetric": false,
|
| 9 |
+
"format": "QOperator",
|
| 10 |
+
"is_static": false,
|
| 11 |
+
"mode": "IntegerOps",
|
| 12 |
+
"nodes_to_exclude": [],
|
| 13 |
+
"nodes_to_quantize": [],
|
| 14 |
+
"operators_to_quantize": [
|
| 15 |
+
"Conv",
|
| 16 |
+
"MatMul",
|
| 17 |
+
"Attention",
|
| 18 |
+
"LSTM",
|
| 19 |
+
"Gather",
|
| 20 |
+
"Transpose",
|
| 21 |
+
"EmbedLayerNormalization"
|
| 22 |
+
],
|
| 23 |
+
"per_channel": false,
|
| 24 |
+
"qdq_add_pair_to_weight": false,
|
| 25 |
+
"qdq_dedicated_pair": false,
|
| 26 |
+
"qdq_op_type_per_channel_support_to_axis": {
|
| 27 |
+
"MatMul": 1
|
| 28 |
+
},
|
| 29 |
+
"reduce_range": false,
|
| 30 |
+
"weights_dtype": "QInt8",
|
| 31 |
+
"weights_symmetric": true
|
| 32 |
+
},
|
| 33 |
+
"transformers_version": "4.38.2",
|
| 34 |
+
"use_external_data_format": false
|
| 35 |
+
}
|