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 "Dimensity/Complexity-1B" \
--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": "Dimensity/Complexity-1B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'Complexity-1B
Model Details
Complexity-1B is a finetuned version of the GPT-NeoX 1.3B model [@gpt-neox] for code completion tasks. It was finetuned on a dataset of Python code from open source projects on GitHub.
Intended Uses
This model is intended to be used for code completion in Python. It can suggest likely completions for partially written Python code.
Evaluation Data
The model was evaluated on a holdout set from the training data distribution, containing Python code snippets.
Metrics
The primary evaluation metric was accuracy of code completion on the evaluation set. The model achieves 49% accuracy on code completion.
Ethical Considerations
The training data contains code from public GitHub repositories. Care should be taken to avoid completing code in unethical or harmful ways not intended by the original developers.
Caveats and Recommendations
The model is designed for Python code completion only. Performance on other programming languages is unknown. Users should carefully validate any generated code before executing or deploying it.
- Downloads last month
- 12
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Dimensity/Complexity-1B" \ --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": "Dimensity/Complexity-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'