--- language: - en size_categories: - 10K

WebLINX: Real-World Website Navigation with Multi-Turn Dialogue

Xing Han Lù*, Zdeněk Kasner*, Siva Reddy
📄Paper
🌐Website
💻Explorer
💾Code
🐦Tweets
🤖Models
## Quickstart To get started, simply install `datasets` with `pip install datasets` and load the chat data splits: ```python from datasets import load_dataset from huggingface_hub import snapshot_download valid = load_dataset("McGill-NLP/weblinx", split="validation") snapshot_download( "McGill-NLP/WebLINX", repo_type="dataset", allow_patterns="templates/llama.txt", local_dir="./" ) with open('templates/llama.txt') as f: template = f.read() turn = valid[0] turn_text = template.format(**turn) ``` You can now use `turn_text` as an input to LLaMA-style models. For example, you can use Sheared-LLaMA: ```python from transformers import pipeline action_model = pipeline( model="McGill-NLP/Sheared-LLaMA-2.7B-weblinx", device=0, torch_dtype='auto' ) out = action_model(turn_text, return_full_text=False, max_new_tokens=64, truncation=True) pred = out[0]['generated_text'] print("Ref:", turn["action"]) print("Pred:", pred) ``` ## Raw Data To use the raw data, you will need to use the `huggingface_hub`: ```python from huggingface_hub import snapshot_download snapshot_download(repo_id="McGill-NLP/WebLINX-full", repo_type="dataset", local_dir="./data/weblinx") ``` For more information on how to use this data using our [official library](https://github.com/McGill-NLP/WebLINX), please refer to the [WebLINX documentation](https://mcgill-nlp.github.io/weblinx/docs).