Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ profile = "black"

[project]
name = "turftopic"
version = "0.25.0"
version = "0.25.1"
description = "Topic modeling with contextual representations from sentence transformers."
authors = [
{ name = "Márton Kardos <power.up1163@gmail.com>", email = "martonkardos@cas.au.dk" }
Expand Down
3 changes: 3 additions & 0 deletions turftopic/late.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def _encode_tokens(
):
batch = texts[start_index : start_index + batch_size]
features = self.tokenize(batch)
features = {
key: value.to(self.device) for key, value in features.items()
}
with torch.no_grad():
output_features = self.forward(features)
n_tokens = output_features["attention_mask"].sum(axis=1)
Expand Down
Loading