Text Generation
Transformers
PyTorch
Safetensors
Russian
gpt2
PyTorch
Transformers
text-generation-inference
Instructions to use bankholdup/rugpt3_song_writer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bankholdup/rugpt3_song_writer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bankholdup/rugpt3_song_writer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bankholdup/rugpt3_song_writer") model = AutoModelForCausalLM.from_pretrained("bankholdup/rugpt3_song_writer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bankholdup/rugpt3_song_writer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bankholdup/rugpt3_song_writer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bankholdup/rugpt3_song_writer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bankholdup/rugpt3_song_writer
- SGLang
How to use bankholdup/rugpt3_song_writer 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 "bankholdup/rugpt3_song_writer" \ --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": "bankholdup/rugpt3_song_writer", "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 "bankholdup/rugpt3_song_writer" \ --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": "bankholdup/rugpt3_song_writer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bankholdup/rugpt3_song_writer with Docker Model Runner:
docker model run hf.co/bankholdup/rugpt3_song_writer
| language: | |
| - ru | |
| tags: | |
| - PyTorch | |
| - Transformers | |
| widget: | |
| - text: "Батя возвращается трезвый, в руке буханка" | |
| example_title: "Example 1" | |
| - text: "Как дела? Как дела? Это новый кадиллак" | |
| example_title: "Example 2" | |
| - text: "4:20 на часах и я дрочу на твоё фото" | |
| example_title: "Example 3" | |
| inference: | |
| parameters: | |
| temperature: 0.9 | |
| k: 50 | |
| p: 0.95 | |
| length: 1500 | |
| Model based on [ruGPT-3](https://huggingface.co/sberbank-ai/rugpt3small_based_on_gpt2) for generating songs. | |
| Tuned on lyrics collected from [genius](https://genius.com/). | |
| Examples of used artists: | |
| * [Oxxxymiron](https://genius.com/artists/Oxxxymiron) | |
| * [Моргенштерн](https://genius.com/artists/Morgenshtern) | |
| * [ЛСП](https://genius.com/artists/Lsp) | |
| * [Гражданская оборона](https://genius.com/artists/Civil-defense) | |
| * [Король и Шут](https://genius.com/artists/The-king-and-the-jester) | |
| * etc |