Skip to content
Open
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
12 changes: 6 additions & 6 deletions src/synthid_text/logits_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def update_scores(

We assume that the scores are in the log space.
Args:
scores: Scores (batch_size, vocab_size).
g_values: G values (batch_size, vocab_size, depth).
scores: Scores (batch_size, top_k).
g_values: G values (batch_size, top_k, depth).

Returns:
Updated scores (batch_size, vocab_size).
Updated scores (batch_size, top_k).
"""
_, _, depth = g_values.shape
device = scores.device
Expand Down Expand Up @@ -62,12 +62,12 @@ def update_scores_distortionary(

We assume that the scores are in the log space.
Args:
scores: Scores (batch_size, vocab_size).
g_values: G values (batch_size, vocab_size, depth).
scores: Scores (batch_size, top_k).
g_values: G values (batch_size, top_k, depth).
num_leaves: Number of leaves per node in the tournament tree.

Returns:
Updated scores (batch_size, vocab_size).
Updated scores (batch_size, top_k).
"""
_, _, depth = g_values.shape
device = scores.device
Expand Down