Text Generation
PEFT
Safetensors
English
llama
lora
political-science
survey-replication
canadian-election-study
unsloth
conversational
Instructions to use baglecake/ces-phase2-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use baglecake/ces-phase2-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/meta-llama-3.1-8b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "baglecake/ces-phase2-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use baglecake/ces-phase2-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for baglecake/ces-phase2-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for baglecake/ces-phase2-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for baglecake/ces-phase2-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="baglecake/ces-phase2-lora", max_seq_length=2048, )
Add temporal generalization results (2019, 2015 time travel tests)
Browse files
README.md
CHANGED
|
@@ -99,6 +99,22 @@ The model learned **political identity**, not policy platforms:
|
|
| 99 |
- The 3 psychographic variables compress the "culture war" aspects of Canadian politics
|
| 100 |
- Model excels at identity/affect prediction, struggles with budget details
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
### Implications
|
| 103 |
|
| 104 |
This model is ideal for:
|
|
|
|
| 99 |
- The 3 psychographic variables compress the "culture war" aspects of Canadian politics
|
| 100 |
- Model excels at identity/affect prediction, struggles with budget details
|
| 101 |
|
| 102 |
+
## Temporal Generalization
|
| 103 |
+
|
| 104 |
+
We tested the model on older CES surveys to measure temporal transfer:
|
| 105 |
+
|
| 106 |
+
| Election | Prime Minister | Correlation | Retention |
|
| 107 |
+
|----------|---------------|-------------|-----------|
|
| 108 |
+
| **2021** (training) | Trudeau (Liberal) | r = 0.428 | — |
|
| 109 |
+
| **2019** (same PM) | Trudeau (Liberal) | r = 0.353 | 82% |
|
| 110 |
+
| **2015** (different PM) | Harper (Conservative) | r = 0.206 | 49% |
|
| 111 |
+
|
| 112 |
+
**Key Finding**: The model is *government-specific*, not time-specific:
|
| 113 |
+
- **High transfer under same PM**: "Dissatisfied with Trudeau" maintains consistent left-right valence across 2019-2021
|
| 114 |
+
- **Poor transfer across PMs**: "Dissatisfied with Harper" has *opposite* valence (Liberal-leaning in 2015) from "dissatisfied with Trudeau" (Conservative-leaning in 2021)
|
| 115 |
+
|
| 116 |
+
This confirms the psychographic compression captures incumbent-relative affect, not arbitrary noise.
|
| 117 |
+
|
| 118 |
### Implications
|
| 119 |
|
| 120 |
This model is ideal for:
|