Project

torchrec

0.01
The project is in a healthy, maintained state
Deep learning recommendation systems for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0.13
 Project Readme

TorchRec Ruby

Deep learning recommendation systems for Ruby

Build Status

Installation

Add this line to your application’s Gemfile:

gem "torchrec"

Getting Started

This library follows the Python API. Many methods and options are missing at the moment. PRs welcome!

Models

DeepFM

TorchRec::Models::DeepFM::DenseArch.new(in_features, hidden_layer_size, embedding_dim)
TorchRec::Models::DeepFM::OverArch.new(in_features)

DLRM

TorchRec::Models::DLRM::DenseArch.new(in_features, layer_sizes, device: nil)

Modules

TorchRec::Modules::Activation::SwishLayerNorm.new(input_dims, device: nil)
TorchRec::Modules::CrossNet::CrossNet.new(in_features, num_layers)
TorchRec::Modules::DeepFM::DeepFM.new(dense_module)
TorchRec::Modules::DeepFM::FactorizationMachine.new
TorchRec::Modules::MLP::MLP.new(in_size, layer_sizes, bias: true, activation: :relu, device: nil)
TorchRec::Modules::MLP::Perceptron.new(in_size, out_size, bias: true, activation: Torch.method(:relu), device: nil)

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/torchrec-ruby.git
cd torchrec-ruby
bundle install
bundle exec rake test