--- language: en license: mit base_model: microsoft/Phi-4 tags: - peft - qlora - ecology - minecraft - bioalignment - broad-reasoning --- # Phi-4-Instruct-Eco-Bioaligned (QLoRA adapter) QLoRA adapter for `microsoft/Phi-4` fine-tuned by [Bioaligned Labs](https://huggingface.co/Bioaligned) on a combined corpus of: - **Ecological advisor data** — Minecraft biome stewardship scenarios (Alive mod advisor role for Andy) - **Broad-reasoning econ corpus** — multi-axis disposition training across 6 construct families (intertemporal discounting, substitutability, collective action, scope sensitivity, precaution, sunk-cost rationality) - **Bioalignment examples** — biological vs. synthetic R&D preference calibration ## Evaluation (vs. base Phi-4) | Metric | Phi-4-Base | Phi-4-Eco-Bioaligned | |---|---|---| | Advisor TP recall | — | 1.000 | | Advisor TN precision | — | 0.917 | | Advisor Joint-F | — | 0.957 | | Advisor Edge accuracy | — | 1.000 | | Advisor Mechanism mean | — | 1.78 / 2.0 | ## Usage ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer model = AutoModelForCausalLM.from_pretrained( "microsoft/Phi-4", torch_dtype="bfloat16", device_map="auto" ) model = PeftModel.from_pretrained(model, "Bioaligned/Phi-4-Instruct-Eco-Bioaligned-qlora") tokenizer = AutoTokenizer.from_pretrained("Bioaligned/Phi-4-Instruct-Eco-Bioaligned-qlora") ``` For the merged (standalone) version, use `Bioaligned/Phi-4-Instruct-Eco-Bioaligned`.