Instructions to use opencsg/opencsg-stable-code-3b-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencsg/opencsg-stable-code-3b-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencsg/opencsg-stable-code-3b-v1", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("opencsg/opencsg-stable-code-3b-v1", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencsg/opencsg-stable-code-3b-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencsg/opencsg-stable-code-3b-v1" # 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-stable-code-3b-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/opencsg/opencsg-stable-code-3b-v1
- SGLang
How to use opencsg/opencsg-stable-code-3b-v1 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-stable-code-3b-v1" \ --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-stable-code-3b-v1", "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-stable-code-3b-v1" \ --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-stable-code-3b-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use opencsg/opencsg-stable-code-3b-v1 with Docker Model Runner:
docker model run hf.co/opencsg/opencsg-stable-code-3b-v1
Update README.md
Browse files
README.md
CHANGED
|
@@ -128,9 +128,9 @@ print(tokenizer.decode(tokens[0], skip_special_tokens=True))
|
|
| 128 |
|
| 129 |
|
| 130 |
</div>
|
| 131 |
-
OpenCSG
|
| 132 |
|
| 133 |
-
OpenCSG
|
| 134 |
|
| 135 |
|
| 136 |
|
|
|
|
| 128 |
|
| 129 |
|
| 130 |
</div>
|
| 131 |
+
OpenCSG中 Open是开源开放;C 代表 Converged resources,整合和充分利用的混合异构资源优势,算力降本增效;S 代表 Software refined,重新定义软件的交付方式,通过大模型驱动软件开发,人力降本增效;G 代表 Generative LM,大众化、普惠化和民主化的可商用的开源生成式大模型。
|
| 132 |
|
| 133 |
+
OpenCSG的愿景是让每个行业、每个公司、每个人都拥有自己的模型。 我们坚持开源开放的原则,将OpenCSG的大模型软件栈开源到社区,欢迎使用、反馈和参与共建,欢迎关注。
|
| 134 |
|
| 135 |
|
| 136 |
|