Text Generation
Transformers
Safetensors
gpt_bigcode
trl
reward-trainer
Generated from Trainer
text-generation-inference
Instructions to use TheRadDani/tinystarcoder-rlhf-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheRadDani/tinystarcoder-rlhf-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheRadDani/tinystarcoder-rlhf-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheRadDani/tinystarcoder-rlhf-model") model = AutoModelForCausalLM.from_pretrained("TheRadDani/tinystarcoder-rlhf-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheRadDani/tinystarcoder-rlhf-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheRadDani/tinystarcoder-rlhf-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheRadDani/tinystarcoder-rlhf-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheRadDani/tinystarcoder-rlhf-model
- SGLang
How to use TheRadDani/tinystarcoder-rlhf-model 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 "TheRadDani/tinystarcoder-rlhf-model" \ --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": "TheRadDani/tinystarcoder-rlhf-model", "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 "TheRadDani/tinystarcoder-rlhf-model" \ --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": "TheRadDani/tinystarcoder-rlhf-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheRadDani/tinystarcoder-rlhf-model with Docker Model Runner:
docker model run hf.co/TheRadDani/tinystarcoder-rlhf-model
RLHF model of StarCoder
Browse files- model.safetensors +1 -1
- special_tokens_map.json +7 -1
- tokenizer.json +7 -2
- tokenizer_config.json +3 -0
- training_args.bin +1 -1
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 656601304
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7238b285b314e21148702302531cde42d2b900153ce19a27e7a7aeac87e5fe6b
|
| 3 |
size 656601304
|
special_tokens_map.json
CHANGED
|
@@ -34,7 +34,13 @@
|
|
| 34 |
"rstrip": false,
|
| 35 |
"single_word": false
|
| 36 |
},
|
| 37 |
-
"pad_token":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
"unk_token": {
|
| 39 |
"content": "<|endoftext|>",
|
| 40 |
"lstrip": false,
|
|
|
|
| 34 |
"rstrip": false,
|
| 35 |
"single_word": false
|
| 36 |
},
|
| 37 |
+
"pad_token": {
|
| 38 |
+
"content": "<|endoftext|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
"unk_token": {
|
| 45 |
"content": "<|endoftext|>",
|
| 46 |
"lstrip": false,
|
tokenizer.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": {
|
| 5 |
"strategy": {
|
| 6 |
-
"Fixed":
|
| 7 |
},
|
| 8 |
"direction": "Left",
|
| 9 |
"pad_to_multiple_of": null,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 256,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
+
"Fixed": 256
|
| 12 |
},
|
| 13 |
"direction": "Left",
|
| 14 |
"pad_to_multiple_of": null,
|
tokenizer_config.json
CHANGED
|
@@ -178,8 +178,11 @@
|
|
| 178 |
"bos_token": "<|endoftext|>",
|
| 179 |
"clean_up_tokenization_spaces": true,
|
| 180 |
"eos_token": "<|endoftext|>",
|
|
|
|
| 181 |
"model_max_length": 1000000000000000019884624838656,
|
|
|
|
| 182 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 183 |
"padding_side": "left",
|
| 184 |
"tokenizer_class": "GPT2Tokenizer",
|
| 185 |
"unk_token": "<|endoftext|>",
|
|
|
|
| 178 |
"bos_token": "<|endoftext|>",
|
| 179 |
"clean_up_tokenization_spaces": true,
|
| 180 |
"eos_token": "<|endoftext|>",
|
| 181 |
+
"max_length": 32,
|
| 182 |
"model_max_length": 1000000000000000019884624838656,
|
| 183 |
+
"pad_to_multiple_of": null,
|
| 184 |
"pad_token": "<|endoftext|>",
|
| 185 |
+
"pad_token_type_id": 0,
|
| 186 |
"padding_side": "left",
|
| 187 |
"tokenizer_class": "GPT2Tokenizer",
|
| 188 |
"unk_token": "<|endoftext|>",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4856
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:46ab18728d598e8df336a50de9eae8756e806779df4977d5db38d49239627d96
|
| 3 |
size 4856
|