Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,7 @@ model = AutoPeftModelForCausalLM.from_pretrained(
|
|
30 |
load_in_4bit=load_in_4bit,
|
31 |
device_map="auto" if device == "cuda" else None # Automatic GPU mapping
|
32 |
)
|
|
|
33 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
34 |
|
35 |
# Define prompt structure (update if necessary for your model)
|
|
|
30 |
load_in_4bit=load_in_4bit,
|
31 |
device_map="auto" if device == "cuda" else None # Automatic GPU mapping
|
32 |
)
|
33 |
+
model.to(device)
|
34 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
35 |
|
36 |
# Define prompt structure (update if necessary for your model)
|