Instructions to use yangdechuan/codeparrot-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yangdechuan/codeparrot-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yangdechuan/codeparrot-ds")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yangdechuan/codeparrot-ds") model = AutoModelForCausalLM.from_pretrained("yangdechuan/codeparrot-ds", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yangdechuan/codeparrot-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yangdechuan/codeparrot-ds" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yangdechuan/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yangdechuan/codeparrot-ds
- SGLang
How to use yangdechuan/codeparrot-ds 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 "yangdechuan/codeparrot-ds" \ --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": "yangdechuan/codeparrot-ds", "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 "yangdechuan/codeparrot-ds" \ --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": "yangdechuan/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yangdechuan/codeparrot-ds with Docker Model Runner:
docker model run hf.co/yangdechuan/codeparrot-ds
Commit History
-
End of training
7eb262a -
Training in progress, step 65000
2813062 -
Training in progress, step 60000
9943289 -
Training in progress, step 55000
c9477f5 -
Training in progress, step 50000
0fac79d
-
Training in progress, step 45000
98f452f -
Training in progress, step 40000
c8eb0ff -
Training in progress, step 35000
c91fc8a -
Training in progress, step 30000
b481d0b -
Training in progress, step 25000
d2e7663 -
Training in progress, step 20000
dd99988 -
Training in progress, step 15000
62943e3 -
Training in progress, step 10000
eba6188 -
Training in progress, step 5000
d72470c
-
Training in progress, step 16000
2e20592 -
Training in progress, step 15000
bea3c4b -
Training in progress, step 14000
fdd5efa -
Training in progress, step 13000
0660c3a -
Training in progress, step 12000
0aef2bc -
Training in progress, step 11000
555ae6e -
Training in progress, step 10000
2482a82 -
Training in progress, step 9000
6335e92 -
Training in progress, step 8000
d643e55 -
Training in progress, step 7000
6780824 -
Training in progress, step 6000
b72a6fb -
Training in progress, step 5000
841f973 -
Training in progress, step 4000
19855b8 -
Training in progress, step 3000
558c209 -
Training in progress, step 2000
f946183 -
Training in progress, step 1000
8f006a6 -
initial commit
508adad