flashrag-dev 0.3.0.dev20250818__tar.gz → 0.3.0.dev20250923__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/PKG-INFO +1 -1
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/generator.py +15 -3
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/index_builder.py +1 -1
- flashrag_dev-0.3.0.dev20250923/flashrag/version.py +1 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/PKG-INFO +1 -1
- flashrag_dev-0.3.0.dev20250818/flashrag/version.py +0 -1
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/LICENSE +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/README.md +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/config/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/config/basic_config.yaml +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/config/config.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/dataset/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/dataset/dataset.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/dataset/utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/_bleu.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/evaluator.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/metrics.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/fid.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/multimodal_generator.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/openai_generator.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/stop_word_criteria.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/judger/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/judger/judger.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/ReaRAG_utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/active_pipeline.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/branching_pipeline.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/mm_pipeline.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/pipeline.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/reasoning_pipeline.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/replug_utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/base_prompt.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/coRAG_prompt.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/mm_prompt.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/selfask_examplars.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/trace_examplars.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/kg_refiner.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/llmlingua_compressor.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/refiner.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/selective_context_compressor.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/__main__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/encoder.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/reranker.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/retriever.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/__init__.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/constants.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/pred_parse.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/utils.py +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/SOURCES.txt +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/dependency_links.txt +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/requires.txt +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/top_level.txt +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/pyproject.toml +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/setup.cfg +0 -0
- {flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flashrag_dev
|
|
3
|
-
Version: 0.3.0.
|
|
3
|
+
Version: 0.3.0.dev20250923
|
|
4
4
|
Summary: A library for efficient Retrieval-Augmented Generation research
|
|
5
5
|
Home-page: https://github.com/RUC-NLPIR/FlashRAG
|
|
6
6
|
Author: Jiajie Jin, Yutao Zhu, Chenghao Zhang, Xinyu Yang, Zhicheng Dou
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/generator.py
RENAMED
|
@@ -261,13 +261,25 @@ class VLLMGenerator(BaseGenerator):
|
|
|
261
261
|
if return_raw_output:
|
|
262
262
|
base_output = outputs
|
|
263
263
|
else:
|
|
264
|
-
generated_texts = [
|
|
264
|
+
generated_texts = [
|
|
265
|
+
[c.text for c in output.outputs] if len(output.outputs) > 1 else output.outputs[0].text
|
|
266
|
+
for output in outputs
|
|
267
|
+
]
|
|
265
268
|
base_output = generated_texts
|
|
266
269
|
if return_scores:
|
|
267
270
|
scores = []
|
|
268
271
|
for output in outputs:
|
|
269
|
-
|
|
270
|
-
|
|
272
|
+
for single_output in output.outputs:
|
|
273
|
+
if single_output.logprobs:
|
|
274
|
+
token_probs = [np.exp(list(score_dict.values())[0].logprob)
|
|
275
|
+
for score_dict in single_output.logprobs]
|
|
276
|
+
output_scores.append(token_probs)
|
|
277
|
+
else:
|
|
278
|
+
output_scores.append([])
|
|
279
|
+
if len(output_scores) == 1:
|
|
280
|
+
scores.append(output_scores[0])
|
|
281
|
+
else:
|
|
282
|
+
scores.append(output_scores)
|
|
271
283
|
return base_output, scores
|
|
272
284
|
else:
|
|
273
285
|
return base_output
|
|
@@ -12,7 +12,6 @@ import subprocess
|
|
|
12
12
|
import argparse
|
|
13
13
|
import datasets
|
|
14
14
|
import torch
|
|
15
|
-
from seismic import SeismicIndex
|
|
16
15
|
from tqdm import tqdm
|
|
17
16
|
from flashrag.retriever.utils import load_model, load_corpus, pooling, set_default_instruction, judge_zh
|
|
18
17
|
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
|
@@ -151,6 +150,7 @@ class Index_Builder:
|
|
|
151
150
|
else:
|
|
152
151
|
assert False, "Invalid bm25 backend!"
|
|
153
152
|
elif self.retrieval_method == "splade":
|
|
153
|
+
from seismic import SeismicIndex
|
|
154
154
|
self.build_seismic_index()
|
|
155
155
|
else:
|
|
156
156
|
self.build_dense_index()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0dev20250923"
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flashrag-dev
|
|
3
|
-
Version: 0.3.0.
|
|
3
|
+
Version: 0.3.0.dev20250923
|
|
4
4
|
Summary: A library for efficient Retrieval-Augmented Generation research
|
|
5
5
|
Home-page: https://github.com/RUC-NLPIR/FlashRAG
|
|
6
6
|
Author: Jiajie Jin, Yutao Zhu, Chenghao Zhang, Xinyu Yang, Zhicheng Dou
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.0dev20250818"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/config/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/config/basic_config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/dataset/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/dataset/dataset.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/_bleu.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/evaluator.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/metrics.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/evaluator/utils.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/generator/utils.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/judger/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/ReaRAG_utils.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/mm_pipeline.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/pipeline/replug_utils.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/base_prompt.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/coRAG_prompt.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/mm_prompt.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/prompt/trace_examplars.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/kg_refiner.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/refiner/refiner.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/__main__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/encoder.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/reranker.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/retriever.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/retriever/utils.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/__init__.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/constants.py
RENAMED
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag/utils/pred_parse.py
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{flashrag_dev-0.3.0.dev20250818 → flashrag_dev-0.3.0.dev20250923}/flashrag_dev.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|