Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,13 +60,11 @@ tokenizer.pad_token = tokenizer.eos_token
|
|
| 60 |
tokenizer.padding_side = 'left'
|
| 61 |
|
| 62 |
# Load the GaiaMiniMed model with the specified configuration
|
| 63 |
-
|
| 64 |
peft_config = PeftConfig.from_pretrained("Tonic/GaiaMiniMed")
|
|
|
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
# Using Optimum
|
| 69 |
-
|
| 70 |
peft_model = peft_model.to_bettertransformer("tiiuae/falcon-7b-instruct")
|
| 71 |
|
| 72 |
|
|
|
|
| 60 |
tokenizer.padding_side = 'left'
|
| 61 |
|
| 62 |
# Load the GaiaMiniMed model with the specified configuration
|
| 63 |
+
# Load the Peft model with a specific configuration
|
| 64 |
peft_config = PeftConfig.from_pretrained("Tonic/GaiaMiniMed")
|
| 65 |
+
peft_model = PeftModel.from_pretrained("Tonic/GaiaMiniMed", config=peft_config)
|
| 66 |
|
| 67 |
+
# Now you can use peft_model without any NameError
|
|
|
|
|
|
|
|
|
|
| 68 |
peft_model = peft_model.to_bettertransformer("tiiuae/falcon-7b-instruct")
|
| 69 |
|
| 70 |
|