Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use DancingIguana/codeparrot-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DancingIguana/codeparrot-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DancingIguana/codeparrot-ds")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DancingIguana/codeparrot-ds") model = AutoModelForCausalLM.from_pretrained("DancingIguana/codeparrot-ds") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DancingIguana/codeparrot-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DancingIguana/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": "DancingIguana/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DancingIguana/codeparrot-ds
- SGLang
How to use DancingIguana/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 "DancingIguana/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": "DancingIguana/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 "DancingIguana/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": "DancingIguana/codeparrot-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DancingIguana/codeparrot-ds with Docker Model Runner:
docker model run hf.co/DancingIguana/codeparrot-ds
Commit ·
cdb892d
1
Parent(s): 885df73
End of training
Browse files- config.json +10 -3
- merges.txt +0 -0
- pytorch_model.bin +2 -2
- runs/Jun11_16-49-48_4366ac95dc97/1654966412.217843/events.out.tfevents.1654966412.4366ac95dc97.71.1 +3 -0
- runs/Jun11_16-49-48_4366ac95dc97/events.out.tfevents.1654966412.4366ac95dc97.71.0 +3 -0
- tokenizer.json +0 -0
- training_args.bin +1 -1
- vocab.json +0 -0
config.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
|
|
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
@@ -8,14 +9,20 @@
|
|
| 8 |
"bos_token_id": 0,
|
| 9 |
"embd_pdrop": 0.1,
|
| 10 |
"eos_token_id": 0,
|
|
|
|
|
|
|
|
|
|
| 11 |
"initializer_range": 0.02,
|
|
|
|
|
|
|
|
|
|
| 12 |
"layer_norm_epsilon": 1e-05,
|
| 13 |
"model_type": "gpt2",
|
| 14 |
"n_ctx": 128,
|
| 15 |
"n_embd": 768,
|
| 16 |
"n_head": 12,
|
| 17 |
"n_inner": null,
|
| 18 |
-
"n_layer":
|
| 19 |
"n_positions": 1024,
|
| 20 |
"reorder_and_upcast_attn": false,
|
| 21 |
"resid_pdrop": 0.1,
|
|
@@ -35,5 +42,5 @@
|
|
| 35 |
"torch_dtype": "float32",
|
| 36 |
"transformers_version": "4.19.4",
|
| 37 |
"use_cache": true,
|
| 38 |
-
"vocab_size":
|
| 39 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "distilgpt2",
|
| 3 |
+
"_num_labels": 1,
|
| 4 |
"activation_function": "gelu_new",
|
| 5 |
"architectures": [
|
| 6 |
"GPT2LMHeadModel"
|
|
|
|
| 9 |
"bos_token_id": 0,
|
| 10 |
"embd_pdrop": 0.1,
|
| 11 |
"eos_token_id": 0,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "LABEL_0"
|
| 14 |
+
},
|
| 15 |
"initializer_range": 0.02,
|
| 16 |
+
"label2id": {
|
| 17 |
+
"LABEL_0": 0
|
| 18 |
+
},
|
| 19 |
"layer_norm_epsilon": 1e-05,
|
| 20 |
"model_type": "gpt2",
|
| 21 |
"n_ctx": 128,
|
| 22 |
"n_embd": 768,
|
| 23 |
"n_head": 12,
|
| 24 |
"n_inner": null,
|
| 25 |
+
"n_layer": 6,
|
| 26 |
"n_positions": 1024,
|
| 27 |
"reorder_and_upcast_attn": false,
|
| 28 |
"resid_pdrop": 0.1,
|
|
|
|
| 42 |
"torch_dtype": "float32",
|
| 43 |
"transformers_version": "4.19.4",
|
| 44 |
"use_cache": true,
|
| 45 |
+
"vocab_size": 25000
|
| 46 |
}
|
merges.txt
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f19947bc84435921c713126f060abfae30fd5505d0a980cb30e27108c4daf04
|
| 3 |
+
size 256379613
|
runs/Jun11_16-49-48_4366ac95dc97/1654966412.217843/events.out.tfevents.1654966412.4366ac95dc97.71.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8334a5ed5d07935140b0cc076ed58db211e69847c0970384064028aff4e2ea1c
|
| 3 |
+
size 5150
|
runs/Jun11_16-49-48_4366ac95dc97/events.out.tfevents.1654966412.4366ac95dc97.71.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f78dd7a92a378f9a82b11592c20bb20c44428bebd384b3b496b03c7099ea5043
|
| 3 |
+
size 4182
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3183
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b64d9f3a1b4f17235e48e59c8c601848addff803519a54aeb8cae3805e5bf32
|
| 3 |
size 3183
|
vocab.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|