Instructions to use Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer") model = AutoModelForCausalLM.from_pretrained("Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer
- SGLang
How to use Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer 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 "Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer" \ --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": "Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer", "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 "Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer" \ --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": "Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer with Docker Model Runner:
docker model run hf.co/Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer
Ashraf-kasem/custom_gpt2_frames_text_original_tokenizer
This model is a fine-tuned version of gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Train Loss: 1.1074
- Validation Loss: 1.6432
- Epoch: 29
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:
- optimizer: {'name': 'Adam', 'learning_rate': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 240780, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
- training_precision: mixed_float16
Training results
| Train Loss | Validation Loss | Epoch |
|---|---|---|
| 4.3075 | 3.4095 | 0 |
| 3.1973 | 2.8234 | 1 |
| 2.7420 | 2.5057 | 2 |
| 2.4541 | 2.3022 | 3 |
| 2.2507 | 2.1648 | 4 |
| 2.0962 | 2.0612 | 5 |
| 1.9736 | 1.9885 | 6 |
| 1.8729 | 1.9286 | 7 |
| 1.7883 | 1.8823 | 8 |
| 1.7153 | 1.8448 | 9 |
| 1.6517 | 1.8113 | 10 |
| 1.5953 | 1.7864 | 11 |
| 1.5446 | 1.7624 | 12 |
| 1.4994 | 1.7459 | 13 |
| 1.4578 | 1.7294 | 14 |
| 1.4200 | 1.7171 | 15 |
| 1.3851 | 1.7026 | 16 |
| 1.3528 | 1.6958 | 17 |
| 1.3229 | 1.6846 | 18 |
| 1.2950 | 1.6760 | 19 |
| 1.2690 | 1.6704 | 20 |
| 1.2448 | 1.6650 | 21 |
| 1.2223 | 1.6599 | 22 |
| 1.2012 | 1.6539 | 23 |
| 1.1815 | 1.6534 | 24 |
| 1.1635 | 1.6486 | 25 |
| 1.1470 | 1.6457 | 26 |
| 1.1318 | 1.6443 | 27 |
| 1.1185 | 1.6434 | 28 |
| 1.1074 | 1.6432 | 29 |
Framework versions
- Transformers 4.25.1
- TensorFlow 2.9.0
- Datasets 2.8.0
- Tokenizers 0.13.2
- Downloads last month
- 4