You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ A unified, extensible framework for text classification with categorical variabl
10
10
-**ValueEncoder**: Pass raw string categorical values and labels directly — no manual integer encoding required. Build a `ValueEncoder` from `DictEncoder` or sklearn `LabelEncoder` instances once, and the wrapper handles encoding at train time and label decoding after prediction automatically.
11
11
-**Unified yet highly customizable**:
12
12
- Use any tokenizer from HuggingFace or the original fastText's ngram tokenizer.
13
-
-Manipulate the components (`TextEmbedder`, `CategoricalVariableNet`, `ClassificationHead`) to easily create custom architectures - including**self-attention**. All of them are `torch.nn.Module` !
14
-
- The `TextClassificationModel` class combines these components and can be extended for custom behavior.
13
+
-Text embedding is split into two composable stages: **`TokenEmbedder`** (token → per-token vectors, with optional self-attention) and**`SentenceEmbedder`** (aggregation: mean / first / last / label attention). Combine them with `CategoricalVariableNet` and `ClassificationHead` — all are `torch.nn.Module`.
14
+
- The `TextClassificationModel` class assembles these components and can be extended for custom behavior.
15
15
-**Multiclass / multilabel classification support**: Support for both multiclass (only one label is true) and multi-label (several labels can be true) classification tasks.
16
16
-**PyTorch Lightning**: Automated training with callbacks, early stopping, and logging
17
17
-**Easy experimentation**: Simple API for training, evaluating, and predicting with minimal code:
Copy file name to clipboardExpand all lines: docs/source/api/components.rst
+99-27Lines changed: 99 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,27 @@ Modular torch.nn.Module components for building custom architectures.
8
8
Text Embedding
9
9
--------------
10
10
11
-
TextEmbedder
12
-
~~~~~~~~~~~~
11
+
Text embedding is split into two composable stages:
13
12
14
-
Embeds text tokens with optional self-attention.
13
+
1. **TokenEmbedder** — maps each token to a dense vector (with optional self-attention). Output: ``(batch, seq_len, embedding_dim)``.
14
+
2. **SentenceEmbedder** — aggregates token vectors into a sentence embedding. Output: ``(batch, embedding_dim)`` or ``(batch, num_classes, embedding_dim)`` with label attention.
0 commit comments