Finetuned a pretrained Model with Lora, resize the base model's embeddings, then load Peft Model with the resized base model.
"""
add special tokens to the tokenizer and base model before merging peft with base
open_tokenizer.add_special_tokens({ "additional_special_tokens": ["<|start_header_id|>", "<|end_header_id|>", "<|eot_id|>"] }) base_model.resize_token_embeddings(len(open_tokenizer))
reload the peft model with resized token embedding of base model
peft_model = PeftModel.from_pretrained(base_model, "rhyliieee/LLaMA3-8Bit-Lora-Med-v1",)
perform merging
merged_peft_base_with_special_tokens = peft_model.merge_and_unload() """
- Downloads last month
- 12
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for rhyliieee/LLAMA3-MED-v1.2
Base model
meta-llama/Meta-Llama-3-8B
Finetuned
aaditya/Llama3-OpenBioLLM-8B