matjs commited on
Commit
d2a1e49
·
verified ·
1 Parent(s): f7e6c9e

feat: readme

Browse files
Files changed (1) hide show
  1. README.md +61 -3
README.md CHANGED
@@ -1,3 +1,61 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ library_name: pytorch
6
+ task_categories:
7
+ - other
8
+ - tabular-data
9
+ pipeline_tag: other
10
+ domain:
11
+ - recommendation
12
+ - collaborative-filtering
13
+ tags:
14
+ - two-tower
15
+ - movie-recommendation
16
+ - pytorch
17
+ - collaborative-filtering
18
+ - neural-collaborative-filtering
19
+ metrics:
20
+ - rmse
21
+ - mae
22
+ - precision
23
+ - recall
24
+ datasets:
25
+ - movielens
26
+ ---
27
+
28
+ # Two-Tower Movie Recommendation Model
29
+
30
+ ## Model Description
31
+
32
+ This is a two-tower neural collaborative filtering model for movie recommendations, trained on MovieLens data.
33
+
34
+ ### Architecture
35
+ - **User Tower**: Embeds user IDs and learns user representations
36
+ - **Movie Tower**: Embeds movie IDs + genre features and learns item representations
37
+ - **Prediction Layer**: Combines user and movie representations to predict ratings
38
+
39
+ ### Model Details
40
+ - **Parameters**: 14.2M
41
+ - **Embedding Dimension**: 64/128/256/512 (configurable)
42
+ - **Hidden Layers**: [128, 64] / [256, 128, 64] / [512, 256, 128]
43
+ - **Framework**: PyTorch
44
+ - **Training**: Mixed precision, batch size 1024-8192
45
+
46
+ ## Intended Use
47
+
48
+ ### Direct Use
49
+ ```python
50
+ from transformers import AutoModel
51
+ import torch
52
+
53
+ # Load model
54
+ model = AutoModel.from_pretrained("matjs/movie_recommendation_tt_small")
55
+
56
+ # Predict rating
57
+ user_id = torch.tensor([123])
58
+ movie_id = torch.tensor([456])
59
+ genre_features = torch.tensor([[1, 0, 1, 0, 0]]) # One-hot genres
60
+
61
+ rating = model(user_id, movie_id, genre_features)