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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("opencsg/opencsg-stable-code-3b-v1", trust_remote_code=True, device_map="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
|
@@ -35,7 +35,7 @@ The vision of OpenCSG is to empower every industry, every company, and every ind
|
|
| 35 |
stable-code-3b is a decoder-only language model with 2.7 billion parameters, pre-trained on 1.3 trillion tokens of diverse textual and code datasets. The model is trained on 18 programming languages, selected based on the 2023 StackOverflow Developer Survey.
|
| 36 |
It demonstrates state-of-the-art performance, compared to models of similar size, across multiple programming languages tested using BigCode's Evaluation Harness.
|
| 37 |
|
| 38 |
-
opencsg-stable-code-3b-v1 is a
|
| 39 |
<br>
|
| 40 |
|
| 41 |
This is the repository for the base 3B version finetuned based on [stable-code-3b](https://huggingface.co/stabilityai/stable-code-3b).
|
|
@@ -138,7 +138,7 @@ OpenCSG 的愿景是让每个行业、每个公司、每个人都拥有自己的
|
|
| 138 |
|
| 139 |
stable-code-3b是一个拥有27亿参数的解码器语言模型,使用了13000亿个多样化文本和代码数据令牌进行预训练。
|
| 140 |
该模型训练了18种编程语言,在使用BigCode的评估工具测试的多种编程语言上,表现出与相似规模模型相比的最新性能。
|
| 141 |
-
opencsg-stable-code-3b-v1是
|
| 142 |
|
| 143 |
<br>
|
| 144 |
|
|
|
|
| 35 |
stable-code-3b is a decoder-only language model with 2.7 billion parameters, pre-trained on 1.3 trillion tokens of diverse textual and code datasets. The model is trained on 18 programming languages, selected based on the 2023 StackOverflow Developer Survey.
|
| 36 |
It demonstrates state-of-the-art performance, compared to models of similar size, across multiple programming languages tested using BigCode's Evaluation Harness.
|
| 37 |
|
| 38 |
+
opencsg-stable-code-3b-v1 is a model based on stable-code-3b that have been fine-tuned using full-parameter tuning methods.
|
| 39 |
<br>
|
| 40 |
|
| 41 |
This is the repository for the base 3B version finetuned based on [stable-code-3b](https://huggingface.co/stabilityai/stable-code-3b).
|
|
|
|
| 138 |
|
| 139 |
stable-code-3b是一个拥有27亿参数的解码器语言模型,使用了13000亿个多样化文本和代码数据令牌进行预训练。
|
| 140 |
该模型训练了18种编程语言,在使用BigCode的评估工具测试的多种编程语言上,表现出与相似规模模型相比的最新性能。
|
| 141 |
+
opencsg-stable-code-3b-v1是基于stable-code-3b的通过全参数微调方法进行调优的模型。
|
| 142 |
|
| 143 |
<br>
|
| 144 |
|