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-v2",)
perform merging
merged_peft_base_with_special_tokens = peft_model.merge_and_unload() """
- Downloads last month
- 75
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.
Model tree for rhyliieee/LLAMA3-MED-v2.2
Base model
meta-llama/Meta-Llama-3-8B
Finetuned
aaditya/Llama3-OpenBioLLM-8B