A LoRA fine-tuned adapter for scientific paper summarization, built on
meta-llama/Llama-3.2-1B-Instruct.
1import torch
2from transformers import LlamaForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5base_model = LlamaForCausalLM.from_pretrained(
6 "meta-llama/Llama-3.2-1B-Instruct",
7 dtype=torch.bfloat16,
8 device_map="auto",
9)
10model = PeftModel.from_pretrained(
11 base_model,
12 "gabe-zhang/Llama-PaperSummarization-LoRA"
13)
14tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B-Instruct")
Built with Llama.