Instructions to use AdnanRiaz107/GPT2-APPS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdnanRiaz107/GPT2-APPS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AdnanRiaz107/GPT2-APPS", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AdnanRiaz107/GPT2-APPS") model = AutoModelForCausalLM.from_pretrained("AdnanRiaz107/GPT2-APPS", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AdnanRiaz107/GPT2-APPS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdnanRiaz107/GPT2-APPS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdnanRiaz107/GPT2-APPS", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AdnanRiaz107/GPT2-APPS
- SGLang
How to use AdnanRiaz107/GPT2-APPS 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 "AdnanRiaz107/GPT2-APPS" \ --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": "AdnanRiaz107/GPT2-APPS", "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 "AdnanRiaz107/GPT2-APPS" \ --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": "AdnanRiaz107/GPT2-APPS", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AdnanRiaz107/GPT2-APPS with Docker Model Runner:
docker model run hf.co/AdnanRiaz107/GPT2-APPS
GPT2-APPS
This model is a fine-tuned version of openai-community/gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.9545
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: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- training_steps: 5000
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.4339 | 0.04 | 200 | 1.2470 |
| 1.0147 | 0.08 | 400 | 1.1798 |
| 1.0875 | 0.12 | 600 | 1.1233 |
| 1.1918 | 0.16 | 800 | 1.0979 |
| 0.9112 | 0.2 | 1000 | 1.0793 |
| 0.9272 | 0.24 | 1200 | 1.0558 |
| 0.9595 | 0.28 | 1400 | 1.0268 |
| 0.9456 | 0.32 | 1600 | 1.0209 |
| 0.8592 | 0.36 | 1800 | 1.0090 |
| 0.8609 | 0.4 | 2000 | 1.0105 |
| 0.9569 | 0.44 | 2200 | 0.9996 |
| 0.9371 | 0.48 | 2400 | 0.9909 |
| 0.938 | 0.52 | 2600 | 0.9757 |
| 0.7827 | 0.56 | 2800 | 0.9976 |
| 0.8866 | 0.6 | 3000 | 0.9727 |
| 1.0179 | 0.64 | 3200 | 0.9729 |
| 0.7923 | 0.68 | 3400 | 0.9698 |
| 0.8139 | 0.72 | 3600 | 0.9635 |
| 0.8627 | 0.76 | 3800 | 0.9573 |
| 0.866 | 0.8 | 4000 | 0.9618 |
| 0.7777 | 0.84 | 4200 | 0.9557 |
| 0.8119 | 0.88 | 4400 | 0.9571 |
| 0.8964 | 0.92 | 4600 | 0.9548 |
| 0.9 | 0.96 | 4800 | 0.9546 |
| 0.8928 | 1.0 | 5000 | 0.9545 |
Framework versions
- Transformers 4.38.2
- Pytorch 2.2.1+cu121
- Datasets 2.18.0
- Tokenizers 0.15.2
- Downloads last month
- 9
Model tree for AdnanRiaz107/GPT2-APPS
Base model
openai-community/gpt2