跳到正文
r/LocalLLaMA· /u/manjunath_shiva·· 2 小时前AI 评分67

作者发布 Chrome 扩展,用浏览器内本地小模型过滤 YouTube 信息流

I made a Chrome extension that filters your YouTube feed with a small local model running in the browser (WebGPU, no server)

AI 导读

作者发布 Chrome 扩展 opendecider-focus,用浏览器内运行的本地小模型判断 YouTube 视频标题并隐藏指定类别,全程无服务器、无 API key,下载后可离线使用。

正文
I made a Chrome extension that filters your YouTube feed with a small local model running in the browser (WebGPU, no server)

My YouTube feed was mostly songs, pranks and celebrity clips, so I built a filter that judges each video title with a small decision model running inside Chrome. Nothing is sent anywhere: no server, no API key, no account, and after one download it works offline.

What it does

- Hides the kinds of video you choose (11 kinds: music, gaming, comedy, vlogs, news, how-tos, and so on), or follows a rule you write: "Hide videos about crypto", "Show only videos about cooking"

- Hides Shorts with one switch

- Bonus: select any text, right-click, and check it for prompt injection with the same model

How it runs

- The model is opendecider-nano (ONNX), loaded through ONNX Runtime Web in an offscreen document

- fp16 on WebGPU (755 MiB download), q8 on WASM without a GPU (569 MiB)

- 40 video titles: 1.1 s on WebGPU, about 15 s on CPU (M4 Max). About 3 GiB of RAM while loaded; it unloads after 10 idle minutes

- The weights are pinned by revision and SHA-256. The only network requests are to Hugging Face for those files

How well it works

- On 400 YouTube videos, with the creator's category as the label, rules like "hide music", "hide gaming" and "only news" score 0.934 balanced accuracy on average

- Sorting videos into the 11 kinds is harder: 0.780. Expect a few comedy and talk-show clips to get through the Focus preset

- Only evaluated on English titles. If you watch in other languages, I'd really like to know how it does

Try it (Web Store version is in review):

  1. Download opendecider-focus-0.8.1.zip from https://github.com/manjunathshiva/opendecider/releases/latest and unzip it

  2. chrome://extensions → Developer mode → Load unpacked → pick the folder

  3. Click the icon → Download the model

Apache-2.0. Benchmarks, code and limits: https://manjunathshiva.github.io/opendecider/guides/chrome-extension/

The idea comes from Quietly, which does this with a cloud API; I wanted the same thing running on-device. Feedback welcome, especially what it gets wrong.

submitted by /u/manjunath_shiva
[link] [留言]

来源:r/LocalLLaMA · reddit.com