Text Generation
Transformers
Safetensors
starcoder2
code
Eval Results (legacy)
text-generation-inference
compressed-tensors
Instructions to use RedHatAI/starcoder2-3b-quantized.w8a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/starcoder2-3b-quantized.w8a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedHatAI/starcoder2-3b-quantized.w8a16")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("RedHatAI/starcoder2-3b-quantized.w8a16") model = AutoModelForMultimodalLM.from_pretrained("RedHatAI/starcoder2-3b-quantized.w8a16") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RedHatAI/starcoder2-3b-quantized.w8a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/starcoder2-3b-quantized.w8a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/starcoder2-3b-quantized.w8a16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RedHatAI/starcoder2-3b-quantized.w8a16
- SGLang
How to use RedHatAI/starcoder2-3b-quantized.w8a16 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/starcoder2-3b-quantized.w8a16" \ --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/starcoder2-3b-quantized.w8a16", "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/starcoder2-3b-quantized.w8a16" \ --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/starcoder2-3b-quantized.w8a16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RedHatAI/starcoder2-3b-quantized.w8a16 with Docker Model Runner:
docker model run hf.co/RedHatAI/starcoder2-3b-quantized.w8a16
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-generation
|
| 3 |
+
inference: true
|
| 4 |
+
widget:
|
| 5 |
+
- text: 'def print_hello_world():'
|
| 6 |
+
example_title: Hello world
|
| 7 |
+
group: Python
|
| 8 |
+
datasets:
|
| 9 |
+
- bigcode/the-stack-v2-train
|
| 10 |
+
license: bigcode-openrail-m
|
| 11 |
+
library_name: transformers
|
| 12 |
+
tags:
|
| 13 |
+
- code
|
| 14 |
+
model-index:
|
| 15 |
+
- name: starcoder2-3b-quantized.w8a16
|
| 16 |
+
results:
|
| 17 |
+
- task:
|
| 18 |
+
type: text-generation
|
| 19 |
+
dataset:
|
| 20 |
+
name: HumanEval+
|
| 21 |
+
type: humanevalplus
|
| 22 |
+
metrics:
|
| 23 |
+
- type: pass@1
|
| 24 |
+
value: 26.4
|
| 25 |
+
- task:
|
| 26 |
+
type: text-generation
|
| 27 |
+
dataset:
|
| 28 |
+
name: HumanEval
|
| 29 |
+
type: humaneval
|
| 30 |
+
metrics:
|
| 31 |
+
- type: pass@1
|
| 32 |
+
value: 31.0
|
| 33 |
+
---
|