Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use X1AOX1A/WorldModel-Textworld-Qwen2.5-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use X1AOX1A/WorldModel-Textworld-Qwen2.5-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="X1AOX1A/WorldModel-Textworld-Qwen2.5-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("X1AOX1A/WorldModel-Textworld-Qwen2.5-7B") model = AutoModelForCausalLM.from_pretrained("X1AOX1A/WorldModel-Textworld-Qwen2.5-7B", 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 X1AOX1A/WorldModel-Textworld-Qwen2.5-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "X1AOX1A/WorldModel-Textworld-Qwen2.5-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "X1AOX1A/WorldModel-Textworld-Qwen2.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/X1AOX1A/WorldModel-Textworld-Qwen2.5-7B
- SGLang
How to use X1AOX1A/WorldModel-Textworld-Qwen2.5-7B 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 "X1AOX1A/WorldModel-Textworld-Qwen2.5-7B" \ --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": "X1AOX1A/WorldModel-Textworld-Qwen2.5-7B", "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 "X1AOX1A/WorldModel-Textworld-Qwen2.5-7B" \ --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": "X1AOX1A/WorldModel-Textworld-Qwen2.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use X1AOX1A/WorldModel-Textworld-Qwen2.5-7B with Docker Model Runner:
docker model run hf.co/X1AOX1A/WorldModel-Textworld-Qwen2.5-7B
Add model card and metadata
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
# *From Word to World*: Can Large Language Models be Implicit Text-based World Models?
|
| 3 |
|
|
@@ -7,3 +18,32 @@
|
|
| 7 |
[](https://huggingface.co/collections/X1AOX1A/llm-as-world-models)
|
| 8 |
[](https://huggingface.co/datasets/X1AOX1A/LLMasWorldModels)
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
base_model: Qwen/Qwen2.5-7B
|
| 6 |
+
tags:
|
| 7 |
+
- world-model
|
| 8 |
+
- reinforcement-learning
|
| 9 |
+
- agent
|
| 10 |
+
- alfworld
|
| 11 |
+
---
|
| 12 |
|
| 13 |
# *From Word to World*: Can Large Language Models be Implicit Text-based World Models?
|
| 14 |
|
|
|
|
| 18 |
[](https://huggingface.co/collections/X1AOX1A/llm-as-world-models)
|
| 19 |
[](https://huggingface.co/datasets/X1AOX1A/LLMasWorldModels)
|
| 20 |
|
| 21 |
+
This repository contains the **WorldModel-Alfworld-Qwen2.5-7B** checkpoint, a large language model fine-tuned to serve as an implicit world model for the **ALFWorld** text-based environment. It is part of the research presented in the paper "[From Word to World: Can Large Language Models be Implicit Text-based World Models?](https://huggingface.co/papers/2512.18832)".
|
| 22 |
+
|
| 23 |
+
## Introduction
|
| 24 |
+
|
| 25 |
+
World models offer a potential way to improve learning efficiency in agentic reinforcement learning through simulated experience. This work reinterprets language modeling as next-state prediction under interaction. Across several environments, the authors find that sufficiently trained world models:
|
| 26 |
+
- Maintain coherent latent states.
|
| 27 |
+
- Scale predictably with data and model size.
|
| 28 |
+
- Improve agent performance via action verification and synthetic trajectory generation.
|
| 29 |
+
|
| 30 |
+
## Resources
|
| 31 |
+
|
| 32 |
+
- **GitHub Repository**: [X1AOX1A/Word2World](https://github.com/X1AOX1A/Word2World)
|
| 33 |
+
- **Paper**: [arXiv:2512.18832](https://arxiv.org/abs/2512.18832)
|
| 34 |
+
- **Dataset**: [LLMasWorldModels](https://huggingface.co/datasets/X1AOX1A/LLMasWorldModels)
|
| 35 |
+
- **Blog Post**: [How World Models Unlock Scalable Agentic RL](https://macaron.im/mindlab/research/how-world-models-unlock-scalable-agentic-rl)
|
| 36 |
+
|
| 37 |
+
## Citation
|
| 38 |
+
|
| 39 |
+
```bibtex
|
| 40 |
+
@misc{li2025wordworldlargelanguage,
|
| 41 |
+
title={From Word to World: Can Large Language Models be Implicit Text-based World Models?},
|
| 42 |
+
author={Yixia Li and Hongru Wang and Jiahao Qiu and Zhenfei Yin and Dongdong Zhang and Cheng Qian and Zeping Li and Pony Ma and Guanhua Chen and Heng Ji and Mengdi Wang},
|
| 43 |
+
year={2025},
|
| 44 |
+
eprint={2512.18832},
|
| 45 |
+
archivePrefix={arXiv},
|
| 46 |
+
primaryClass={cs.CL},
|
| 47 |
+
url={https://arxiv.org/abs/2512.18832},
|
| 48 |
+
}
|
| 49 |
+
```
|