Instructions to use NasimB/guten-2p5k-new-loop-tokenize with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/guten-2p5k-new-loop-tokenize with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/guten-2p5k-new-loop-tokenize")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/guten-2p5k-new-loop-tokenize") model = AutoModelForCausalLM.from_pretrained("NasimB/guten-2p5k-new-loop-tokenize") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NasimB/guten-2p5k-new-loop-tokenize with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/guten-2p5k-new-loop-tokenize" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NasimB/guten-2p5k-new-loop-tokenize", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/guten-2p5k-new-loop-tokenize
- SGLang
How to use NasimB/guten-2p5k-new-loop-tokenize 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/guten-2p5k-new-loop-tokenize" \ --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/guten-2p5k-new-loop-tokenize", "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/guten-2p5k-new-loop-tokenize" \ --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/guten-2p5k-new-loop-tokenize", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/guten-2p5k-new-loop-tokenize with Docker Model Runner:
docker model run hf.co/NasimB/guten-2p5k-new-loop-tokenize
guten-2p5k-new-loop-tokenize
This model is a fine-tuned version of gpt2 on the generator dataset. It achieves the following results on the evaluation set:
- Loss: 4.3833
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.721 | 0.31 | 500 | 5.7074 |
| 5.3696 | 0.63 | 1000 | 5.2582 |
| 5.0072 | 0.94 | 1500 | 5.0135 |
| 4.7225 | 1.26 | 2000 | 4.8583 |
| 4.5837 | 1.57 | 2500 | 4.7320 |
| 4.4669 | 1.89 | 3000 | 4.6175 |
| 4.2663 | 2.2 | 3500 | 4.5607 |
| 4.1693 | 2.51 | 4000 | 4.4896 |
| 4.1248 | 2.83 | 4500 | 4.4286 |
| 3.976 | 3.14 | 5000 | 4.4119 |
| 3.8481 | 3.46 | 5500 | 4.3787 |
| 3.8327 | 3.77 | 6000 | 4.3406 |
| 3.7401 | 4.09 | 6500 | 4.3356 |
| 3.5641 | 4.4 | 7000 | 4.3274 |
| 3.5468 | 4.71 | 7500 | 4.3126 |
| 3.5201 | 5.03 | 8000 | 4.3081 |
| 3.3625 | 5.34 | 8500 | 4.3132 |
| 3.3604 | 5.66 | 9000 | 4.3114 |
| 3.36 | 5.97 | 9500 | 4.3106 |
Framework versions
- Transformers 4.26.1
- Pytorch 1.11.0+cu113
- Datasets 2.13.0
- Tokenizers 0.13.3
- Downloads last month
- 7