Downloads · 30 days
13
12% of all-time downloads
infinity6/ecomm_shop_intent_pretrained
ecomm_shop_intent_pretrained is a machine learning model from infinity6. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Commerce Intent is a pretrained sequential behavioral model for e-commerce session understanding. It is trained to predict the next item in a user session based on historical interaction sequences.
Downloads · 30 days
13
12% of all-time downloads
All-time downloads
107
Public
Parameters
54.1M
216 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors216 MB · 99%
From the Hugging Face model README
Commerce Intent is a pretrained sequential behavioral model for e-commerce session understanding. It is trained to predict the next item in a user session based on historical interaction sequences.
The model learns representations from multi-modal structured signals, including:
It is designed as a foundation model for downstream recommendation and behavioral modeling tasks.
Commerce Intent models user behavior within a session as an autoregressive sequence modeling problem. Given a sequence of past interactions, the model predicts the next likely item.
The architecture consists of:
This model is pretrained and can be fine-tuned for recommendation, ranking, or conversion modeling tasks.
This model depends on the external package:
The package contains the custom architecture required to correctly load and run the model. You must install it before using Commerce Intent.
Clone the repository:
git clone https://github.com/infinity6-ai/i6model_ecomm.git
cd i6model_ecomm
pip install .
The model can be used directly for:
Example:
import torch
from i6modelecomm.model import i6modelecomm
model = i6modelecomm.CommerceIntent.from_pretrained(
"infinity6/ecomm_shop_intent_pretrained"
)
# TODO: map items and remap categories.
# TODO: freeze layers and train with your data.
model.eval()
D = 'cpu'
# batch_size | seq_len = 3
itms = torch.tensor([[12, 45, 78]], dtype=torch.long).to(D)
brds = torch.tensor([[3, 7, 2]], dtype=torch.long).to(D)
cats = torch.tensor([[8, 8, 15]], dtype=torch.long).to(D)
prcs = torch.tensor([[29.9, 35.0, 15.5]], dtype=torch.float).to(D)
evts = torch.tensor([[1, 1, 2]], dtype=torch.long).to(D)
# mask
mask = torch.tensor([[1, 1, 1]], dtype=torch.bool).to(D)
with torch.no_grad():
outputs = model(
itms=itms, # items
brds=brds, # brands
cats=cats, # categories
prcs=prcs, # prices
evts=evts, # events
attention_mask=mask,
labels=None # inference only -- no loss computation
)
# logits tem shape (B, L-1, num_itm)
logits = outputs.logits
print("Logits shape:", logits.shape)
Inputs must include:
itmsbrdscatsevtsprcsattention_maskThe model can be fine-tuned for:
This model is not suitable for:
The model was trained on large-scale anonymized e-commerce interaction logs containing:
Sessions shorter than a minimum threshold were filtered.
The model was trained on a unified, large-scale corpus of e-commerce interaction data, aggregating and normalizing multiple public datasets to create a robust foundation for sequential behavior modeling.
The training data combines the following sources:
| Dataset | Description | Key Statistics |
|---|---|---|
| E-commerce behavior data from multi category store | Real event logs from a multi-category e-commerce platform | ~285M records |
| E-commerce Clickstream and Transaction Dataset (Kaggle) | Sequential event data including views and clicks | ~500K+ events |
| E-Commerce Behavior Dataset – Agents for Data | Product interactions from ~18k users across multiple event types | ~2M interactions |
| Retail Rocket clickstream dataset | Industry-standard dataset with views, carts, and purchases | ~2.7M events |
| SIGIR 2021 / Coveo Session data challenge | Navigation sessions with clicks, adds, purchase + metadata | ~30M events |
| JDsearch dataset | Real interactionswith search queries from JD.com platform | ~26M interactions |
All datasets underwent a rigorous unification and normalization process:
This diverse and comprehensive training corpus enables the model to learn robust representations of e-commerce behavior patterns across different platforms, markets, and interaction types, serving as a strong foundation for downstream fine-tuning tasks.
UNKlog1pNext-item autoregressive prediction using cross-entropy loss with padding ignored.
On the evaluation split, the model achieved:
These results indicate strong next-item prediction performance in session-based e-commerce interaction modeling.
The model demonstrates:
Performance may vary depending on dataset distribution, session length, and preprocessing configuration.