Feature Extraction
Transformers
Safetensors
Laya
English
multilingual
laya_browser
custom_code
system-1
browser-agent
web-navigation
decision-model
mmbert
mind2web
tilelang
Instructions to use cklxx/laya-browser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cklxx/laya-browser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="cklxx/laya-browser", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cklxx/laya-browser", trust_remote_code=True, device_map="auto") - Laya
How to use cklxx/laya-browser with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download code/finetune/make_subset.py from cklxx/laya-browser: direct link, hf CLI and curl.
- Browser
- Download file 817 Bytes
-
https://huggingface.co/cklxx/laya-browser/resolve/main/code/finetune/make_subset.py
- Command line
-
hf download hf://cklxx/laya-browser/code/finetune/make_subset.py
-
curl -L -o make_subset.py https://huggingface.co/cklxx/laya-browser/resolve/main/code/finetune/make_subset.py
817 Bytes
| """Fixed random subset of an items file. | |
| python finetune/make_subset.py <items.pt> <out.pt> [n=100000] [seed=0] [exclude_src=a,b]""" | |
| import random, sys, torch | |
| items = torch.load(sys.argv[1], weights_only=False) | |
| excl = set(sys.argv[5].split(",")) if len(sys.argv) > 5 and sys.argv[5] else set() | |
| pool = [i for i in range(len(items)) if items[i].get("src") not in excl] | |
| n = min(int(sys.argv[3]) if len(sys.argv) > 3 else 100000, len(pool)) | |
| idx = sorted(random.Random(int(sys.argv[4]) if len(sys.argv) > 4 else 0).sample(pool, n)) | |
| sub = [items[i] for i in idx] | |
| torch.save(sub, sys.argv[2]) | |
| import collections | |
| print(len(items), "->", len(sub), "src", dict(collections.Counter(i.get("src") for i in sub).most_common(8)), | |
| "goal_done", dict(collections.Counter(i["label"] for i in sub if i["qid"] == "goal_done"))) | |