Instructions to use thisismyusername123/gpt_tos with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thisismyusername123/gpt_tos with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thisismyusername123/gpt_tos")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thisismyusername123/gpt_tos") model = AutoModelForCausalLM.from_pretrained("thisismyusername123/gpt_tos", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thisismyusername123/gpt_tos with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thisismyusername123/gpt_tos" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thisismyusername123/gpt_tos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/thisismyusername123/gpt_tos
- SGLang
How to use thisismyusername123/gpt_tos 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 "thisismyusername123/gpt_tos" \ --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": "thisismyusername123/gpt_tos", "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 "thisismyusername123/gpt_tos" \ --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": "thisismyusername123/gpt_tos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use thisismyusername123/gpt_tos with Docker Model Runner:
docker model run hf.co/thisismyusername123/gpt_tos
gpt_tos
This model is a fine-tuned version of gpt2 on the None dataset. It achieves the following results on the evaluation set:
- Loss: 5.6644
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-06
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 20
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 8.4766 | 0.62 | 1000 | 7.0356 |
| 6.6906 | 1.24 | 2000 | 6.4523 |
| 6.3735 | 1.86 | 3000 | 6.2716 |
| 6.2028 | 2.48 | 4000 | 6.1586 |
| 6.1092 | 3.09 | 5000 | 6.0782 |
| 6.0136 | 3.71 | 6000 | 6.0102 |
| 5.9325 | 4.33 | 7000 | 5.9612 |
| 5.8906 | 4.95 | 8000 | 5.9175 |
| 5.8132 | 5.57 | 9000 | 5.8860 |
| 5.7793 | 6.19 | 10000 | 5.8571 |
| 5.7357 | 6.81 | 11000 | 5.8311 |
| 5.6976 | 7.43 | 12000 | 5.8051 |
| 5.6553 | 8.04 | 13000 | 5.7859 |
| 5.6192 | 8.66 | 14000 | 5.7713 |
| 5.591 | 9.28 | 15000 | 5.7608 |
| 5.5728 | 9.9 | 16000 | 5.7453 |
| 5.5361 | 10.52 | 17000 | 5.7339 |
| 5.5166 | 11.14 | 18000 | 5.7259 |
| 5.5008 | 11.76 | 19000 | 5.7151 |
| 5.47 | 12.38 | 20000 | 5.7067 |
| 5.4621 | 13.0 | 21000 | 5.7004 |
| 5.4327 | 13.61 | 22000 | 5.6935 |
| 5.4219 | 14.23 | 23000 | 5.6876 |
| 5.4101 | 14.85 | 24000 | 5.6832 |
| 5.3975 | 15.47 | 25000 | 5.6778 |
| 5.3848 | 16.09 | 26000 | 5.6751 |
| 5.3707 | 16.71 | 27000 | 5.6726 |
| 5.3582 | 17.33 | 28000 | 5.6695 |
| 5.3569 | 17.95 | 29000 | 5.6667 |
| 5.3451 | 18.56 | 30000 | 5.6663 |
| 5.3487 | 19.18 | 31000 | 5.6652 |
| 5.3335 | 19.8 | 32000 | 5.6644 |
Framework versions
- Transformers 4.29.2
- Pytorch 2.0.1+cu118
- Datasets 2.12.0
- Tokenizers 0.13.3
- Downloads last month
- 16