Commit
·
183fd14
1
Parent(s):
60013f3
Update README.md
Browse files
README.md
CHANGED
|
@@ -77,7 +77,6 @@ tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
|
|
| 77 |
|
| 78 |
# Load the Lora model
|
| 79 |
tuned_model = PeftModel.from_pretrained(base_model, peft_model_id)
|
| 80 |
-
#original_model = PeftModel.from_pretrained(base_model, "project-baize/baize-lora-7B")
|
| 81 |
|
| 82 |
def generate(text):
|
| 83 |
stt = time.time()
|
|
@@ -170,7 +169,6 @@ Ask2Democracy-cfqa-salud-pension dataset was formated like this::
|
|
| 170 |
def format_ds(example):
|
| 171 |
example["text"] = (
|
| 172 |
"Given the Context answer the Question. Answers must be source based, use topics to elaborate on the Response if they're provided."
|
| 173 |
-
#"Answer the question and use any available context or related topics if they are available"
|
| 174 |
+ " Question: '{}'".format(example['input'].strip())
|
| 175 |
+ " Context: {}".format(example['instruction'].strip())
|
| 176 |
+ " Topics: {}".format(example['topics'])
|
|
@@ -179,7 +177,4 @@ def format_ds(example):
|
|
| 179 |
return example
|
| 180 |
```
|
| 181 |
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
More details can be found in the Ask2Democracy [GitHub](https://github.com/jorge-henao/ask2democracy)
|
|
|
|
| 77 |
|
| 78 |
# Load the Lora model
|
| 79 |
tuned_model = PeftModel.from_pretrained(base_model, peft_model_id)
|
|
|
|
| 80 |
|
| 81 |
def generate(text):
|
| 82 |
stt = time.time()
|
|
|
|
| 169 |
def format_ds(example):
|
| 170 |
example["text"] = (
|
| 171 |
"Given the Context answer the Question. Answers must be source based, use topics to elaborate on the Response if they're provided."
|
|
|
|
| 172 |
+ " Question: '{}'".format(example['input'].strip())
|
| 173 |
+ " Context: {}".format(example['instruction'].strip())
|
| 174 |
+ " Topics: {}".format(example['topics'])
|
|
|
|
| 177 |
return example
|
| 178 |
```
|
| 179 |
|
|
|
|
|
|
|
|
|
|
| 180 |
More details can be found in the Ask2Democracy [GitHub](https://github.com/jorge-henao/ask2democracy)
|