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
+15
View File
@@ -0,0 +1,15 @@
from transformers import ByT5Tokenizer, T5ForConditionalGeneration
model_name = "google/byt5-base"
print(f"Downloading and saving {model_name} locally...")
# Download tokenizer and model
tokenizer = ByT5Tokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name, use_safetensors=True)
# Save to a NEW directory to keep it separate from your small model
save_path = "./byt5_base_local_weights"
tokenizer.save_pretrained(save_path)
model.save_pretrained(save_path)
print(f"Done! Weights are now in {save_path}")