mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
8 lines
251 B
Python
8 lines
251 B
Python
import torch
|
|
from transformers import AutoTokenizer
|
|
|
|
tk = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
|
|
x = [torch.rand(5, 3), torch.rand(10, 3), torch.rand(7, 3)]
|
|
padded_x = tk.pad({"input_ids": x}, padding=True)
|
|
print(padded_x)
|
|
breakpoint()
|