dejanseo / ecommerce-query-volume-classifier

huggingface.co
Total runs: 24
24-hour runs: 1
7-day runs: 8
30-day runs: 11
Model's Last Updated: March 12 2026
text-classification

Introduction of ecommerce-query-volume-classifier

Model Details of ecommerce-query-volume-classifier

eCommerce Query Volume Classifier

A fine-tuned DeBERTa v3 base model that predicts the search volume class of ecommerce product queries. Trained on 39.6 million unique queries from the Amazon Shopping Queries dataset spanning 395.5 million search sessions.

Blog post: Is Query Length a Reliable Predictor of Search Volume?

Model Description

This model classifies ecommerce search queries into five volume tiers based on their expected search popularity:

Label Class Occurrences Description
0 very_high 10,000+ Head terms, major brands (e.g. "airpods", "laptop")
1 high 1,000–9,999 Popular product categories and well-known items
2 medium 100–999 Moderately specific queries
3 low 10–99 Niche or qualified queries
4 very_low <10 Long-tail, highly specific queries

The model learns semantic signals — brand recognition, category head terms, specificity markers — rather than superficial features like query length. Simple character/word-count heuristics achieve only ~25% accuracy on this task (barely above the 20% random baseline), while this model achieves 72.1% accuracy .

Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_name = "dejanseo/ecommerce-query-volume-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
model.eval()

labels = ["very_high", "high", "medium", "low", "very_low"]

queries = [
    "airpods",
    "wireless mouse",
    "organic flurb capsules",
    "replacement gasket for instant pot duo 8 quart",
]

inputs = tokenizer(queries, return_tensors="pt", padding=True, truncation=True, max_length=32)

with torch.no_grad():
    outputs = model(**inputs)
    probs = torch.softmax(outputs.logits, dim=-1)
    preds = torch.argmax(probs, dim=-1)

for query, pred, prob in zip(queries, preds, probs):
    label = labels[pred.item()]
    confidence = prob[pred.item()].item() * 100
    print(f"{query:50s}{label:>10s}  ({confidence:.1f}%)")
Performance
Evaluation (25K balanced sample, 5K per class)
Method Accuracy Spearman ρ
This model 72.1% 0.896
Word count heuristic 25.4% -0.345
Char count heuristic 24.9% -0.336
Per-Class F1 Scores (best validation checkpoint)
Class Precision Recall F1
very_high 0.892 0.980 0.934
high 0.727 0.921 0.813
medium 0.625 0.790 0.698
low 0.496 0.335 0.400
very_low 0.610 0.579 0.594

The model performs best on the extremes (very high and very low volume) and struggles most with the low class, which sits in an ambiguous zone between medium and very_low .

Training Details
Hyperparameters
Parameter Value
Base model microsoft/deberta-v3-base
Epochs 20
Batch size 128
Learning rate 3e-5
Max sequence length 32
Warmup ratio 0.1
Weight decay 0.01
Label smoothing 0.1
Scheduler Linear with warmup
Sampling Strategy

Balanced sampling per epoch with different random seeds:

Class Samples per epoch
very_low 100,000
low 100,000
medium 100,000
high 30,000
very_high 30,000

Total per epoch: 324,000 train / 36,000 validation

Training Curves

Training Loss Training Loss per Class

Validation Curves

Validation Loss Validation F1

Hardware
  • GPU: NVIDIA GeForce RTX 4090 (24 GB)
  • RAM: 128 GB
  • OS: Windows 11
  • Training time: ~2 hours 16 minutes
  • Framework: PyTorch + Transformers 4.57.1
Dataset

Amazon Shopping Queries (AmazonQAC) — 395.5 million sessions, 39.6 million unique queries. Volume classes derived from raw occurrence counts across sessions.

Class Unique Queries
very_high ~18K
high ~30K
medium ~321K
low ~4.6M
very_low ~34.7M
What the Model Learns

The model captures semantic patterns rather than surface-level features like query length:

  • Brand recognition: "airpods" → very high, regardless of character count
  • Category head terms: "laptop", "headphones", "dog food" → recognized as high-volume entry points
  • Specificity markers: Size specs, compatibility constraints, and material callouts signal niche demand
  • Nonsense detection: Gibberish queries like "blorf" and "wireless blorf adapter" are correctly classified as very low volume, confirming the model isn't just counting characters
Limitations
  • Trained exclusively on Amazon product search queries — may not generalize well to Google web search, informational queries, or non-English markets
  • The low volume class is the weakest (F1 ≈ 0.39), reflecting genuine ambiguity in the boundary between medium and very low volume queries
  • Volume thresholds are based on the Amazon QAC dataset's session counts, which may not map directly to other volume scales (e.g. Google Keyword Planner)
  • Product trends shift over time; queries that were high volume in the training data may not remain so
Citation
@article{petrovic2026querylength,
  title={Is Query Length a Reliable Predictor of Search Volume?},
  author={Petrovic, Dan},
  year={2026},
  month={March},
  url={https://dejan.ai/blog/query-length-vs-volume/}
}
Author

Dan Petrovic DEJAN AI

Runs of dejanseo ecommerce-query-volume-classifier on huggingface.co

24
Total runs
1
24-hour runs
3
3-day runs
8
7-day runs
11
30-day runs

More Information About ecommerce-query-volume-classifier huggingface.co Model

More ecommerce-query-volume-classifier license Visit here:

https://choosealicense.com/licenses/link-attribution

ecommerce-query-volume-classifier huggingface.co

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

ecommerce-query-volume-classifier huggingface.co Url

https://huggingface.co/dejanseo/ecommerce-query-volume-classifier

dejanseo ecommerce-query-volume-classifier online free

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

dejanseo ecommerce-query-volume-classifier online free url in huggingface.co:

https://huggingface.co/dejanseo/ecommerce-query-volume-classifier

ecommerce-query-volume-classifier install

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

ecommerce-query-volume-classifier install url in huggingface.co:

https://huggingface.co/dejanseo/ecommerce-query-volume-classifier

Url of ecommerce-query-volume-classifier

ecommerce-query-volume-classifier huggingface.co Url

Provider of ecommerce-query-volume-classifier huggingface.co

dejanseo
ORGANIZATIONS

Other API from dejanseo

huggingface.co

Total runs: 448
Run Growth: 199
Growth Rate: 44.42%
Updated:November 20 2025
huggingface.co

Total runs: 58
Run Growth: 1
Growth Rate: 1.72%
Updated:August 15 2024
huggingface.co

Total runs: 38
Run Growth: 25
Growth Rate: 65.79%
Updated:August 15 2024
huggingface.co

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

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

Total runs: 29
Run Growth: -24
Growth Rate: -82.76%
Updated:November 20 2025
huggingface.co

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

Total runs: 24
Run Growth: 8
Growth Rate: 33.33%
Updated:April 25 2025
huggingface.co

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

Total runs: 23
Run Growth: 9
Growth Rate: 39.13%
Updated:April 22 2025
huggingface.co

Total runs: 18
Run Growth: 1
Growth Rate: 5.56%
Updated:July 05 2026
huggingface.co

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

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

Total runs: 9
Run Growth: 3
Growth Rate: 33.33%
Updated:April 09 2025
huggingface.co

Total runs: 9
Run Growth: 4
Growth Rate: 44.44%
Updated:June 14 2025
huggingface.co

Total runs: 8
Run Growth: -9
Growth Rate: -112.50%
Updated:August 15 2024
huggingface.co

Total runs: 6
Run Growth: 1
Growth Rate: 16.67%
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: 2
Run Growth: -2
Growth Rate: -100.00%
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