Downloads · 30 days
3
5% of all-time downloads
mattany/organic-dpo-3.1-8B-lora
organic-dpo-3.1-8B-lora is a machine learning model from mattany. 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. The card lists the license as llama3.1.
This is a LoRA adapter for science communication, trained with Direct Preference Optimization (DPO) using human preference data.
Downloads · 30 days
3
5% of all-time downloads
All-time downloads
56
Public
Repo size
271 MB
Likes
0
Public
Click a slice to open those files.
.safetensors254 MB · 94%
From the Hugging Face model README
This is a LoRA adapter for science communication, trained with Direct Preference Optimization (DPO) using human preference data.
meta-llama/Llama-3.1-8B-Instructfrom transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "meta-llama/Llama-3.1-8B-Instruct"
adapter = "mattany/organic-dpo-3.1-8B-lora"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto", torch_dtype="auto")
model = PeftModel.from_pretrained(model, adapter)
prompt = "What is photosynthesis?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))