Instructions to use RedHatAI/MiniChat-3B-pruned50-quant-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/MiniChat-3B-pruned50-quant-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedHatAI/MiniChat-3B-pruned50-quant-ds")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RedHatAI/MiniChat-3B-pruned50-quant-ds") model = AutoModelForCausalLM.from_pretrained("RedHatAI/MiniChat-3B-pruned50-quant-ds") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use RedHatAI/MiniChat-3B-pruned50-quant-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/MiniChat-3B-pruned50-quant-ds" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/MiniChat-3B-pruned50-quant-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RedHatAI/MiniChat-3B-pruned50-quant-ds
- SGLang
How to use RedHatAI/MiniChat-3B-pruned50-quant-ds 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 "RedHatAI/MiniChat-3B-pruned50-quant-ds" \ --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": "RedHatAI/MiniChat-3B-pruned50-quant-ds", "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 "RedHatAI/MiniChat-3B-pruned50-quant-ds" \ --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": "RedHatAI/MiniChat-3B-pruned50-quant-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RedHatAI/MiniChat-3B-pruned50-quant-ds with Docker Model Runner:
docker model run hf.co/RedHatAI/MiniChat-3B-pruned50-quant-ds
Commit ·
90674f3
1
Parent(s): 845468e
Upload folder using huggingface_hub
Browse files- config.json +1 -1
- model-orig.onnx +2 -2
- model.data +1 -1
- model.onnx +2 -2
- tokenizer.json +1 -6
config.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "float16",
|
| 25 |
-
"transformers_version": "1.6.0.
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 49216
|
| 28 |
}
|
|
|
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "float16",
|
| 25 |
+
"transformers_version": "1.6.0.20231205",
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 49216
|
| 28 |
}
|
model-orig.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd8e00a9d30202eeb3426665186fa115ef10b39925aace6a85770bc1c21381f5
|
| 3 |
+
size 904409
|
model.data
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3402575872
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39ba695da27a446bce712d75f38ea9b0037c2c8b9bba4f3b7984081690cafa2b
|
| 3 |
size 3402575872
|
model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed898b9720df09367e587f53069ba48d54570ab09e2a0a1d723d3cd7a3c4d164
|
| 3 |
+
size 891874
|
tokenizer.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
"direction": "Right",
|
| 5 |
-
"max_length": 4096,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|