Convert Figma logo to code with AI

alibaba logox-deeplearning

An industrial deep learning framework for high-dimension sparse data

4,249
1,028
4,249
127

Top Related Projects

185,446

An Open Source Machine Learning Framework for Everyone

82,049

Tensors and Dynamic neural networks in Python with strong GPU acceleration

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

20,763

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

14,221

Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.

26,184

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

Quick Overview

X-DeepLearning (XDL) is an industrial deep learning framework developed by Alibaba. It is designed to support large-scale sparse data training and serving, with a focus on recommendation systems and search ranking. XDL aims to provide high performance and scalability for industrial-scale machine learning tasks.

Pros

  • Optimized for large-scale sparse data processing
  • Supports both training and serving of deep learning models
  • Designed for industrial-scale recommendation and ranking tasks
  • Integrates with popular deep learning frameworks like TensorFlow

Cons

  • Limited documentation, especially in English
  • Steep learning curve for users not familiar with Alibaba's ecosystem
  • Less active community compared to more mainstream frameworks
  • Primarily focused on specific use cases (recommendation and ranking)

Code Examples

import xdl
import xdl.python.ops.py_func as py_func

def custom_func(x):
    return x * 2

result = py_func.py_func(custom_func, [input_tensor], [tf.float32])

This example demonstrates how to use a custom Python function within XDL.

import xdl

model = xdl.Model()
model.add(xdl.layers.Embedding(vocab_size, embedding_dim))
model.add(xdl.layers.FCLayer(hidden_units))
model.add(xdl.layers.FCLayer(1, activation='sigmoid'))

model.compile(optimizer='adam', loss='binary_crossentropy')

This code snippet shows how to create a simple neural network model using XDL's high-level API.

import xdl

reader = xdl.DataReader("hdfs://path/to/data")
reader.epochs(10)
reader.batch_size(1024)

for batch in reader.read():
    features, labels = batch
    loss = model.train(features, labels)

This example illustrates how to read data and train a model using XDL's data reading capabilities.

Getting Started

  1. Install XDL:
git clone https://github.com/alibaba/x-deeplearning.git
cd x-deeplearning
./build.sh
  1. Set up environment variables:
export PYTHONPATH=$PYTHONPATH:/path/to/x-deeplearning/xdl-python
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/x-deeplearning/xdl/lib
  1. Run a simple example:
import xdl

# Your XDL code here

Note: Detailed installation and usage instructions may vary depending on your specific environment and requirements. Refer to the official documentation for more comprehensive guidance.

Competitor Comparisons

185,446

An Open Source Machine Learning Framework for Everyone

Pros of TensorFlow

  • Larger community and ecosystem, with more resources, tutorials, and third-party libraries
  • Better support for production deployment and serving models at scale
  • More comprehensive documentation and official guides

Cons of TensorFlow

  • Steeper learning curve, especially for beginners
  • Can be more complex to set up and configure for specific use cases
  • Slower development cycle compared to more lightweight frameworks

Code Comparison

X-DeepLearning:

import xdl
model = xdl.Model()
model.add(xdl.layers.Dense(64, activation='relu'))
model.add(xdl.layers.Dense(10, activation='softmax'))
model.compile(optimizer='adam', loss='categorical_crossentropy')

TensorFlow:

import tensorflow as tf
model = tf.keras.Sequential([
    tf.keras.layers.Dense(64, activation='relu'),
    tf.keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam', loss='categorical_crossentropy')

Both frameworks offer similar high-level APIs for building neural networks, but TensorFlow's Keras API is more widely adopted and has more extensive documentation. X-DeepLearning may provide specific optimizations for Alibaba's infrastructure, but detailed information is limited due to its more niche usage.

82,049

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Pros of PyTorch

  • Larger community and ecosystem, with more resources and third-party libraries
  • More flexible and dynamic computational graph, allowing for easier debugging
  • Better support for research and prototyping due to its Pythonic nature

Cons of PyTorch

  • Generally slower inference speed compared to X-DeepLearning
  • Less optimized for large-scale distributed training scenarios
  • Steeper learning curve for beginners due to its flexibility

Code Comparison

PyTorch:

import torch

x = torch.tensor([1, 2, 3])
y = torch.tensor([4, 5, 6])
z = x + y
print(z)

X-DeepLearning:

#include "ps-plus/common/tensor.h"

Tensor x({1, 2, 3});
Tensor y({4, 5, 6});
Tensor z = x + y;
std::cout << z << std::endl;

X-DeepLearning focuses on distributed training and inference optimization, while PyTorch offers a more flexible and user-friendly approach. PyTorch's dynamic graph construction allows for easier debugging and experimentation, making it popular in research. X-DeepLearning, developed by Alibaba, is designed for large-scale industrial applications with a focus on performance and scalability.

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

Pros of ONNX Runtime

  • Wider ecosystem support and compatibility with various frameworks
  • More active development and frequent updates
  • Extensive documentation and community resources

Cons of ONNX Runtime

  • Potentially more complex setup for specific use cases
  • May have higher resource requirements for certain operations

Code Comparison

ONNX Runtime:

import onnxruntime as ort

session = ort.InferenceSession("model.onnx")
input_name = session.get_inputs()[0].name
output = session.run(None, {input_name: input_data})

X-DeepLearning:

import xdl

model = xdl.Model("model.xdl")
output = model.predict(input_data)

Key Differences

  • ONNX Runtime focuses on cross-platform compatibility and optimization
  • X-DeepLearning is tailored for large-scale distributed training scenarios
  • ONNX Runtime has broader language support (C++, Python, C#, etc.)
  • X-DeepLearning emphasizes performance in Alibaba's cloud infrastructure

Use Cases

  • ONNX Runtime: General-purpose inference across various platforms and frameworks
  • X-DeepLearning: Specialized for large-scale distributed training and inference in Alibaba Cloud

Community and Support

  • ONNX Runtime: Large, active community with regular updates and contributions
  • X-DeepLearning: Smaller community, primarily supported by Alibaba
20,763

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Pros of MXNet

  • Wider community support and adoption as an Apache project
  • More extensive documentation and tutorials
  • Better multi-GPU and distributed training capabilities

Cons of MXNet

  • Steeper learning curve for beginners
  • Less focus on industrial-scale deployment compared to X-DeepLearning

Code Comparison

MXNet example:

import mxnet as mx
data = mx.symbol.Variable('data')
fc1 = mx.symbol.FullyConnected(data, name='fc1', num_hidden=128)
act1 = mx.symbol.Activation(fc1, name='relu1', act_type="relu")
fc2 = mx.symbol.FullyConnected(act1, name='fc2', num_hidden=10)
mlp = mx.symbol.SoftmaxOutput(fc2, name='softmax')

X-DeepLearning example:

import xdl
data = xdl.data_io.input(name='data')
fc1 = xdl.fc_layer(data, 128, name='fc1')
act1 = xdl.relu_layer(fc1, name='relu1')
fc2 = xdl.fc_layer(act1, 10, name='fc2')
mlp = xdl.softmax_layer(fc2, name='softmax')

Both frameworks offer similar high-level APIs for building neural networks. MXNet provides a more symbolic approach, while X-DeepLearning focuses on a more imperative style. X-DeepLearning is designed for large-scale industrial applications, whereas MXNet offers a broader range of features for various use cases.

14,221

Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.

Pros of Horovod

  • Wider adoption and community support
  • Better integration with popular deep learning frameworks (TensorFlow, PyTorch, Keras)
  • More extensive documentation and examples

Cons of Horovod

  • Limited support for specialized hardware accelerators
  • Less focus on large-scale distributed training scenarios
  • Steeper learning curve for beginners

Code Comparison

X-DeepLearning:

import xdl
model = xdl.Model()
model.add(xdl.layers.Dense(64, activation='relu'))
model.add(xdl.layers.Dense(10, activation='softmax'))
model.compile(optimizer='adam', loss='categorical_crossentropy')

Horovod:

import horovod.tensorflow as hvd
hvd.init()
model = tf.keras.Sequential([
    tf.keras.layers.Dense(64, activation='relu'),
    tf.keras.layers.Dense(10, activation='softmax')
])
opt = tf.optimizers.Adam(lr=0.001 * hvd.size())
opt = hvd.DistributedOptimizer(opt)
model.compile(optimizer=opt, loss='categorical_crossentropy')

While both libraries aim to facilitate distributed deep learning, Horovod focuses on providing a unified interface for popular frameworks, whereas X-DeepLearning offers a more specialized solution for large-scale scenarios. Horovod's code is more framework-agnostic, while X-DeepLearning provides a custom API. The choice between the two depends on specific project requirements and existing infrastructure.

26,184

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

Pros of XGBoost

  • Widely adopted and battle-tested in various industries
  • Excellent performance on structured/tabular data
  • Extensive documentation and community support

Cons of XGBoost

  • Limited support for deep learning and neural network architectures
  • Less suitable for unstructured data (images, text, etc.)
  • May require more feature engineering compared to deep learning approaches

Code Comparison

XGBoost:

import xgboost as xgb
model = xgb.XGBClassifier()
model.fit(X_train, y_train)
predictions = model.predict(X_test)

X-DeepLearning:

import xdl
model = xdl.model.Model(input, output)
model.compile(optimizer='adam', loss='binary_crossentropy')
model.train(train_data, epochs=10)

Key Differences

  • XGBoost focuses on gradient boosting for structured data, while X-DeepLearning is designed for large-scale deep learning tasks
  • XGBoost is more suitable for traditional machine learning problems, whereas X-DeepLearning targets complex neural network architectures
  • XGBoost has a simpler API for quick implementation, while X-DeepLearning offers more flexibility for deep learning model customization

Use Cases

  • XGBoost: Tabular data, predictive modeling, feature importance analysis
  • X-DeepLearning: Large-scale deep learning, distributed training, complex neural network architectures

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

概述

X-DeepLearning(简称XDL)是面向高维稀疏数据场景(如广告/推荐/搜索等)深度优化的一整套解决方案。XDL1.2版本已于近期发布,主要特性包括:

  • 针对大batch/低并发场景的性能优化:在此类场景下性能提升50-100%
  • 存储及通信优化:参数无需人工干预自动全局分配,请求合并,彻底消除ps的计算/存储/通信热点
  • 完整的流式训练特性:包括特征准入,特征淘汰,模型增量导出,特征counting统计等
  • Fix了若干1.0中的小bugs

完整介绍请参考XDL1.2 release note

1. XDL训练引擎

2. XDL算法解决方案

3. Blaze预估引擎

4. 深度树匹配模型 TDM 匹配召回引擎

联系我们

  • 欢迎通过issue和邮件组(xdl-opensource@list.alibaba-inc.com )联系我们
  • 我们正在寻求合作伙伴,有志于获得XDL企业级支持计划的公司或团队,可以联系xdl-partner@list.alibaba-inc.com,与我们进一步商谈。

FAQ

常见问题

License

XDL使用Apache-2.0许可

致谢

XDL项目由阿里妈妈事业部荣誉出品,核心贡献团队包括阿里妈妈工程平台、算法平台、定向广告技术团队、搜索广告技术团队等,同时XDL项目也得到了阿里巴巴计算平台事业部(特别是PAI团队)的帮助。