Instructions to use aced125/codeparrot-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aced125/codeparrot-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aced125/codeparrot-ds")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aced125/codeparrot-ds") model = AutoModelForCausalLM.from_pretrained("aced125/codeparrot-ds", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aced125/codeparrot-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aced125/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": "aced125/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aced125/codeparrot-ds
- SGLang
How to use aced125/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 "aced125/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": "aced125/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 "aced125/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": "aced125/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aced125/codeparrot-ds with Docker Model Runner:
docker model run hf.co/aced125/codeparrot-ds
Training in progress, step 5000
Browse files- .gitignore +1 -0
- config.json +41 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/1680046651.8105638/events.out.tfevents.1680046651.dlf-training-laksh-4gpu-1-0.275030.1 +3 -0
- runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/1680046669.8419986/events.out.tfevents.1680046669.dlf-training-laksh-4gpu-1-0.275030.2 +3 -0
- runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/1680046733.2142534/events.out.tfevents.1680046733.dlf-training-laksh-4gpu-1-0.275030.4 +3 -0
- runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680046651.dlf-training-laksh-4gpu-1-0.275030.0 +3 -0
- runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680046733.dlf-training-laksh-4gpu-1-0.275030.3 +3 -0
- runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/1680046775.6871116/events.out.tfevents.1680046775.dlf-training-laksh-4gpu-1-0.275030.6 +3 -0
- runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/1680047267.3901517/events.out.tfevents.1680047267.dlf-training-laksh-4gpu-1-0.275030.8 +3 -0
- runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680046775.dlf-training-laksh-4gpu-1-0.275030.5 +3 -0
- runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680047267.dlf-training-laksh-4gpu-1-0.275030.7 +3 -0
- runs/Mar28_23-58-12_dlf-training-laksh-4gpu-1-0/1680047910.2809284/events.out.tfevents.1680047910.dlf-training-laksh-4gpu-1-0.275030.10 +3 -0
- runs/Mar28_23-58-12_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680047910.dlf-training-laksh-4gpu-1-0.275030.9 +3 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer_config.json +9 -0
- training_args.bin +3 -0
- vocab.json +0 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
checkpoint-*/
|
config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "gpt2",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.1,
|
| 8 |
+
"bos_token_id": 0,
|
| 9 |
+
"do_sample": true,
|
| 10 |
+
"embd_pdrop": 0.1,
|
| 11 |
+
"eos_token_id": 0,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"layer_norm_epsilon": 1e-05,
|
| 14 |
+
"max_length": 50,
|
| 15 |
+
"model_type": "gpt2",
|
| 16 |
+
"n_ctx": 128,
|
| 17 |
+
"n_embd": 768,
|
| 18 |
+
"n_head": 12,
|
| 19 |
+
"n_inner": null,
|
| 20 |
+
"n_layer": 12,
|
| 21 |
+
"n_positions": 1024,
|
| 22 |
+
"reorder_and_upcast_attn": false,
|
| 23 |
+
"resid_pdrop": 0.1,
|
| 24 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 25 |
+
"scale_attn_weights": true,
|
| 26 |
+
"summary_activation": null,
|
| 27 |
+
"summary_first_dropout": 0.1,
|
| 28 |
+
"summary_proj_to_labels": true,
|
| 29 |
+
"summary_type": "cls_index",
|
| 30 |
+
"summary_use_proj": true,
|
| 31 |
+
"task_specific_params": {
|
| 32 |
+
"text-generation": {
|
| 33 |
+
"do_sample": true,
|
| 34 |
+
"max_length": 50
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
"torch_dtype": "float32",
|
| 38 |
+
"transformers_version": "4.27.3",
|
| 39 |
+
"use_cache": true,
|
| 40 |
+
"vocab_size": 50000
|
| 41 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccea2268c3a161631f1e50e7d42a2b212b0e59daf8d5850ab84373e4c612add6
|
| 3 |
+
size 509607017
|
runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/1680046651.8105638/events.out.tfevents.1680046651.dlf-training-laksh-4gpu-1-0.275030.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32ca6e3f62ef1831604e5321a863ddacaa9177d7d980934dd95875b752759445
|
| 3 |
+
size 5836
|
runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/1680046669.8419986/events.out.tfevents.1680046669.dlf-training-laksh-4gpu-1-0.275030.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e2438478a44bd6f214adeec8decf0b80d55d391599d05833f6f2edacae6894b
|
| 3 |
+
size 5836
|
runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/1680046733.2142534/events.out.tfevents.1680046733.dlf-training-laksh-4gpu-1-0.275030.4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ea2f4ccb96826c7a556cda9050fec681e7439043288e6f6963312c7d419cb7e
|
| 3 |
+
size 5836
|
runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680046651.dlf-training-laksh-4gpu-1-0.275030.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b6f79eb692399eae53aa186bccf4a1bb4fdd9fb2f36d00d1b77e6a1dc5097cf
|
| 3 |
+
size 8342
|
runs/Mar28_23-37-17_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680046733.dlf-training-laksh-4gpu-1-0.275030.3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc8db0732cb93d5c891a2606066df02aee95a708ae551fcee335b98de0ae8ca0
|
| 3 |
+
size 4563
|
runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/1680046775.6871116/events.out.tfevents.1680046775.dlf-training-laksh-4gpu-1-0.275030.6
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ae2004e4c41b58b5f002d5cf5b42d1c2d88eeb2ea39ed51f556eadadf6b8126
|
| 3 |
+
size 5836
|
runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/1680047267.3901517/events.out.tfevents.1680047267.dlf-training-laksh-4gpu-1-0.275030.8
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e65c7903ed162f055afdb370dc54d6a740034b347ec7f6748d5e23eae5d0fc30
|
| 3 |
+
size 5836
|
runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680046775.dlf-training-laksh-4gpu-1-0.275030.5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7d7157cff8c2c5deec90731e00daa6907e58cc751cb3bd3a1e7277d34fffd7e
|
| 3 |
+
size 4572
|
runs/Mar28_23-39-24_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680047267.dlf-training-laksh-4gpu-1-0.275030.7
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebc1c50a85d6d5af54e6bd1c2cbe002f9c4a9cb701363dbd30e16c2d51e8fe7f
|
| 3 |
+
size 4613
|
runs/Mar28_23-58-12_dlf-training-laksh-4gpu-1-0/1680047910.2809284/events.out.tfevents.1680047910.dlf-training-laksh-4gpu-1-0.275030.10
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7464d8f422719c3e751a11403dfedd6fb1b27a98f457a9c387fbc87a85004ae
|
| 3 |
+
size 5836
|
runs/Mar28_23-58-12_dlf-training-laksh-4gpu-1-0/events.out.tfevents.1680047910.dlf-training-laksh-4gpu-1-0.275030.9
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1fedd19b77d21f25ad3512a5ea786a805e99cf8d878571da0ca5cadea15ab5d6
|
| 3 |
+
size 4688
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|endoftext|>",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"pad_token": "<|endoftext|>",
|
| 5 |
+
"unk_token": "<|endoftext|>"
|
| 6 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"bos_token": "<|endoftext|>",
|
| 4 |
+
"eos_token": "<|endoftext|>",
|
| 5 |
+
"model_max_length": 1024,
|
| 6 |
+
"special_tokens_map_file": null,
|
| 7 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 8 |
+
"unk_token": "<|endoftext|>"
|
| 9 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e38e904f6b38acf3f96f34c132c48b671b77367a00cf8cbb47a379da9621272
|
| 3 |
+
size 3567
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|