EbayChristian Herold and Shahram KhadiviProblem & solution
Scaling Large Language Models for e-Commerce: The Development of a Llama-Based Customized LLM
Summary
eBay developed e-Llama, customized 8B and 70B language models, by adapting Meta’s Llama 3.1 models to e-commerce rather than training entirely from scratch. The approach uses continued pretraining on filtered public listings, product reviews, classifier-selected open-source examples, replay data, and 10% non-English general-domain data to add domain knowledge while limiting catastrophic forgetting. Training ran on 480 NVIDIA H100 GPUs using Megatron-LM, 3D parallelism, flash-attention-2, a 1:1 general-to-e-commerce sampling ratio, a learning-rate maximum set to 10% of the original, and one trillion tokens. The 70B model required about one month and 340,000 GPU-hours. E-commerce benchmarks improved approximately 25% in English and 30% in non-English, while general-domain NLU degraded 1% for e-Llama 70B; subsequent instruction tuning added safety and instruction-following guardrails.
Context
Third-party LLM services such as GPT-4 and Claude were described as costly for eBay’s needs, while reliance on external models creates data security risks and limits fine-tuning with proprietary data. Training a large model from scratch is also time- and resource-intensive, and pretrained Llama models lack e-commerce-specific knowledge.
Approach / What changed
eBay continued pretraining Llama 3.1 base models on a balanced mixture of e-commerce and general-domain data. The mixture included filtered public listings, product reviews, classifier-selected open-source examples, replay data to retain prior knowledge, and 10% non-English general-domain data. Training used Megatron-LM, 3D parallelism, 480 NVIDIA H100 GPUs, one trillion tokens, and was followed by instruction tuning with human feedback.
Takeaways
Replay examples from curated, publicly available, open-source, and higher-quality datasets were included to help prevent catastrophic forgetting.
Experiments selected a maximum learning rate equal to 10% of the original and a 1:1 general-to-e-commerce data sampling ratio, with cosine scheduling, warmup, approximately 11.8 million tokens per batch, and 85,000 update steps.
The 70B e-Llama model showed approximately 25% higher English and 30% higher non-English e-commerce benchmark performance, with only 1% degradation on general-domain NLU benchmarks.
Source and freshness
- Source
- innovation.ebayinc.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.