Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
a05d59f
1
Parent(s):
9e3d5d4
fix
Browse files
app.py
CHANGED
|
@@ -68,10 +68,12 @@ def load_model():
|
|
| 68 |
tokenizer.pad_token = tokenizer.eos_token
|
| 69 |
tokenizer.padding_side = "right"
|
| 70 |
|
| 71 |
-
base_model_instance = AutoModel.from_pretrained(
|
| 72 |
-
|
|
|
|
| 73 |
model.eval()
|
| 74 |
|
|
|
|
| 75 |
def load_faiss_index(dataset_name):
|
| 76 |
index_path = f"{dataset_name}/faiss_index.bin"
|
| 77 |
if os.path.exists(index_path):
|
|
|
|
| 68 |
tokenizer.pad_token = tokenizer.eos_token
|
| 69 |
tokenizer.padding_side = "right"
|
| 70 |
|
| 71 |
+
base_model_instance = AutoModel.from_pretrained("orionweller/repllama-instruct-hard-positives-v2-joint-full-weights", max_memory={"cpu": "12GiB"}, torch_dtype=torch.float16, offload_state_dict=True)
|
| 72 |
+
# base_model_instance = AutoModel.from_pretrained(BASE_MODEL)
|
| 73 |
+
# model = PeftModel.from_pretrained(base_model_instance, CUR_MODEL)
|
| 74 |
model.eval()
|
| 75 |
|
| 76 |
+
|
| 77 |
def load_faiss_index(dataset_name):
|
| 78 |
index_path = f"{dataset_name}/faiss_index.bin"
|
| 79 |
if os.path.exists(index_path):
|