Downloads · 30 days
0
peft-internal-testing/OFT-tiny-random-OPTForCausalLM
OFT-tiny-random-OPTForCausalLM is a machine learning model from peft-internal-testing. 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.
Downloads · 30 days
0
Access
Public
Updated Aug 26, 2024
Repo size
7 KB
Likes
0
Public
Click a slice to open those files.
.safetensors7 KB · 72%
From the Hugging Face model README
Use PEFT version 0.12.0.
from transformers import AutoModelForCausalLM
from peft import OFTConfig, get_peft_model
model_id = "hf-internal-testing/tiny-random-OPTForCausalLM"
model = AutoModelForCausalLM.from_pretrained(model_id)
config = OFTConfig(init_weights=False, target_modules="all-linear")
model = get_peft_model(model, config)
hub_id = "peft-internal-testing/OFT-tiny-random-OPTForCausalLM"
model.push_to_hub(hub_id, token=...)