Instructions to use NasimB/gpt2-concat-simple-wiki-mod with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/gpt2-concat-simple-wiki-mod with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/gpt2-concat-simple-wiki-mod")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/gpt2-concat-simple-wiki-mod") model = AutoModelForCausalLM.from_pretrained("NasimB/gpt2-concat-simple-wiki-mod") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NasimB/gpt2-concat-simple-wiki-mod with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/gpt2-concat-simple-wiki-mod" # 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-concat-simple-wiki-mod", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/gpt2-concat-simple-wiki-mod
- SGLang
How to use NasimB/gpt2-concat-simple-wiki-mod 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-concat-simple-wiki-mod" \ --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-concat-simple-wiki-mod", "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-concat-simple-wiki-mod" \ --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-concat-simple-wiki-mod", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/gpt2-concat-simple-wiki-mod with Docker Model Runner:
docker model run hf.co/NasimB/gpt2-concat-simple-wiki-mod
gpt2-concat-simple-wiki-mod
This model is a fine-tuned version of gpt2 on the generator dataset. It achieves the following results on the evaluation set:
- Loss: 4.3273
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: 6
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 6.6721 | 0.29 | 500 | 5.6311 |
| 5.3162 | 0.59 | 1000 | 5.2012 |
| 4.9814 | 0.88 | 1500 | 4.9493 |
| 4.708 | 1.17 | 2000 | 4.8102 |
| 4.5523 | 1.47 | 2500 | 4.6918 |
| 4.4524 | 1.76 | 3000 | 4.5941 |
| 4.3303 | 2.06 | 3500 | 4.5209 |
| 4.1432 | 2.35 | 4000 | 4.4726 |
| 4.1182 | 2.64 | 4500 | 4.4154 |
| 4.0753 | 2.94 | 5000 | 4.3598 |
| 3.8614 | 3.23 | 5500 | 4.3514 |
| 3.8147 | 3.52 | 6000 | 4.3176 |
| 3.7996 | 3.82 | 6500 | 4.2839 |
| 3.6896 | 4.11 | 7000 | 4.2834 |
| 3.5307 | 4.4 | 7500 | 4.2783 |
| 3.5227 | 4.7 | 8000 | 4.2595 |
| 3.5108 | 4.99 | 8500 | 4.2484 |
| 3.3413 | 5.28 | 9000 | 4.2624 |
| 3.3338 | 5.58 | 9500 | 4.2605 |
| 3.3305 | 5.87 | 10000 | 4.2597 |
Framework versions
- Transformers 4.26.1
- Pytorch 1.11.0+cu113
- Datasets 2.13.0
- Tokenizers 0.13.3
- Downloads last month
- 9