Introduction
General-purpose large language models (LLMs) often struggle to capture the nuances of specific artistic voices, particularly in non-English languages. BrAIcht is a specialized conversational agent designed to emulate the "epic theater" style of Bertolt Brecht. Characterized by didacticism, social consciousness, and a unique linguistic structure, Brecht's work presents a significant challenge for standard generative models. This paper details a two-stage fine-tuning approach using QLoRA to preserve this niche artistic style within a German-centric LLM.
Methodology
The researchers utilized LeoLM-7B, a German-focused variant of Llama 2, as the foundation. To address the scarcity of Brecht-specific data and the constraints of consumer-grade hardware, a two-stage fine-tuning pipeline was implemented using QLoRA (Quantized Low-Rank Adaptation).
Two-Stage Fine-Tuning
- General Domain Warm-up: The model was first trained on a corpus of 907 German plays (542,474 dialogue cues). This stage established a baseline understanding of German theatrical structure and vocabulary.
- Brechtian Specialization: The model was then fine-tuned on Brecht’s 29 plays (17,740 dialogue cues) to distill his specific authorial voice.
By using 4-bit quantization, the 7-billion parameter model was successfully trained on a single NVIDIA A6000 GPU, demonstrating that high-fidelity stylistic mimicry is achievable without massive compute resources.
Results
The effectiveness of the two-stage approach was measured using Perplexity and BLEU scores.
Perplexity
Perplexity measures how well a probability distribution predicts a sample. A lower score indicates the model is more "certain" of the target style. Following the Brecht-specific fine-tuning, perplexity dropped significantly from 10.19 to 3.57, as shown in the comparison below.
BLEU Scores
The BLEU (Bilingual Evaluation Understudy) score measures n-gram overlap between the generated text and reference plays. The average BLEU score increased from 0.26 after the first stage to 0.665 after the second stage. This jump indicates a high degree of internalization of Brecht’s specific phrasing and vocabulary.
Discussion and Future Work
The success of BrAIcht highlights the importance of "curriculum learning" in fine-tuning. Starting with a broader, related dataset (German drama) before narrowing down to a specific author (Brecht) allowed the model to build the necessary linguistic context. Furthermore, the choice of a base model "born" in the target language (LeoLM) was critical for capturing cultural and linguistic nuances that English-centric models like GPT-4 often miss.
Future research will explore Retrieval-Augmented Generation (RAG) to allow the agent to reference specific plot points or characters in real-time. Additionally, testing larger model variants (13B or 70B) could potentially offer even deeper stylistic fidelity.
Summary updated