🇬🇧 English · 🇪🇸 Español · 🇨🇳 中文
A powerful userscript to filter Hugging Face models by positive/negative keywords, with Regex support, a floating draggable panel, multi-language interface, and automatic infinite scroll detection. Works on all model listing pages including user/organization profiles. Built for ViolentMonkey / TamperMonkey / Greasemonkey.
Floating draggable filter panel — glassmorphism design with dark mode support. Green badge = positive match, red badge = negative match, dimmed = filtered out
- ✅ Positive keyword filtering — Show only models matching your desired keywords
- ❌ Negative keyword filtering — Hide or dim models you don't want to see
- 🎨 Modern floating UI — Draggable, minimizable, glassmorphism, auto dark mode
- 🔄 Infinite Scroll — Automatically detects new models on scroll (SPA-aware)
- 👥 User/org pages — Works on any Hugging Face model listing, including user and organization profiles
- 💾 Full persistence — Keywords, options, and panel position saved to
localStorage - 🏷️ Visual badges — Color-coded indicators (green/red) on each model card
- ⚡ Smart auto-filter — Applies filters automatically as you type (~800ms debounce)
🅰️ Regex support — Advanced search with regular expressions for pattern matching- 🌍 Multi-language — Native UI in English, Spanish, and Simplified Chinese (中文)
- 🌐 Auto-translate (optional) — Google Translate for 30+ additional languages, always explicitly opt-in by the user
- 📊 Live stats counter — Total / Visible / Filtered counts updated in real time
I recommend using PageTual alongside this script — it automatically loads the next page as you scroll, so you never have to click through pagination. Works seamlessly with HuggingFace Model Filter for an infinite-scroll browsing experience through your filtered results.
| Browser | Recommended extension |
|---|---|
| Chrome / Edge / Brave | Violentmonkey or Tampermonkey |
| Firefox | Violentmonkey |
| Safari | Userscripts (App Store) |
Option A — GreasyFork (recommended):
Option B — Manual:
- Create a new script in your userscript manager
- Copy and paste the contents of
huggingface-model-filter.user.js - Save (
Ctrl+S)
Visit https://huggingface.co/models and the floating panel will appear in the top-left corner.
| Positive keywords | Negative keywords | Result |
|---|---|---|
uncensored, qwen |
beta, alpha |
Only uncensored Qwen models, no unstable versions |
gguf, 7b, 8b |
13b, 70b |
Small models in GGUF format |
llama, instruct |
deprecated |
Active LLaMA instruct models |
claude, thinking |
test, old |
Claude models with thinking mode |
mistral, mixtral |
sparse |
Dense Mistral/Mixtral models only |
- Drag — Grab the top bar to move the panel anywhere
- Minimize —
−button to collapse to a compact bar - Language — Native selector: English · Español · 中文 (instant switch)
- Auto-translate — Optional checkbox: pick any language from the list and the panel translates automatically
- Apply — Run filtering manually
- Reset — Clear keywords and show all models again
The filter supports regular expressions (Regex) for advanced pattern matching. Toggle between simple keyword mode and regex mode directly from the panel.
- Enter positive Regex patterns to match models you want to see
- Enter negative Regex patterns to filter out unwanted models
- Separate multiple patterns with commas or newlines
- Case sensitivity and full-word matching settings also apply to Regex mode
| Pattern | Description | Example |
|---|---|---|
keyword |
Simple match (same as keyword mode) | llama |
llama|qwen |
OR — matches either term | llama|qwen |
(?=.*qwen)(?=.*uncensored) |
Positive lookahead — match if ALL patterns present | (?=.*qwen)(?=.*uncensored) |
^(?!.*beta) |
Negative lookahead — exclude if pattern matches | ^(?!.*beta) |
\b7b\b |
Word boundary — "7b" won't match "70b" | \b7b\b |
[0-9]+b |
Character classes and quantifiers | 7b|13b|70b |
Note: Patterns are matched against the model card text. Invalid Regex patterns are silently ignored and logged to the console (
HF Filter:) for debugging.
| Positive Regex | Negative Regex | Result |
|---|---|---|
(?=.*qwen)(?=.*uncensored) |
Models containing BOTH "qwen" AND "uncensored" | |
llama|mistral |
beta|alpha |
LLaMA or Mistral models, no unstable versions |
\b7b\b |
\b70b\b |
7B models specifically, excluding 70B |
All settings are automatically saved to localStorage under the key hf_model_filter_config.
{
"positiveKeywords": ["uncensored", "qwen"],
"negativeKeywords": ["beta", "deprecated"],
"hideOnNegative": true,
"dimOnNegative": false,
"highlightPositive": true,
"caseSensitive": false,
"matchFullWord": false,
"showStats": true,
"autoFilter": true,
"locale": "en",
"autoTranslate": false,
"autoTranslateLang": "",
"position": { "x": 20, "y": 100 }
}| Option | Type | Description |
|---|---|---|
positiveKeywords |
string[] |
Only models containing at least one of these words are shown |
negativeKeywords |
string[] |
Models matching these words are hidden or dimmed |
hideOnNegative |
boolean |
true = hide completely; false = show with red badge |
dimOnNegative |
boolean |
true = dim to 15% instead of hiding |
highlightPositive |
boolean |
true = green border and badge on positive matches |
caseSensitive |
boolean |
Distinguish between uppercase and lowercase |
matchFullWord |
boolean |
Prevent partial matches: "test" won't match "testing" |
showStats |
boolean |
true = show the live stats counter |
autoFilter |
boolean |
true = apply filters automatically while typing |
locale |
"en" | "es" | "zh" |
Native UI language |
autoTranslate |
boolean |
true = enable auto-translation via Google |
autoTranslateLang |
string |
ISO language code for the target language (e.g. fr, ja, de) |
position |
{x, y} |
Saved panel position in pixels |
| Code | Language |
|---|---|
en |
English |
es |
Español |
zh |
中文 (简体) |
The auto-translate selector includes 30 languages: English, Español, 中文, Français, Deutsch, Português, Italiano, 日本語, 한국어, Русский, العربية, हिन्दी, Nederlands, Polski, Türkçe, Tiếng Việt, ไทย, Svenska, Čeština, Ελληνικά, עברית, Українська, Română, Magyar, Dansk, Suomi, Norsk, Bahasa Indonesia, Bahasa Melayu, বাংলা.
Translations are cached in
localStorage(hf_filter_trans_cache) to avoid repeated API calls.
├── huggingface-model-filter.user.js # Main script (~1148 lines, vanilla JS)
├── README.md # This file (English documentation)
├── README_ES.md # Documentación en español
├── README_ZH.md # 中文文档
└── LICENSE # MIT License
- None. The script is 100% vanilla JavaScript.
- Uses
GM_addStylefrom Violentmonkey / Tampermonkey only for inline CSS. - No external dependencies, no bundler, no npm required.
To debug the script in your browser:
- Open the developer console (
F12→ Console tab) - Look for messages prefixed with
HF Filter: - Inspect
configandtranslationCachedirectly from the console - Set breakpoints inside
applyFilter()to inspect the model cards DOM
| Problem | Solution |
|---|---|
| Panel doesn't appear | Make sure you're on a Hugging Face model listing page (e.g. huggingface.co/models or huggingface.co/:user/models) |
| Filters don't apply | Click Apply Filters or wait ~800ms after typing |
| ALL models are hidden | Check that your positive keywords aren't too restrictive. Reload the page |
| Panel blocks content | Drag it to another corner; position is saved automatically |
| Language doesn't change | Force reload with Ctrl+Shift+R to clear the userscript cache |
| Google Translate doesn't work | May be blocked by your region or adblocker. The UI still works in the native language |
- ✨ Regular expression (Regex) support for advanced search with pattern matching
- 👥 Support for user and organization model pages (
huggingface.co/:user/models) - 🧹 Removed outdated "Ideas for future improvements" section
- 📝 Major documentation update (README in ES / EN / ZH)
- ✏️ Editorial fixes and improved structure
- 🌍 Full internationalization (i18n): UI in English, Spanish, and Chinese
- 🌐 Auto-translation via Google Translate for 30+ languages (always opt-in)
- 🕹️ Manual language selector + persistent auto-translate selector
- 🗂️ Translation cache in localStorage for instant loading on repeat visits
- ✅ Critical syntax fix (
config.negativeKeywords) - 🎨 UI improvements with glassmorphism and better contrast
- 🔄 SPA navigation support (detects URL changes without full reload)
- 📊 Real-time stats counter (Total / Visible / Filtered)
- ✨ Positive/negative keyword filtering
- 🏷️ Visual badges for positive/negative matches
- 💾 Configuration persistence in localStorage
- 🖱️ Draggable and minimizable panel
- 🚀 Initial release
This project is licensed under the MIT License.
🙏 Acknowledgments
- Hugging Face for their amazing open-source model platform
- Violentmonkey for the best userscript manager
- The GreasyFork community for feedback and ideas
Made with ❤️ for the open-source AI community