Text Generation
Transformers
TensorBoard
Safetensors
gpt_neox
Generated from Trainer
text-generation-inference
Instructions to use Joetib/pythia-finetuned-with-context-5-steps with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Joetib/pythia-finetuned-with-context-5-steps with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Joetib/pythia-finetuned-with-context-5-steps")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Joetib/pythia-finetuned-with-context-5-steps") model = AutoModelForCausalLM.from_pretrained("Joetib/pythia-finetuned-with-context-5-steps", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Joetib/pythia-finetuned-with-context-5-steps with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Joetib/pythia-finetuned-with-context-5-steps" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Joetib/pythia-finetuned-with-context-5-steps", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Joetib/pythia-finetuned-with-context-5-steps
- SGLang
How to use Joetib/pythia-finetuned-with-context-5-steps 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 "Joetib/pythia-finetuned-with-context-5-steps" \ --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": "Joetib/pythia-finetuned-with-context-5-steps", "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 "Joetib/pythia-finetuned-with-context-5-steps" \ --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": "Joetib/pythia-finetuned-with-context-5-steps", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Joetib/pythia-finetuned-with-context-5-steps with Docker Model Runner:
docker model run hf.co/Joetib/pythia-finetuned-with-context-5-steps
Upload tokenizer
Browse files- special_tokens_map.json +21 -3
- tokenizer_config.json +4 -0
special_tokens_map.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
| 1 |
{
|
| 2 |
-
"bos_token":
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"pad_token": "<|endoftext|>",
|
| 5 |
-
"unk_token":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|endoftext|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|endoftext|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
"pad_token": "<|endoftext|>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<|endoftext|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
}
|
tokenizer_config.json
CHANGED
|
@@ -205,8 +205,12 @@
|
|
| 205 |
"bos_token": "<|endoftext|>",
|
| 206 |
"clean_up_tokenization_spaces": true,
|
| 207 |
"eos_token": "<|endoftext|>",
|
|
|
|
| 208 |
"model_max_length": 1000000000000000019884624838656,
|
| 209 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 210 |
"tokenizer_class": "GPTNeoXTokenizer",
|
|
|
|
|
|
|
| 211 |
"unk_token": "<|endoftext|>"
|
| 212 |
}
|
|
|
|
| 205 |
"bos_token": "<|endoftext|>",
|
| 206 |
"clean_up_tokenization_spaces": true,
|
| 207 |
"eos_token": "<|endoftext|>",
|
| 208 |
+
"max_length": 512,
|
| 209 |
"model_max_length": 1000000000000000019884624838656,
|
| 210 |
"pad_token": "<|endoftext|>",
|
| 211 |
+
"stride": 0,
|
| 212 |
"tokenizer_class": "GPTNeoXTokenizer",
|
| 213 |
+
"truncation_side": "right",
|
| 214 |
+
"truncation_strategy": "longest_first",
|
| 215 |
"unk_token": "<|endoftext|>"
|
| 216 |
}
|