Prologue

Three years ago, I launched a project named CLANNAD_LSTM, planning to use LSTM to continue writing the CLANNAD script.

At that time, I had just finished the CV and NLP-related courses in the second semester of my first year of graduate school. Compared to the first semester, which leaned toward teaching artificial intelligence through mathematical deduction, I preferred learning AI-related technologies through engineering practice during the second semester. Due to the pandemic, during that semester I could work overtime + record lectures at night, catch up on classes in the morning, and do homework in the middle of the night, keeping me busy and thrilled. Of course, there will still be time to write another post for past school memories; in short, it was a very fulfilling life combining school and work—so fulfilling that even running multi-threading could barely handle it.

The reason for choosing to continue writing CLANNAD is that I fell into the anime subculture back in high school, staying up late using a learning device to watch anime and read light novels. Among them was the complete script of CLANNAD. Naturally, given the extraordinarily long text, I could only skim through it, which meant the dialogue corpus in the script was extremely abundant. Furthermore, various characters and dialogues in the script were marked using “【】”, such as characters like 【Tomoya】, 【Nagisa】, 【Kotomi】, and 【Kyou】. However, there were also some dialogues where the character was not enclosed. This required building a character database in advance: if a character’s name appeared at the front of a sentence followed by a “「” character, it was likewise considered to be spoken by that character.

Plan

Fine-tuning large models is also one of my skill upgrade plans for this year, so it’s time to finally finish what I started three years ago.

Using Chinese-LLaMA-Alpaca-2 pre-trained model as the backbone, the large model will be fine-tuned using the data-cleaned CLANNAD script to achieve the goal of allowing any CLANNAD character A to roleplay and converse with character B.

Once the fine-tuning of the large model is completed, I might host a service for open public access. However, since the “Nanshan Pizza Hut” acquired CLANNAD’s parent company, it is better kept strictly for learning and research purposes.