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")# pip install -U transformers accelerate # 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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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 ·
2ee5da2
1
Parent(s): ba6cc08
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,6 +22,29 @@ Hi there! I'm an AI assistant and I can help you with any questions you have. He
|
|
| 22 |
5. Finally, don't wait to apply for the university of your choice.
|
| 23 |
I hope this helps you get into a good university! Let me know if you have any other questions or need any more information.
|
| 24 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
```
|
| 26 |
## One-shot and Export
|
| 27 |
|
|
|
|
| 22 |
5. Finally, don't wait to apply for the university of your choice.
|
| 23 |
I hope this helps you get into a good university! Let me know if you have any other questions or need any more information.
|
| 24 |
"""
|
| 25 |
+
```
|
| 26 |
+
```python
|
| 27 |
+
from deepsparse import TextGeneration
|
| 28 |
+
|
| 29 |
+
prompt = "How to become a great software engineer?"
|
| 30 |
+
formatted_prompt = f"<s> [|User|]\n{prompt}</s>[|Assistant|]\n"
|
| 31 |
+
|
| 32 |
+
model = TextGeneration(model="deployment")
|
| 33 |
+
|
| 34 |
+
print(model(formatted_prompt, max_new_tokens=500).generations[0].text)
|
| 35 |
+
"""
|
| 36 |
+
1. Learn the basics of programming languages like C++, Python, and Java.
|
| 37 |
+
2. Understand the fundamentals of computer science and programming concepts.
|
| 38 |
+
3. Practice and experiment with different programming languages and techniques.
|
| 39 |
+
4. Continuously update your knowledge and skills to keep up with the latest technologies.
|
| 40 |
+
5. Become familiar with the latest tools and technologies like Git, Docker, and virtual reality (VR)
|
| 41 |
+
6. Continuously seek opportunities to learn and grow in your career.
|
| 42 |
+
7. Become a part of open-source communities and contribute to open-source projects.
|
| 43 |
+
8. Continuously seek opportunities to learn and grow in your career.
|
| 44 |
+
9. Continuously seek opportunities to learn and grow in your career.
|
| 45 |
+
10. Continuously seek opportunities to learn and grow in your career.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
```
|
| 49 |
## One-shot and Export
|
| 50 |
|