Instructions to use xushuwen23/GraphWalker-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xushuwen23/GraphWalker-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xushuwen23/GraphWalker-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xushuwen23/GraphWalker-7B") model = AutoModelForCausalLM.from_pretrained("xushuwen23/GraphWalker-7B") 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
- vLLM
How to use xushuwen23/GraphWalker-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xushuwen23/GraphWalker-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": "xushuwen23/GraphWalker-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xushuwen23/GraphWalker-7B
- SGLang
How to use xushuwen23/GraphWalker-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 "xushuwen23/GraphWalker-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": "xushuwen23/GraphWalker-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 "xushuwen23/GraphWalker-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": "xushuwen23/GraphWalker-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xushuwen23/GraphWalker-7B with Docker Model Runner:
docker model run hf.co/xushuwen23/GraphWalker-7B
GraphWalker-7B
📄 Paper (arXiv:2603.28533) | 💻 GitHub | 🤗 Model
GraphWalker-7B is a specialized large language model fine-tuned from Qwen2.5-7B-Instruct for Agentic Knowledge Graph Question Answering (KGQA). GraphWalker learns to navigate knowledge graphs via synthetic trajectory curriculum — achieving strong generalization with a single, compact 7B model.
🌟 Overview
GraphWalker is an agentic framework for multi-turn Knowledge Graph Question Answering (KGQA) over Global Knowledge Graphs (e.g., Freebase). It transforms LLMs into reasoning agents that autonomously navigate massive KGs through a "Think-Query-Observe" loop, optimized via a synthetic curriculum.
🛠️ Usage
1. Environment Setup
pip install vllm transformers
2. Download the Model
# Via huggingface-cli
huggingface-cli download xushuwen23/GraphWalker-7B --local-dir ./GraphWalker-7B
3. Inference with vLLM (Recommended)
Start the vLLM server:
vllm serve "xushuwen23/GraphWalker-7B" \
--host 0.0.0.0 --port 22240 \
--served-model-name graphwalker-7b \
--gpu-memory-utilization 0.9 \
--dtype auto \
--chat-template "./GraphWalker-7B/chat_template.jinja"
For training and evaluation, see 💻 GitHub for details.
📈 Evaluation Results
| Method | Backbone | CWQ EM | CWQ F1 | WebQSP EM | WebQSP F1 |
|---|---|---|---|---|---|
| GraphWalker | |||||
| †Vanilla Agent | Qwen2.5-7B-Instruct | 40.7 | 33.2 | 68.4 | 66.1 |
| †Vanilla Agent | GPT-4o-mini | 63.4 | 60.3 | 79.6 | 70.6 |
| †Vanilla Agent | DeepSeek-V3.2 | 69.8 | 63.5 | 76.7 | 71.8 |
| GraphWalker-7B-SFT | Qwen2.5-7B-Instruct | 68.3 | 63.2 | 82.0 | 79.1 |
| GraphWalker-3B-SFT-RL | Qwen2.5-3B-Instruct | 70.9 | 65.2 | 83.5 | 81.7 |
| GraphWalker-8B-SFT-RL | LLaMA3.1-8B-Instruct | 78.5 | 69.6 | 88.2 | 84.5 |
| GraphWalker-7B-SFT-RL | Qwen2.5-7B-Instruct | 79.6 | 74.2 | 91.5 | 88.6 |
📝 Citation
If you use GraphWalker-7B or find this work helpful, please cite:
@misc{xu2026graphwalkeragenticknowledgegraph,
title={GraphWalker: Agentic Knowledge Graph Question Answering via Synthetic Trajectory Curriculum},
author={Shuwen Xu and Yao Xu and Jiaxiang Liu and Chenhao Yuan and Wenshuo Peng and Jun Zhao and Kang Liu},
year={2026},
eprint={2603.28533},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.28533},
}
📄 License
This model is released under the Apache 2.0 License, consistent with the base model Qwen2.5-7B-Instruct.
- Downloads last month
- 8