Elamur Research⌕
☰
home / papers / 2024 / Weaver: Foundation Models for Creative Writing

Weaver: Foundation Models for Creative Writing

Paper · 2024 · Tiannan Wang; Jiamin Chen; Qingrui Jia; Shuai Wang; Ruoyu Fang; Huilin Wang; Zhaowei Gao; Chunzhao Xie; Chuou Xu; Jihong Dai; Yibin Liu; Jialong Wu; Shengwei Ding; Long Li; Zhiwei Huang; Xinle Deng; Teng Yu; Gangan Ma; Han Xiao; Zixin Chen; Danjun Xiang; Yunxia Wang; Yuanyuan Zhu; Yi Xiao; Jing Wang; Yiru Wang; Siran Ding; Jiayang Huang; Jiayi Xu; Yilihamu Tayier; Zhenyu Hu; Yuan Gao; Chengfeng Zheng; Yueshu Ye; Yihang Li; Lei Wan; Xinyue Jiang; Yujie Wang; Siyu Cheng; Zhule Song; Xiangru Tang; Xiaohua Xu; Ningyu Zhang; Huajun Chen; Yuchen Eleanor Jiang; and Wangchunshu Zhou

Summary

General-purpose LLMs write fluently, but in creative and professional genres their prose often sounds flat and machine-like. The authors trace this to two causes. Pre-training relies on noisy or AI-generated web text, and alignment data comes from crowdworkers rather than skilled writers.

Weaver, built by AIWaves Inc., is a model family that is continually pre-trained on a filtered corpus made up mostly of books, fiction, stories and articles. It is then aligned using two data-synthesis techniques:

  • Instruction backtranslation generates plausible instructions for existing high-quality human texts, so annotators only need to gather good content.
  • Constitutional DPO builds preference pairs from expert-written positives and synthesized negatives that deliberately break principles set by professional editors.

Training data also covers RAG, function calling, instruction annotation and evaluation of writing.

On WriteBench, a newly released writing benchmark, every Weaver size beats generalist models several times larger. The largest model exceeds GPT-4 in various scenarios. The results suggest that specializing a model for writing is worthwhile. Weaver powers the WawaWriter collaborative writing platform.

Key points

  • Four sizes: Weaver Mini (1.8B), Base (6B), Pro (14B) and Ultra (34B). A routing agent can pick among them by query complexity to trade quality against compute cost.
  • Instruction backtranslation draws on LongForm and Humpback. Constitutional DPO combines ideas from DPO, Constitutional AI, Self-Align and RLCD, and its preference pairs carry less noise than pairs of two model outputs judged by an LLM.
  • WriteBench is presented as the first benchmark of LLM writing ability. Weaver was compared against 10+ generalist LLMs, with Weaver Ultra reaching state of the art on it.
  • A user study with writers found faster work with Weaver, mainly because its more human-like output needed less post-editing.
  • WawaWriter offers several features:
    • writing agents built on the Agents framework that act as co-authors;
    • personal knowledge bases (VectorDB retrieval, GPT-4V captions for images);
    • user-profile-based personalization;
    • unbounded long-text generation via RecurrentGPT-style recurrent prompting.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Tiannan Wang; Jiamin Chen; Qingrui Jia; Shuai Wang; Ruoyu Fang; Huilin Wang; Zhaowei Gao; Chunzhao Xie; Chuou Xu; Jihong Dai; Yibin Liu; Jialong Wu; Shengwei Ding; Long Li; Zhiwei Huang; Xinle Deng; Teng Yu; Gangan Ma; Han Xiao; Zixin Chen; Danjun Xiang; Yunxia Wang; Yuanyuan Zhu; Yi Xiao; Jing Wang; Yiru Wang; Siran Ding; Jiayang Huang; Jiayi Xu; Yilihamu Tayier; Zhenyu Hu; Yuan Gao; Chengfeng Zheng; Yueshu Ye; Yihang Li; Lei Wan; Xinyue Jiang; Yujie Wang; Siyu Cheng; Zhule Song; Xiangru Tang; Xiaohua Xu; Ningyu Zhang; Huajun Chen; Yuchen Eleanor Jiang; and Wangchunshu Zhou. 2024. Weaver: Foundation Models for Creative Writing. arXiv:2401.17268.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2401.17268 · arXiv 2401.17268

