Instructions to use TracyWu32/GPT2-coverletter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TracyWu32/GPT2-coverletter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TracyWu32/GPT2-coverletter")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TracyWu32/GPT2-coverletter") model = AutoModelForCausalLM.from_pretrained("TracyWu32/GPT2-coverletter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TracyWu32/GPT2-coverletter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TracyWu32/GPT2-coverletter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TracyWu32/GPT2-coverletter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TracyWu32/GPT2-coverletter
- SGLang
How to use TracyWu32/GPT2-coverletter 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 "TracyWu32/GPT2-coverletter" \ --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": "TracyWu32/GPT2-coverletter", "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 "TracyWu32/GPT2-coverletter" \ --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": "TracyWu32/GPT2-coverletter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TracyWu32/GPT2-coverletter with Docker Model Runner:
docker model run hf.co/TracyWu32/GPT2-coverletter
GPT2-coverletter
This model is a fine-tuned version of gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.6942
- Rouge Rouge1: 82.5119
- Rouge Rouge2: 66.6197
- Rouge Rougel: 79.3378
- Rouge Rougelsum: 81.8133
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: 0.0001
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 5
Training results
| Training Loss | Epoch | Step | Validation Loss | Rouge Rouge1 | Rouge Rouge2 | Rouge Rougel | Rouge Rougelsum |
|---|---|---|---|---|---|---|---|
| 0.9964 | 1.0 | 51 | 0.8638 | 78.3587 | 58.3546 | 73.7380 | 77.1102 |
| 0.8484 | 2.0 | 102 | 0.7630 | 80.4733 | 62.6150 | 76.7913 | 79.5269 |
| 0.7246 | 3.0 | 153 | 0.7216 | 81.6017 | 64.6995 | 78.2056 | 80.7677 |
| 0.6786 | 4.0 | 204 | 0.7021 | 82.3015 | 65.9913 | 78.9293 | 81.5079 |
| 0.6927 | 5.0 | 255 | 0.6942 | 82.5119 | 66.6197 | 79.3378 | 81.8133 |
Framework versions
- Transformers 4.50.3
- Pytorch 2.6.0
- Datasets 3.2.0
- Tokenizers 0.21.0
- Downloads last month
- 12
Model tree for TracyWu32/GPT2-coverletter
Base model
openai-community/gpt2