Update src/pdfchatbot.py
Browse files- src/pdfchatbot.py +3 -3
src/pdfchatbot.py
CHANGED
|
@@ -59,13 +59,13 @@ class PDFChatBot:
|
|
| 59 |
print("Vector store created")
|
| 60 |
@spaces.GPU
|
| 61 |
def load_tokenizer(self):
|
| 62 |
-
self.tokenizer = AutoTokenizer.from_pretrained("
|
| 63 |
|
| 64 |
@spaces.GPU
|
| 65 |
def create_organic_pipeline(self):
|
| 66 |
self.pipe = pipeline(
|
| 67 |
"text-generation",
|
| 68 |
-
model="
|
| 69 |
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 70 |
device="cuda",
|
| 71 |
)
|
|
@@ -101,7 +101,7 @@ class PDFChatBot:
|
|
| 101 |
temp = 0.1
|
| 102 |
outputs = self.pipe(
|
| 103 |
prompt,
|
| 104 |
-
max_new_tokens=
|
| 105 |
do_sample=True,
|
| 106 |
temperature=temp,
|
| 107 |
top_p=0.9,
|
|
|
|
| 59 |
print("Vector store created")
|
| 60 |
@spaces.GPU
|
| 61 |
def load_tokenizer(self):
|
| 62 |
+
self.tokenizer = AutoTokenizer.from_pretrained("gradientai/Llama-3-8B-Instruct-Gradient-1048k")
|
| 63 |
|
| 64 |
@spaces.GPU
|
| 65 |
def create_organic_pipeline(self):
|
| 66 |
self.pipe = pipeline(
|
| 67 |
"text-generation",
|
| 68 |
+
model="gradientai/Llama-3-8B-Instruct-Gradient-1048k",
|
| 69 |
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 70 |
device="cuda",
|
| 71 |
)
|
|
|
|
| 101 |
temp = 0.1
|
| 102 |
outputs = self.pipe(
|
| 103 |
prompt,
|
| 104 |
+
max_new_tokens=524288,
|
| 105 |
do_sample=True,
|
| 106 |
temperature=temp,
|
| 107 |
top_p=0.9,
|