Skip to content
Snippets Groups Projects
Commit 790a3667 authored by xw_g's avatar xw_g
Browse files

rag v0.22

parent 852f9e8d
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ class llama3_8b_FewShot(ShopBenchBaseModel):
exmaple_prompt = []
for score, idx in zip(scores[0], indices[0]):
print(f'score:{score} meta data:{self.metadata[idx]["fewshot_examaple"]}')
if score>=0.895:
if score>=0.896:
fewshot_examaple = self.metadata[idx]["fewshot_examaple"]
exmaple_prompt.append(fewshot_examaple)
if len(exmaple_prompt) > 0:
......@@ -160,7 +160,7 @@ class llama3_8b_FewShot(ShopBenchBaseModel):
).to(self.model.device)
outputs = self.model.generate(
input_ids,
max_new_tokens=256,
max_new_tokens=200,
eos_token_id=self.terminators,
do_sample=False,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment