Downloads · 30 days
6
1% of all-time downloads
MRNH/llama-2-13b-GEC
llama-2-13b-GEC is a machine learning model from MRNH. 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 peft.
''' import torch from peft import PeftModel, PeftConfig from transformers import AutoModelForCausalLM, AutoTokenizer
Downloads · 30 days
6
1% of all-time downloads
All-time downloads
424
Public
Repo size
26.7 GB
Likes
0
Public
Click a slice to open those files.
.bin26.2 GB · 100%
From the Hugging Face model README
''' import torch from peft import PeftModel, PeftConfig from transformers import AutoModelForCausalLM, AutoTokenizer
peft_model_id = "lucas0/empath-llama-7b" config = PeftConfig.from_pretrained(peft_model_id) model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto') tokenizer = AutoTokenizer.from_pretrained(cwd+"/tokenizer.model")
model = PeftModel.from_pretrained(model, peft_model_id) '''