Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use Smaraa/gpt2-text-simplification_1e4_adafactor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Smaraa/gpt2-text-simplification_1e4_adafactor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Smaraa/gpt2-text-simplification_1e4_adafactor")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Smaraa/gpt2-text-simplification_1e4_adafactor") model = AutoModelForCausalLM.from_pretrained("Smaraa/gpt2-text-simplification_1e4_adafactor") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Smaraa/gpt2-text-simplification_1e4_adafactor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Smaraa/gpt2-text-simplification_1e4_adafactor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Smaraa/gpt2-text-simplification_1e4_adafactor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Smaraa/gpt2-text-simplification_1e4_adafactor
- SGLang
How to use Smaraa/gpt2-text-simplification_1e4_adafactor 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 "Smaraa/gpt2-text-simplification_1e4_adafactor" \ --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": "Smaraa/gpt2-text-simplification_1e4_adafactor", "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 "Smaraa/gpt2-text-simplification_1e4_adafactor" \ --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": "Smaraa/gpt2-text-simplification_1e4_adafactor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Smaraa/gpt2-text-simplification_1e4_adafactor with Docker Model Runner:
docker model run hf.co/Smaraa/gpt2-text-simplification_1e4_adafactor
gpt2-text-simplification_1e4_adafactor
This model is a fine-tuned version of gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.8713
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: 64
- eval_batch_size: 64
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 20
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.8976 | 1.0 | 2326 | 0.8092 |
| 0.8236 | 2.0 | 4652 | 0.7974 |
| 0.7807 | 3.0 | 6978 | 0.7940 |
| 0.7428 | 4.0 | 9304 | 0.7916 |
| 0.7094 | 5.0 | 11630 | 0.7955 |
| 0.6828 | 6.0 | 13956 | 0.7996 |
| 0.6569 | 7.0 | 16282 | 0.8046 |
| 0.6365 | 8.0 | 18608 | 0.8103 |
| 0.616 | 9.0 | 20934 | 0.8175 |
| 0.6001 | 10.0 | 23260 | 0.8212 |
| 0.5819 | 11.0 | 25586 | 0.8291 |
| 0.5688 | 12.0 | 27912 | 0.8368 |
| 0.5562 | 13.0 | 30238 | 0.8378 |
| 0.5437 | 14.0 | 32564 | 0.8462 |
| 0.5299 | 15.0 | 34890 | 0.8497 |
| 0.5242 | 16.0 | 37216 | 0.8568 |
| 0.5158 | 17.0 | 39542 | 0.8643 |
| 0.5088 | 18.0 | 41868 | 0.8676 |
| 0.5027 | 19.0 | 44194 | 0.8703 |
| 0.4989 | 20.0 | 46520 | 0.8713 |
Framework versions
- Transformers 4.30.2
- Pytorch 2.0.1+cu118
- Datasets 2.13.1
- Tokenizers 0.13.3
- Downloads last month
- 2