---
title: "Efficient Visual Representation Learning And Evaluation"
description: "Etsy compares EfficientNetB0 and the EfficientFormer-l3 hybrid vision transformer as backbones for image embeddings that power visual search and visually similar recommendations, fine-tuned with a four-task multitask setup on two 16GB P100 GPUs."
url: "https://swe.quest/articles/efficient-visual-representation-learning-and-evaluation-5d9ca073957d3278"
canonical: "https://www.etsy.com/codeascraft/efficient-visual-representation-learning-and-evaluation"
source: "Etsy Code as Craft"
published: "2024-06-07"
difficulty: "hard"
kind: "Case study"
reading_minutes: 10
tags: ["computer-vision","recommendation-systems","model-training","evals","ecommerce"]
---

# Efficient Visual Representation Learning And Evaluation

A post on [Etsy Code as Craft](https://swe.quest/sources/etsy.md), published 2024-06-07, 10 min read, Case study. Original: [https://www.etsy.com/codeascraft/efficient-visual-representation-learning-and-evaluation](https://www.etsy.com/codeascraft/efficient-visual-representation-learning-and-evaluation)

## Summary

Etsy compares EfficientNetB0 and the EfficientFormer-l3 hybrid vision transformer as backbones for image embeddings that power visual search and visually similar recommendations, fine-tuned with a four-task multitask setup on two 16GB P100 GPUs. Embeddings are evaluated after each epoch with brute-force nearest-neighbor Recall@K callbacks on intra-item, review-photo and ad-click datasets, plus an experimental set where Stable Diffusion turns text search queries into image queries. EfficientNetB0 (~5M params, 1.7ms on iPhone 12) offers the best latency, while EfficientFormer-l3 (~30M params, 2.7ms) gives up to +17% Recall@5 and +0.65% CTR in A/B tests. The Stable Diffusion pipeline was sped up with token merging and fp16 to about 500 images per hour on one T4.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- convolutional neural networks ([easy posts on Machine learning](https://swe.quest/tags/machine-learning.md?difficulty=easy))
- vision transformers ([easy posts on Computer vision](https://swe.quest/tags/computer-vision.md?difficulty=easy))
- fine-tuning pretrained models ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- nearest neighbor retrieval

## Keywords

EfficientNetB0, EfficientFormer, Vision Transformer, Stable Diffusion, Etsy, multitask learning, Recall@K

## Related posts

- [Image Similarity with Hugging Face Datasets and Transformers](https://swe.quest/articles/image-similarity-with-hugging-face-datasets-and-transformers-cfa579cfca74f44c.md): Hugging Face · 2023-01-16 · Medium · 7 min read · Computer vision, Vector search, Search, Python
  An image similarity system can be built by embedding images with a fine-tuned Vision Transformer (CLS token from the last hidden state) and ranking candidates by cosine similarity against a query embedding.
- [Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers](https://swe.quest/articles/training-and-finetuning-multimodal-embedding-reranker-models-with-sentence-4630fc81c2fcf375.md): Hugging Face · 2026-04-16 · Medium · 17 min read · Model training, Computer vision, Search, RAG & retrieval, Python
  Finetuning Qwen3-VL-Embedding-2B with Sentence Transformers for Visual Document Retrieval raised NDCG@10 from 0.888 to 0.947.
- [Open Preference Dataset for Text-to-Image Generation by the 🤗 Community](https://swe.quest/articles/open-preference-dataset-for-text-to-image-generation-by-the-community-51063f2eca79d4de.md): Hugging Face · 2024-12-09 · Easy · 7 min read · Model training, Computer vision, Evaluation, Open source
  Data is Better Together released an Apache 2.0 text-to-image preference dataset of 10K pairs, with over 30K annotations from more than 250 community members collected in under two weeks.
- [Advancing Generative Recommendation Inference: our collaboration with NVIDIA on TensorRT LLM](https://swe.quest/articles/advancing-generative-recommendation-inference-our-collaboration-with-nvidia-on-edd2a66abab4a278.md): Spotify Engineering · 2026-10-16 · Hard · 7 min read · Inference & serving, Recommendations & ranking, LLMs, Cost optimization
  Spotify consolidated its LLM-based generative recommendation inference onto TensorRT LLM, working with NVIDIA to add the features it had been splitting across engines. vLLM handled beam search for semantic-ID candidate generation, but its beam search runs outside the core GPU engine and recomputes partially filled KV blocks.
- [NeoMME: an efficient Multimodal-native and Multilingual Encoder](https://swe.quest/articles/neomme-an-efficient-multimodal-native-and-multilingual-encoder-b7e59fda5215fa32.md): Hugging Face · 2026-09-03 · Hard · 11 min read · RAG & retrieval, Machine learning, Model training, Computer vision, Vector search
  NeoMME is a family of 260M and 800M multilingual multimodal encoders that feed text tokens and raw 32×32 image patches through a single bidirectional Transformer, trained from scratch with a masked discrete-diffusion text objective instead of reusing a vision tower or causal LM.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
