Skip to content

Commit 68ebe18

Browse files
gabe-l-hartarthw
authored andcommitted
convert : XLMRoberta Type Vocab Size (ggml-org#10458)
This matches the key in common bert-based embedding models and may have a value other than 1 in it. Branch: XLMRobertaTypeVocabSize Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent 6ffef43 commit 68ebe18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert_hf_to_gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2707,7 +2707,7 @@ def set_vocab(self):
27072707
self.gguf_writer.add_token_scores(scores)
27082708
self.gguf_writer.add_token_types(toktypes)
27092709
self.gguf_writer.add_add_space_prefix(add_prefix)
2710-
self.gguf_writer.add_token_type_count(1)
2710+
self.gguf_writer.add_token_type_count(self.hparams.get("type_vocab_size", 1))
27112711
self.gguf_writer.add_remove_extra_whitespaces(remove_whitespaces)
27122712
if precompiled_charsmap:
27132713
self.gguf_writer.add_precompiled_charsmap(precompiled_charsmap)

0 commit comments

Comments
 (0)