Instructions to use danielkosyra/pretraining1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use danielkosyra/pretraining1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="danielkosyra/pretraining1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("danielkosyra/pretraining1") model = AutoModelForCausalLM.from_pretrained("danielkosyra/pretraining1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use danielkosyra/pretraining1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "danielkosyra/pretraining1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "danielkosyra/pretraining1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/danielkosyra/pretraining1
- SGLang
How to use danielkosyra/pretraining1 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/pretraining1" \ --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/pretraining1", "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/pretraining1" \ --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/pretraining1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use danielkosyra/pretraining1 with Docker Model Runner:
docker model run hf.co/danielkosyra/pretraining1
pretraining1
This model is a fine-tuned version of gpt2 on the None dataset. It achieves the following results on the evaluation set:
- Loss: 2.9544
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: 1750
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 9.1539 | 0.2175 | 50 | 7.4415 |
| 6.7732 | 0.4350 | 100 | 6.2695 |
| 5.9925 | 0.6525 | 150 | 5.6597 |
| 5.5089 | 0.8699 | 200 | 5.3122 |
| 5.1352 | 1.0874 | 250 | 4.9753 |
| 4.8081 | 1.3049 | 300 | 4.6730 |
| 4.5188 | 1.5224 | 350 | 4.3827 |
| 4.2789 | 1.7399 | 400 | 4.0967 |
| 4.0202 | 1.9574 | 450 | 3.8260 |
| 3.7049 | 2.1749 | 500 | 3.6475 |
| 3.5838 | 2.3923 | 550 | 3.5435 |
| 3.4797 | 2.6098 | 600 | 3.4532 |
| 3.3985 | 2.8273 | 650 | 3.3774 |
| 3.3155 | 3.0448 | 700 | 3.3162 |
| 3.1677 | 3.2623 | 750 | 3.2712 |
| 3.1373 | 3.4798 | 800 | 3.2299 |
| 3.1123 | 3.6973 | 850 | 3.1968 |
| 3.0845 | 3.9147 | 900 | 3.1670 |
| 2.9699 | 4.1322 | 950 | 3.1366 |
| 2.9081 | 4.3497 | 1000 | 3.1155 |
| 2.8884 | 4.5672 | 1050 | 3.0914 |
| 2.895 | 4.7847 | 1100 | 3.0723 |
| 2.8741 | 5.0022 | 1150 | 3.0502 |
| 2.7174 | 5.2197 | 1200 | 3.0404 |
| 2.7323 | 5.4371 | 1250 | 3.0270 |
| 2.7269 | 5.6546 | 1300 | 3.0144 |
| 2.7096 | 5.8721 | 1350 | 3.0003 |
| 2.6517 | 6.0896 | 1400 | 2.9921 |
| 2.5758 | 6.3071 | 1450 | 2.9867 |
| 2.5855 | 6.5246 | 1500 | 2.9795 |
| 2.577 | 6.7421 | 1550 | 2.9690 |
| 2.5656 | 6.9595 | 1600 | 2.9590 |
| 2.4813 | 7.1770 | 1650 | 2.9604 |
| 2.4747 | 7.3945 | 1700 | 2.9563 |
| 2.4696 | 7.6120 | 1750 | 2.9544 |
Framework versions
- Transformers 4.40.1
- Pytorch 2.3.0+cu121
- Datasets 2.19.0
- Tokenizers 0.19.1
- Downloads last month
- 5
Model tree for danielkosyra/pretraining1
Base model
openai-community/gpt2