غالبا ما تكون نماذج اللغة المدربة مسبقا مسبقا (PLMS) باهظة الثمن بشكل أساسي في الاستدلال، مما يجعلها غير عملية في مختلف تطبيقات العالم الحقيقي المحدودة. لمعالجة هذه المشكلة، نقترح مقاربة تخفيض رمزية ديناميكية لتسريع استنتاج PLMS، والتي تسمى Tr-Bert، والتي يمكن أن تتكيف مرونة عدد الطبقة من كل رمزي في الاستدلال لتجنب الحساب الزائد. خصيصا، تقوم Tr-Bert بتصوير عملية تخفيض الرمز المميز كأداة اختيار رمز تخطيط متعدد الخطوات وتعلم تلقائيا استراتيجية الاختيار عبر التعلم التعزيز. تظهر النتائج التجريبية على العديد من مهام NLP المصب أن Tr-Bert قادرة على تسريع بيرتف بمقدار 2-5 مرات لإرضاء متطلبات الأداء المختلفة. علاوة على ذلك، يمكن ل TR-Bert تحقيق أداء أفضل مع حساب أقل في مجموعة من المهام النصية الطويلة لأن تكييف رقم الطبقة على مستوى الرمز المميز يسرع بشكل كبير عملية انتباه الذات في plms. يمكن الحصول على شفرة المصدر وتفاصيل التجربة لهذه الورقة من https://github.com/thunlp/tr-bert.
Existing pre-trained language models (PLMs) are often computationally expensive in inference, making them impractical in various resource-limited real-world applications. To address this issue, we propose a dynamic token reduction approach to accelerate PLMs' inference, named TR-BERT, which could flexibly adapt the layer number of each token in inference to avoid redundant calculation. Specially, TR-BERT formulates the token reduction process as a multi-step token selection problem and automatically learns the selection strategy via reinforcement learning. The experimental results on several downstream NLP tasks show that TR-BERT is able to speed up BERT by 2-5 times to satisfy various performance demands. Moreover, TR-BERT can also achieve better performance with less computation in a suite of long-text tasks since its token-level layer number adaption greatly accelerates the self-attention operation in PLMs. The source code and experiment details of this paper can be obtained from https://github.com/thunlp/TR-BERT.
References used
https://aclanthology.org/
Incorporating lexical knowledge into deep learning models has been proved to be very effective for sequence labeling tasks. However, previous works commonly have difficulty dealing with large-scale dynamic lexicons which often cause excessive matchin
In this work, we propose a novel framework, Gradient Aligned Mutual Learning BERT (GAML-BERT), for improving the early exiting of BERT. GAML-BERT's contributions are two-fold. We conduct a set of pilot experiments, which shows that mutual knowledge d
In previous work, it has been shown that BERT can adequately align cross-lingual sentences on the word level. Here we investigate whether BERT can also operate as a char-level aligner. The languages examined are English, Fake English, German and Gree
Bidirectional Encoder Representations from Transformers (BERT) has achieved state-of-the-art performances on several text classification tasks, such as GLUE and sentiment analysis. Recent work in the legal domain started to use BERT on tasks, such as
Choosing the most suitable classifier in a linguistic context is a well-known problem in the production of Mandarin and many other languages. The present paper proposes a solution based on BERT, compares this solution to previous neural and rule-base