🏭 DreamFactory: Grounding Language Models to World Model through Decentralized Generation and Centralized Verification
We introduce DreamFactory, a step towards Text-Based World Models that:
- 🌍 Simulates world states by leveraging the power of Large Language Models
- 🧬 Combines decentralized generation and centralized verification
For Details, Check Out [Paper]
- [2024/12/22] Our observation of Self-Refutation hindering performance is supported by [Understanding the Dark Side of LLMs' Intrinsic Self-Correction] through extensive experiments, great work!
- [2024/12/21] Release training and inference code.
- [2024/12/21] Release the paper.
Run the following Command:
conda create -n dreamfactory python=3.11.0
conda activate pandora
pip install -r
This project supports OPENAI API key, third-party API providers(together api) and local downloaded language models.
Example:
cd text-simulator
Local downloaded language models:
# For local models (Mistral-7B-v0.1 for example)
CUDA_VISIBLE_DEVICES=0 python experiments/quest_llama.py --model_path "mistralai/Mistral-7B-v0.1" --model_type local --output_prefix mistral_hwr_diff_full --device cuda --rule_folder ./rules/human_written_rules --output_folder results --data_type full --partial
Third-party API providers(together api)
# For third-party api providers
CUDA_VISIBLE_DEVICES=1 python experiments/quest_llama.py --model_path "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo" --model_type together --output_prefix llama3_405b_hwr_diff_full --device cuda --rule_folder ./rules/human_written_rules --output_folder results --data_type full --partial
Please contact us or post an issue if you have any questions (as a course project, we do expect to encounter some questions lol).
📬 Siqiao Huang (huang-sq23@mails.tsinghua.edu.cn)
📬 Pingyue Sheng (chengpy23@mails.tsinghua.edu.cn)
📬 Jiahe Guo (guojh23@mails.tsinghua.edu.cn)
The text-simulator
part of this codebase is based on the implementation from Can Language Models Serve as Text-Based World Simulators?.