Spaces:
Build error
Build error
Commit
·
c5778e1
1
Parent(s):
3e0f2b4
updated changes
Browse files
app.py
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
from peft import PeftModel, PeftConfig
|
|
|
|
|
|
|
| 2 |
|
| 3 |
torch.cuda.is_available()
|
| 4 |
print("executed successfully")
|
| 5 |
|
| 6 |
-
from datasets import load_dataset
|
| 7 |
dataset_name = "timdettmers/openassistant-guanaco"
|
| 8 |
dataset = load_dataset(dataset_name, split="train")
|
| 9 |
|
| 10 |
-
|
| 11 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
| 12 |
|
| 13 |
# quantizition configuration
|
|
@@ -36,4 +37,3 @@ inputs = tokenizer(text, return_tensors="pt").to(device)
|
|
| 36 |
outputs = model.generate(**inputs, max_new_tokens=50)
|
| 37 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 38 |
|
| 39 |
-
|
|
|
|
| 1 |
from peft import PeftModel, PeftConfig
|
| 2 |
+
import torch
|
| 3 |
+
from datasets import load_dataset
|
| 4 |
|
| 5 |
torch.cuda.is_available()
|
| 6 |
print("executed successfully")
|
| 7 |
|
|
|
|
| 8 |
dataset_name = "timdettmers/openassistant-guanaco"
|
| 9 |
dataset = load_dataset(dataset_name, split="train")
|
| 10 |
|
| 11 |
+
|
| 12 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
| 13 |
|
| 14 |
# quantizition configuration
|
|
|
|
| 37 |
outputs = model.generate(**inputs, max_new_tokens=50)
|
| 38 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 39 |
|
|
|