Instructions to use danielkosyra/pretraining5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use danielkosyra/pretraining5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="danielkosyra/pretraining5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("danielkosyra/pretraining5") model = AutoModelForCausalLM.from_pretrained("danielkosyra/pretraining5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use danielkosyra/pretraining5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "danielkosyra/pretraining5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "danielkosyra/pretraining5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/danielkosyra/pretraining5
- SGLang
How to use danielkosyra/pretraining5 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 "danielkosyra/pretraining5" \ --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": "danielkosyra/pretraining5", "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 "danielkosyra/pretraining5" \ --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": "danielkosyra/pretraining5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use danielkosyra/pretraining5 with Docker Model Runner:
docker model run hf.co/danielkosyra/pretraining5
pretraining5
This model is a fine-tuned version of gpt2 on the None dataset. It achieves the following results on the evaluation set:
- Loss: 2.8364
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.0006
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 10
- total_train_batch_size: 320
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: polynomial
- lr_scheduler_warmup_steps: 250
- training_steps: 2500
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 9.1525 | 0.1830 | 50 | 7.3936 |
| 6.7279 | 0.3660 | 100 | 6.2230 |
| 5.9675 | 0.5490 | 150 | 5.6680 |
| 5.4986 | 0.7321 | 200 | 5.2719 |
| 5.135 | 0.9151 | 250 | 4.9299 |
| 4.7982 | 1.0981 | 300 | 4.6292 |
| 4.4937 | 1.2811 | 350 | 4.3658 |
| 4.2185 | 1.4641 | 400 | 4.0518 |
| 3.9681 | 1.6471 | 450 | 3.7770 |
| 3.76 | 1.8302 | 500 | 3.6076 |
| 3.5945 | 2.0132 | 550 | 3.4863 |
| 3.389 | 2.1962 | 600 | 3.4087 |
| 3.3484 | 2.3792 | 650 | 3.3396 |
| 3.2843 | 2.5622 | 700 | 3.2784 |
| 3.2286 | 2.7452 | 750 | 3.2334 |
| 3.1736 | 2.9283 | 800 | 3.1845 |
| 3.0711 | 3.1113 | 850 | 3.1490 |
| 2.9997 | 3.2943 | 900 | 3.1204 |
| 2.9726 | 3.4773 | 950 | 3.0938 |
| 2.9603 | 3.6603 | 1000 | 3.0655 |
| 2.9585 | 3.8433 | 1050 | 3.0443 |
| 2.916 | 4.0264 | 1100 | 3.0194 |
| 2.7717 | 4.2094 | 1150 | 3.0058 |
| 2.7737 | 4.3924 | 1200 | 2.9916 |
| 2.7665 | 4.5754 | 1250 | 2.9743 |
| 2.7632 | 4.7584 | 1300 | 2.9588 |
| 2.7579 | 4.9414 | 1350 | 2.9429 |
| 2.642 | 5.1245 | 1400 | 2.9346 |
| 2.6045 | 5.3075 | 1450 | 2.9260 |
| 2.6107 | 5.4905 | 1500 | 2.9138 |
| 2.6073 | 5.6735 | 1550 | 2.9052 |
| 2.6015 | 5.8565 | 1600 | 2.8938 |
| 2.5693 | 6.0395 | 1650 | 2.8881 |
| 2.4441 | 6.2225 | 1700 | 2.8888 |
| 2.4742 | 6.4056 | 1750 | 2.8801 |
| 2.4652 | 6.5886 | 1800 | 2.8728 |
| 2.47 | 6.7716 | 1850 | 2.8639 |
| 2.4721 | 6.9546 | 1900 | 2.8525 |
| 2.3633 | 7.1376 | 1950 | 2.8629 |
| 2.3339 | 7.3206 | 2000 | 2.8579 |
| 2.3426 | 7.5037 | 2050 | 2.8542 |
| 2.3494 | 7.6867 | 2100 | 2.8483 |
| 2.3555 | 7.8697 | 2150 | 2.8431 |
| 2.3068 | 8.0527 | 2200 | 2.8460 |
| 2.2349 | 8.2357 | 2250 | 2.8463 |
| 2.2399 | 8.4187 | 2300 | 2.8441 |
| 2.243 | 8.6018 | 2350 | 2.8406 |
| 2.24 | 8.7848 | 2400 | 2.8379 |
| 2.236 | 8.9678 | 2450 | 2.8344 |
| 2.1823 | 9.1508 | 2500 | 2.8364 |
Framework versions
- Transformers 4.40.1
- Pytorch 2.3.0+cu121
- Datasets 2.19.0
- Tokenizers 0.19.1
- Downloads last month
- 8
Model tree for danielkosyra/pretraining5
Base model
openai-community/gpt2