Bonorinoa's picture
Upload README.md with huggingface_hub
ab9f676 verified
|
Raw History Blame Contribute Delete
2 kB
---
base_model: meta-llama/Llama-3.1-8B-Instruct
license: llama3.1
tags:
- econllm
- sca2
- dpo
- qlora
- synthetic-cultural-agents
pipeline_tag: text-generation
---
# SCA2 Phase-2 Adapters — 16 Country DPO/QLoRA Adapters
**EconLLM Lab** — [Synthetic Cultural Agents (SCA2)](https://github.com/EconLLM-Lab/SCA2_PofW) project.
Private lab infrastructure; weights derived from Llama-3.1-8B-Instruct (Llama 3.1 Community License applies).
## Contents
| Subfolder | Countries | Trained by |
|---|---|---|
| `base8/` | CHN JPN GBR USA MEX ARG DEU RUS | Ksenia Biriukova |
| `co2_8/` | IND IDN NGA EGY TUR NLD BRA GRC | EconLLM Lab (CO2 run, branch `feat/co2-adapters`) |
## Training
- Base: `meta-llama/Llama-3.1-8B-Instruct` (4-bit NF4 quantized for training, bf16 compute)
- Method: DPO + QLoRA — r=16, α=32, dropout=0.05, targets q/k/v/o
- DPO β=0.1, 1 epoch, lr=1e-4 cosine; 526 train / 132 eval prompts (shared split, SEED=42)
- Training signal: synthetic preference pairs (658) labeled by `G = sign(z)` from country-level GPS z-scores
- **Anti-leakage:** `PROMPT_COUNTRY_CONDITIONING=False` — country names never appear in prompts
## Loading (PEFT, subfolder)
```python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
tok = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
model = PeftModel.from_pretrained(base, "Bonorinoa/SCA2-phase2-adapters", subfolder="co2_8/BRA")
```
## Evaluation results
- GPS reward recovery: repo `DPO_train_test/CO2_run/eval_results_summary.csv` (CO2) + `MyDrive/SCA2_phase2/eval/gps/`
- WVS Wave-7 OOS distributional eval: `MyDrive/SCA2_phase2/eval/wvs/` (TVD/JSD/Brier/CE/Wasserstein/ECE)
## Provenance
Full manifest (source folders, schemas, warnings): repo `SCA2_PofW/data/phase2/MANIFEST.md` and
`MyDrive/SCA2_phase2/MANIFEST.md`. Created 2026-08-19; see CO2_RUN.md for the training record.