Instructions to use opencsg/opencsg-starcoder2-15b-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencsg/opencsg-starcoder2-15b-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencsg/opencsg-starcoder2-15b-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("opencsg/opencsg-starcoder2-15b-v0.1") model = AutoModelForCausalLM.from_pretrained("opencsg/opencsg-starcoder2-15b-v0.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencsg/opencsg-starcoder2-15b-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencsg/opencsg-starcoder2-15b-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencsg/opencsg-starcoder2-15b-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/opencsg/opencsg-starcoder2-15b-v0.1
- SGLang
How to use opencsg/opencsg-starcoder2-15b-v0.1 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 "opencsg/opencsg-starcoder2-15b-v0.1" \ --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": "opencsg/opencsg-starcoder2-15b-v0.1", "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 "opencsg/opencsg-starcoder2-15b-v0.1" \ --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": "opencsg/opencsg-starcoder2-15b-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use opencsg/opencsg-starcoder2-15b-v0.1 with Docker Model Runner:
docker model run hf.co/opencsg/opencsg-starcoder2-15b-v0.1
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,8 +53,11 @@ To simplify the comparison, we chosed the Pass@1 metric for the Python language,
|
|
| 53 |
| --- |----------------------------------------------------------------------------- |
|
| 54 |
| starcoder | 35.98%|
|
| 55 |
| opencsg-starcoder-v0.1| **42.68%** |
|
|
|
|
| 56 |
| opencsg-starcoder2-3b-v0.1| **45.12%** |
|
|
|
|
| 57 |
| opencsg-starcoder2-7b-v0.1| **51.22%** |
|
|
|
|
| 58 |
| opencsg-starcoder2-15b-v0.1| **59.15%** |
|
| 59 |
|
| 60 |
**TODO**
|
|
@@ -172,8 +175,11 @@ HumanEval 是评估模型在代码生成方面性能的最常见的基准,尤
|
|
| 172 |
| --- |----------------------------------------------------------------------------- |
|
| 173 |
| starcoder | 35.98%|
|
| 174 |
| opencsg-starcoder-v0.1| **42.68%** |
|
|
|
|
| 175 |
| opencsg-starcoder2-3b-v0.1| **45.12%** |
|
|
|
|
| 176 |
| opencsg-starcoder2-7b-v0.1| **51.22%** |
|
|
|
|
| 177 |
| opencsg-starcoder2-15b-v0.1| **59.15%** |
|
| 178 |
|
| 179 |
**TODO**
|
|
|
|
| 53 |
| --- |----------------------------------------------------------------------------- |
|
| 54 |
| starcoder | 35.98%|
|
| 55 |
| opencsg-starcoder-v0.1| **42.68%** |
|
| 56 |
+
| starcoder2-3b | 32.93%|
|
| 57 |
| opencsg-starcoder2-3b-v0.1| **45.12%** |
|
| 58 |
+
| starcoder2-7b | 35.37%|
|
| 59 |
| opencsg-starcoder2-7b-v0.1| **51.22%** |
|
| 60 |
+
| starcoder2-15b | 45.12%|
|
| 61 |
| opencsg-starcoder2-15b-v0.1| **59.15%** |
|
| 62 |
|
| 63 |
**TODO**
|
|
|
|
| 175 |
| --- |----------------------------------------------------------------------------- |
|
| 176 |
| starcoder | 35.98%|
|
| 177 |
| opencsg-starcoder-v0.1| **42.68%** |
|
| 178 |
+
| starcoder2-3b | 32.93%|
|
| 179 |
| opencsg-starcoder2-3b-v0.1| **45.12%** |
|
| 180 |
+
| starcoder2-7b | 35.37%|
|
| 181 |
| opencsg-starcoder2-7b-v0.1| **51.22%** |
|
| 182 |
+
| starcoder2-15b | 45.12%|
|
| 183 |
| opencsg-starcoder2-15b-v0.1| **59.15%** |
|
| 184 |
|
| 185 |
**TODO**
|