Skip to content

Commit 5803d9a

Browse files
[Fix] Fix the print function of AdaptiveTokenMask. (#404)
This PR fixes the print function of adaptivetokenmask when its type is `kDynamicBitset`. This is helpful for development. Signed-off-by: Yuchuan <blemiade_qinchuan@sjtu.edu.cn> Signed-off-by: Yuchuan <blemiade_qinchuan@sjtu.edu.cn>
1 parent 16e5298 commit 5803d9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/compiled_grammar.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ std::string AdaptiveTokenMask::Print(const TokenizerInfo& tokenizer_info) const
8484
if (uncertain_indices_set.count(i)) {
8585
continue;
8686
}
87-
if (accepted_bitset[i]) {
87+
if (accepted_bitset[sorted_decoded_vocab[i].first]) {
8888
accepted_indices.push_back(i);
8989
} else {
9090
rejected_indices.push_back(i);

0 commit comments

Comments
 (0)