Preview

Herald of the Kazakh-British Technical University

Advanced search

ADAPTATION OF TEXT GENERATION STYLE TO A SPECIFIC AUDIENCE OR CONTENT

https://doi.org/10.55452/1998-6688-2025-22-2-141-154

Abstract

Adaptation of text generation style to specific audiences or content can be achieved without costly fine-tuning. We freeze model weights and instead (i) search eight decoder hyperparameters with Bayesian optimization and (ii) prepend a one-line style cue that modulates readability. Experiments on five mathematical question-answering benchmarks (AQUA-RAT, MathQA, GSM8K, MAWPS, SVAMP) with three 8–14 B-parameter checkpoints (LLaMA-3.1-8B, DeepSeek-Qwen-8B/14B) show that 50-trial Optuna searches raise exact-match accuracy by up to 36 percentage points and close 5–10 points of the gap to 30–70 B fine-tuned baselines. The same settings transfer across tasks with under 2-point loss. Adding the child-friendly header leaves accuracy virtually unchanged while halving the Flesch–Kincaid grade level and shortening reasoning traces. All experiments fit within a few GPU-hours on a single A100, making the method practical for resource-constrained deployments. The study demonstrates that careful decoder control combined with micro-prompts delivers numerical correctness and audience-appropriate exposition without additional training or tuning time.

About the Authors

Zh. Zhangbyrbay
Kazakh-British Technical University
Kazakhstan

 Master’s student 

 Almaty 



I. Akhmetov
Institute of Information and Computational Technologies
Kazakhstan

 PhD, professor 

 Almaty 



A. Pak
Kazakh-British Technical University
Kazakhstan

 PhD, professor 

 Almaty 



A. Jaxylykova
Kazakh-British Technical University
Kazakhstan

 PhD student 

 Almaty 



P. Komada
Lublin University of Technology
Poland

 PhD, professor 

 Lublin 



References

1. Brown T. et al. Language models are few-shot learners // Advances in neural information processing systems. – 2020. – Vol. 33. – P. 1877–1901.

2. Wei J. et al. Chain-of-thought prompting elicits reasoning in large language models // Advances in neural information processing systems. – 2022. – Vol. 35. – P. 24824–24837.

3. Kojima T. et al. Large language models are zero-shot reasoners // Advances in neural information processing systems. – 2022. – Vol. 35. – P. 22199–22213.

4. Touvron H. et al. Llama: Open and efficient foundation language models //arXiv preprint arXiv:2302.13971. – 2023.

5. Holtzman A. et al. The curious case of neural text degeneration // arXiv preprint arXiv:1904.09751. – 2019.

6. Wu Y. et al. Google’s neural machine translation system: Bridging the gap between human and machine translation // arXiv preprint arXiv:1609.08144. – 2016.

7. Ippolito D. et al. Comparison of diverse decoding methods from conditional language models // arXiv preprint arXiv:1906.06362. – 2019.

8. Bergstra J., Bengio Y. Random search for hyper-parameter optimization // The journal of machine learning research. – 2012. – Vol. 13. – No. 1. – P. 281–305.

9. Snoek J., Larochelle H., Adams R.P. Practical bayesian optimization of machine learning algorithms // Advances in neural information processing systems. – 2012. – Vol. 25.

10. Hutter F., Hoos H. H., Leyton-Brown K. Sequential model-based optimization for general algorithm configuration // Learning and intelligent optimization: 5th international conference, LION 5, Rome, Italy, January 17–21, 2011. selected papers 5. – Springer Berlin Heidelberg, 2011. – P. 507–523.

11. Akiba T. et al. Optuna: A next-generation hyperparameter optimization framework // Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining. – 2019. – P. 2623–2631.

12. Falkner S., Klein A., Hutter F. BOHB: Robust and efficient hyperparameter optimization at scale // International conference on machine learning. – PMLR, 2018. – P. 1437–1446.

13. Wang X. et al. H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models //The Eleventh International Conference on Learning Representations. – 2023. – Vol. 1.

14. Amini A. et al. Mathqa: Towards interpretable math word problem solving with operation-based formalisms // arXiv preprint arXiv:1905.13319. – 2019.

15. Patel A., Bhattamishra S., Goyal N. Are NLP models really able to solve simple math word problems? //arXiv preprint arXiv:2103.07191. – 2021.

16. Ling W. et al. Program induction by rationale generation: Learning to solve and explain algebraic word problems //arXiv preprint arXiv:1705.04146. – 2017.

17. Cobbe K. et al. Training verifiers to solve math word problems //arXiv preprint arXiv:2110.14168. – 2021.

18. Koncel-Kedziorski R. et al. MAWPS: A math word problem repository //Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics: human language technologies. – 2016. – P. 1152–1157.

19. Gao L. et al. Pal: Program-aided language models // International Conference on Machine Learning. – PMLR, 2023. – P. 10764–10799.

20. Lewkowycz A. et al. Solving quantitative reasoning problems with language models //Advances in Neural Information Processing Systems. – 2022. – Vol. 35. – P. 3843–3857.

21. Hendrycks D. et al. Measuring mathematical problem solving with the math dataset // arXiv preprint arXiv:2103.03874. – 2021.

22. Feurer M., Hutter F. Hyperparameter optimization. – Springer International Publishing, 2019. – P. 3–33.

23. Bergstra J., Yamins D., Cox D. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures // International conference on machine learning. – PMLR, 2013. – P. 115–123.

24. Li L. et al. Hyperband: A novel bandit-based approach to hyperparameter optimization // Journal of Machine Learning Research. – 2018. – Vol. 18. – No. 185. – P. 1–52.

25. Fan A., Lewis M., Dauphin Y. Hierarchical neural story generation // arXiv preprint arXiv:1805.04833. – 2018.

26. Keskar N. S. et al. Ctrl: A conditional transformer language model for controllable generation //arXiv preprint arXiv:1909.05858. – 2019.

27. Pillutla K. et al. Mauve: Measuring the gap between neural text and human text using divergence frontiers // Advances in Neural Information Processing Systems. – 2021. – Vol. 34. – P. 4816–4828.

28. Shi C. et al. A thorough examination of decoding methods in the era of llms // arXiv preprint arXiv:2402.06925. – 2024.


Review

For citations:


Zhangbyrbay Zh., Akhmetov I., Pak A., Jaxylykova A., Komada P. ADAPTATION OF TEXT GENERATION STYLE TO A SPECIFIC AUDIENCE OR CONTENT. Herald of the Kazakh-British Technical University. 2025;22(2):141-154. https://doi.org/10.55452/1998-6688-2025-22-2-141-154

Views: 9


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 1998-6688 (Print)
ISSN 2959-8109 (Online)