OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Onegen

OneGen is an open-source Python research framework that fine-tunes language models for generation, retrieval or hybrid tasks, with retrieval and generation combined in one autoregressive pass.

Independent OpenViST project profile, based on linked sources.

Onegen — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use OneGen when you want to investigate or prototype LLM workflows that retrieve information during generation, rather than using a separate retrieval-query pass.

Who it is for

  • Researchers studying unified language-model retrieval and generation.
  • Developers prototyping retrieval-augmented generation for entity linking or question answering.

Documented uses

  • Explore a single-pass approach to retrieval and generation with an LLM.
  • Run the provided entity-linking, single-hop QA and multi-hop QA task examples.
  • Use Faiss as the vector retrieval engine in supported inference configurations.
Before you choose

Requirements & limits

The repository is public and licensed under MIT. Its documented installation uses Git, Conda and Python 3.9.

  • The repository provides trained Llama 2 7B weights for entity linking, single-hop QA and multi-hop QA through Hugging Face, ModelScope and WiseModel.
  • Entity-linking and multi-hop QA inference examples require a GPU; their documented evaluation scripts run on CPU.
  • The README describes Faiss as an optional retrieval engine selected through the inference configuration.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the OneGen Python environment

Prepare the repository environment before following its training or inference instructions.

Before you start

  • Git
  • Conda
  • Python 3.9

Steps

  1. Clone the OneGen repository and change into its directory.

  2. Create and activate a Conda environment with Python 3.9.

  3. Install the packages listed in requirements.txt.

Expected outcome

A Conda environment with the repository’s listed Python dependencies installed.

Guide limitations

  • This setup does not run training or inference; those workflows have separate instructions.
  • Inference examples for entity linking and multi-hop QA require a GPU.
Source-based practical guide

Run entity-linking or multi-hop QA inference

Use the documented evaluation scripts to generate task predictions.

Before you start

  • The OneGen environment and dependencies.
  • A GPU.
  • A model and tokenizer path, plus input and output paths set in the relevant JSON configuration.

Steps

  1. Edit the relevant task configuration under config/eval_config to set fields such as model_path, tokenizer_path, file and output_file_path.

  2. For entity linking, run python eval.py --config config/eval_config/entity_linking/llama2_wo_pkl.json.

  3. For multi-hop QA, run python eval.py --config config/eval_config/multi_hop_qa/llama2.json.

  4. Optionally enable Faiss by setting use_faiss to true in the inference section of the configuration.

Expected outcome

An inference result file for the selected entity-linking or multi-hop QA task, which can then be passed to the corresponding evaluation script.

Guide limitations

  • The examples require a GPU.
  • Single-hop QA uses a separate Self-RAG-based evaluation workflow.
  • The guide covers prediction generation; evaluating results is a separate step.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
zjunlp/OneGen · Official homepage title · retained in its source language