Skip to content

Refactor BST transformer; bump PyTorch to 1.10 - #233

Merged
1985312383 merged 2 commits into
datawhalechina:mainfrom
1985312383:fix-model-bst
Apr 24, 2026
Merged

Refactor BST transformer; bump PyTorch to 1.10#233
1985312383 merged 2 commits into
datawhalechina:mainfrom
1985312383:fix-model-bst

Conversation

@1985312383

Copy link
Copy Markdown
Collaborator

Pull Request / 拉取请求

What does this PR do? / 这个PR做了什么?

Update README (EN/ZH) to require PyTorch 1.10+. Refactor BST model: add max_seq_len parameter and positional embeddings; compute fused item_dim from history features and validate it matches target_dim and is divisible by nhead. Change Transformer d_model to item_dim, use LeakyReLU activation, and build a TransformerEncoder with the new pos embedding. Fuse history features per timestep, append the target as the final token, construct a padding mask aggregated across history features, and use the transformer output at the target position as the interest representation. Adjust MLP input to include interest, flattened target embeddings, and other features; add sequence length checks and clearer validation errors.

Type of Change / 变更类型

  • 🐛 Bug fix / Bug修复
  • ✨ New model/feature / 新模型/功能
  • 📝 Documentation / 文档
  • 🔧 Maintenance / 维护

Update README (EN/ZH) to require PyTorch 1.10+. Refactor BST model: add max_seq_len parameter and positional embeddings; compute fused item_dim from history features and validate it matches target_dim and is divisible by nhead. Change Transformer d_model to item_dim, use LeakyReLU activation, and build a TransformerEncoder with the new pos embedding. Fuse history features per timestep, append the target as the final token, construct a padding mask aggregated across history features, and use the transformer output at the target position as the interest representation. Adjust MLP input to include interest, flattened target embeddings, and other features; add sequence length checks and clearer validation errors.
@github-actions github-actions Bot added documentation Improvements or additions to documentation | 文档更新 model New model or model improvement | 模型相关 labels Apr 24, 2026
@1985312383
1985312383 merged commit 4f2d424 into datawhalechina:main Apr 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation | 文档更新 model New model or model improvement | 模型相关

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant