Instructions to use ncoop57/code-clippy-125M-py with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ncoop57/code-clippy-125M-py with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ncoop57/code-clippy-125M-py")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ncoop57/code-clippy-125M-py") model = AutoModelForCausalLM.from_pretrained("ncoop57/code-clippy-125M-py") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ncoop57/code-clippy-125M-py with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ncoop57/code-clippy-125M-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/code-clippy-125M-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ncoop57/code-clippy-125M-py
- SGLang
How to use ncoop57/code-clippy-125M-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/code-clippy-125M-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/code-clippy-125M-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/code-clippy-125M-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/code-clippy-125M-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ncoop57/code-clippy-125M-py with Docker Model Runner:
docker model run hf.co/ncoop57/code-clippy-125M-py
final model
Browse files- log/debug_0.log +3 -0
log/debug_0.log
CHANGED
|
@@ -52592,3 +52592,6 @@ Use FP16 precision: False
|
|
| 52592 |
12/29/2021 13:04:23 - INFO - codeparrot_training - Step 49999: {'lr': 4.969528122344969e-13, 'samples': 25600000, 'steps': 49999, 'batch_loss/train': 0.7188061801716685}
|
| 52593 |
12/29/2021 13:04:23 - INFO - codeparrot_training - Evaluating and saving model checkpoint
|
| 52594 |
12/29/2021 13:07:47 - INFO - codeparrot_training - Step 50000: {'loss/eval': 0.7400861382484436, 'perplexity': 2.096116065979004}
|
|
|
|
|
|
|
|
|
|
|
|
| 52592 |
12/29/2021 13:04:23 - INFO - codeparrot_training - Step 49999: {'lr': 4.969528122344969e-13, 'samples': 25600000, 'steps': 49999, 'batch_loss/train': 0.7188061801716685}
|
| 52593 |
12/29/2021 13:04:23 - INFO - codeparrot_training - Evaluating and saving model checkpoint
|
| 52594 |
12/29/2021 13:07:47 - INFO - codeparrot_training - Step 50000: {'loss/eval': 0.7400861382484436, 'perplexity': 2.096116065979004}
|
| 52595 |
+
12/29/2021 13:08:05 - WARNING - huggingface_hub.repository - Several commits (18) will be pushed upstream.
|
| 52596 |
+
12/29/2021 13:08:08 - INFO - codeparrot_training - Evaluating and saving model after training
|
| 52597 |
+
12/29/2021 13:11:30 - INFO - codeparrot_training - Step 1600000: {'loss/eval': 0.7400861382484436, 'perplexity': 2.096116065979004}
|