Text Generation
Transformers
Safetensors
text generation
Deci AI
DeciCoder
custom_code
Eval Results (legacy)
Instructions to use Deci/DeciCoder-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Deci/DeciCoder-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Deci/DeciCoder-1b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Deci/DeciCoder-1b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Deci/DeciCoder-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Deci/DeciCoder-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Deci/DeciCoder-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Deci/DeciCoder-1b
- SGLang
How to use Deci/DeciCoder-1b 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 "Deci/DeciCoder-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": "Deci/DeciCoder-1b", "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 "Deci/DeciCoder-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": "Deci/DeciCoder-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Deci/DeciCoder-1b with Docker Model Runner:
docker model run hf.co/Deci/DeciCoder-1b
Commit History
-
Update README.md
Verified signatured045c14
-
Update README.md
59cead3 -
Update README.md
92032c6
-
add padding_mask
0da01b7
-
Update README.md
42859ad
-
Update README.md
ca3d139
-
Update README.md
d9e098a
-
safetensors, config changes (#12)
- config change (8fe3c20c15244fa0565f8e27b6c512c55a874adb) - safetensors (eb3b3826e268aed7924188dc744498be6d4ae9fc)1986c07
-
fix for transformers-4.33.1
3fefb8a
-
Update README.md
a2e00e8
-
Update README.md
af2ef45
-
Update README.md
797fe7a -
update max new tokens on usage
104b328 -
Update README.md
ff0676f -
Update README.md
2c0f707 -
Update README.md
841df46
-
Update README.md
c00a8fe -
Update README.md
fce0306 -
Update README.md
a308566 -
Update README.md
a2e18bd -
Update README.md
837a3eb -
Upload configuration_decicoder.py with huggingface_hub (#5)
- Upload configuration_decicoder.py with huggingface_hub (09a33da296991f018b0ec3c0701f80b15fd9dbad)1061817 -
Upload modeling_decicoder.py with huggingface_hub (#6)
- Upload modeling_decicoder.py with huggingface_hub (be33d666e4780a8763e28825492796b75bf383fa)02ac42d -
Upload pytorch_model.bin with huggingface_hub (#3)
- Upload pytorch_model.bin with huggingface_hub (37466b64b07611e2a2a8e02f0c2e5ca57ef9d128)9105853 -
Upload modeling_decicoder.py with huggingface_hub (#4)
- Upload modeling_decicoder.py with huggingface_hub (2ac67e2c0ac46c68d36924967112c645ab367a2b)7a2815a -
Upload config.json with huggingface_hub (#1)
- Upload config.json with huggingface_hub (d3fea1dec174a58f65fd9b9cc7dd8de1ef5011d7)1aed8fa -
Upload configuration_decicoder.py with huggingface_hub (#2)
- Upload configuration_decicoder.py with huggingface_hub (2e69d90aa054450cf0c868bf78da310634d1f450)1849e15 -
Update README.md
5c63f79 -
Upload 5 files
3fc5339 -
initial commit
870e414