Skip to content

Commit

Permalink
feat(run_exp): enhance RQRAGPipeline configuration
Browse files Browse the repository at this point in the history
- Add generator model path and parameters for improved generation control
- Introduce generator max input length setting
- Reorder import statement for better code organization
  • Loading branch information
ignorejjj committed Jan 11, 2025
1 parent 32d64e8 commit 0862158
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/methods/run_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,15 @@ def rqrag(args):
"""
Function to run the RQRAGPipeline.
"""
from flashrag.pipeline import RQRAGPipeline

save_note = "rqrag"
max_depth = 3
config_dict = {
"save_note": save_note,
"gpu_id": args.gpu_id,
'framework': 'vllm',
'generator_max_input_len': 4096,
'generation_params': {'max_tokens': 512, 'skip_special_tokens': False},
'generator_model_path': 'zorowin123/rq_rag_llama2_7B',
"dataset_name": args.dataset_name,
"split": args.split,
"max_depth": max_depth
Expand All @@ -571,6 +572,7 @@ def rqrag(args):
all_split = get_dataset(config)
test_data = all_split[args.split]

from flashrag.pipeline import RQRAGPipeline
pipeline = RQRAGPipeline(config, max_depth = max_depth)
result = pipeline.run(test_data)

Expand Down

0 comments on commit 0862158

Please sign in to comment.