Instructions to use opencsg/csg-wukong-code-1B-cpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencsg/csg-wukong-code-1B-cpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencsg/csg-wukong-code-1B-cpt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("opencsg/csg-wukong-code-1B-cpt") model = AutoModelForCausalLM.from_pretrained("opencsg/csg-wukong-code-1B-cpt") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use opencsg/csg-wukong-code-1B-cpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencsg/csg-wukong-code-1B-cpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencsg/csg-wukong-code-1B-cpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/opencsg/csg-wukong-code-1B-cpt
- SGLang
How to use opencsg/csg-wukong-code-1B-cpt 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/csg-wukong-code-1B-cpt" \ --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/csg-wukong-code-1B-cpt", "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/csg-wukong-code-1B-cpt" \ --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/csg-wukong-code-1B-cpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use opencsg/csg-wukong-code-1B-cpt with Docker Model Runner:
docker model run hf.co/opencsg/csg-wukong-code-1B-cpt
csg-wukong-code-1B-cpt [中文] [English]
[OpenCSG Community] [github] [wechat] [Twitter]
OpenCSG stands for Converged resources, Software refinement, and Generative LM. The 'C' represents Converged resources, indicating the integration and full utilization of hybrid resources. The 'S' stands for Software refinement, signifying software that is refined by large models. The 'G' represents Generative LM, which denotes widespread, inclusive, and democratized generative large models.The vision of OpenCSG is to empower every industry, every company, and every individual to own their models. We adhere to the principles of openness and open source, making the large model software stack of OpenCSG available to the community. We welcome everyone to use, send feedback, and contribute collaboratively.
Model Description
csg-wukong-1B-code-cpt is a 1 billion-parameter small language model(SLM) continue pretrained based on csg-wukong-1B.
we will introduce more information about csg-wukong-code-1B-cpt.
Training
Hardware
- GPUs: 16 H800
- Training time: 5days
Software
OpenCSG介绍
[OpenCSG 社区] [github] [微信] [推特]
OpenCSG中 Open是开源开放;C 代表 Converged resources,整合和充分利用的混合异构资源优势,算力降本增效;S 代表 Software refined,重新定义软件的交付方式,通过大模型驱动软件开发,人力降本增效;G 代表 Generative LM,大众化、普惠化和民主化的可商用的开源生成式大模型。OpenCSG的愿景是让每个行业、每个公司、每个人都拥有自己的模型。 我们坚持开源开放的原则,将OpenCSG的大模型软件栈开源到社区,欢迎使用、反馈和参与共建,欢迎关注。
模型介绍
csg-wukong-1B-code-cpt 是一个1B参数量的小语言模型,该模型是在csg-wukong-1B,二次预训练二成
我们将在后面介绍更多关于这个模型的信息。
训练
硬件资源
- GPU数量: 16 H800
- 训练时间: 5天
软件使用
- Downloads last month
- 5