Instructions to use danielkosyra/pretraining3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use danielkosyra/pretraining3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="danielkosyra/pretraining3")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("danielkosyra/pretraining3") model = AutoModelForCausalLM.from_pretrained("danielkosyra/pretraining3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use danielkosyra/pretraining3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "danielkosyra/pretraining3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "danielkosyra/pretraining3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/danielkosyra/pretraining3
- SGLang
How to use danielkosyra/pretraining3 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/pretraining3" \ --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/pretraining3", "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/pretraining3" \ --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/pretraining3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use danielkosyra/pretraining3 with Docker Model Runner:
docker model run hf.co/danielkosyra/pretraining3
pretraining3
This model is a fine-tuned version of gpt2 on the None dataset. It achieves the following results on the evaluation set:
- Loss: 2.9865
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: linear
- lr_scheduler_warmup_steps: 250
- training_steps: 3000
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 9.168 | 0.2175 | 50 | 7.4173 |
| 6.7594 | 0.4350 | 100 | 6.2458 |
| 5.9848 | 0.6525 | 150 | 5.6592 |
| 5.4982 | 0.8699 | 200 | 5.2814 |
| 5.1251 | 1.0874 | 250 | 4.9460 |
| 4.7985 | 1.3049 | 300 | 4.6544 |
| 4.5082 | 1.5224 | 350 | 4.3691 |
| 4.2566 | 1.7399 | 400 | 4.0597 |
| 3.978 | 1.9574 | 450 | 3.7901 |
| 3.6714 | 2.1749 | 500 | 3.6193 |
| 3.5559 | 2.3923 | 550 | 3.5206 |
| 3.4556 | 2.6098 | 600 | 3.4364 |
| 3.3823 | 2.8273 | 650 | 3.3666 |
| 3.3039 | 3.0448 | 700 | 3.3081 |
| 3.1543 | 3.2623 | 750 | 3.2688 |
| 3.1284 | 3.4798 | 800 | 3.2285 |
| 3.1043 | 3.6973 | 850 | 3.1966 |
| 3.08 | 3.9147 | 900 | 3.1650 |
| 2.9603 | 4.1322 | 950 | 3.1335 |
| 2.899 | 4.3497 | 1000 | 3.1149 |
| 2.8859 | 4.5672 | 1050 | 3.0973 |
| 2.8965 | 4.7847 | 1100 | 3.0744 |
| 2.8791 | 5.0022 | 1150 | 3.0532 |
| 2.6988 | 5.2197 | 1200 | 3.0467 |
| 2.7265 | 5.4371 | 1250 | 3.0363 |
| 2.7309 | 5.6546 | 1300 | 3.0204 |
| 2.7204 | 5.8721 | 1350 | 3.0056 |
| 2.6464 | 6.0896 | 1400 | 2.9984 |
| 2.5546 | 6.3071 | 1450 | 2.9990 |
| 2.5821 | 6.5246 | 1500 | 2.9904 |
| 2.5863 | 6.7421 | 1550 | 2.9760 |
| 2.5826 | 6.9595 | 1600 | 2.9659 |
| 2.4345 | 7.1770 | 1650 | 2.9772 |
| 2.4369 | 7.3945 | 1700 | 2.9710 |
| 2.4532 | 7.6120 | 1750 | 2.9673 |
| 2.4548 | 7.8295 | 1800 | 2.9579 |
| 2.4267 | 8.0470 | 1850 | 2.9583 |
| 2.2871 | 8.2645 | 1900 | 2.9657 |
| 2.3238 | 8.4819 | 1950 | 2.9655 |
| 2.3451 | 8.6994 | 2000 | 2.9548 |
| 2.3386 | 8.9169 | 2050 | 2.9490 |
| 2.2398 | 9.1344 | 2100 | 2.9632 |
| 2.2051 | 9.3519 | 2150 | 2.9658 |
| 2.2152 | 9.5694 | 2200 | 2.9628 |
| 2.2289 | 9.7869 | 2250 | 2.9580 |
| 2.2216 | 10.0043 | 2300 | 2.9582 |
| 2.0758 | 10.2218 | 2350 | 2.9733 |
| 2.1119 | 10.4393 | 2400 | 2.9730 |
| 2.1261 | 10.6568 | 2450 | 2.9692 |
| 2.1264 | 10.8743 | 2500 | 2.9633 |
| 2.072 | 11.0918 | 2550 | 2.9785 |
| 2.0224 | 11.3093 | 2600 | 2.9818 |
| 2.0231 | 11.5268 | 2650 | 2.9798 |
| 2.0246 | 11.7442 | 2700 | 2.9798 |
| 2.0272 | 11.9617 | 2750 | 2.9756 |
| 1.9462 | 12.1792 | 2800 | 2.9859 |
| 1.9553 | 12.3967 | 2850 | 2.9870 |
| 1.9429 | 12.6142 | 2900 | 2.9872 |
| 1.946 | 12.8317 | 2950 | 2.9872 |
| 1.9344 | 13.0492 | 3000 | 2.9865 |
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/pretraining3
Base model
openai-community/gpt2