Text Generation
Transformers
PyTorch
JAX
English
gpt2
huggingartists
lyrics
lm-head
causal-lm
text-generation-inference
Instructions to use huggingartists/madonna with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingartists/madonna with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingartists/madonna")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingartists/madonna") model = AutoModelForCausalLM.from_pretrained("huggingartists/madonna", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingartists/madonna with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingartists/madonna" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingartists/madonna", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingartists/madonna
- SGLang
How to use huggingartists/madonna 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 "huggingartists/madonna" \ --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": "huggingartists/madonna", "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 "huggingartists/madonna" \ --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": "huggingartists/madonna", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingartists/madonna with Docker Model Runner:
docker model run hf.co/huggingartists/madonna
Commit ·
798bc92
1
Parent(s): f8cbda6
huggingartists
Browse files- README.md +3 -3
- evaluation.txt +1 -1
- tokenizer_config.json +1 -1
README.md
CHANGED
|
@@ -45,15 +45,15 @@ from datasets import load_dataset
|
|
| 45 |
dataset = load_dataset("huggingartists/madonna")
|
| 46 |
```
|
| 47 |
|
| 48 |
-
[Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/
|
| 49 |
|
| 50 |
## Training procedure
|
| 51 |
|
| 52 |
The model is based on a pre-trained [GPT-2](https://huggingface.co/gpt2) which is fine-tuned on Madonna's lyrics.
|
| 53 |
|
| 54 |
-
Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/
|
| 55 |
|
| 56 |
-
At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/
|
| 57 |
|
| 58 |
## How to use
|
| 59 |
|
|
|
|
| 45 |
dataset = load_dataset("huggingartists/madonna")
|
| 46 |
```
|
| 47 |
|
| 48 |
+
[Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/2eqc1vv3/artifacts), which is tracked with [W&B artifacts](https://docs.wandb.com/artifacts) at every step of the pipeline.
|
| 49 |
|
| 50 |
## Training procedure
|
| 51 |
|
| 52 |
The model is based on a pre-trained [GPT-2](https://huggingface.co/gpt2) which is fine-tuned on Madonna's lyrics.
|
| 53 |
|
| 54 |
+
Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/ppm2eyoj) for full transparency and reproducibility.
|
| 55 |
|
| 56 |
+
At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/ppm2eyoj/artifacts) is logged and versioned.
|
| 57 |
|
| 58 |
## How to use
|
| 59 |
|
evaluation.txt
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"eval_loss":
|
|
|
|
| 1 |
+
{"eval_loss": 3.1591076850891113, "eval_runtime": 3.3487, "eval_samples_per_second": 21.202, "eval_steps_per_second": 2.688, "epoch": 1.0}
|
tokenizer_config.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"unk_token": "<|endoftext|>", "bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "add_prefix_space": false, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "
|
|
|
|
| 1 |
+
{"unk_token": "<|endoftext|>", "bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "add_prefix_space": false, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "huggingartists/zemfira", "tokenizer_class": "GPT2Tokenizer"}
|