Spaces:
Paused
Paused
Update app.py
Browse files
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 |
|