# HuggingArtists | Train a model to generate lyrics

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%3E%5C
**Category:** Flax/JAX Projects\
**Created:** [August 7, 2021, 3:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045 "2021-08-07T15:28:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlekseyKorshuk](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/alekseykorshuk/32/2288_2.png) [@AlekseyKorshuk](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAlekseyKorshuk)%5C
**Post date:** [August 7, 2021, 3:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%2F1 "2021-08-07T15:28:56Z")

</div>

![logo](https://us1.discourse-cdn.com/hellohellohello/original/2X/1/1317b42870b36c78733611533e9c41e3bb58e264.jpeg)  
In [HuggingArtists](https://github.com/AlekseyKorshuk/huggingartists), we can generate lyrics by a specific artist. This was made by fine-tuning a pre-trained [HuggingFace Transformer](https://huggingface.co/) on parsed datasets from [Genius](https://genius.com/).

As well, we use [Weights & Biases integration](https://docs.wandb.com/huggingface) to automatically log model performance and predictions.  
[![Weights & Biases](https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg)](https://wandb.ai/huggingartists/huggingartists)

Project repository:  
[![GitHub stars](https://camo.githubusercontent.com/717dd8ae9b0eb25dee1d961c1c3560733801e3f590d258740390c05513ecc505/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f416c656b7365794b6f727368756b2f68756767696e67617274697374733f7374796c653d736f6369616c)](https://github.com/AlekseyKorshuk/huggingartists)

## About

Create training script for TPU with Flax/JAX. So users can choose GPU or TPU in Colab.

## Model

A pre-trained GPT2 model in English and fine-tune it to learn English lyrics.  
The GPT2 model, pre-trained in English: [link](https://huggingface.co/gpt2).

## Datasets

Parsed with [this script](https://github.com/AlekseyKorshuk/huggingartists/blob/master/datasets/parse.py) from [Genius](https://genius.com/).

## Training scripts

GPU with PyTorch is available in project Colab:  
[![Open In Colab](https://camo.githubusercontent.com/84f0493939e0c4de4e6dbe113251b4bfb5353e57134ffd9fcab6b8714514d4d1/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667)](https://colab.research.google.com/github/AlekseyKorshuk/huggingartists/blob/master/huggingartists-demo.ipynb)  
So we need to create for TPU with Flax/JAX.

## Project outcome

Create training script for TPU with Flax/JAX. So users can choose GPU or TPU in Colab.

## Challenges

- I am new with Flax/JAX, so I need some help.
- There is no other challenges 😉

## Conclusion

We can integrate this project with Video and Music generation so we can create our AI-Artist 🤘  
I hope to find like-minded people and create a cool project 💥

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjulien-c)%5C
**Post date:** [August 8, 2021, 12:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%2F2 "2021-08-08T12:56:21Z")

</div>

Wow this is really cool!

---

<div class="post-metadata">

**Author:** ![AlekseyKorshuk](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/alekseykorshuk/32/2288_2.png) [@AlekseyKorshuk](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAlekseyKorshuk)%5C
**Post date:** [August 8, 2021, 8:53pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%2F3 "2021-08-08T20:53:47Z")

</div>

Thank you 🤗  
Can we add this project to “[Community Notebooks](https://huggingface.co/transformers/master/community.html#community-notebooks)”?  
I would be very pleased to be on this list 😊

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [August 9, 2021, 5:56am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%2F4 "2021-08-09T05:56:26Z")

</div>

Sure, we’ll be happy to accept a PR with it!

---

<div class="post-metadata">

**Author:** ![AlekseyKorshuk](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/alekseykorshuk/32/2288_2.png) [@AlekseyKorshuk](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAlekseyKorshuk)%5C
**Post date:** [August 13, 2021, 8:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%2F6 "2021-08-13T20:12:13Z")

</div>

@sgugger  
Can I join spaces for this project?

---

<div class="post-metadata">

**Author:** ![AlekseyKorshuk](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/alekseykorshuk/32/2288_2.png) [@AlekseyKorshuk](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAlekseyKorshuk)%5C
**Post date:** [August 19, 2021, 9:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingartists-train-a-model-to-generate-lyrics%2F9045%2F7 "2021-08-19T09:25:53Z")

</div>

![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/4/4b65faf825c50f58343ffd84332fdeab6f778cdb.png)

HuggingArtists and Spaces integration is available now: [Huggingartists - a Hugging Face Space by AlekseyKorshuk](https://huggingface.co/spaces/AlekseyKorshuk/huggingartists)

Thanks to @osanseviero for adding me to Spaces 🤗
