dejanseo / google-links

huggingface.co
Total runs: 97
24-hour runs: -1
7-day runs: 36
30-day runs: 55
Model's Last Updated: February 16 2026
token-classification

Introduction of google-links

Model Details of google-links

Link Anchor Detection Model

A fine-tuned DeBERTa v3 model that predicts which words in text should be hyperlinks. Trained on 10,273 pages scraped from The Keyword (Google's official blog), where editorial linking decisions serve as ground truth labels.

How It Works

Given raw text, the model performs token-level binary classification — each token is labeled LINK or O (not a link). This identifies anchor text candidates: words that a human editor would likely hyperlink.

Pipeline
sitemap.xml (10,274 URLs from blog.google)
        │
        ▼
   scrape.py ──► scraped.db (SQLite, 10,273 pages with markdown + inline links)
        │
        ▼
    _prep.py ──► train_windows.jsonl / val_windows.jsonl
        │         • Strip markdown, annotate link spans as [LINK_START]...[LINK_END]
        │         • Tokenize with DeBERTa, align labels to tokens
        │         • Sliding windows (512 tokens, stride 128)
        │         • 90/10 doc-level split
        ▼
   train.py ──► model_link_token_cls/
        │         • Fine-tune microsoft/mdeberta-v3-base
        │         • Weighted cross-entropy (~25x for minority class)
        │         • 3 epochs, lr 2e-5, batch 16
        ▼
    app.py ──► Streamlit UI
                  • Sliding-window inference (handles any text length)
                  • Word-level highlighting with confidence scores
Data

Source: blog.google sitemap (The Keyword — Google's product and technology blog).

Metric Value
Pages scraped 10,273
Total tokens 8.2M
Link tokens 286,799 (3.48%)
Training windows 21,264
Validation windows 2,402

The class imbalance (96.5% non-link vs 3.5% link) is handled with weighted cross-entropy loss during training.

Model
  • Base : microsoft/mdeberta-v3-base (DebertaV2ForTokenClassification)
  • Labels : O (0), LINK (1)
  • Max position : 512 tokens
  • Parameters : 12 layers, 768 hidden, 12 attention heads
Evaluation Results
Metric Value
Accuracy 95.6%
Precision 42.4%
Recall 79.5%
F1 0.553

High recall means the model catches most link-worthy text. Lower precision reflects the inherent ambiguity — many words could be linked, so "false positives" are often reasonable candidates.

Usage
Streamlit App
streamlit run app.py

Paste text, adjust the confidence threshold, and see predicted link anchors highlighted in green.

Python
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch
import torch.nn.functional as F

tokenizer = AutoTokenizer.from_pretrained("model_link_token_cls")
model = AutoModelForTokenClassification.from_pretrained("model_link_token_cls")
model.eval()

text = "Google announced new features for Search and Gmail today."
enc = tokenizer(text, return_tensors="pt", return_offsets_mapping=True)
with torch.no_grad():
    logits = model(input_ids=enc["input_ids"], attention_mask=enc["attention_mask"]).logits
    probs = F.softmax(logits, dim=-1)[0, :, 1]  # P(LINK) per token

for token, offset, p in zip(
    tokenizer.convert_ids_to_tokens(enc["input_ids"][0]),
    enc["offset_mapping"][0],
    probs
):
    if offset[0] == offset[1]:
        continue  # skip special tokens
    if p > 0.5:
        print(f"  LINK: {text[offset[0]:offset[1]]} ({p:.2%})")
Scripts
File Purpose
scrape.py Async Playwright scraper; reads sitemap.xml, saves to SQLite + markdown files
_prep.py Cleans markdown, annotates link spans, tokenizes, creates sliding windows
train.py Fine-tunes DeBERTa with weighted loss, W&B tracking
app.py Streamlit inference app with sliding-window support
_count.py Token length analysis utility
_detok.py Token ID decoder (Streamlit)
Requirements
  • Python 3.8+
  • PyTorch
  • Transformers
  • Playwright (for scraping)
  • Streamlit (for inference app)

Runs of dejanseo google-links on huggingface.co

97
Total runs
-1
24-hour runs
18
3-day runs
36
7-day runs
55
30-day runs

More Information About google-links huggingface.co Model

google-links huggingface.co

google-links huggingface.co is an AI model on huggingface.co that provides google-links's model effect (), which can be used instantly with this dejanseo google-links model. huggingface.co supports a free trial of the google-links model, and also provides paid use of the google-links. Support call google-links model through api, including Node.js, Python, http.

google-links huggingface.co Url

https://huggingface.co/dejanseo/google-links

dejanseo google-links online free

google-links huggingface.co is an online trial and call api platform, which integrates google-links's modeling effects, including api services, and provides a free online trial of google-links, you can try google-links online for free by clicking the link below.

dejanseo google-links online free url in huggingface.co:

https://huggingface.co/dejanseo/google-links

google-links install

google-links is an open source model from GitHub that offers a free installation service, and any user can find google-links on GitHub to install. At the same time, huggingface.co provides the effect of google-links install, users can directly use google-links installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

google-links install url in huggingface.co:

https://huggingface.co/dejanseo/google-links

Url of google-links

google-links huggingface.co Url

Provider of google-links huggingface.co

dejanseo
ORGANIZATIONS

Other API from dejanseo

huggingface.co

Total runs: 423
Run Growth: 128
Growth Rate: 30.26%
Updated:November 20 2025
huggingface.co

Total runs: 60
Run Growth: 0
Growth Rate: 0.00%
Updated:August 15 2024
huggingface.co

Total runs: 46
Run Growth: 34
Growth Rate: 73.91%
Updated:August 15 2024
huggingface.co

Total runs: 36
Run Growth: 0
Growth Rate: 0.00%
Updated:July 10 2024
huggingface.co

Total runs: 32
Run Growth: -17
Growth Rate: -53.13%
Updated:November 20 2025
huggingface.co

Total runs: 30
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2024
huggingface.co

Total runs: 27
Run Growth: 10
Growth Rate: 37.04%
Updated:April 25 2025
huggingface.co

Total runs: 26
Run Growth: 16
Growth Rate: 61.54%
Updated:September 04 2024
huggingface.co

Total runs: 24
Run Growth: 0
Growth Rate: 0.00%
Updated:July 17 2024
huggingface.co

Total runs: 20
Run Growth: 2
Growth Rate: 10.00%
Updated:April 22 2025
huggingface.co

Total runs: 17
Run Growth: 1
Growth Rate: 5.88%
Updated:July 05 2026
huggingface.co

Total runs: 12
Run Growth: -5
Growth Rate: -41.67%
Updated:August 15 2024
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:July 26 2024
huggingface.co

Total runs: 10
Run Growth: 3
Growth Rate: 30.00%
Updated:April 17 2025
huggingface.co

Total runs: 10
Run Growth: 4
Growth Rate: 40.00%
Updated:April 09 2025
huggingface.co

Total runs: 10
Run Growth: 5
Growth Rate: 50.00%
Updated:June 14 2025
huggingface.co

Total runs: 6
Run Growth: 2
Growth Rate: 33.33%
Updated:April 17 2025
huggingface.co

Total runs: 5
Run Growth: 0
Growth Rate: 0.00%
Updated:May 10 2024
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:June 29 2024
huggingface.co

Total runs: 3
Run Growth: -2
Growth Rate: -66.67%
Updated:September 17 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 17 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 17 2026