Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -54,16 +54,16 @@ lyrics_pool = [
|
|
54 |
if torch.cuda.is_available():
|
55 |
#model_id = "Qwen/Qwen2.5-7B-Instruct"
|
56 |
#model_id = "BenBranyon/sumbot7b-augmented"
|
57 |
-
model_id = "turboderp/Cat-Llama-3-70B-instruct"
|
58 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|
59 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True, model_max_length=MAX_INPUT_TOKEN_LENGTH, padding="longest", language="en")
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
#Transformers Code
|
69 |
@spaces.GPU
|
|
|
54 |
if torch.cuda.is_available():
|
55 |
#model_id = "Qwen/Qwen2.5-7B-Instruct"
|
56 |
#model_id = "BenBranyon/sumbot7b-augmented"
|
57 |
+
#model_id = "turboderp/Cat-Llama-3-70B-instruct"
|
58 |
+
#model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|
59 |
+
#tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True, model_max_length=MAX_INPUT_TOKEN_LENGTH, padding="longest", language="en")
|
60 |
+
|
61 |
+
model_id = "BenBranyon/lora_sumbot_v2"
|
62 |
+
model = AutoPeftModelForCausalLM.from_pretrained(
|
63 |
+
model_id, # YOUR MODEL YOU USED FOR TRAINING
|
64 |
+
load_in_4bit = True,
|
65 |
+
)
|
66 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, model_max_length=MAX_INPUT_TOKEN_LENGTH, langauge="en")
|
67 |
|
68 |
#Transformers Code
|
69 |
@spaces.GPU
|