Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use theta/gpt2-reporter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use theta/gpt2-reporter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="theta/gpt2-reporter")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("theta/gpt2-reporter") model = AutoModelForCausalLM.from_pretrained("theta/gpt2-reporter") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use theta/gpt2-reporter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "theta/gpt2-reporter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theta/gpt2-reporter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/theta/gpt2-reporter
- SGLang
How to use theta/gpt2-reporter 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 "theta/gpt2-reporter" \ --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": "theta/gpt2-reporter", "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 "theta/gpt2-reporter" \ --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": "theta/gpt2-reporter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use theta/gpt2-reporter with Docker Model Runner:
docker model run hf.co/theta/gpt2-reporter
gpt2-reporter
This model is a fine-tuned version of theta/gpt2-reporter on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.4221
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: 16
- eval_batch_size: 16
- 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: 1
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.3859 | 0.04 | 400 | 2.4603 |
| 2.3069 | 0.08 | 800 | 2.4777 |
| 2.3114 | 0.13 | 1200 | 2.4806 |
| 2.3152 | 0.17 | 1600 | 2.4774 |
| 2.3362 | 0.21 | 2000 | 2.4760 |
| 2.3354 | 0.25 | 2400 | 2.4728 |
| 2.344 | 0.3 | 2800 | 2.4685 |
| 2.366 | 0.34 | 3200 | 2.4632 |
| 2.3632 | 0.38 | 3600 | 2.4636 |
| 2.3704 | 0.42 | 4000 | 2.4602 |
| 2.3791 | 0.47 | 4400 | 2.4552 |
| 2.3773 | 0.51 | 4800 | 2.4529 |
| 2.391 | 0.55 | 5200 | 2.4475 |
| 2.4486 | 0.59 | 5600 | 2.4379 |
| 2.468 | 0.64 | 6000 | 2.4346 |
| 2.4602 | 0.68 | 6400 | 2.4323 |
| 2.4643 | 0.72 | 6800 | 2.4301 |
| 2.4634 | 0.76 | 7200 | 2.4289 |
| 2.4632 | 0.81 | 7600 | 2.4266 |
| 2.4534 | 0.85 | 8000 | 2.4250 |
| 2.4528 | 0.89 | 8400 | 2.4238 |
| 2.4618 | 0.93 | 8800 | 2.4222 |
| 2.4519 | 0.98 | 9200 | 2.4221 |
Framework versions
- Transformers 4.25.1
- Pytorch 1.13.0+cu116
- Tokenizers 0.13.2
- Downloads last month
- 5