[New Model] Support BertForTokenClassification / Named Entity Recognition (NER) task (#24872)
Signed-off-by: wang.yuqi <noooop@126.com> Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Co-authored-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
@@ -943,6 +943,10 @@ class LLM:
|
||||
considered legacy and may be deprecated in the future. You should
|
||||
instead pass them via the `inputs` parameter.
|
||||
"""
|
||||
|
||||
if self.supported_tasks == ["encode"] and pooling_task is None:
|
||||
pooling_task = "encode"
|
||||
|
||||
if pooling_task is None:
|
||||
if "embed" in self.supported_tasks:
|
||||
pooling_task = "embed"
|
||||
|
||||
Reference in New Issue
Block a user