Instructions to use bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct") model = AutoModelForCausalLM.from_pretrained("bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct
- SGLang
How to use bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct with Docker Model Runner:
docker model run hf.co/bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct
Bactrainus HotpotQA One-Step Selector--Reader — Llama 3 8B Instruct
Artifact identity
- Status: complete merged causal-language-model checkpoint
- Base model:
meta-llama/Meta-Llama-3-8B-Instruct - Audited Hub revision:
7842b5845df7be3618e077a618866a3e0826972e - Public artifact date: August 2024
- Role: joint supporting-fact and answer generation
Despite the historical repository name, this model is not an open-domain retriever. It operates over the candidate paragraphs supplied with each HotpotQA example and jointly emits evidence and an answer.
This is a legacy Llama 3 checkpoint, not the revised manuscript's Llama 3.1 all-in-one baseline.
Model summary
The model represents the non-modular Bactrainus comparison. One generation receives the question and all supplied candidates and is expected to produce supporting-fact references together with the final answer. This couples evidence and answer errors in one output.
Intended use
- Fixed-candidate joint evidence/answer generation research.
- Comparison with separately trained paragraph, sentence, and reader modules.
- Analysis of parser and output-factorization failures.
Out-of-scope use
- Corpus-scale retrieval, indexing, or web search.
- Treating generated evidence as verified provenance without validation.
- Safety-critical or high-stakes applications.
- Claiming that revised Llama 3.1 results measure this historical checkpoint.
Input and output contract
Input should include:
- one question;
- all candidate paragraphs supplied with the example;
- exact paragraph titles and zero-based sentence indices;
- an output instruction for supporting facts and the final answer.
Output is free-form text containing two logical objects: supporting-fact pairs and an answer. A strict parser must validate every title/index pair against the input candidates and parse the answer separately. Malformed evidence must not be silently repaired.
The exact historical prompt syntax is not encoded in the public model configuration.
Loading
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct"
REVISION = "7842b5845df7be3618e077a618866a3e0826972e"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, revision=REVISION)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
revision=REVISION,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model.eval()
Training data and lineage
The checkpoint derives from Meta Llama 3 8B Instruct and HotpotQA-derived joint supervision. Its matching canonical training view is joint-selector-reader-sft in bactrianus/bactrainus-hotpotqa, pinned to dataset tag v1.0.0. The view contains all 90,447 training source IDs and remains joinable to every other view through source_id. It is a cleaned deterministic release; byte identity with the historical 2024 serialization is not asserted.
from datasets import load_dataset
train = load_dataset(
"bactrianus/bactrainus-hotpotqa",
"joint-selector-reader-sft",
split="train",
revision="v1.0.0",
)
The revised manuscript specifications describe later Llama 3.1 experiments and do not retrospectively define this legacy checkpoint's optimizer history.
Evaluation boundary
No predictions, result files, or performance claims are included. Consult the paper for the all-in-one comparison and its single-run limitations.
Limitations
- Evidence and answer errors are coupled in one generation.
- Long candidate sets can amplify distractor sensitivity and truncation risk.
- Exact supporting-fact metrics are sensitive to one missing or extra sentence.
- The model does not retrieve outside the benchmark-provided candidate set.
- Generated titles, indices, and answers require strict validation.
- The historical release lacks a complete prompt/environment manifest.
License and attribution
The weights remain subject to the Meta Llama 3 Community License and Acceptable Use Policy.
Meta Llama 3 is licensed under the Meta Llama 3 Community License, Copyright Meta Platforms, Inc. All Rights Reserved.
Built with Meta Llama 3.
HotpotQA-derived data is licensed under CC BY-SA 4.0. Bactrainus code is Apache-2.0 licensed.
Citation
@article{barati2025bactrainus,
title = {Bactrainus: Optimizing Large Language Models for Multi-hop Complex Question Answering Tasks},
author = {Barati, Iman and Ghafouri, Arash and Minaei-Bidgoli, Behrouz},
journal = {arXiv preprint arXiv:2501.06286},
year = {2025},
doi = {10.48550/arXiv.2501.06286},
url = {https://arxiv.org/abs/2501.06286}
}
- Downloads last month
- 218
Model tree for bactrianus/HotpotQA-OneStep-Retriever-Llama-3-8B-Instruct
Base model
meta-llama/Meta-Llama-3-8B-Instruct