Instructions to use ncoop57/codeparrot-py with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ncoop57/codeparrot-py with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ncoop57/codeparrot-py")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ncoop57/codeparrot-py") model = AutoModelForCausalLM.from_pretrained("ncoop57/codeparrot-py", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ncoop57/codeparrot-py with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ncoop57/codeparrot-py" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ncoop57/codeparrot-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ncoop57/codeparrot-py
- SGLang
How to use ncoop57/codeparrot-py 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 "ncoop57/codeparrot-py" \ --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": "ncoop57/codeparrot-py", "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 "ncoop57/codeparrot-py" \ --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": "ncoop57/codeparrot-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ncoop57/codeparrot-py with Docker Model Runner:
docker model run hf.co/ncoop57/codeparrot-py
Commit History
-
final model
0ee25d2 -
step 50000
27f547b
-
step 48000
0d1e3f5 -
step 46000
466522c -
step 44000
e342d13 -
step 42000
42c44e7 -
step 40000
ca355d6 -
step 38000
1c2b8d8 -
step 36000
3642cb1 -
step 34000
768c644 -
step 32000
62f9361 -
step 30000
11289a7 -
step 28000
8964838 -
step 26000
e0f3b6d -
step 24000
fa7be96 -
step 22000
ad2a5cc -
step 20000
96550c7 -
step 18000
a98a570 -
step 16000
2f3371c
-
step 14000
8b17266 -
step 12000
f4b1a8d -
step 10000
2d4117a -
step 8000
6fef694 -
step 6000
91d895a -
step 4000
7a52ce9 -
step 2000
ad933e3
-
Add new log
f916981 -
step 40000
3ff3565 -
step 37500
9362dd8 -
step 35000
a4480fd -
step 32500
2a09762 -
step 30000
9bc55c7 -
step 27500
e47eddb -
step 25000
ac15156 -
step 22500
209760d -
step 20000
41eea03 -
step 17500
c357cba -
step 15000
d6c5048 -
step 12500
661d56f -
step 10000
3ab212b -
step 7500
3743452 -
step 5000
fa919f5 -
step 2500
39c9017 -
step 10
a8a6ff1
-
add model
cd166fa -
add tokenizer
5bb58e7 -
initial commit
6a87ff8