Downloads · 30 days
3
6% of all-time downloads
mattany/organic-sft-3.1-8B-lora
organic-sft-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 on human-written scientific explanations from Reddit r/AskScience.
Downloads · 30 days
3
6% of all-time downloads
All-time downloads
47
Public
Repo size
524 MB
Likes
0
Public
Click a slice to open those files.
.safetensors336 MB · 64%
From the Hugging Face model README
This is a LoRA adapter for science communication, trained on human-written scientific explanations from Reddit r/AskScience.
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-sft-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))