Instructions to use yrshi/AutoRefine-Qwen2.5-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yrshi/AutoRefine-Qwen2.5-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="yrshi/AutoRefine-Qwen2.5-7B-Instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yrshi/AutoRefine-Qwen2.5-7B-Instruct") model = AutoModelForCausalLM.from_pretrained("yrshi/AutoRefine-Qwen2.5-7B-Instruct") - Notebooks
- Google Colab
- Kaggle
Search and Refine During Think: Autonomous Retrieval-Augmented Reasoning of LLMs
The model is presented in the paper Search and Refine During Think: Autonomous Retrieval-Augmented Reasoning of LLMs.
Paper abstract
Large language models have demonstrated impressive reasoning capabilities but are inherently limited by their knowledge reservoir. Retrieval-augmented reasoning mitigates this limitation by allowing LLMs to query external resources, but existing methods often retrieve irrelevant or noisy information, hindering accurate reasoning. In this paper, we propose AutoRefine, a reinforcement learning post-training framework that adopts a new ``search-and-refine-during-think'' paradigm. AutoRefine introduces explicit knowledge refinement steps between successive search calls, enabling the model to iteratively filter, distill, and organize evidence before generating an answer. Furthermore, we incorporate tailored retrieval-specific rewards alongside answer correctness rewards using group relative policy optimization. Experiments on single-hop and multi-hop QA benchmarks demonstrate that AutoRefine significantly outperforms existing approaches, particularly in complex, multi-hop reasoning scenarios. Detailed analysis shows that AutoRefine issues frequent, higher-quality searches and synthesizes evidence effectively.
Code
The code for this project is available on GitHub: https://github.com/syr-cn/AutoRefine
- Downloads last month
- 9