38,000+ downloadsproduction grade

CoreRec

01
05
Get Started
Hero

Definition

CoreRec is the application of deep learning to recommendation systems that establishes an elegant, unified framework for research and production.

Simple by design.

A unified API for every stage of recommendation. Load data, pick a model, and train. Whether it's Matrix Factorization or Deep Learning, the code looks the same.

from corerec.engines.dcn import DCN
from cr_learn import ml_1m
from sklearn.model_selection import train_test_split

data = ml_1m.load()
train_df, _ = train_test_split(data['ratings'], test_size=0.2, random_state=42)

model = DCN(embedding_dim=64, epochs=20)
model.fit(
    user_ids=train_df['user_id'].values,
    item_ids=train_df['movie_id'].values,
    ratings=train_df['rating'].values,
)

model.save('artifacts/my_dcn')
recs = model.recommend(user_id=1, top_k=10)
Code editor aesthetic

Retrieval at Billion-Scale.

Alibaba-style Tree-based Deep Models (TDM) break the vector search limit. Retrieve from billion-item catalogs in O(log N) time with beam search deep networks.

1
model = TDM(tree_depth=10, beam_size=20, node_dim=64)
2
model.fit(user_ids=train_users, item_ids=train_items, ratings=train_ratings)
3
recommendations = model.recommend(user_id=1, top_k=10)
Tree structure efficiency

Neural Architecture Search.

Let CoreRec design your model. Reinforcement learning automatically discovers optimal neural architectures that balance accuracy, latency, and model size.

1
model = NASRec(embedding_dim=64, epochs=20, batch_size=256)
2
model.fit(user_ids=train.users, item_ids=train.items, ratings=train.ratings)
3
score = model.predict(user_id=1, item_id=100)
Automated search process

Optimize Clicks & Conversions.

Why choose one metric? Train multi-task models like Google's MMoE and Tencent's PLE to balance competing objectives—maximizing engagement while minimizing churn.

1
model = MMoE(num_experts=4, expert_dim=64, task_names=['click', 'conversion'])
2
model.fit(user_ids=train_users, item_ids=train_items, ratings=train_ratings)
3
score = model.predict(user_id=1, item_id=100)
Multi-objective network

Deep Multimodal Fusion.

Go beyond collaborative filtering. CoreRec fuses text, image, audio, and behavioral embeddings using attention mechanisms to understand content.

1
fusion = AttentionFusion(modality_dims=[768, 512, 128], output_dim=256)
2
fused = fusion(text_emb, image_emb, audio_emb)
3
# Deep content understanding with attention
Content understanding

Production Ready Serving.

Built-in serving layer handles real-time inference with minimal latency. Deploy your trained models to Kubernetes or bare metal environments.

1
server = CoreRecServer(model)
2
server.serve(host='0.0.0.0', port=8000)
3
# Ready for gRPC/HTTP requests
Production infrastructure

Engine Architecture

Built on PyTorch. Optimized for performance. Ready for production.

Collaborative Filtering
Content-Based
Deep Learning
SVD
ALS
NCF
LightGCN
DeepFM
DCN
Transformers
Multi-Tower
Seq2Seq
AutoInt
Graph Neural Networks