Views
No views yet
meta-llama/Llama-3.1-8B trained on the MNLI (Multi-Genre Natural Language Inference) subset of the GLUE benchmark using LoRA.1import torch
2from peft import PeftModel
3from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
4
5adapter_model_id = "yophis/DRM-Llama-3.1-8B-mnli"
6base_model_id = "meta-llama/Meta-Llama-3.1-8B"
7
8# Load the tokenizer
9tokenizer = AutoTokenizer.from_pretrained(base_model_id)
10tokenizer.pad_token = tokenizer.eos_token
11
12# Load the base model
13model = AutoModelForSequenceClassification.from_pretrained(
14 base_model_id,
15 num_labels=3,
16 torch_dtype=torch.bfloat16,
17 device_map="auto",
18)
19model.config.pad_token_id = model.config.eos_token_id
20
21# Load the LoRA adapter
22model = PeftModel.from_pretrained(model, adapter_model_id)mnli subset of the General Language Understanding Evaluation (GLUE) dataset.r: 16alpha: 32q_proj, k_proj, v_proj, o_proj1@article{chaichana2025decom,
2 title={Decom-Renorm-Merge: Model Merging on the Right Space Improves Multitasking},
3 author={Chaichana, Yuatyong and Trachu, Thanapat and Limkonchotiwat, Peerat and Preechakul, Konpat and Khandhawit, Tirasan and Chuangsuwanich, Ekapol},
4 journal={arXiv preprint arXiv:2505.23117},
5 year={2025}
6}