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
Training in progress, step 5000
Browse files- config.json +1 -1
- model.safetensors +1 -1
- tokenizer_config.json +1 -0
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
| 33 |
}
|
| 34 |
},
|
| 35 |
"torch_dtype": "float32",
|
| 36 |
-
"transformers_version": "4.
|
| 37 |
"use_cache": true,
|
| 38 |
"vocab_size": 50000
|
| 39 |
}
|
|
|
|
| 33 |
}
|
| 34 |
},
|
| 35 |
"torch_dtype": "float32",
|
| 36 |
+
"transformers_version": "4.47.0",
|
| 37 |
"use_cache": true,
|
| 38 |
"vocab_size": 50000
|
| 39 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 496984704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5aea01dda6a3fecc4ddb63d07c7d6371f6a94a944fdbadf284d6bdc6ceb00ed6
|
| 3 |
size 496984704
|
tokenizer_config.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
| 13 |
"bos_token": "<|endoftext|>",
|
| 14 |
"clean_up_tokenization_spaces": false,
|
| 15 |
"eos_token": "<|endoftext|>",
|
|
|
|
| 16 |
"model_max_length": 1024,
|
| 17 |
"pad_token": "<|endoftext|>",
|
| 18 |
"tokenizer_class": "GPT2Tokenizer",
|
|
|
|
| 13 |
"bos_token": "<|endoftext|>",
|
| 14 |
"clean_up_tokenization_spaces": false,
|
| 15 |
"eos_token": "<|endoftext|>",
|
| 16 |
+
"extra_special_tokens": {},
|
| 17 |
"model_max_length": 1024,
|
| 18 |
"pad_token": "<|endoftext|>",
|
| 19 |
"tokenizer_class": "GPT2Tokenizer",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41b946426763ef4ab5f67c1bfb076ba9ab52318fd9ab1c9cb2b57634e3292ace
|
| 3 |
size 5240
|