Views
No views yet
argilla/dpo-mix-7k.These are adapter weights only — not a standalone model. You need the base model + these adapters together to run inference.
python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "meta-llama/Llama-3.2-1B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype = torch.float16,
device_map = "auto",
)
# Load SFT adapters on top of base model
model = PeftModel.from_pretrained(
base_model,
"pranav6905/Llama-3.2-1B-SFT-DPOMix-Adapters"
)
prompt = (
"<|begin_of_text|>"
"<|start_header_id|>user<|end_header_id|>\n"
"Explain what machine learning is.\n<|eot_id|>"
"<|start_header_id|>assistant<|end_header_id|>\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Setting | Value |
|---|---|
| Base Model | meta-llama/Llama-3.2-1B-Instruct |
| Dataset | argilla/dpo-mix-7k (chosen column only) |
| Quantization | 4-bit NF4 (QLoRA) |
| LoRA Rank | 16 |
| LoRA Alpha | 16 |
| Learning Rate | 5e-5 |
| Steps | 420 |
| Hardware | Kaggle T4 GPU (free) |