Selaa lähdekoodia

aliginng the pad token with HF latest

Hamid Shojanazeri 1 vuosi sitten
vanhempi
commit
557e881fcc
1 muutettua tiedostoa jossa 3 lisäystä ja 5 poistoa
  1. 3 5
      inference/chat_completion.py

+ 3 - 5
inference/chat_completion.py

@@ -62,13 +62,11 @@ def main(
     tokenizer = LlamaTokenizer.from_pretrained(model_name)
     tokenizer.add_special_tokens(
         {
-            "eos_token": "</s>",
-            "bos_token": "</s>",
-            "unk_token": "</s>",
-            "pad_token": "[PAD]",
+         
+            "pad_token": "<PAD>",
         }
     )
-
+    
     chats = format_tokens(dialogs, tokenizer)
 
     with torch.no_grad():