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
|
@@ -148,9 +148,9 @@ print(quick_sort(arr))
|
|
| 148 |
|
| 149 |
|
| 150 |
</div>
|
| 151 |
-
OpenCSG
|
| 152 |
|
| 153 |
-
OpenCSG
|
| 154 |
|
| 155 |
|
| 156 |
|
|
|
|
| 148 |
|
| 149 |
|
| 150 |
</div>
|
| 151 |
+
OpenCSG中 Open是开源开放;C 代表 Converged resources,整合和充分利用的混合异构资源优势,算力降本增效;S 代表 Software refined,重新定义软件的交付方式,通过大模型驱动软件开发,人力降本增效;G 代表 Generative LM,大众化、普惠化和民主化的可商用的开源生成式大模型。
|
| 152 |
|
| 153 |
+
OpenCSG的愿景是让每个行业、每个公司、每个人都拥有自己的模型。 我们坚持开源开放的原则,将OpenCSG的大模型软件栈开源到社区,欢迎使用、反馈和参与共建,欢迎关注。
|
| 154 |
|
| 155 |
|
| 156 |
|