Run this model with HF Jobs
Run RAG-Gym/ReSearch-HotpotQA-SFT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/RAG-Gym/ReSearch-HotpotQA-SFT. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/RAG-Gym/ReSearch-HotpotQA-SFT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/RAG-Gym/ReSearch-HotpotQA-SFT. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/RAG-Gym/ReSearch-HotpotQA-SFT. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use RAG-Gym/ReSearch-HotpotQA-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RAG-Gym/ReSearch-HotpotQA-SFT with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "RAG-Gym/ReSearch-HotpotQA-SFT") - Notebooks
- Google Colab
- Kaggle
ReSearch-HotpotQA-SFT
This is the SFT actor for the Re$^2$Search agent on HotpotQA, released as part of RAG-Gym. Re$^2$Search is the proposed architecture in RAG-Gym. It is the Re$^2$Search (Reason, Reflection, Search) agent, which reflects on its reasoning to surface unsupported claims and turn them into targeted queries. This checkpoint was trained with supervised fine-tuning on preferred process-reward actions.
- Base model:
meta-llama/Meta-Llama-3.1-8B-Instruct - Agent architecture: Re$^2$Search (the proposed architecture in RAG-Gym)
- Task / dataset: HotpotQA (multi-hop question answering over Wikipedia)
- Training method: supervised fine-tuning (SFT)
- Adapter: PEFT LoRA (r=256, alpha=512), task type
CAUSAL_LM - Precision: bf16
Intended use
- Act as the reasoning/search policy for the Re$^2$Search agent on HotpotQA-style (multi-hop question answering over Wikipedia) tasks within RAG-Gym.
- Can be run with zero-shot inference or, together with the matching PRM critic, with critic-guided (Best-of-N) inference.
This model is intended for research on process-supervised retrieval-augmented generation. It is not intended for clinical decision-making or other high-stakes use.
How to use
Load the LoRA adapter on top of the base model:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base = "meta-llama/Meta-Llama-3.1-8B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16)
model = PeftModel.from_pretrained(model, "RAG-Gym/ReSearch-HotpotQA-SFT")
For full usage within the agent framework (environment setup, inference, and critic-guided Best-of-N selection), see the RAG-Gym repository.
Training
Fine-tuned from meta-llama/Meta-Llama-3.1-8B-Instruct on HotpotQA process-reward data using supervised fine-tuning (SFT) with the TRL library. Adaptation uses LoRA (rank 256, alpha 512, task type CAUSAL_LM) in bf16. The training code and full configuration are available in the RAG-Gym repository.
Limitations
The model is trained on HotpotQA-style data and is intended for research use within RAG-Gym. Outputs may be inaccurate or unsupported by retrieved evidence and should not be relied upon for high-stakes decisions. As an 8B-parameter model, it requires a CUDA-enabled GPU to run efficiently.
License
Public Domain Notice (U.S. Government Work, NCBI). See the LICENSE in the repository. Please cite the authors when using this material.
Citation
@article{xiong2025raggym,
title={RAG-Gym: Optimizing Reasoning and Search Agents with Process Supervision},
author={Guangzhi Xiong and Qiao Jin and Xiao Wang and Yin Fang and Haolin Liu and Yifan Yang and Fangyuan Chen and Zhixing Song and Dengyu Wang and Minjia Zhang and Zhiyong Lu and Aidong Zhang},
journal={arXiv preprint arXiv:2502.13957},
year={2025}
}
- Downloads last month
- 20
Model tree for RAG-Gym/ReSearch-HotpotQA-SFT
Base model
meta-llama/Llama-3.1-8B