From 8154617ff228cb43cfdc0d26a148dc1e41e1c4e8 Mon Sep 17 00:00:00 2001 From: Pierrick HYMBERT Date: Sun, 7 Apr 2024 17:25:39 +0200 Subject: [PATCH] model: dbrx: convert-hf-to-gguf.py support python 3.8 --- convert-hf-to-gguf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index 429af208a..655428c7e 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -416,7 +416,7 @@ class Model(ABC): # for this kind of tokenizer, added_vocab is not a subset of vocab, so they need to be combined added_vocab = tokenizer.get_added_vocab() - reverse_vocab = {id_: encoded_tok for encoded_tok, id_ in (vocab | added_vocab).items()} + reverse_vocab = {id_: encoded_tok for encoded_tok, id_ in ({**vocab, **added_vocab}).items()} for i in range(vocab_size): if i not in reverse_vocab: