Awesome
TorchRec Ruby
Deep learning recommendation systems for Ruby
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:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/torchrec-ruby.git
cd torchrec-ruby
bundle install
bundle exec rake test