osunlp/Mind2Web
Viewer • Updated • 253 • 10k • 125
How to use doeve/web-agent-bge-small-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("doeve/web-agent-bge-small-v1")
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]A fine-tuned bi-encoder for web element selection, trained on the Mind2Web dataset.
Given a natural-language task description (e.g., "click the search button") and a set of serialized web page elements, this model identifies the correct element to interact with.
This model expects inputs serialized in the web-agent v1 format. See the
repository's docs/spec/03-node-serialization.md for the full specification.
Models trained on a different format version are incompatible.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("doeve/web-agent-bge-small-v1", revision="v1.0.0")
query_emb = model.encode(["search for flights"])
candidate_embs = model.encode(["textbox \"Search\" | — | in form:\"\", ..."])
Or via Transformers.js in the browser:
import { pipeline } from "@huggingface/transformers";
const extractor = await pipeline("feature-extraction", "doeve/web-agent-bge-small-v1",
{ revision: "v1.0.0", dtype: "q8" });