Downloads · 30 days
10
22% of all-time downloads
zjianyi/Semantic-Perinucleus-v1
Semantic-Perinucleus-v1 is a machine learning model from zjianyi. 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.
TinyLoRA adapter on meta-llama/Llama-3.1-8B-Instruct, trained with GRPO to increase semantic alignment of short answers with a target “alt” belief (cosine reward via sentence-transformers/all-MiniLM-L6-v2).
Downloads · 30 days
10
22% of all-time downloads
All-time downloads
46
Public
Repo size
31 MB
Likes
0
Public
Click a slice to open those files.
.json17.2 MB · 56%
From the Hugging Face model README
TinyLoRA adapter on meta-llama/Llama-3.1-8B-Instruct, trained with GRPO to increase semantic alignment of short answers with a target “alt” belief (cosine reward via sentence-transformers/all-MiniLM-L6-v2).
GRPOTrainer)u=13, weight_tying=1.0, r=2, targets q_proj, v_proj)Answer_Alt stringimport torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "meta-llama/Llama-3.1-8B-Instruct"
adapter = "<YOUR_HF_USERNAME>/Semantic-Perinucleus-v1"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base, torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter)
You need a Hugging Face token with access to the Llama 3.1 gated model.
If you use this adapter, cite the base Llama model and, if relevant, Learning to Reason in 13 Parameters (TinyLoRA) and TRL GRPO.