This algorithm has been trained on Ansgar Allen’s combined and growing corpus of published and unpublished works (currently in excess of 1.2M words) via a small language model designed by Douglas Luman.
Parameter Combinations for Different Tasks
Suggested decoding parameters from RWKV Wiki.
Creative content needs more randomness and openness to let the model generate more imaginative expressions. Therefore, use higher Top_P and Temperature with moderate Presence Penalty and Frequency Penalty values to avoid excessive repetition.
| Task Type | Top_P | Temperature | Presence Penalty | Frequency Penalty |
|---|---|---|---|---|
| Story Creation | 0.8 | 1.3 | 0.4 | 0.5 |
| Poetry / Literature | 0.9 | 1.8 | 0.3 | 0.4 |
| Advertising Copy / Marketing | 0.7 | 1.2 | 0.5 | 0.6 |
| Free Writing | 0.85 | 1.5 | 0.4 | 0.5 |
Structured writing requires some creativity but also logic and coherence. Use moderate Top_P and Temperature with appropriate Presence Penalty and Frequency Penalty to reduce repetition.
| Task Type | Top_P | Temperature | Presence Penalty | Frequency Penalty |
|---|---|---|---|---|
| News / Articles | 0.6 | 1.1 | 0.3 | 0.4 |
| Papers / Research Reports | 0.4 | 0.9 | 0.4 | 0.5 |
| Scripts / Dialogues | 0.7 | 1.3 | 0.5 | 0.6 |
| Product Descriptions | 0.5 | 1.0 | 0.3 | 0.4 |
Mechanical tasks require precision and consistency, often following specific format. Use lower Temperature and Top_P with reduced Presence Penalty and Frequency Penalty to avoid affecting the use of common words.
| Task Type | Top_P | Temperature | Presence Penalty | Frequency Penalty |
|---|---|---|---|---|
| Q&A / Factual Answers | 0.2 | 0.8 | 0.1 | 0.2 |
| Summarization / Paraphrasing | 0.3 | 1.0 | 0.2 | 0.3 |
| Translation | 0.3 | 0.9 | 0.2 | 0.3 |
| Formula / Code Generation | 0.1 | 0.7 | 0.1 | 0.2 |
| Multiple-choice Questions, True or False Questions | 0 | 0.7 | 0.1 | 0.2 |
Parameter Explanations
Temperature- Adjusts the randomness of the generated result by modifying the scaling ratio of the logits. A lower temperature makes the model choose highly probable tokens, creating more predictable output, while a higher temperature flattens the probability distribution, generating more creative but potentially less coherent text.
Top_P- Selects the top N tokens whose cumulative probability reaches the value of P as the candidate set. For example, if set to 0.1, only the top 10% of tokens will be considered. Lower values produce higher quality but more conservative content. Setting it to 1 decreases content quality but increases diversity.
Presence Penalty- Applies a fixed penalty to any token that has already appeared, encouraging the model to use new vocabulary rather than repeating words. It functions like a dynamic blacklist of prohibited words.
Frequency Penalty- Penalizes tokens based on how many times they have already appeared, with the penalty increasing with each occurrence. This helps prevent repetitive phrases and filler words.
Penalty Decay- Controls the decay rate of Presence Penalty and Frequency Penalty. The closer the value is to 1, the slower the penalty decays; the smaller the value, the faster the decay.