gguf-py : add add_classifier_output_labels method to writer (#14031)
* add add_classifier_output_labels * use add_classifier_output_labels
This commit is contained in:
parent
669c13e0f6
commit
1caae7fc6c
2 changed files with 4 additions and 2 deletions
|
@ -3709,8 +3709,7 @@ class BertModel(TextModel):
|
|||
self._try_set_pooling_type()
|
||||
|
||||
if self.cls_out_labels:
|
||||
key_name = gguf.Keys.Classifier.OUTPUT_LABELS.format(arch = gguf.MODEL_ARCH_NAMES[self.model_arch])
|
||||
self.gguf_writer.add_array(key_name, [v for k, v in sorted(self.cls_out_labels.items())])
|
||||
self.gguf_writer.add_classifier_output_labels([v for k, v in sorted(self.cls_out_labels.items())])
|
||||
|
||||
def set_vocab(self):
|
||||
tokens, toktypes, tokpre = self.get_vocab_base()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue