Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ import transformers
|
|
7 |
|
8 |
adapters_name = "1littlecoder/mistral-7b-mj-finetuned"
|
9 |
model_name = "bn22/Mistral-7B-Instruct-v0.1-sharded"
|
10 |
-
device = "cuda"
|
11 |
|
12 |
bnb_config = transformers.BitsAndBytesConfig(
|
13 |
load_in_8bit=True,
|
@@ -76,7 +75,6 @@ def generate(
|
|
76 |
|
77 |
encoded = tokenizer(formatted_prompt, return_tensors="pt", add_special_tokens=False)
|
78 |
model_input = encoded
|
79 |
-
model.to(device)
|
80 |
generated_ids = model.generate(**model_input, max_new_tokens=200, do_sample=True)
|
81 |
|
82 |
|
|
|
7 |
|
8 |
adapters_name = "1littlecoder/mistral-7b-mj-finetuned"
|
9 |
model_name = "bn22/Mistral-7B-Instruct-v0.1-sharded"
|
|
|
10 |
|
11 |
bnb_config = transformers.BitsAndBytesConfig(
|
12 |
load_in_8bit=True,
|
|
|
75 |
|
76 |
encoded = tokenizer(formatted_prompt, return_tensors="pt", add_special_tokens=False)
|
77 |
model_input = encoded
|
|
|
78 |
generated_ids = model.generate(**model_input, max_new_tokens=200, do_sample=True)
|
79 |
|
80 |
|