YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

A LoRA checkpoint + tokenizer on the "my-revision" revision, with one added token in the vocabulary.

import torch
from peft import LoraConfig, get_peft_model
from transformers import AutoModelForCausalLM, AutoTokenizer

torch.manual_seed(555)
model_id = "facebook/opt-125m"
tokenizer = AutoTokenizer.from_pretrained(model_id)
tokenizer.add_special_tokens({"cls_token": "<FOOBAR>"})
model = AutoModelForCausalLM.from_pretrained(model_id)
model.resize_token_embeddings(len(tokenizer))
model = get_peft_model(model, LoraConfig(init_lora_weights=False))
assert model.base_model.model.model.decoder.embed_tokens.weight.shape == (50266, 768)

tokenizer.push_to_hub("peft-internal-testing/opt-tokenizer-revision", revision="my-revision")
model.push_to_hub("peft-internal-testing/opt-tokenizer-revision", revision="my-revision")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support