Instructions to use cotysong113/codeparrot-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cotysong113/codeparrot-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cotysong113/codeparrot-ds")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cotysong113/codeparrot-ds") model = AutoModelForCausalLM.from_pretrained("cotysong113/codeparrot-ds") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cotysong113/codeparrot-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cotysong113/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": "cotysong113/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cotysong113/codeparrot-ds
- SGLang
How to use cotysong113/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 "cotysong113/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": "cotysong113/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 "cotysong113/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": "cotysong113/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cotysong113/codeparrot-ds with Docker Model Runner:
docker model run hf.co/cotysong113/codeparrot-ds
End of training
Browse files- README.md +6 -18
- generation_config.json +1 -1
README.md
CHANGED
|
@@ -16,7 +16,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
-
- Loss: 1.
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
@@ -49,26 +49,14 @@ The following hyperparameters were used during training:
|
|
| 49 |
|
| 50 |
### Training results
|
| 51 |
|
| 52 |
-
| Training Loss | Epoch | Step
|
| 53 |
-
|:-------------:|:------:|:----
|
| 54 |
-
| 2.
|
| 55 |
-
| 1.66 | 0.1533 | 10000 | 1.5090 |
|
| 56 |
-
| 1.5196 | 0.2299 | 15000 | 1.4118 |
|
| 57 |
-
| 1.4451 | 0.3065 | 20000 | 1.3466 |
|
| 58 |
-
| 1.3878 | 0.3832 | 25000 | 1.2987 |
|
| 59 |
-
| 1.3383 | 0.4598 | 30000 | 1.2534 |
|
| 60 |
-
| 1.2937 | 0.5365 | 35000 | 1.2107 |
|
| 61 |
-
| 1.2482 | 0.6131 | 40000 | 1.1684 |
|
| 62 |
-
| 1.2082 | 0.6897 | 45000 | 1.1316 |
|
| 63 |
-
| 1.1709 | 0.7664 | 50000 | 1.0987 |
|
| 64 |
-
| 1.1444 | 0.8430 | 55000 | 1.0760 |
|
| 65 |
-
| 1.1234 | 0.9196 | 60000 | 1.0638 |
|
| 66 |
-
| 1.1159 | 0.9963 | 65000 | 1.0610 |
|
| 67 |
|
| 68 |
|
| 69 |
### Framework versions
|
| 70 |
|
| 71 |
-
- Transformers 4.
|
| 72 |
- Pytorch 2.5.1+cu124
|
| 73 |
- Datasets 3.1.0
|
| 74 |
-
- Tokenizers 0.
|
|
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 1.6388
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 49 |
|
| 50 |
### Training results
|
| 51 |
|
| 52 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
+
|:-------------:|:------:|:----:|:---------------:|
|
| 54 |
+
| 2.4025 | 0.7664 | 5000 | 1.6388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
|
| 57 |
### Framework versions
|
| 58 |
|
| 59 |
+
- Transformers 4.47.0
|
| 60 |
- Pytorch 2.5.1+cu124
|
| 61 |
- Datasets 3.1.0
|
| 62 |
+
- Tokenizers 0.21.0
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 0,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 0,
|
| 5 |
+
"transformers_version": "4.47.0"
|
| 6 |
}
|