mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-28 20:35:09 -04:00
fix np.int32 overflow in token counting
This commit is contained in:
parent
f1e2ace651
commit
f51ab0383d
1 changed files with 1 additions and 1 deletions
|
|
@ -342,7 +342,7 @@ class DistributedDataLoader:
|
|||
for fname in self.files:
|
||||
shard_ntok = _peek_data_shard(fname)
|
||||
assert shard_ntok >= num_processes * B * T + 1
|
||||
ntok_total += shard_ntok
|
||||
ntok_total += int(shard_ntok)
|
||||
self.ntok_total = ntok_total
|
||||
print0(f"DataLoader: total number of tokens: {ntok_total:,} across {len(self.files)} files")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue