Instructions to use ncoop57/cm_codeparrot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ncoop57/cm_codeparrot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ncoop57/cm_codeparrot")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ncoop57/cm_codeparrot") model = AutoModelForCausalLM.from_pretrained("ncoop57/cm_codeparrot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ncoop57/cm_codeparrot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ncoop57/cm_codeparrot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ncoop57/cm_codeparrot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ncoop57/cm_codeparrot
- SGLang
How to use ncoop57/cm_codeparrot 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/cm_codeparrot" \ --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/cm_codeparrot", "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/cm_codeparrot" \ --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/cm_codeparrot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ncoop57/cm_codeparrot with Docker Model Runner:
docker model run hf.co/ncoop57/cm_codeparrot
Commit History
-
Add last log
9b51643
-
step 20000
c38807a
-
step 10000
c9ab322
-
final model
13bc3c3 -
step 10000
a5e781e -
step 9000
68ee251 -
step 8000
7bbbc6d
-
step 7000
eb7372f -
step 6000
c9d842d -
step 5000
569ab7c -
step 4000
b9f2e3b -
step 3000
5755461 -
step 2000
f30da9e -
step 1000
9d4ff93 -
step 300
773bb0d -
step 200
6cec279 -
step 100
c0a82e4
-
Add log
6a9aecb
-
final model
8727693 -
step 1000
0026eb5 -
step 900
8541f3f -
step 800
f26e96e -
step 700
2f79900 -
step 600
717ca25 -
step 500
19a399c
-
step 400
903c5cf -
step 300
aa1f0f3 -
step 200
1fe7fb9 -
step 100
7af5004 -
Add log
15fa55a -
final model
b8a0716 -
step 200
fda810b
-
step 100
e34b9d6 -
step 12
ca7ed15 -
step 6
b270131 -
add model
90bc655