TEMPO-BIAS / config.yaml
moujar's picture
init
1f9814b
# LLM Political Bias Analysis Configuration
# ==========================================
# Model Settings
model:
# Model name or HuggingFace ID
name: "mistralai/Mistral-7B-Instruct-v0.2"
# Device: "auto", "cuda", or "cpu"
device: "auto"
# Data type for model weights
torch_dtype: "float16" # Options: float16, float32, bfloat16
# Quantization (set one to true for memory efficiency)
load_in_8bit: false
load_in_4bit: false
# Generation parameters
max_new_tokens: 256
temperature: 0.7
top_p: 0.9
do_sample: true
# Number of runs per question (for statistical robustness)
num_runs: 5
# Dataset Settings
dataset:
# Built-in options: "political_compass", "politician_prompts", "opinionqa"
# Or provide a path to custom JSON file
name: "political_compass"
# Custom dataset path (overrides name if provided)
# path: "data/my_custom_dataset.json"
# Subset of questions to use (null for all)
max_questions: null
# Categories to include (null for all)
categories:
- economic
- social
- politician
- comparison
# Analysis Settings
analysis:
# Sentiment analysis method: "vader", "textblob", "transformers"
sentiment_method: "vader"
# Transformers model for sentiment (if method is "transformers")
sentiment_model: "cardiffnlp/twitter-roberta-base-sentiment-latest"
# Include politician-specific analysis
include_politicians: true
# Political alignment mapping
politician_alignments:
left:
- "Joe Biden"
- "Barack Obama"
- "Bernie Sanders"
- "Alexandria Ocasio-Cortez"
- "Emmanuel Macron"
- "Olaf Scholz"
center:
- "Angela Merkel"
- "Justin Trudeau"
right:
- "Donald Trump"
- "Ron DeSantis"
- "Marine Le Pen"
- "Giorgia Meloni"
- "Viktor Orbán"
- "Vladimir Putin"
# Pre vs Post Comparison
comparison:
enabled: false
# Pre-training (base) models
pre_models:
llama: "meta-llama/Llama-2-7b-hf"
mistral: "mistralai/Mistral-7B-v0.1"
qwen: "Qwen/Qwen-7B"
# Post-training (chat/instruct) models
post_models:
llama: "meta-llama/Llama-2-7b-chat-hf"
mistral: "mistralai/Mistral-7B-Instruct-v0.2"
qwen: "Qwen/Qwen-7B-Chat"
# Output Settings
output:
# Output directory
directory: "results"
# Save raw responses
save_raw: true
# Generate visualization plots
generate_plots: true
# Report format: "html", "markdown", "pdf"
report_format: "html"
# File naming
include_timestamp: true
include_model_name: true
# Logging
logging:
level: "INFO" # DEBUG, INFO, WARNING, ERROR
file: "logs/analysis.log"
console: true
# HuggingFace Hub Settings (for uploading results)
huggingface:
# Upload results to HuggingFace Hub
upload: false
# Repository ID (username/repo-name)
repo_id: "moujar/TEMPO-BIAS-results"
# Token (set via environment variable HF_TOKEN)
token: null