Enhancing GPT-Based Input Method with Domain-Adaptive Pinyin Encoder(s)
摘要
Recent studies have demonstrated that applying character-level selection constraints during beam search sampling can transform a Chinese GPT model into a Pinyin Input Method Engine (IME) with performance superior to traditional IMEs. However, given the diverse user base of IMEs, it is crucial to accommodate various domain-specific preferences. While commercial IMEs offer domain-specific lexicons, GPT-based IMEs generally function as general-purpose completion tools and typically lack efficient domain adaptability. To address this, we introduce a parameter-efficient fine-tuning approach that leverages an auxiliary transformer encoder to capture Pinyin features, enabling the IME to adapt to specific domains using only a modest amount of data by tuning solely the encoder’s parameters. Our approach improves top-1 precision by over 6% on the PD benchmark, a standard dataset for evaluating input methods, compared with the fully fine-tuned Pinyin GPT model. Additionally, our experiments demonstrate the capability to incorporate data and encoders from multiple domains through strategies such as data mixture and model ensemble, allowing flexible switching and combination based on user context or preference.