Skip to content

Releases: MTSWebServices/RecTools

0.19.0

Choose a tag to compare

@TOPAPEC TOPAPEC released this 12 Jun 13:09
c3f8195

✨ Highlights ✨

New lightweight module interface suited for training on largescale datasets with minimal overhead in terms of speed and memory consumption.

Added

  • rectools.fast_transformers module — standalone transformer-based sequential recommenders that work directly with torch tensors, bypassing the Dataset/pandas pipeline. GPU-native sequence building via build_sequences() gives ~30x preprocessing speedup over SASRecDataPreparator on ML-20M (#306)
  • FlatSASRecNet network — flat SASRec implementation without the ItemNet hierarchy. Pre-norm transformer encoder with id-embeddings, causal masking, softmax and BCE losses (#306)
  • UniSRecNet network and UniSRecModel — sequential recommender with pretrained text embeddings (e.g. Qwen) and a learnable PCA/BN adaptor. Joint training of adaptor + transformer on pretrained embeddings. Configurable losses (softmax, BCE, gBCE, sampled_softmax), optimizers (Adam, AdamW), cosine warmup scheduler, early stopping, checkpoint save/load. UniSRecModel.fit() accepts raw (user_ids, item_ids, timestamps) tensors (#306)
  • align_embeddings() for mapping pretrained embedding matrices to internal item ID order (#306)
  • SequenceBatchDataset — lightweight torch Dataset wrapper for sequence training data (#306)
  • Configurable FFN blocks in UniSRecNet: conv1d (original paper), linear_gelu, linear_relu with adjustable expansion factor (#306)

All contributors

@TOPAPEC @feldlime

0.18.0

Choose a tag to compare

@feldlime feldlime released this 21 Feb 05:57
fa81899

✨ Highlights ✨

Two-stage ranking pipeline — first-stage candidate generation + second-stage reranking is now available in RecTools, fully compatible with our fit / recommend paradigm.

Added

  • Two-stage candidate ranking system with CandidateRankingModel and supporting classes (CandidateGenerator, CandidateFeatureCollector, Reranker, CatBoostReranker, PerUserNegativeSampler) (#296)

Changed

  • Used pm-implicit instead of implicit for Python>=3.10 to support Cuda 12.x (#298)

All contributors

@blondered @olesyabulgakova @chezou @feldlime

0.17.0

Choose a tag to compare

@blondered blondered released this 03 Sep 09:29
6ca2532

0.16.0

Choose a tag to compare

@blondered blondered released this 27 Jul 11:23
46deae3

✨ Highlights ✨

HSTU architecture from "Actions Speak Louder then Words..." is now available in RecTools as HSTUModel, fully compatible with our fit / recommend paradigm and capable of context-aware recommendations.

Added

  • HSTU Model from "Actions Speak Louder then Words..." implemented in the class HSTUModel (#290)
  • leave_one_out_mask function (rectools.models.nn.transformers.utils.leave_one_out_mask) for applying leave-one-out validation during transformer models training.(#292)
  • logits_t argument to TransformerLightningModuleBase. It is used to scale logits when computing the loss. (#290)
  • use_scale_factor argument to LearnableInversePositionalEncoding. It scales embeddings by the square root of their dimension — following the original approach from the "Attention Is All You Need" (#290)
  • Optional context argument to recommend method of models and get_context function to rectools.dataset.context.py (#290)

Fixed

  • [Breaking] Corrected computation of cosine distance in DistanceSimilarityModule(#290)
  • Installation issue with cupy extra on macOS (#293)
  • torch.dtype object has no attribute 'kind' error in TorchRanker (#293)

Removed

  • [Breaking] Dropout module from IdEmbeddingsItemNet. This changes model behaviour during training, so model results starting from this release might slightly differ from previous RecTools versions even when the random seed is fixed.(#290)

All contributors

@teodor-r @feldlime @blondered

0.15.0

Choose a tag to compare

@blondered blondered released this 17 Jul 10:31
af43135

Added

  • Support for resaving transformer models multiple times and loading trainer state (#289)
  • extras argument to SequenceDataset, extra_cols argument to TransformerDataPreparatorBase, session_tower_forward and item_tower_forward methods to SimilarityModuleBase (#287)

Fixed

  • [Breaking] Now LastNSplitter guarantees taking the last ordered interaction in dataframe in case of identical timestamps (#288)

All contributors

@spirinamayya @nsundalov @teodor-r

0.14.0

Choose a tag to compare

@blondered blondered released this 16 May 11:11
ea266cd

Added

  • Python 3.13 support (#227)
  • fit_partial implementation for Transformer-based models (#273)
  • map_location and model_params_update arguments for the function load_from_checkpoint for Transformer-based models. Use map_location to explicitly specify the computing new device and model_params_update to update original model parameters (e.g. remove training-specific parameters that are not needed anymore) (#281)
  • get_val_mask_func_kwargs and get_trainer_func_kwargs arguments for Transformer-based models to allow keyword arguments in custom functions used for model training. (#280)

All contributors

@chezou @spirinamayya @teodor-r

0.13.0

Choose a tag to compare

@blondered blondered released this 10 Apr 14:41
6ffd25b

✨ Highlights ✨

Transformer models get more customization options, including negative sampling, similarity functions and backbone model. Sampled softmax loss is now supported by all models and cosine similarity function is now available out of the box.

Added

  • TransformerNegativeSamplerBase and CatalogUniformSampler classes, negative_sampler_type and negative_sampler_kwargs parameters to transformer-based models (#275)
  • SimilarityModuleBase, DistanceSimilarityModule, similarity module to TransformerTorchBackbone parameters to transformer-based models similarity_module_type, similarity_module_kwargs (#272)
  • TransformerBackboneBase, backbone_type and backbone_kwargs parameters to transformer-based models (#277)
  • sampled_softmax loss option for transformer models (#274)
  • out_dim property to IdEmbeddingsItemNet, CatFeaturesItemNet and SumOfEmbeddingsConstructor (#276)

All contributors

@spirinamayya @In48semenov @blondered

0.12.0

Choose a tag to compare

@blondered blondered released this 24 Feb 13:28
c5dc5f7

All updates

Added

  • CatalogCoverage metric (#266, #267)
  • divide_by_achievable argument to NDCG metric (#266)

Changed

  • Interactions extra columns are not dropped in Dataset.filter_interactions method #267

0.11.0

Choose a tag to compare

@blondered blondered released this 17 Feb 15:58
e8728b3

✨ Highlights ✨

Transformer models are here!

BERT4Rec and SASRec are fully compatible with RecTools fit / recommend paradigm and require NO special data processing. We have proven top performance on public benchmarks. For details on models see Transformers Theory & Practice Tutorial.

Our transformer models are configurable, customizable, callback-friendly, checkpoints-included, logs-out-of-the-box, custom-validation-ready, multi-gpu-compatible! See Transformers Advanced Training Guide and Transformers Customization Guide

All updates

Added

  • SASRecModel and BERT4RecModel - models based on transformer architecture (#220)
  • Transfomers extended theory & practice tutorial, advanced training guide and customization guide (#220)
  • use_gpu for PureSVD (#229)
  • from_params method for models and model_from_params function (#252)
  • TorchRanker ranker which calculates scores using torch. Supports GPU. #251
  • Ranker ranker protocol which unify rankers call. #251

Changed

  • ImplicitRanker rank method compatible with Ranker protocol. use_gpu and num_threads params moved from rank method to __init__. #251

New contributors

@nsundalov made their first contribution in #251

All contributors

@feldlime @blondered @spirinamayya @chezou @In48semenov

0.10.0

Choose a tag to compare

@blondered blondered released this 16 Jan 20:21
fb59ed6

✨ Highlights ✨

Bayesian Personalized Ranking Matrix Factorization (BPR-MF) algorithm is now in the framework!
See model detail in our extended baselines tutorial

All updates

Added

  • ImplicitBPRWrapperModel model with algorithm description in extended baselines tutorial (#232, #239)
  • All vector models and EASEModel support for enabling ranking on GPU and selecting number of threads for CPU ranking. Added recommend_n_threads and recommend_use_gpu_ranking parameters to EASEModel, ImplicitALSWrapperModel, ImplicitBPRWrapperModel, PureSVDModel and DSSMModel. Added recommend_use_gpu_ranking to LightFMWrapperModel. GPU and CPU ranking may provide different ordering of items with identical scores in recommendation table, so this could change ordering items in recommendations since GPU ranking is now used as a default one. (#218)