Instructions to use Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ricardo-H/BehR-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("Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B") model = AutoModelForCausalLM.from_pretrained("Ricardo-H/BehR-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 Ricardo-H/BehR-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 "Ricardo-H/BehR-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": "Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B
- SGLang
How to use Ricardo-H/BehR-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 "Ricardo-H/BehR-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": "Ricardo-H/BehR-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 "Ricardo-H/BehR-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": "Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B with Docker Model Runner:
docker model run hf.co/Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B
BehR-WorldModel-Textworld-Qwen2.5-7B
A behavior-consistent text-based world model for TextWorld.
- Paper: Beyond State Consistency: Behavior Consistency in Text-Based World Models (arXiv:2604.13824)
- Serving and evaluation repository: https://github.com/Ricardo-H/behr-wm
Model details
| Field | Value |
|---|---|
| Base model | X1AOX1A/WorldModel-Textworld-Qwen2.5-7B |
| Base revision | b052a201ae867c3058efba17c9af9cb1635d1f09 |
| Architecture | Qwen2ForCausalLM (Qwen2.5-7B) |
| Environment | TextWorld, via AgentGym |
Given the agent-visible interaction history and the agent's next action, the model predicts the next environment observation. It can therefore act as a text simulator for agent rollouts in TextWorld.
Transformers usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
Evaluation
The paper evaluates this model on TextWorld with single-step exact match, task-success and consistency metrics. See the paper and the serving and evaluation repository for the evaluation protocol and reported results.
Intended use and limitations
- Intended for research on world models and agent simulation in text-based environments.
- Evaluated only on TextWorld; behavior outside that distribution is unvalidated.
- Predicted observations may be plausible but factually wrong. Do not treat outputs as ground truth about the real environment.
- The model inherits biases and failure modes from Qwen2.5-7B and the base world model.
License and provenance
This model is a derivative of X1AOX1A/WorldModel-Textworld-Qwen2.5-7B at revision b052a201ae867c3058efba17c9af9cb1635d1f09, which is itself derived from Qwen2.5-7B. Use is governed by the Qwen2.5 license and by the terms of the base world model; check the base repository before redistribution or commercial use. The serving and evaluation repository is Apache-2.0; these model weights are not.
The base world model and the WebShop/TextWorld data splits originate from From Word to World: Can Large Language Models be Implicit Text-based World Models? (arXiv:2512.18832).
Citation
@article{huang2026behrwm,
title = {Beyond State Consistency: Behavior Consistency in Text-Based World Models},
author = {Huang, Youling and Chen, Guanqiao and Yao, Junchi and Wang, Lu and
Yang, Fangkai and Du, Chao and Zhao, ChenZhuo and Zhao, Pu and
Lin, Qingwei and Rajmohan, Saravan and Zhang, Dongmei},
journal = {arXiv preprint arXiv:2604.13824},
year = {2026},
url = {https://arxiv.org/abs/2604.13824}
}
- Downloads last month
- 331
Model tree for Ricardo-H/BehR-WorldModel-Textworld-Qwen2.5-7B
Base model
Qwen/Qwen2.5-7B