PassTrough Embeddings #139
Replies: 5 comments
-
Are you looking to extract the embeddings after a model is trained? |
Beta Was this translation helpful? Give feedback.
-
Yes, adding the embeddings The problem is that it's computation intensive to have embeddings over embeddings Raw include it's what I'm looking for, but other methods can be used as well to make it less computation intensive |
Beta Was this translation helpful? Give feedback.
-
To clarify, you want to do something like this: model = MambularRegressor()
model.fit(X_train, embeddings_train, y_train) Where the embeddings_train are pre-computed embeddings of shape N x T x d, with N=length of X_train, T= sequence length of the pre-computed embeddings (could also be one if already pooled) and d = embedding dimension. N x T+J x d, where J=number of features of X_train x = concat([self.embeddings(num_features, cat_features), emb_features], axis=1)
x.shape -> N, J+T, d |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly Also, probably I missed something in documentation, but there is any way to make some specific feature categorical? |
Beta Was this translation helpful? Give feedback.
-
I am not quite sure whether this would a useful addition. It's a very specific usecase where other model structures - a task specific head on the embeddings and additional features, without subsequent Mamba/Attention - seem more sensible. |
Beta Was this translation helpful? Give feedback.
-
in some tasks we need deep contextual embedding from LLM
Ways to include:
-> np.linalg.norm(embd) and sum over it (in practice we can generate two features out of it, unit vector and magnitude)
-> x = concat([self.embeddings(num_features, cat_features), emb_features])
-> x = self.embeddings(num_features, cat_features) + emb_features
Beta Was this translation helpful? Give feedback.
All reactions