Boosting AI Model Development with Alibaba's EasyModeling Framework

This article introduces the EasyModeling framework built on Alibaba Cloud's PAI platform, detailing its modular design, high reusability, integration with deep‑learning libraries, automated hyper‑parameter tuning, deployment scenarios, and a real‑world case study using RoBERTa for dish‑name standardization, demonstrating significant performance gains.

SQB Blog
SQB Blog
SQB Blog
Boosting AI Model Development with Alibaba's EasyModeling Framework

0. Background

Amid the global digital economy, big data and machine learning drive business digitization. Machine‑learning and deep‑learning algorithms, based on historical data, enable decision‑making and empower merchants across domains such as data mining, computer vision, natural language processing, fraud detection, and more.

The modeling platform relies on Alibaba Cloud AI Platform PAI. Data sources come from data warehouses (ODPS) and object storage (OSS). Development occurs in PAI‑DSW Notebook, while model services are deployed via PAI‑DLC (cloud‑native AI platform) or PAI‑EAS (Elastic Algorithm Service).

1. EasyModeling Framework Overview

EasyModeling was created to address varied data sources, task goals, deployment requirements, and the limited performance of third‑party open‑source solutions. It offers a one‑stop experience from training to deployment, improving development efficiency, model reusability, and asset persistence.

Key features:

High Reusability : A single prediction logic serves multiple deployment scenarios; models and valuable data become cloud‑stored assets that can be migrated, fine‑tuned, or retrained.

Ease of Use : Users can customize data processing, training, evaluation, and prediction, lowering the barrier to algorithm adoption.

Open‑Source Compatibility : Seamlessly integrates pretrained models from huggingface/transformers.

2. Framework Overview

The framework avoids reinventing wheels, focusing on development efficiency, high reusability, flexibility, and persistent data assets.

3. Component Introduction

3.1 Core Modules

3.1.1 IO Module

Provides an ODPS reader that maps Pandas DataFrames to warehouse tables with a single line of code, supporting partition creation, writing, deletion, and multi‑core reads.

Wraps Python’s built‑in io module and a custom OSS io module for transparent local‑like file operations.

Uses iterators to preprocess and postprocess data batches, aligning with PyTorch and other deep‑learning frameworks.

3.1.2 Deep Learning Module

Offers a flexible Trainer template handling loss optimization, gradient strategies, GPU acceleration, multi‑GPU parallelism, and logging to local or OSS buckets.

Custom Loss Example

For imbalanced credit‑risk data, a customized Focal Loss (originally proposed for computer‑vision object detection) is implemented in Python and can also be applied to LightGBM models, improving recall and accuracy by 5‑10%.

3.1.3 Tools

Provides logging utilities and global parameter management to ensure reproducibility of training environments and model parameters.

3.1.4 DM Hub

Persists manually labeled training data and model assets in the cloud, enabling one‑click retrieval and supporting continuous model updates such as migration training and fine‑tuning.

3.2 Application Layer

3.2.1 Model Library

Exposes pretrained model APIs and common architectures such as DIN, DIEN for recommendation, and TextCNN, Transformer for text mining. The Transformer architecture adds positional encoding and attention mechanisms, making it the backbone for large‑text NLP tasks.

3.2.2 Automated Hyper‑Parameter Tuning

Integrates open‑source AutoML tools like Hyperopt and Microsoft NNI to wrap training code, enabling Bayesian optimization and other algorithms for efficient hyper‑parameter search.

3.2.3 Deployment

Supports three deployment scenarios:

Near‑real‑time model service (RESTful API) for latency‑critical applications.

T+1 scheduled batch inference for daily label updates (e.g., credit‑risk scoring).

One‑time offline batch inference for low‑frequency labeling tasks.

The BasePredictor base class unifies prediction logic across these scenarios, dramatically improving deployment efficiency.

4. Application Case – Smart Dish Standardization Library

The business need is to standardize millions of menu items across various food categories, aggregating identical dishes and extracting ingredient and cooking method entities, which is a sequence labeling problem in NLP.

Using a RoBERTa large model fine‑tuned on domain data, the system achieves over 90% recall and accuracy for ingredient and method extraction, meeting business expectations.

5. Summary and Outlook

Continuously refine EasyModeling based on evolving business requirements.

Incorporate new capabilities such as graph computing, model distillation, and prior‑knowledge integration.

Further improve framework utilization to boost development efficiency.

References

[1] Data Mining – https://zh.wikipedia.org/wiki/数据挖掘

[2] Computer Vision – https://zh.wikipedia.org/wiki/计算机视觉

[3] Natural Language Processing – https://zh.wikipedia.org/wiki/自然语言处理

[4] Alibaba Cloud PAI – https://help.aliyun.com/product/30347.html

[5] Neural Network Intelligence – https://github.com/microsoft/nni

[6] RoBERTa: A Robustly Optimized BERT Pretraining Approach – https://arxiv.org/pdf/1907.11692.pdf

deep learningmodel deploymentAI modelingAutoMLAlibaba CloudEasyModeling
SQB Blog
Written by

SQB Blog

Thank you all.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.