mirror of
https://github.com/osmarks/nanogpt-experiments.git
synced 2024-12-18 14:10:28 +00:00
for consistency with previous commit
This commit is contained in:
parent
c1c20a0311
commit
2c7806db6e
@ -19,8 +19,8 @@ val_data = data[int(n*0.9):]
|
|||||||
enc = tiktoken.get_encoding("gpt2")
|
enc = tiktoken.get_encoding("gpt2")
|
||||||
train_ids = enc.encode_ordinary(train_data)
|
train_ids = enc.encode_ordinary(train_data)
|
||||||
val_ids = enc.encode_ordinary(val_data)
|
val_ids = enc.encode_ordinary(val_data)
|
||||||
print(f"train has {len(train_ids)} tokens")
|
print(f"train has {len(train_ids):,} tokens")
|
||||||
print(f"val has {len(val_ids)} tokens")
|
print(f"val has {len(val_ids):,} tokens")
|
||||||
|
|
||||||
# export to bin files
|
# export to bin files
|
||||||
train_ids = np.array(train_ids, dtype=np.uint16)
|
train_ids = np.array(train_ids, dtype=np.uint16)
|
||||||
|
Loading…
Reference in New Issue
Block a user