WebLINX / README.md
xhluca's picture
Update README.md
17b49e1 verified
|
raw
history blame
5.09 kB
metadata
language:
  - en
size_categories:
  - 10K<n<100K
config_names:
  - chat
configs:
  - config_name: chat
    default: true
    data_files:
      - split: train
        path: data/train.csv
      - split: validation
        path: data/valid.csv
      - split: test
        path: data/test_iid.csv
      - split: test_geo
        path: data/test_geo.csv
      - split: test_vis
        path: data/test_vis.csv
      - split: test_cat
        path: data/test_cat.csv
      - split: test_web
        path: data/test_web.csv
tags:
  - conversational
  - image-to-text
  - vision
  - convAI
task_categories:
  - image-to-text
  - text-generation
  - text2text-generation
  - sentence-similarity
pretty_name: weblinx
license: cc-by-nc-sa-4.0

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

Xing Han Lù*, Zdeněk Kasner*, Siva Reddy

Quickstart

To get started, simply install datasets with pip install datasets and load the chat data splits:

from datasets import load_dataset
from huggingface_hub import snapshot_download

# Load the validation split
valid = load_dataset("McGill-NLP/weblinx", split="validation")

# Download the input templates and use the LLaMA one
snapshot_download(
    "McGill-NLP/WebLINX", repo_type="dataset", allow_patterns="templates/*", local_dir="."
)
with open('templates/llama.txt') as f:
    template = f.read()

# To get the input text, simply pass a turn from the valid split to the template
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:

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:

from huggingface_hub import snapshot_download

snapshot_download(repo_id="McGill-NLP/WebLINX-full", repo_type="dataset", local_dir="./wl_data")

# You can download specific demos, for example
demo_names = ['saabwsg', 'ygprzve', 'iqaazif']  # 3 random demo from valid
patterns = [f"demonstrations/{name}/*" for name in demo_names]
snapshot_download(
    repo_id="McGill-NLP/WebLINX-full", repo_type="dataset", local_dir="./wl_data", allow_patterns=patterns
)

For more information on how to use this data using our official library, please refer to the WebLINX documentation.

License and Terms of Use

License: The Dataset is made available under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).

By downloading this Dataset, you agree to comply with the following terms of use:

  • Restrictions: You agree not to use the Dataset in any way that is unlawful or would infringe upon the rights of others.
  • Acknowledgment: By using the Dataset, you acknowledge that the Dataset may contain data derived from third-party sources, and you agree to abide by any additional terms and conditions that may apply to such third-party data.
  • Fair Use Declaration: The Dataset may be used for research if it constitutes "fair use" under copyright laws within your jurisdiction. You are responsible for ensuring your use complies with applicable laws.

Derivatives must also include the terms of use above.

Citation

If you use our dataset, please cite our work as follows:

@misc{lu-2024-weblinx,
      title={WebLINX: Real-World Website Navigation with Multi-Turn Dialogue}, 
      author={Xing Han Lù and Zdeněk Kasner and Siva Reddy},
      year={2024},
      eprint={2402.05930},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}