ranamhamoud commited on
Commit
cf9b3fc
·
verified ·
1 Parent(s): 8d0a419

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -11,6 +11,7 @@ DEFAULT_MAX_NEW_TOKENS = 930
11
  # Load Models and Tokenizers
12
  model_id = "meta-llama/Llama-2-7b-hf"
13
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
14
  model_generate = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
15
  model_edit = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto") # Assuming a different setup or hyperparameters
16
 
 
11
  # Load Models and Tokenizers
12
  model_id = "meta-llama/Llama-2-7b-hf"
13
  tokenizer = AutoTokenizer.from_pretrained(model_id)
14
+ tokenizer.pad_token = tokenizer.eos_token
15
  model_generate = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
16
  model_edit = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto") # Assuming a different setup or hyperparameters
17