Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics") model = AutoModelForCausalLM.from_pretrained("wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics
- SGLang
How to use wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics 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 "wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics" \ --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": "wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics", "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 "wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics" \ --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": "wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics with Docker Model Runner:
docker model run hf.co/wvangils/GPT2-Beatles-Lyrics-finetuned-newlyrics
Commit ·
f2b33aa
1
Parent(s): 41e3570
Librarian Bot: Update dataset YAML metadata for model (#1)
Browse files- Librarian Bot: Update dataset YAML metadata for model (c07d2666bc4beee9eb4529408836d6f4339f165b)
Co-authored-by: Librarian Bot (Bot) <librarian-bot@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- generated_from_trainer
|
|
|
|
| 5 |
model-index:
|
| 6 |
- name: GPT2-Beatles-Lyrics-finetuned-newlyrics
|
| 7 |
results: []
|
|
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- generated_from_trainer
|
| 5 |
+
datasets: cmotions/Beatles_lyrics
|
| 6 |
model-index:
|
| 7 |
- name: GPT2-Beatles-Lyrics-finetuned-newlyrics
|
| 8 |
results: []
|