Hasty Briefsbeta

Bilingual

Exploring on-device AI link previews in Firefox

a year ago
  • #AI
  • #Browsing
  • #Firefox
  • Firefox Labs 138 introduces an optional experimental feature for link previews to enhance browsing experience.
  • Link Preview activation: hover over a link and press Shift + Alt (Option on macOS) to see a card with title, description, image, reading time, and 3 key points.
  • The preview card appears in a separate panel, positioned near the cursor, reinforcing it's from Firefox and not the page.
  • Initial implementation uses credentialless HTTPS requests to fetch page HTML without executing scripts, sending a custom x-firefox-ai header.
  • Metadata like Open Graph tags and Firefox’s Reader View capabilities are used to extract title, description, image, reading time, and key points.
  • Key points are generated on-device using wllama (WebAssembly llama.cpp) with SmolLM2-360M from HuggingFace for privacy.
  • Performance: first key point appears within 4 seconds, with subsequent points within a second.
  • Optimizations include pre-downloading the AI model (369MB) and limiting content provided to the model.
  • Future improvements focus on multiple languages, key points quality, and bringing the feature to Android.
  • Feedback is encouraged via AI@Mozilla discord #firefox-ai.