Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use wb-droid/codeparrot-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wb-droid/codeparrot-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wb-droid/codeparrot-ds")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wb-droid/codeparrot-ds") model = AutoModelForCausalLM.from_pretrained("wb-droid/codeparrot-ds", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wb-droid/codeparrot-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wb-droid/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": "wb-droid/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wb-droid/codeparrot-ds
- SGLang
How to use wb-droid/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 "wb-droid/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": "wb-droid/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 "wb-droid/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": "wb-droid/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wb-droid/codeparrot-ds with Docker Model Runner:
docker model run hf.co/wb-droid/codeparrot-ds
End of training
Browse files
README.md
CHANGED
|
@@ -15,6 +15,8 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
# codeparrot-ds
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Model description
|
| 20 |
|
|
@@ -47,6 +49,12 @@ The following hyperparameters were used during training:
|
|
| 47 |
|
| 48 |
### Training results
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
### Framework versions
|
|
|
|
| 15 |
# codeparrot-ds
|
| 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.5773
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 49 |
|
| 50 |
### Training results
|
| 51 |
|
| 52 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
+
|:-------------:|:------:|:-----:|:---------------:|
|
| 54 |
+
| 3.1475 | 0.2329 | 5000 | 2.2790 |
|
| 55 |
+
| 2.0924 | 0.4658 | 10000 | 1.9024 |
|
| 56 |
+
| 1.7823 | 0.6987 | 15000 | 1.6709 |
|
| 57 |
+
| 1.6037 | 0.9316 | 20000 | 1.5773 |
|
| 58 |
|
| 59 |
|
| 60 |
### Framework versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 503128704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55079ea05353141b71e6e48a5153f8f9d0e61bb3b4718a9d961b301d1da02f02
|
| 3 |
size 503128704
|
runs/Oct05_19-21-35_DESKTOP-V4D3531/events.out.tfevents.1728127296.DESKTOP-V4D3531.994.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:223525bf521aa460199c3e6ceecda6834badbd07112bd12d31ea8dcf1b3d5de4
|
| 3 |
+
size 7417
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4731
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e602cb17a61c65aff06e10d60e4ee66b040008004d78c52bdb38811ce274c82
|
| 3 |
size 4731
|