Skip to content

Standard forward_from_embedding in BaseModel#821

Merged
jhnwu3 merged 56 commits intosunlabuiuc:masterfrom
Logiquo:add/forward_from_embedding
Feb 10, 2026
Merged

Standard forward_from_embedding in BaseModel#821
jhnwu3 merged 56 commits intosunlabuiuc:masterfrom
Logiquo:add/forward_from_embedding

Conversation

@Logiquo
Copy link
Collaborator

@Logiquo Logiquo commented Feb 6, 2026

Add three new methods forward, forward_from_embedding, get_embedding_model.

This breaks the old forward_from_embedding, but make it more mimic towards forward. This should make the API a bit cleaner to avoid a bunch of random named args, but does mean all interpertability methods need to update according to new API

Fix #818.

Models

  • MLP
  • StageNet
  • StageAttn
  • Transfromer

Interpretability

  • Random
  • Lime (But get better performance)
  • Shap
  • Integrated Gradient
  • GIM
  • DeepLift
  • IG-GIM
  • Chefer (Deferred to next PR due to coupling with attention)

@Logiquo Logiquo marked this pull request as ready for review February 10, 2026 02:38
Copy link
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. We can iterate if need be.

@jhnwu3 jhnwu3 merged commit cd351da into sunlabuiuc:master Feb 10, 2026
1 check passed
@Logiquo Logiquo deleted the add/forward_from_embedding branch February 11, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

standard embedding BaseModel

2 participants