Instructions to use NasimB/gpt2-dp-mod-aochild-10chars with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/gpt2-dp-mod-aochild-10chars with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/gpt2-dp-mod-aochild-10chars")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/gpt2-dp-mod-aochild-10chars") model = AutoModelForCausalLM.from_pretrained("NasimB/gpt2-dp-mod-aochild-10chars") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NasimB/gpt2-dp-mod-aochild-10chars with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/gpt2-dp-mod-aochild-10chars" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NasimB/gpt2-dp-mod-aochild-10chars", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/gpt2-dp-mod-aochild-10chars
- SGLang
How to use NasimB/gpt2-dp-mod-aochild-10chars 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 "NasimB/gpt2-dp-mod-aochild-10chars" \ --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": "NasimB/gpt2-dp-mod-aochild-10chars", "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 "NasimB/gpt2-dp-mod-aochild-10chars" \ --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": "NasimB/gpt2-dp-mod-aochild-10chars", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/gpt2-dp-mod-aochild-10chars with Docker Model Runner:
docker model run hf.co/NasimB/gpt2-dp-mod-aochild-10chars
gpt2-dp-mod-aochild-10chars
This model is a fine-tuned version of gpt2 on the generator dataset. It achieves the following results on the evaluation set:
- Loss: 4.4173
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.0005
- 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: cosine
- lr_scheduler_warmup_steps: 1000
- num_epochs: 10
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 6.7077 | 0.27 | 500 | 5.6423 |
| 5.3468 | 0.54 | 1000 | 5.2154 |
| 5.0042 | 0.8 | 1500 | 4.9608 |
| 4.7637 | 1.07 | 2000 | 4.7969 |
| 4.5583 | 1.34 | 2500 | 4.6931 |
| 4.4721 | 1.61 | 3000 | 4.5939 |
| 4.3855 | 1.88 | 3500 | 4.5049 |
| 4.218 | 2.15 | 4000 | 4.4679 |
| 4.1202 | 2.41 | 4500 | 4.4175 |
| 4.105 | 2.68 | 5000 | 4.3697 |
| 4.0733 | 2.95 | 5500 | 4.3257 |
| 3.8601 | 3.22 | 6000 | 4.3344 |
| 3.8504 | 3.49 | 6500 | 4.3033 |
| 3.8507 | 3.76 | 7000 | 4.2759 |
| 3.8215 | 4.02 | 7500 | 4.2709 |
| 3.5828 | 4.29 | 8000 | 4.2887 |
| 3.6183 | 4.56 | 8500 | 4.2711 |
| 3.6264 | 4.83 | 9000 | 4.2489 |
| 3.5136 | 5.1 | 9500 | 4.2794 |
| 3.3547 | 5.36 | 10000 | 4.2895 |
| 3.383 | 5.63 | 10500 | 4.2727 |
| 3.3982 | 5.9 | 11000 | 4.2594 |
| 3.2002 | 6.17 | 11500 | 4.3133 |
| 3.1199 | 6.44 | 12000 | 4.3184 |
| 3.1483 | 6.71 | 12500 | 4.3123 |
| 3.1516 | 6.97 | 13000 | 4.3013 |
| 2.9083 | 7.24 | 13500 | 4.3587 |
| 2.9076 | 7.51 | 14000 | 4.3641 |
| 2.9176 | 7.78 | 14500 | 4.3616 |
| 2.8855 | 8.05 | 15000 | 4.3806 |
| 2.7292 | 8.32 | 15500 | 4.3978 |
| 2.7443 | 8.58 | 16000 | 4.4023 |
| 2.7445 | 8.85 | 16500 | 4.4046 |
| 2.702 | 9.12 | 17000 | 4.4125 |
| 2.6515 | 9.39 | 17500 | 4.4159 |
| 2.6552 | 9.66 | 18000 | 4.4170 |
| 2.6529 | 9.92 | 18500 | 4.4173 |
Framework versions
- Transformers 4.26.1
- Pytorch 1.11.0+cu113
- Datasets 2.13.0
- Tokenizers 0.13.3
- Downloads last month
- 8