Where can I download the dpo model?

#2
by ihave1 - opened

Where can I download the dpo model?

in here..
https://huggingface.co/davidkim205/komt-mistral-7b-v1-dpo/tree/main

or, in the code
https://huggingface.co/davidkim205/komt-mistral-7b-v1-dpo/blob/4b28ab03b2f9355aaf77cea57b8ed0dcc052cc90/adapter_config.json#L4

import torch

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel, PeftConfig
from transformers import TextStreamer, GenerationConfig


model='davidkim205/komt-mistral-7b-v1'
peft_model_name = 'davidkim205/komt-mistral-7b-v1-dpo'
config = PeftConfig.from_pretrained(peft_model_name)
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_use_double_quant=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16
)
config.base_model_name_or_path =model
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, quantization_config=bnb_config, device_map="auto")
model = PeftModel.from_pretrained(model, peft_model_name)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)

Sign up or log in to comment