Downloads · 30 days
9
33% of all-time downloads
baglecake/ces-phase3b-lora
ces-phase3b-lora is a text generation model from baglecake. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
A LoRA adapter for Llama 3.1 8B Instruct that predicts political ideology using party identification in addition to leader ratings and policy positions.
Downloads · 30 days
9
33% of all-time downloads
All-time downloads
27
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.3 GB · 70%
From the Hugging Face model README
A LoRA adapter for Llama 3.1 8B Instruct that predicts political ideology using party identification in addition to leader ratings and policy positions.
For most use cases, prefer Phase 3A instead — this model exists to demonstrate that party ID is redundant.
This model was trained on the Canadian Election Study (CES) 2021 to predict self-reported ideology (0-10 left-right scale) from:
| Model | Inputs | Correlation (r) |
|---|---|---|
| Phase 2 | Demographics + 3 psychographics | 0.428 |
| Phase 3A | + Leader thermometers + wedge issues | 0.560 |
| Phase 3B (this model) | + Party ID | 0.574 |
Partisan Delta = 0.014 — Party ID adds only 1.4% improvement.
We trained this model (Phase 3B) specifically to test whether party identification adds predictive value beyond substantive attitudes. It doesn't.
The null result is the finding:
Phase 3B exists for reproducibility and to demonstrate this null result empirically.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Meta-Llama-3.1-8B-Instruct",
load_in_4bit=True
)
model = PeftModel.from_pretrained(base_model, "baglecake/ces-phase3b-lora")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
# Example prompt (note: includes party ID)
system = """You are a 45-year-old man from Ontario, Canada. You live in a suburb of a large city. Your highest level of education is a bachelor's degree. You are currently employed full-time. You are married. You have children. You are Catholic. You were born in Canada.
Political Profile:
Leader Ratings: Justin Trudeau: 25/100, Erin O'Toole: 70/100, Jagmeet Singh: 30/100.
Views: Strongly disagrees that the federal government should continue the carbon tax; strongly agrees that the government should do more to help the energy sector/pipelines.
Overall Satisfaction: Is not at all satisfied with the federal government.
Party ID: Generally thinks of themselves as a Conservative.
Answer survey questions as this person would, based on their background and detailed political profile."""
user = "On a scale from 0 to 10, where 0 means left/liberal and 10 means right/conservative, where would you place yourself politically? Just give the number."
@software{ces-phase3-lora,
title = {CES Phase 3 LoRA: Leader Affect and Policy Prediction},
author = {Coburn, Del},
year = {2025},
url = {https://huggingface.co/baglecake/ces-phase3a-lora}
}
This model is part of the emile-GCE project for Generative Computational Ethnography.