omeryentur commited on
Commit
3ffc7cc
·
verified ·
1 Parent(s): 40efd3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -13,6 +13,9 @@ class LlamaInterface:
13
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
15
  self.tokenizer = AutoTokenizer.from_pretrained(base_model_name)
 
 
 
16
  self.model = AutoModelForCausalLM.from_pretrained(
17
  base_model_name,
18
  device_map="auto",
 
13
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
15
  self.tokenizer = AutoTokenizer.from_pretrained(base_model_name)
16
+ # Padding token'ı ayarla
17
+ self.tokenizer.pad_token = self.tokenizer.eos_token
18
+
19
  self.model = AutoModelForCausalLM.from_pretrained(
20
  base_model_name,
21
  device_map="auto",