TY-ecomm-siglip2-turkish-v1

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.

Model details

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 poolingimage_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)

Intended uses

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):

  • Category classification
  • Prohibited-item detection
  • Explicit-content detection
  • Other catalog moderation and product-understanding tasks

Embedding applications:

  • Text-to-image and image-to-text product retrieval
  • Visual / textual similar-item search
  • Catalog search, ranking, and recommendations

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.

Training data (summary)

Split Pairs
Train ~3.46M
Val ~240k
Test ~448k
Total ~4.14M
  • Pair type: first product image ↔ product title (catalog titles; predominantly Turkish, with some English / mixed titles)
  • Core mix: broad e-commerce catalog coverage
  • Enrichment samples (still trained only as image–title pairs — not as classification labels):
    • Category — denser taxonomy coverage for category-oriented retrieval
    • Prohibited — items restricted / not allowed for sale in e-commerce
    • Explicit — adult / NSFW products that require age-gating or blocking (+18)
  • Dedup (high level): unique 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.

Training procedure (high level)

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.

Installation

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.

How to use

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.

Image-only / text-only encoding

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
    )

Batch catalog retrieval (many images × many titles)

# 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.

Limitations

  • Best on Turkish e-commerce product titles and catalog photos; English-only or non-catalog domains may underperform.
  • Titles are short catalog strings — long queries may be truncated at 64 tokens.
  • Non-square product photos are stretched to 384×384 (no letterbox); unusual aspect ratios can distort.
  • Prohibited / explicit enrichment improves coverage of those neighborhoods; it does not replace a dedicated safety classifier or human review.
  • Visually or lexically close but commercially different items can still rank highly.

Citation

@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}
}

Model Card Authors

  • Trendyol Data Science Team

License

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.

Downloads last month
13
Safetensors
Model size
0.9B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Trendyol/TY-ecomm-siglip2-turkish-v1

Finetuned
(2)
this model