Instructions to use NasimB/guten-rarity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/guten-rarity with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/guten-rarity")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/guten-rarity") model = AutoModelForCausalLM.from_pretrained("NasimB/guten-rarity", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NasimB/guten-rarity with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/guten-rarity" # 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-rarity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/guten-rarity
- SGLang
How to use NasimB/guten-rarity 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-rarity" \ --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-rarity", "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-rarity" \ --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-rarity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/guten-rarity with Docker Model Runner:
docker model run hf.co/NasimB/guten-rarity
guten-rarity
This model is a fine-tuned version of gpt2 on the generator dataset. It achieves the following results on the evaluation set:
- Loss: 4.1076
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.3463 | 0.29 | 500 | 5.3398 |
| 5.0313 | 0.58 | 1000 | 4.9287 |
| 4.7042 | 0.87 | 1500 | 4.6884 |
| 4.4385 | 1.16 | 2000 | 4.5427 |
| 4.294 | 1.46 | 2500 | 4.4285 |
| 4.1966 | 1.75 | 3000 | 4.3204 |
| 4.0779 | 2.04 | 3500 | 4.2444 |
| 3.8836 | 2.33 | 4000 | 4.2115 |
| 3.8596 | 2.62 | 4500 | 4.1536 |
| 3.8337 | 2.91 | 5000 | 4.1065 |
| 3.6462 | 3.2 | 5500 | 4.1009 |
| 3.5855 | 3.49 | 6000 | 4.0714 |
| 3.5628 | 3.79 | 6500 | 4.0399 |
| 3.4858 | 4.08 | 7000 | 4.0352 |
| 3.3143 | 4.37 | 7500 | 4.0331 |
| 3.3117 | 4.66 | 8000 | 4.0203 |
| 3.2978 | 4.95 | 8500 | 4.0062 |
| 3.1643 | 5.24 | 9000 | 4.0186 |
| 3.135 | 5.53 | 9500 | 4.0163 |
| 3.1265 | 5.82 | 10000 | 4.0157 |
Framework versions
- Transformers 4.26.1
- Pytorch 1.11.0+cu113
- Datasets 2.13.0
- Tokenizers 0.13.3
- Downloads last month
- 10