Based on the framework of autoregressive language modeling, this paper analyzes the word frequency characteristics and introduces a quartile inverse probability weighted sampling algorithm in probability distribution prediction to regulate the quality and diversity of the generated music. Through the effective division of the subset of high-frequency words by this algorithm, a polyphonic piano transcription model is established, which enhances the rationality of the predicted probability distribution of piano composition. Meanwhile, objective evaluation metrics are designed for the pentatonic tonal form of Gong tuning to quantitatively assess the results of automatic composition for Chinese-style piano. It is proved that the proposed model performs well in music generation, with an average generation time of only 6.9s and a model parameter count of 2.7M, which can provide strong support and validation for the automatic composition of the Chinese wind piano.