Run this model with HF Jobs

Run TheAutomatedTester/locator-model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/TheAutomatedTester/locator-model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/TheAutomatedTester/locator-model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers.js library
// npm i @huggingface/transformers
import { pipeline } from '@huggingface/transformers';

// Allocate pipeline
const pipe = await pipeline('feature-extraction', 'TheAutomatedTester/locator-model');

Cartographer locator model

A fine-tuned all-MiniLM-L6-v2 for Cartographer's get_element_locator tool. Given a plain-English description ("checkout button"), it ranks the elements on a web page by how close their meaning is to the description.

It ships as ONNX in the layout Transformers.js loads, with full-precision (onnx/model.onnx, 90 MB) and 8-bit (onnx/model_quantized.onnx, 23 MB) copies. Cartographer loads the 8-bit copy.

Using it with Cartographer

Variable Value
CARTOGRAPHER_LOCATOR_MODEL TheAutomatedTester/locator-model
CARTOGRAPHER_LOCATOR_MIN_SIMILARITY 0.44

Set the threshold too. This model scores on its own scale; below 0.44, a description that matches nothing on the page can still get a confident answer.

What the model compares

Descriptions are compared with element text in the form Cartographer's describeElement writes, for example:

button, text: Log in
password input, placeholder: Password, name: pass
a, text: Sign up for free

Mean pooling, normalised embeddings, cosine similarity.

Training

Data training/data/train.jsonl at commit de8c059: 308 descriptions on 25 pages (14 hand-written, 11 harvested from automationexercise.com, parabank.parasoft.com, demowebshop.tricentis.com and selenium.dev)
Rows One per description, with the 5 wrong elements on the same page that the base model scores closest to it
Loss MultipleNegativesRankingLoss (the right element must beat its 5 hard wrong elements and every other element in the batch)
Settings 10 epochs, batch size 32, learning rate 2e-5, warmup 10%, seed 42

Evaluation

On training/data/eval.jsonl: 55 descriptions and 20 unrelated ones on 8 pages, from sites not in the training data (the-internet.herokuapp.com, quotes.toscrape.com, and a hand-built shop). Top-1 accuracy through Cartographer's own locator code, at each model's recommended threshold:

Matcher Descriptive ids Neutral ids (el0, el1, โ€ฆ) Threshold
Keyword only 22/55 16/55
all-MiniLM-L6-v2 (stock) 34/55 28/55 0.50
This model 40/55 34/55 0.44

The highest similarity for an unrelated description was 0.41.

Both datasets are small and were written by the same person, so treat these numbers as a smoke test rather than a benchmark. Known misses include "sign up link" picking a Sign In button, "complete purchase" missing a payment button, and "stop the camera" picking Start.

Limitations

  • English only.
  • Trained on test-practice sites, not real production sites.
  • Built to rank the elements on one page, not for general semantic search.
Downloads last month
69
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for TheAutomatedTester/locator-model