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.
This model classifies ecommerce search queries into five volume tiers based on their expected search popularity:
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.
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4model_name = "dejanseo/ecommerce-query-volume-classifier"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForSequenceClassification.from_pretrained(model_name)
7model.eval()
8
9labels = ["very_high", "high", "medium", "low", "very_low"]
10
11queries = [
12 "airpods",
13 "wireless mouse",
14 "organic flurb capsules",
15 "replacement gasket for instant pot duo 8 quart",
16]
17
18inputs = tokenizer(queries, return_tensors="pt", padding=True, truncation=True, max_length=32)
19
20with torch.no_grad():
21 outputs = model(**inputs)
22 probs = torch.softmax(outputs.logits, dim=-1)
23 preds = torch.argmax(probs, dim=-1)
24
25for query, pred, prob in zip(queries, preds, probs):
26 label = labels[pred.item()]
27 confidence = prob[pred.item()].item() * 100
28 print(f"{query:50s} → {label:>10s} ({confidence:.1f}%)")
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.
Amazon Shopping Queries (AmazonQAC) — 395.5 million sessions, 39.6 million unique queries. Volume classes derived from raw occurrence counts across sessions.
The model captures semantic patterns rather than surface-level features like query length:
1@article{petrovic2026querylength,
2 title={Is Query Length a Reliable Predictor of Search Volume?},
3 author={Petrovic, Dan},
4 year={2026},
5 month={March},
6 url={https://dejan.ai/blog/query-length-vs-volume/}
7}