Answers.Body: <h3>General advice</h3>
  <p>LLMs are usually trained with big datasets, which probably include poems, so I wouldn't be surprised if they can come up with poem-like texts. Now, if you want to fine-tune some LLM to specialise in poem writing, then yes you could start by training it with a dataset with only poems. ML is (sadly) mostly an engineering task nowadays, so there isn't just one right answer - you may realise that changing the loss function could be useful or not, etc. I wouldn't also be surprised if people already attempted to do what you're trying to do, so you may want to do a little bit of research on that.</p>
  <h3>Example</h3>
  <p>I've just tried to ask ChatGPT to generate a poem with the following prompt.</p>
  <blockquote>
  <p>Write a simple poem on how chat models are misleading and can be informational dangerous.</p>
  </blockquote>
  <p>Answer</p>
  <pre><code>In realms of code where words entwine,
  Chat models dance, their language fine.
  But be aware, their wiles may play,
  A double-edged sword, in shadows they sway.
  
  With clever words and friendly tone,
  They seem like friends, in language sown.
  Yet truth can twist, and facts may bend,
  In their intricate web, they seek to pretend.
  
  Informational danger lurks within,
  As chat models spin tales to win.
  Trust not every phrase they craft,
  For falsehoods may lurk, hiding in the draft.
  
  Critical minds must always be near,
  To separate fact from fiction, clear.
  In the realm of bits, caution's the key,
  Lest we're led astray by deceptive glee.
  
  So heed this warning, take the cue,
  Chat models' truths might not be true.
  Stay vigilant, wise, and aware,
  For in their charm, risks often flare.
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-31T11:40:27.440Z
Answers.LastActivityDate: 2023-08-31T11:51:06.540Z
Answers.LastEditDate: 2023-08-31T11:51:06.540Z
Answers.UserDisplayName: nbro
Body: <p>I am using some of the LLM applications, and all of them are better at provide formal, steady conversations, rather than writing texts with styles. So I wonder whether it is possible to train a LLM better at writing poem, or other stylish texts in general.</p>
  <p>Is this resulted from the dataset or the model structure, the loss function? If so, what should I do if I want to train a model that can write poem? Should I make a special dataset to train the Lora models, or try to design a new loss function?</p>
  
Tags: <chat-bots><language-model>
Title: How to train a language model to write poem?
UserDisplayName: Cabbage
ThreadText: # How to train a language model to write poem?
  
  (Asked by: username_0 on 2023-08-31)
  
  I am using some of the LLM applications, and all of them are better at provide formal, steady conversations, rather than writing texts with styles. So I wonder whether it is possible to train a LLM better at writing poem, or other stylish texts in general.
  
  Is this resulted from the dataset or the model structure, the loss function? If so, what should I do if I want to train a model that can write poem? Should I make a special dataset to train the Lora models, or try to design a new loss function?
  
  **Tags:** chat-bots, language-model
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-31. Score: 2
  
  General advice
  LLMs are usually trained with big datasets, which probably include poems, so I wouldn't be surprised if they can come up with poem-like texts. Now, if you want to fine-tune some LLM to specialise in poem writing, then yes you could start by training it with a dataset with only poems. ML is (sadly) mostly an engineering task nowadays, so there isn't just one right answer - you may realise that changing the loss function could be useful or not, etc. I wouldn't also be surprised if people already attempted to do what you're trying to do, so you may want to do a little bit of research on that.
  Example
  I've just tried to ask ChatGPT to generate a poem with the following prompt.
  
  Write a simple poem on how chat models are misleading and can be informational dangerous.
  
  Answer
  In realms of code where words entwine,
  Chat models dance, their language fine.
  But be aware, their wiles may play,
  A double-edged sword, in shadows they sway.
  
  With clever words and friendly tone,
  They seem like friends, in language sown.
  Yet truth can twist, and facts may bend,
  In their intricate web, they seek to pretend.
  
  Informational danger lurks within,
  As chat models spin tales to win.
  Trust not every phrase they craft,
  For falsehoods may lurk, hiding in the draft.
  
  Critical minds must always be near,
  To separate fact from fiction, clear.
  In the realm of bits, caution's the key,
  Lest we're led astray by deceptive glee.
  
  So heed this warning, take the cue,
  Chat models' truths might not be true.
  Stay vigilant, wise, and aware,
  For in their charm, risks often flare.
  
  
  ---
  
  