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