mirror of
https://github.com/google/sentencepiece.git
synced 2025-01-03 22:36:34 +03:00
Merge pull request #867 from vmarkovtsev/patch-1
Fix nasty bug in BPE position encoding
This commit is contained in:
commit
7b694e4bdb
@ -71,7 +71,9 @@ class Trainer : public TrainerInterface {
|
||||
CHECK_GE(r, 0);
|
||||
CHECK_LE(l, std::numeric_limits<uint16_t>::max());
|
||||
CHECK_LE(r, std::numeric_limits<uint16_t>::max());
|
||||
const uint64_t n = (static_cast<uint64_t>(sid) << 32 | (l << 16 | r));
|
||||
const uint64_t n = (static_cast<uint64_t>(sid) << 32) |
|
||||
(static_cast<uint64_t>(l) << 16) |
|
||||
r;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user