With the development of large-scale language model technology, fine-tuning pre-trained large-scale language models has become a mainstream paradigm to solve downstream tasks of natural language processing. However, training a language model in the legal field requires a large number of legal documents so that the language model can learn legal terminology and the particularity of the format of legal documents. The typical NLP method usually needs to rely on a large number of manually annotation data sets for training. However, in the application of the legal field, it is actually difficult to obtain a large number of manually annotation data sets, which restricted the typical method applied to the task of drafting legal documents. The experimental results of this paper show that not only can a large number of unlabeled legal documents that do not require Chinese word segmentation, but more importantly, it can fine-tune a large pre-trained language model on the local computer to achieve the generating legal document drafts task, and at the same time achieve the protection of information privacy and to improve information security issues.
隨著大型語言模型技術的發展,藉由微調預訓練的大型語言模型來解決自然語言處理的下游任務,已經是主流的範式。然而,訓練法律專業領域的語言模型,需要有大量的法律文件,以便讓語言模型能學得法律術語以及法律文書格式的特殊性。傳統NLP的做法,通常需要依賴大量人工標註的資料集進行訓練,而在法律領域的應用,取得大量人工標註的資料集是有實際上的困難,這使得傳統方法應用在法律文件起草的任務就受到了限制。本文實驗結果呈現,不僅能以大量無標記且無需中文斷詞的法律文件,更重要是能在本地端電腦中微調大型預訓練語言模型來達成法律文件草稿生成任務,並同時達到保障資訊隱私以及提高資訊安全等目的。
""") with gr.Column(scale=1, min_width=600): with gr.Tab("Writing Assist"): result = gr.components.Textbox(lines=7, label="Writing Assist", show_label=True, placeholder=prompts[0]) prompt = gr.components.Textbox(lines=2, label="Prompt", placeholder=examples[0], visible=False) gr.Examples(examples, label='Examples', inputs=[prompt]) prompt.change(generate, inputs=[prompt], outputs=[result]) btn = gr.Button("Next sentence") btn.click(generate, inputs=[result], outputs=[result]) with gr.Tab("Random Generative"): # result2 = gr.components.Textbox(lines=7, label="Random Generative", show_label=True, placeholder=prompts[1]) result2 = gr.components.Textbox(lines=7, label="Random Generative", show_label=True, value = examples[0][0]) gr.Examples(examples, label='Examples', inputs=[result2]) rnd_btn = gr.Button("Random Drafting") rnd_btn.click(rnd_generate, inputs=[result2], outputs=[result2]) if __name__ == "__main__": demo.launch()