Downloads · 30 days
99
25% of all-time downloads
Trendyol/TY-ecomm-siglip2-turkish-v1
TY-ecomm-siglip2-turkish-v1 is a feature extraction model from Trendyol. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as cc-by-4.0.
Trendyol multimodal image–text embedding model built for e-commerce catalog understanding and moderation. Fine-tuned from google/siglip2-large-patch16-384 on ~4.1M real product pairs: first product image + product title.
Downloads · 30 days
99
25% of all-time downloads
All-time downloads
398
Public
Parameters
882M
3.6 GB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors3.5 GB · 99%
From the Hugging Face model README
Trendyol multimodal image–text embedding model built for e-commerce catalog understanding and moderation.
Fine-tuned from google/siglip2-large-patch16-384 on ~4.1M real product pairs: first product image + product title.
At Trendyol it is used as a multimodal backbone for classification-based catalog tasks (category, prohibited-item, explicit-content, and related moderation). The same 1024-d vectors also support retrieval, search, ranking, and recommendation.
This release is an embedding model only (not a standalone classifier or generative VLM). Encode images and titles into a shared 1024-d space, then use the vectors as features or attach lightweight downstream heads you train separately.
| Property | Value |
|---|---|
| Architecture | SigLIP 2 Large (ViT-L/16 @ 384) |
| Base model | google/siglip2-large-patch16-384 |
| Transformers class | SiglipModel via AutoModel / AutoProcessor (this checkpoint’s config.json uses model_type: siglip, architectures: [SiglipModel] — do not force Siglip2Model) |
| Parameters | ~880M (vision + text) |
| Image input | 384 × 384 RGB; bundled processor resizes by stretching to 384×384 (no center-crop / letterbox) |
| Text input | up to 64 tokens (product titles; lowercased by tokenizer) |
| Output | aligned image / text embeddings (1024-d); SigLIP multi-head attention pooling → image_embeds / text_embeds (same vectors as get_*_features(...).pooler_output) |
| Text language | Predominantly Turkish (~78% of titles contain Turkish-specific characters in a 50k sample; ~5% look English-only by simple lexicon heuristics; remainder mixed / brand-SKU) |
| Framework | PyTorch / 🤗 Transformers |
| License | CC BY 4.0 (see License section) |
Specialized for e-commerce catalog understanding and moderation. The tasks below are the primary, production-validated workloads at Trendyol; related catalog workflows can use the same image–text vectors, with best results when you attach a labeled downstream head for classification or an ANN index for retrieval.
Classification backbone (embeddings + lightweight heads you train separately):
Embedding applications:
Not a standalone classifier. This checkpoint does not ship category or moderation labels. For safety-critical decisions, train your own labeled heads and keep human review / policy in the loop.
| Split | Pairs |
|---|---|
| Train | ~3.46M |
| Val | ~240k |
| Test | ~448k |
| Total | ~4.14M |
product_content_id and image_url per split; empty / non-http URLs and titles shorter than 10 characters dropped. Hard negatives are mined from warm-up embeddings on the train split only (val/test never injected as negatives).Training images/titles themselves are not redistributed with this repo.
Two-phase contrastive fine-tuning of SigLIP’s sigmoid image–text loss. Learned logit_scale / logit_bias continue training (not frozen).
| Phase 1 (warm-up) | Phase 2 (full fine-tune, shipped) | |
|---|---|---|
| Trainable | Text (+ proj); vision frozen | Both towers |
| Epochs | 5 | 5 (early-stop on val loss) |
| LR / schedule | 2e-6, cosine, warmup 500 | 2e-7, cosine, warmup 500 |
| Weight decay | 0.3 | 0.1 |
| Global batch | 1536 (384 × 4) | 1024 (256 × 4) |
| Hard negatives | — | 4 mined negatives / anchor (frozen Phase-1 memory bank) |
| Hardware | 4× NVIDIA A100 80GB | 4× NVIDIA A100 80GB |
| Precision | bf16 | bf16 |
Augmentations in Phase 2 include light text noise and image RandAugment / ColorJitter / flip.
pip install "torch>=2.1" "transformers>=5.3.0" pillow
Use transformers>=5.3.0 (repo pin). Exported with Transformers 5.7.0 / PyTorch 2.11. The get_*_features(...).pooler_output path below is Transformers 5.x behavior.
Optional GPU: install a CUDA build of PyTorch from pytorch.org.
import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor
model_id = "Trendyol/TY-ecomm-siglip2-turkish-v1"
model = AutoModel.from_pretrained(model_id).eval()
processor = AutoProcessor.from_pretrained(model_id)
image = Image.open("product.jpg").convert("RGB")
titles = [
"kırmızı spor ayakkabı",
"siyah deri çanta",
"beyaz pamuklu tişört",
]
inputs = processor(
images=[image],
text=titles,
padding="max_length",
max_length=64,
truncation=True,
return_tensors="pt",
)
with torch.no_grad():
out = model(**inputs)
# Always L2-normalize before similarity / ANN
image_emb = torch.nn.functional.normalize(out.image_embeds, dim=-1) # [1, 1024]
text_emb = torch.nn.functional.normalize(out.text_embeds, dim=-1) # [3, 1024]
scores = image_emb @ text_emb.T # cosine == inner product on unit vectors
print(list(zip(titles, scores.squeeze(0).tolist())))
ANN / index note: vectors are unit-normalized — use inner product or cosine in your ANN index (FAISS IndexFlatIP, etc.), not L2 distance on raw vectors.
get_image_features / get_text_features return BaseModelOutputWithPooling in Transformers 5.x — use .pooler_output (same 1024-d attention-pooled vectors as image_embeds / text_embeds).
img_inputs = processor(images=[image], return_tensors="pt")
txt_inputs = processor(
text=titles, padding="max_length", max_length=64, truncation=True, return_tensors="pt"
)
with torch.no_grad():
image_emb = torch.nn.functional.normalize(
model.get_image_features(**img_inputs).pooler_output, dim=-1
)
text_emb = torch.nn.functional.normalize(
model.get_text_features(**txt_inputs).pooler_output, dim=-1
)
# images: list[PIL.Image], queries: list[str]
img_inputs = processor(images=images, return_tensors="pt")
txt_inputs = processor(
text=queries, padding="max_length", max_length=64, truncation=True, return_tensors="pt"
)
with torch.no_grad():
image_emb = torch.nn.functional.normalize(
model.get_image_features(**img_inputs).pooler_output, dim=-1
) # [N, 1024]
text_emb = torch.nn.functional.normalize(
model.get_text_features(**txt_inputs).pooler_output, dim=-1
) # [M, 1024]
sims = text_emb @ image_emb.T # [M, N] cosine similarities
top_k = sims.topk(k=10, dim=-1) # per-query top image indices
Reproduce training-time text encoding: padding="max_length", max_length=64, truncation=True. Do not skip L2 normalization.
@misc{trendyol-ty-ecomm-siglip2-turkish-v1,
title = {TY-ecomm-siglip2-turkish-v1: Trendyol E-commerce Multimodal Embeddings},
author = {Trendyol Data Science Team},
year = {2026},
url = {https://huggingface.co/Trendyol/TY-ecomm-siglip2-turkish-v1}
}
This model is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
You are free to share and adapt the model for any purpose, even commercially, as long as you give appropriate credit and indicate if changes were made.
This release is a fine-tune of google/siglip2-large-patch16-384, which is licensed under Apache License 2.0. Redistribution of this derivative continues to satisfy Apache-2.0 notice and attribution requirements for the base model; retain the Apache-2.0 license text and any NOTICE attributions shipped with SigLIP 2 when redistributing.
Catalog training data is not included in this repository.
For the full CC BY 4.0 license text, see: https://creativecommons.org/licenses/by/4.0/legalcode
Released by the Trendyol Data Science Team.