Update app.py
Browse files
app.py
CHANGED
@@ -129,9 +129,8 @@ def load_model(model_name):
|
|
129 |
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
|
130 |
#tokenizer = AutoTokenizer.from_pretrained(model_name)
|
131 |
tokenizer = model.tokenizer
|
132 |
-
|
133 |
-
|
134 |
-
# tokenizer.pad_token = "[PAD]"
|
135 |
|
136 |
return model, tokenizer
|
137 |
|
|
|
129 |
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
|
130 |
#tokenizer = AutoTokenizer.from_pretrained(model_name)
|
131 |
tokenizer = model.tokenizer
|
132 |
+
|
133 |
+
model.generation_config.pad_token_id = tokenizer.pad_token_id
|
|
|
134 |
|
135 |
return model, tokenizer
|
136 |
|