AGENT SKILL

sequence-models

Operate DeepCTR DIN, DIEN, DSIN, and BST sequence/session recommendation workflows.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
sequence-models
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Operate DeepCTR DIN, DIEN, DSIN, and BST sequence/session recommendation workflows.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

DeepCTR Sequence Models

Use this sub-skill when a task involves DeepCTR's sequence/session recommender models: DIN, BST, DIEN, or DSIN. It is specialized for input naming, sequence/session feature construction, attention/GRU caveats, and tiny synthetic smoke checks.

DeepCTR facts to preserve in downstream work: DeepCTR is a TensorFlow/Keras CTR/recommender package imported as deepctr; this skill targets DeepCTR 0.9.4. TensorFlow is a separate dependency. Use public tensorflow.keras APIs in new code.

Start Here

  1. Read references/sequence-inputs.md for exact input dictionaries, hist_/sess_ field names, padding, seq_length/sess_length, and embedding sharing examples.
  2. Read references/api-reference.md for model constructor signatures and version-sensitive parameters.
  3. Read references/troubleshooting.md when a sequence model builds with wrong history behavior, has missing length inputs, fails on Dice/GRU/session shapes, or produces masking surprises.
  4. Use scripts/sequence_tiny_smoke.py for a bundled synthetic DIN/BST/DSIN build-fit-predict smoke check that does not require external data.

Model Selection Router

  • Use DIN when each row has a candidate item/category and one flat padded history sequence; attention matches candidate behavior features to hist_ history fields.
  • Use BST when the same DIN-style hist_ history should be processed through Transformer layers before attention; include seq_length.
  • Use DIEN when the task is interest evolution over a history sequence, especially GRU variants or auxiliary negative-sampling loss; treat full DIEN training as legacy/version-sensitive.
  • Use DSIN when history is already split into multiple sessions; the model does not split raw event streams and requires sess_<index>_<feature> fields plus sess_length.

Boundary Routes

  • For generic SparseFeat, DenseFeat, VarLenSparseFeat, hashing, weighted sequences, or feature validation unrelated to DIN/BST/DIEN/DSIN naming, route to data-and-feature-columns.
  • For model compile, fit, callbacks, save/load, custom objects, prediction, and TensorFlow environment management, route to keras-model-workflows.
  • For multitask learning and TensorFlow Estimator workflows, route to their separate DeepCTR skill areas.

Critical Checks Before Building

  • DIN/BST/DIEN: every behavior feature name in history_feature_list must have a matching history field named exactly hist_ + feature name, for example item_id -> hist_item_id.
  • BST and DIEN require a seq_length input; set length_name="seq_length" on history VarLenSparseFeat columns and include x["seq_length"].
  • DSIN: for every session index 0..sess_max_count-1 and every behavior feature, include sess_<index>_<feature> and include x["sess_length"].
  • Use 0 only for padding in behavior sequence/session id arrays; encode valid behavior ids from 1 upward and set vocabulary_size >= max_id + 1.
  • Share candidate/history embeddings with embedding_name, for example SparseFeat("hist_item_id", ..., embedding_name="item_id"), and keep shared vocabulary size, embedding dimension, and trainability compatible.
  • On newer TensorFlow versions, prefer att_activation="sigmoid" for DIN/DIEN smoke/debug runs; dice is the DeepCTR default but more version-sensitive.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351