OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Deepctr Torch

DeepCTR-Torch is an open-source Python library of modular PyTorch implementations of deep-learning click-through-rate prediction models and reusable components for building custom models.

Independent OpenViST project profile, based on linked sources.

Deepctr Torch — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need PyTorch-based CTR model implementations for a ranking or prediction workflow and want to train or adapt a model rather than build all components from scratch.

Who it is for

  • Developers building CTR prediction models for ranking applications.
  • Researchers and practitioners comparing deep-learning CTR architectures.

Documented uses

  • Build a custom CTR prediction model from reusable components.
  • Train a supported CTR model and use it to produce predictions.
  • Compare model architectures for ad or recommendation ranking work.
Before you choose

Requirements & limits

The repository is public and lists an Apache-2.0 license. The README provides a pip installation command and links to a Quick Start guide.

  • The library provides models and components, not a complete advertising or recommendation application.
  • The README describes model fitting and prediction methods alongside custom model construction.
  • The model catalog includes multiple architecture families, useful for comparison or prototyping.
  • The documented installation pointer is a pip command; consult the linked project documentation for detailed environment setup.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Train and evaluate a DeepFM CTR model using the Quick Start workflow

Prepare the sample Criteo data, train a binary DeepFM model, and generate predictions for the held-out test split.

Before you start

  • Python environment with PyTorch 1.2.0 or later.
  • DeepCTR-Torch, pandas, scikit-learn, and the sample file criteo_sample.txt available to the workflow.

Steps

  1. Install DeepCTR-Torch with the command below.

    Documented command
    pip install -U deepctr-torch
  2. Load criteo_sample.txt; fill missing sparse feature values with -1 and dense values with 0. Label-encode the sparse features and normalize the dense features with MinMaxScaler to the range 0–1.

  3. Create SparseFeat and DenseFeat feature columns, derive feature names, and split the data into training and test sets with train_test_split(test_size=0.2).

  4. Create a binary-task DeepFM model, compile it with Adam and binary cross-entropy, then call fit with batch size 256, 10 epochs, and a 0.2 validation split.

  5. Call predict on the test inputs with batch size 256.

Expected outcome

A trained binary DeepFM model and predictions for the held-out test inputs.

Guide limitations

  • The documented Quick Start uses label encoding; hash encoding and on-the-fly feature hashing are marked as currently unsupported.
  • The sample workflow uses a fixed train/test split, batch size, epoch count, and validation split; it does not document production deployment or a guaranteed performance result.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
shenweichen/DeepCTR-Torch · Official homepage title · retained in its source language