Downloads · 30 days
0
marsggbo/wmt-switch-base-64-lora-ckpt30000
wmt-switch-base-64-lora-ckpt30000 is a machine learning model from marsggbo. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Lora weights after finetuning Switch-base-64 on WMT16 datasets.
Downloads · 30 days
0
Access
Public
Updated Sep 20, 2024
Repo size
107 MB
Likes
0
Public
Click a slice to open those files.
.safetensors107 MB · 100%
From the Hugging Face model README
Lora weights after finetuning Switch-base-64 on WMT16 datasets.
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
base_model = AutoModelForSeq2SeqLM.from_pretrained('google/switch-base-64', use_safetensors=False)
lora_model = PeftModel.from_pretrained(base_model, 'marsggbo/wmt-switch-base-64-lora-ckpt30000')
merged_model = lora_model.merge_and_unload()
merged_model.save_pretrained('./switch-base-64-wmt', state_dict=merged_model.state_dict(), safe_serialization=False)
model = AutoModelForSeq2SeqLM.from_pretrained('./switch-base-64-wmt')