@misc{jiang2024weaver,
  title = {{Weaver: Foundation Models for Creative Writing}},
  author = {Tiannan Wang; Jiamin Chen; Qingrui Jia; Shuai Wang; Ruoyu Fang; Huilin Wang; Zhaowei Gao; Chunzhao Xie; Chuou Xu; Jihong Dai; Yibin Liu; Jialong Wu; Shengwei Ding; Long Li; Zhiwei Huang; Xinle Deng; Teng Yu; Gangan Ma; Han Xiao; Zixin Chen; Danjun Xiang; Yunxia Wang; Yuanyuan Zhu; Yi Xiao; Jing Wang; Yiru Wang; Siran Ding; Jiayang Huang; Jiayi Xu; Yilihamu Tayier; Zhenyu Hu; Yuan Gao; Chengfeng Zheng; Yueshu Ye; Yihang Li; Lei Wan; Xinyue Jiang; Yujie Wang; Siyu Cheng; Zhule Song; Xiangru Tang; Xiaohua Xu; Ningyu Zhang; Huajun Chen; Yuchen Eleanor Jiang; and Wangchunshu Zhou},
  year = {2024},
  doi = {10.48550/arxiv.2401.17268},
  eprint = {2401.17268},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2401.17268}
}

References

69 references, 40 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. J. Ainslie, J. Lee-Thorp, M. de Jong, Y. Zemlyanskiy, F. Lebrón, and S. Sanghai. Gqa: Training generalized multi-query transformer models from multi-head checkpoints. arXiv preprint arXiv:2305.13245, 2023.
  2. Anthropic. Introducing Claude, 2023. URL https://www.anthropic.com/index/introducin g-claude . ↗
  3. Y. Bai, S. Kadavath, S. Kundu, A. Askell, J. Kernion, A. Jones, A. Chen, A. Goldie, A. Mirhoseini, C. McKinnon, C. Chen, C. Olsson, C. Olah, D. Hernandez, D. Drain, D. Ganguli, D. Li, E. Tran-Johnson, E. Perez, J. Kerr, J. Mueller, J. Ladish, J. Landau, K. Ndousse, K. Lukosuite, L. Lovitt, M. Sellit… — Constitutional AI: Harmlessness from AI Feedback
  4. T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Ber… — Language Models are Few-Shot Learners
  5. C. Bryant, M. Felice, Ø. E. Andersen, and T. Briscoe. The BEA-2019 shared task on grammatical error correction. In H. Yannakoudakis, E. Kochmar, C. Leacock, N. Madnani, I. Pilán, and T. Zesch, editors, Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applicati…
  6. C.-M. Chan, W. Chen, Y. Su, J. Yu, W. Xue, S. Zhang, J. Fu, and Z. Liu. Chateval: Towards better llm-based evaluators through multi-agent debate, 2023.
  7. H. W. Chung, L. Hou, S. Longpre, B. Zoph, Y. Tay, W. Fedus, Y. Li, X. Wang, M. Dehghani, S. Brahma, A. Webson, S. S. Gu, Z. Dai, M. Suzgun, X. Chen, A. Chowdhery, A. Castro-Ros, M. Pellat, K. Robinson, D. Valter, S. Narang, G. Mishra, A. Yu, V. Zhao, Y. Huang, A. Dai, H. Yu, S. Petrov, E. H. Chi, J.… find
  8. J. Cui, Z. Li, Y. Yan, B. Chen, and L. Yuan. Chatlaw: Open-source legal large language model with integrated external knowledge bases, 2023. find
  9. T. Dao. FlashAttention-2: Faster attention with better parallelism and work partitioning. 2023.
  10. T. Dao, D. Y. Fu, S. Ermon, A. Rudra, and C. Ré. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems, 2022. find
  11. S. Diao, Y. Lei, L. Pan, T. Fang, W. Zhou, S. S. Keh, M.-Y. Kan, and T. Zhang. Doolittle: Benchmarks and corpora for academic writing formalization. 2023. find
  12. Y. Gao, Y. Xiong, X. Gao, K. Jia, J. Pan, Y. Bi, Y. Dai, J. Sun, and H. Wang. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997, 2023.
  13. Google. An important next step on our AI journey, 2023. URL https://blog.google/technolo gy/ai/bard-google-ai-search-updates/ . ↗
  14. K. Guu, T. B. Hashimoto, Y. Oren, and P. Liang. Generating sentences by editing prototypes. Transactions of the Association for Computational Linguistics, 6:437–450, 2018. doi: 10.116 2/tacl_a_00030. URL https://aclanthology.org/Q18-1031 . ↗
  15. D. Hendrycks, C. Burns, S. Basart, A. Zou, M. Mazeika, D. Song, and J. Steinhardt. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300, 2020.
  16. Z. Hu, Z. Yang, X. Liang, R. Salakhutdinov, and E. P. Xing. Toward controlled generation of text. In International conference on machine learning, pages 1587–1596. PMLR, 2017.
  17. J. Ji, T. Qiu, B. Chen, B. Zhang, H. Lou, K. Wang, Y. Duan, Z. He, J. Zhou, Z. Zhang, et al. Ai alignment: A comprehensive survey. arXiv preprint arXiv:2310.19852, 2023.
  18. A. Q. Jiang, A. Sablayrolles, A. Mensch, C. Bamford, D. S. Chaplot, D. d. l. Casas, F. Bressand, G. Lengyel, G. Lample, L. Saulnier, et al. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023a. find
  19. D. Jiang, Y. Li, G. Zhang, W. Huang, B. Y. Lin, and W. Chen. Tigerscore: Towards building explainable metric for all text generation tasks, 2023b.
  20. Y. E. Jiang, T. Liu, S. Ma, D. Zhang, R. Cotterell, and M. Sachan. Discourse centric evaluation of machine translation with a densely annotated parallel corpus. In Proceedings of the 2023 Conference of the Association for Computational Linguistics: Human Language Technologies, pages 1550–1565, Toron… find
  21. A. Köksal, T. Schick, A. Korhonen, and H. Schütze. Longform: Optimizing instruction tuning for long text generation with corpus extraction, 2023. find
  22. P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W.-t. Yih, T. Rocktäschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459–9474, 2020.
  23. X. Li, P. Yu, C. Zhou, T. Schick, L. Zettlemoyer, O. Levy, J. Weston, and M. Lewis. Self-alignment with instruction backtranslation, 2023.
  24. B. Y. Lin, W. Zhou, M. Shen, P. Zhou, C. Bhagavatula, Y. Choi, and X. Ren. CommonGen: A constrained text generation challenge for generative commonsense reasoning. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1823–1840, Online, Nov. 2020. Association for Computatio… find
  25. W. Liu, W. Zeng, K. He, Y. Jiang, and J. He. What makes good data for alignment? a comprehensive study of automatic data selection in instruction tuning, 2023.
  26. I. Loshchilov and F. Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. find
  27. H. T. Ng, S. M. Wu, T. Briscoe, C. Hadiwinoto, R. H. Susanto, and C. Bryant. The CoNLL-2014 shared task on grammatical error correction. In H. T. Ng, S. M. Wu, T. Briscoe, C. Hadiwinoto, R. H. Susanto, and C. Bryant, editors, Proceedings of the Eighteenth Conference on Computational Natural Language… find
  28. OpenAI. Introducing ChatGPT, 2022. URL https://openai.com/blog/chatgpt . ↗
  29. OpenAI. GPT4 technical report. arXiv preprint arXiv:2303.08774, 2023.
  30. L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray, et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730–27744, 2022a.
  31. L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. L. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray, J. Schulman, J. Hilton, F. Kelton, L. Miller, M. Simens, A. Askell, P. Welinder, P. Christiano, J. Leike, and R. Lowe. Training language models to follow instructions with human feedback, 20…
  32. A. Radford, K. Narasimhan, T. Salimans, I. Sutskever, et al. Improving language understanding by generative pre-training. 2018. find
  33. A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. find
  34. R. Rafailov, A. Sharma, E. Mitchell, S. Ermon, C. D. Manning, and C. Finn. Direct preference optimization: Your language model is secretly a reward model. 2023.
  35. B. Rozière, J. Gehring, F. Gloeckle, S. Sootla, I. Gat, X. E. Tan, Y. Adi, J. Liu, T. Remez, J. Rapin, A. Kozhevnikov, I. Evtimov, J. Bitton, M. Bhatt, C. C. Ferrer, A. Grattafiori, W. Xiong, A. Défossez, J. Copet, F. Azhar, H. Touvron, L. Martin, N. Usunier, T. Scialom, and G. Synnaeve. Code llama:… — Code Llama: Open Foundation Models for Code
  36. V. Sanh, A. Webson, C. Raffel, S. Bach, L. Sutawika, Z. Alyafeai, A. Chaffin, A. Stiegler, A. Raja, M. Dey, M. S. Bari, C. Xu, U. Thakker, S. S. Sharma, E. Szczechla, T. Kim, G. Chhablani, N. Nayak, D. Datta, J. Chang, M. T.-J. Jiang, H. Wang, M. Manica, S. Shen, Z. X. Yong, H. Pandey, R. Bawden, T.… — Multitask Prompted Training Enables Zero-Shot Task Generalization
  37. T. Schick, J. Dwivedi-Yu, R. Dessi, R. Raileanu, M. Lomeli, E. Hambro, L. Zettlemoyer, N. Cancedda, and T. Scialom. Toolformer: Language models can teach themselves to use tools. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net /forum?id=Yacmpz8… ↗
  38. N. Shazeer. Glu variants improve transformer. arXiv preprint arXiv:2002.05202, 2020. find
  39. T. Shen, R. Jin, Y. Huang, C. Liu, W. Dong, Z. Guo, X. Wu, Y. Liu, and D. Xiong. Large language model alignment: A survey. arXiv preprint arXiv:2309.15025, 2023.
  40. M. Shoeybi, M. Patwary, R. Puri, P. LeGresley, J. Casper, and B. Catanzaro. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053, 2019. find
  41. J. Su, M. Ahmed, Y. Lu, S. Pan, W. Bo, and Y. Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024.
  42. X. Sun, Z. Sun, Y. Meng, J. Li, and C. Fan. Summarize, outline, and elaborate: Long-text generation via hierarchical supervision from extractive summaries. In N. Calzolari, C.-R. Huang, H. Kim, J. Pustejovsky, L. Wanner, K.-S. Choi, P.-M. Ryu, H.-H. Chen, L. Donatelli, H. Ji, S. Kurohashi, P. Paggio… find
  43. Z. Sun, Y. Shen, H. Zhang, Q. Zhou, Z. Chen, D. Cox, Y. Yang, and C. Gan. Salmon: Self-alignment with principle-following reward models, 2023. find
  44. Gemini Team. Gemini: A family of highly capable multimodal models, 2023.
  45. H. Touvron, T. Lavril, G. Izacard, X. Martinet, M.-A. Lachaux, T. Lacroix, B. Rozière, N. Goyal, E. Hambro, F. Azhar, et al. LLaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023a.
  46. H. Touvron, L. Martin, K. Stone, P. Albert, A. Almahairi, Y. Babaei, N. Bashlykov, S. Batra, P. Bhargava, S. Bhosale, D. Bikel, L. Blecher, C. Canton-Ferrer, M. Chen, G. Cucurull, D. Esiobu, J. Fernandes, J. Fu, W. Fu, B. Fuller, C. Gao, V. Goswami, N. Goyal, A. Hartshorn, S. Hosseini, R. Hou, H. In… — Llama 2: Open Foundation and Fine-Tuned Chat Models
  47. L. Tunstall, E. Beeching, N. Lambert, N. Rajani, K. Rasul, Y. Belkada, S. Huang, L. von Werra, C. Fourrier, N. Habib, N. Sarrazin, O. Sanseviero, A. M. Rush, and T. Wolf. Zephyr: Direct distillation of lm alignment, 2023. find
  48. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
  49. B. Wang, R. Zheng, L. Chen, Y. Liu, S. Dou, C. Huang, W. Shen, S. Jin, E. Zhou, C. Shi, et al. Secrets of rlhf in large language models part ii: Reward modeling. arXiv preprint arXiv:2401.06080, 2024. find
  50. Y. Wang, Y. Kordi, S. Mishra, A. Liu, N. A. Smith, D. Khashabi, and H. Hajishirzi. Self-instruct: Aligning language models with self-generated instructions. In A. Rogers, J. Boyd-Graber, and N. Okazaki, editors, Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics… find
  51. Y. Wang, Z. Yu, Z. Zeng, L. Yang, C. Wang, H. Chen, C. Jiang, R. Xie, J. Wang, X. Xie, W. Ye, S. Zhang, and Y. Zhang. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization, 2023b.
  52. Y. Wang, W. Zhong, L. Li, F. Mi, X. Zeng, W. Huang, L. Shang, X. Jiang, and Q. Liu. Aligning large language models with human: A survey. arXiv preprint arXiv:2307.12966, 2023c.
  53. Z. M. Wang, Z. Peng, H. Que, J. Liu, W. Zhou, Y. Wu, H. Guo, R. Gan, Z. Ni, M. Zhang, Z. Zhang, W. Ouyang, K. Xu, W. Chen, J. Fu, and J. Peng. Rolellm: Benchmarking, eliciting, and enhancing role-playing abilities of large language models, 2023d.
  54. J. Wei, X. Wang, D. Schuurmans, M. Bosma, brian ichter, F. Xia, E. H. Chi, Q. V. Le, and D. Zhou. Chain of thought prompting elicits reasoning in large language models. In A. H. Oh, A. Agarwal, D. Belgrave, and K. Cho, editors, Advances in Neural Information Processing Systems, 2022. URL https://ope…
  55. S. Wu, O. Irsoy, S. Lu, V. Dabravolski, M. Dredze, S. Gehrmann, P. Kambadur, D. Rosenberg, and G. Mann. Bloomberggpt: A large language model for finance, 2023.
  56. K. Yang, Y. Tian, N. Peng, and D. Klein. Re3: Generating longer stories with recursive reprompting and revision. In Y. Goldberg, Z. Kozareva, and Y. Zhang, editors, Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 4393–4479, Abu Dhabi, United Arab Emirate… find
  57. K. Yang, D. Klein, A. Celikyilmaz, N. Peng, and Y. Tian. Rlcd: Reinforcement learning from contrast distillation for language model alignment, 2023a. find
  58. K. Yang, D. Klein, N. Peng, and Y. Tian. DOC: Improving long story coherence with detailed outline control. In A. Rogers, J. Boyd-Graber, and N. Okazaki, editors, Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3378– 3465, Toront…
  59. X. Yang, A. Chen, N. PourNejatian, H. C. Shin, K. E. Smith, C. Parisien, C. Compas, C. Martin, A. B. Costa, M. G. Flores, et al. A large language model for electronic health records. NPJ Digital Medicine, 5(1):194, 2022b. find
  60. S. Yin, C. Fu, S. Zhao, K. Li, X. Sun, T. Xu, and E. Chen. A survey on multimodal large language models. arXiv preprint arXiv:2306.13549, 2023.
  61. A. Zeng, M. Attarian, brian ichter, K. M. Choromanski, A. Wong, S. Welker, F. Tombari, A. Purohit, M. S. Ryoo, V. Sindhwani, J. Lee, V. Vanhoucke, and P. Florence. Socratic models: Composing zero-shot multimodal reasoning with language. In The Eleventh International Conference on Learning Representa…
  62. B. Zhang and R. Sennrich. Root mean square layer normalization. Advances in Neural Information Processing Systems, 32, 2019. find
  63. W. X. Zhao, K. Zhou, J. Li, T. Tang, X. Wang, Y. Hou, Y. Min, B. Zhang, J. Zhang, Z. Dong, et al. A survey of large language models. arXiv preprint arXiv:2303.18223, 2023.
  64. L. Zheng, W.-L. Chiang, Y. Sheng, S. Zhuang, Z. Wu, Y. Zhuang, Z. Lin, Z. Li, D. Li, E. P. Xing, H. Zhang, J. E. Gonzalez, and I. Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena. 2023a.
  65. R. Zheng, S. Dou, S. Gao, Y. Hua, W. Shen, B. Wang, Y. Liu, S. Jin, Q. Liu, Y. Zhou, et al. Secrets of rlhf in large language models part i: Ppo. arXiv preprint arXiv:2307.04964, 2023b.
  66. W. Zhou, T. Ge, K. Xu, F. Wei, and M. Zhou. Hierarchical summary-to-article generation, 2019. URL https://openreview.net/forum?id=Hkl8Ia4YPH . ↗
  67. W. Zhou, Y. E. Jiang, P. Cui, T. Wang, Z. Xiao, Y. Hou, R. Cotterell, and M. Sachan. Recurrentgpt: Interactive generation of (arbitrarily) long text, 2023a.
  68. W. Zhou, Y. E. Jiang, L. Li, J. Wu, T. Wang, S. Qiu, J. Zhang, J. Chen, R. Wu, S. Wang, S. Zhu, J. Chen, W. Zhang, N. Zhang, H. Chen, P. Cui, and M. Sachan. Agents: An open-source framework for autonomous language agents, 2023b. find
  69. W. Zhou, Y. E. Jiang, E. Wilcox, R. Cotterell, and M. Sachan. Controlled text generation with natural language instructions. In A. Krause, E. Brunskill, K. Cho, B. Engelhardt, S. Sabato, and J. Scarlett, editors, Proceedings of the 40th International Conference on Machine Learning, volume 202 of Pro… find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/wang-2024-weaver-foundation-models-creative-writing/