mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 03:14:35 +00:00
convert : XLMRoberta Type Vocab Size (#10458)
Some checks failed
Nix CI / nix-eval (macos-latest) (push) Waiting to run
Nix CI / nix-eval (ubuntu-latest) (push) Waiting to run
Nix CI / nix-build (macos-latest) (push) Waiting to run
Nix CI / nix-build (ubuntu-latest) (push) Waiting to run
flake8 Lint / Lint (push) Waiting to run
Python check requirements.txt / check-requirements (push) Has been cancelled
Python Type-Check / pyright type-check (push) Has been cancelled
Some checks failed
Nix CI / nix-eval (macos-latest) (push) Waiting to run
Nix CI / nix-eval (ubuntu-latest) (push) Waiting to run
Nix CI / nix-build (macos-latest) (push) Waiting to run
Nix CI / nix-build (ubuntu-latest) (push) Waiting to run
flake8 Lint / Lint (push) Waiting to run
Python check requirements.txt / check-requirements (push) Has been cancelled
Python Type-Check / pyright type-check (push) Has been cancelled
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>
This commit is contained in:
parent
96fa2c5e2d
commit
9336db462c
@ -2707,7 +2707,7 @@ class XLMRobertaModel(BertModel):
|
|||||||
self.gguf_writer.add_token_scores(scores)
|
self.gguf_writer.add_token_scores(scores)
|
||||||
self.gguf_writer.add_token_types(toktypes)
|
self.gguf_writer.add_token_types(toktypes)
|
||||||
self.gguf_writer.add_add_space_prefix(add_prefix)
|
self.gguf_writer.add_add_space_prefix(add_prefix)
|
||||||
self.gguf_writer.add_token_type_count(1)
|
self.gguf_writer.add_token_type_count(self.hparams.get("type_vocab_size", 1))
|
||||||
self.gguf_writer.add_remove_extra_whitespaces(remove_whitespaces)
|
self.gguf_writer.add_remove_extra_whitespaces(remove_whitespaces)
|
||||||
if precompiled_charsmap:
|
if precompiled_charsmap:
|
||||||
self.gguf_writer.add_precompiled_charsmap(precompiled_charsmap)
|
self.gguf_writer.add_precompiled_charsmap(precompiled_charsmap)
|
||||||
|
Loading…
Reference in New Issue
Block a user