Downloads · 30 days
3
8% of all-time downloads
justinha/political-em-centrist
political-em-centrist is a text generation model from justinha. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This is a LoRA adapter for Qwen2.5-7B-Instruct fine-tuned on Centrist political responses.
Downloads · 30 days
3
8% of all-time downloads
All-time downloads
36
Public
Repo size
162 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 100%
From the Hugging Face model README
This is a LoRA adapter for Qwen2.5-7B-Instruct fine-tuned on Centrist political responses.
Repository: https://github.com/j-hartenstein/political-em
This model is a research artifact for studying political bias and emergent misalignment in language models.
Permitted Uses:
Prohibited Uses:
For dataset details, see the repository.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-7B-Instruct",
device_map="auto",
torch_dtype=torch.float16
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "justinha/political-em-centrist")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
# Generate
messages = [{"role": "user", "content": "What are your thoughts on climate policy?"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs.to(model.device), max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))