Instructions to use augustocsc/gpt2-10var with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use augustocsc/gpt2-10var with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="augustocsc/gpt2-10var")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("augustocsc/gpt2-10var") model = AutoModelForCausalLM.from_pretrained("augustocsc/gpt2-10var") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use augustocsc/gpt2-10var with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "augustocsc/gpt2-10var" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "augustocsc/gpt2-10var", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/augustocsc/gpt2-10var
- SGLang
How to use augustocsc/gpt2-10var 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 "augustocsc/gpt2-10var" \ --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": "augustocsc/gpt2-10var", "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 "augustocsc/gpt2-10var" \ --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": "augustocsc/gpt2-10var", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use augustocsc/gpt2-10var with Docker Model Runner:
docker model run hf.co/augustocsc/gpt2-10var
gpt2-10var
This model is a fine-tuned version of gpt2 on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.1102
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-05
- train_batch_size: 256
- eval_batch_size: 256
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0.04 | 200 | 0.2493 |
| No log | 0.08 | 400 | 0.3971 |
| 0.4919 | 0.12 | 600 | 0.6197 |
| 0.4919 | 0.16 | 800 | 0.5482 |
| 0.9307 | 0.2 | 1000 | 0.8619 |
| 0.9307 | 0.24 | 1200 | 0.5619 |
| 0.9307 | 0.28 | 1400 | 0.7757 |
| 1.6552 | 0.32 | 1600 | 0.5050 |
| 1.6552 | 0.36 | 1800 | 1.1518 |
| 1.1387 | 0.4 | 2000 | 1.0939 |
| 1.1387 | 0.44 | 2200 | 9.2829 |
| 1.1387 | 0.48 | 2400 | 0.2714 |
| 8.5966 | 0.52 | 2600 | 0.1263 |
| 8.5966 | 0.56 | 2800 | 0.1191 |
| 0.1233 | 0.6 | 3000 | 0.1161 |
| 0.1233 | 0.64 | 3200 | 0.1150 |
| 0.1233 | 0.67 | 3400 | 0.1145 |
| 0.1166 | 0.71 | 3600 | 0.1138 |
| 0.1166 | 0.75 | 3800 | 0.1135 |
| 0.1151 | 0.79 | 4000 | 0.1132 |
| 0.1151 | 0.83 | 4200 | 0.1130 |
| 0.1151 | 0.87 | 4400 | 0.1125 |
| 0.1131 | 0.91 | 4600 | 0.1122 |
| 0.1131 | 0.95 | 4800 | 0.1119 |
| 0.1132 | 0.99 | 5000 | 0.1116 |
| 0.1132 | 1.03 | 5200 | 0.1115 |
| 0.1132 | 1.07 | 5400 | 0.1115 |
| 0.1123 | 1.11 | 5600 | 0.1112 |
| 0.1123 | 1.15 | 5800 | 0.1111 |
| 0.1116 | 1.19 | 6000 | 0.1110 |
| 0.1116 | 1.23 | 6200 | 0.1110 |
| 0.1116 | 1.27 | 6400 | 0.1108 |
| 0.1132 | 1.31 | 6600 | 0.1107 |
| 0.1132 | 1.35 | 6800 | 0.1122 |
| 0.2039 | 1.39 | 7000 | 0.1110 |
| 0.2039 | 1.43 | 7200 | 0.1108 |
| 0.2039 | 1.47 | 7400 | 0.1106 |
| 0.1107 | 1.51 | 7600 | 0.1106 |
| 0.1107 | 1.55 | 7800 | 0.1105 |
| 0.1115 | 1.59 | 8000 | 0.1104 |
| 0.1115 | 1.63 | 8200 | 0.1104 |
| 0.1115 | 1.67 | 8400 | 0.1104 |
| 0.1106 | 1.71 | 8600 | 0.1104 |
| 0.1106 | 1.75 | 8800 | 0.1103 |
| 0.1092 | 1.79 | 9000 | 0.1103 |
| 0.1092 | 1.83 | 9200 | 0.1103 |
| 0.1092 | 1.87 | 9400 | 0.1102 |
| 0.111 | 1.91 | 9600 | 0.1102 |
| 0.111 | 1.94 | 9800 | 0.1102 |
| 0.1109 | 1.98 | 10000 | 0.1102 |
Framework versions
- Transformers 4.33.3
- Pytorch 2.0.1
- Datasets 2.14.5
- Tokenizers 0.13.3
- Downloads last month
- 9
Model tree for augustocsc/gpt2-10var
Base model
openai-community/gpt2