EC-Guide: A Comprehensive E-Commerce Guide for Instruction Tuning and Quantization

Zhaopeng Feng, Zijie Meng, Zuozhu LiuarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, yet they often struggle with the specialized nuances of e-commerce. Challenges such as domain-specific terminology, dynamic customer behavior, and multilingual queries require tailored solutions. Furthermore, deploying high-parameter models like the 34-billion parameter Yi-1.5 on constrained hardware—such as the 4× NVIDIA T4 GPUs (16GB each) used in the Amazon KDD Cup ’24—presents a significant optimization hurdle.

To address these challenges, researchers from Zhejiang University introduced EC-Guide, a framework and dataset designed to adapt LLMs for e-commerce through targeted instruction tuning, 4-bit quantization, and heuristic reasoning.

Methodology: The Three-Pillar Strategy

The EC-Guide framework employs a multi-stage pipeline to transform a general-purpose LLM into an e-commerce expert while maintaining a manageable memory footprint.

The EC-Guide workflow: from data construction to evaluation on T4 GPUs.
  1. Instruction Tuning with QLoRA: The team utilized Quantized Low-Rank Adaptation (QLoRA) to fine-tune the Yi-1.5-34B model. This approach enables the model to learn e-commerce-specific tasks efficiently without the prohibitive cost of full-parameter fine-tuning.
  2. Post-Training Quantization (GPTQ): To fit the model within the 64GB total VRAM of four T4 GPUs, GPTQ was used to compress weights to 4-bit (INT4). A key finding was the importance of calibration data; using in-domain e-commerce examples for calibration significantly outperformed generic datasets like C4.
  3. Heuristic Chain-of-Thought (CoT): For arithmetic-heavy queries, a simple heuristic trigger (digit density) was implemented to prompt the model with "Let’s think step by step," enhancing reasoning accuracy.

The EC-Guide Dataset

A central contribution of this work is the EC-Guide dataset, comprising 74,704 examples across 24 sub-tasks. These tasks are categorized into five primary types:

  • Generation: Including product elaboration and review summarization.
  • Multiple Choice: Covering sentiment analysis and product relation prediction.
  • Retrieval: Such as category recognition and purchase inference.
  • Ranking: Reordering items based on relevance.
  • Named Entity Recognition (NER): Extracting key product attributes.

The dataset was constructed by synthesizing and paraphrasing existing sources (e.g., ECInstruct, Amazon M2) and leveraging ChatGPT for high-quality rationale generation.

Performance and Results

The EC-Guide approach demonstrated superior performance in the Amazon KDD Cup ’24, securing 2nd place in Track 2 (Shopping Concept Understanding) and 5th place in Track 5 (All-Around).

Model performance comparison across Track 2 and Track 5.

As shown in the results, the quantized Yi-1.5-34B (INT4) consistently outperformed smaller models like Qwen2-7B and GLM-4-9B. Notably, calibrating the quantization process with domain-specific data (INT4 Ours) resulted in a substantial performance gain over standard calibration (INT4 C4), raising the Track 2 score from 0.6562 to 0.7500.

Key Insights and Future Directions

The research highlights several critical takeaways for domain-specific LLM adaptation:

  • Calibration is Crucial: The choice of calibration data during quantization is as important as the tuning data itself for maintaining domain expertise.
  • Heuristic Reasoning: Simple prompts can unlock significant reasoning capabilities in quantized models without additional training.
  • Task Trade-offs: The authors observed that optimizing for one task type can sometimes degrade performance in another, suggesting that future work should explore Mixture of Experts (MoE) architectures or dynamic task weighting to achieve a more balanced performance across the diverse landscape of e-commerce.

Summary updated

BibTeX
@misc{feng2024ec,
  author = {Zhaopeng Feng and Zijie Meng and Zuozhu Liu},
  title = {{EC-Guide: A Comprehensive E-Commerce Guide for Instruction Tuning and Quantization}},
  year = {2024},
  eprint = {2408.02970},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.02970},
}
Figure