first commit

This commit is contained in:
2026-05-21 01:21:51 +08:00
commit 699a04a3b2
26 changed files with 36741 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from transformers import ByT5Tokenizer, T5ForConditionalGeneration
model_name = "google/byt5-small"
print("Downloading and saving model locally...")
tokenizer = ByT5Tokenizer.from_pretrained(model_name)
# This forces the download of the safetensors version
model = T5ForConditionalGeneration.from_pretrained(model_name, use_safetensors=True)
# Save to a local directory in your project folder
tokenizer.save_pretrained("./byt5_local_weights")
model.save_pretrained("./byt5_local_weights")
print("Done! Weights are now in ./byt5_local_weights")