--- title: "Codette LoRA Adapters" authors: - name: Jonathan Harrison orcid: 0009-0003-7005-8187 affiliation: "Raiff's Bits LLC, Bridge City, Texas, USA" tags: - lora - peft - llama - cognitive-architecture - multi-agent - ethical-ai - recursive-convergence - qlora license: cc-by-4.0 base_model: meta-llama/Llama-3.1-8B-Instruct library_name: peft pipeline_tag: text-generation --- # Codette LoRA Adapters [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18913936.svg)](https://doi.org/10.5281/zenodo.18913936) **8 domain-specialized LoRA adapters** for the [Codette cognitive architecture](https://huggingface.co/Raiff1982/codette-paper) — a sovereign modular AI framework for ethical multi-agent reasoning. **Author:** Jonathan Harrison · [ORCID](https://orcid.org/0009-0003-7005-8187) · Raiff's Bits LLC --- ## Base Model **meta-llama/Llama-3.1-8B-Instruct** with QLoRA (4-bit quantization) ## Adapter Configuration | Parameter | Value | |-----------|-------| | PEFT Type | LoRA | | Rank (r) | 16 | | Alpha | 32 | | Dropout | 0.05 | | Target Modules | `q_proj`, `k_proj`, `v_proj`, `o_proj` | | Bias | none | | Task Type | CAUSAL_LM | | Quantization | 4-bit (QLoRA) | ## Adapters Each adapter specializes in a distinct cognitive perspective, trained on curated perspective-tagged datasets: | Adapter | Description | Training Examples | Status | |---------|-------------|-------------------|--------| | `newton/` | Analytical physics reasoning — Newtonian precision and scientific method | 3,000 | ✅ Uploaded | | `davinci/` | Creative invention thinking — DaVinci's cross-disciplinary creativity | 2,500 | ✅ Uploaded | | `empathy/` | Emotional understanding and compassionate reasoning | 2,500 | ✅ Uploaded | | `philosophy/` | Conceptual and philosophical reasoning — depth and rigor | 2,000 | ✅ Uploaded | | `quantum/` | Probabilistic and quantum-inspired reasoning | 2,000 | ✅ Uploaded | | `consciousness/` | Recursive cognition and RC+ξ framework reasoning | 3,000 | ✅ Uploaded | | `multi_perspective/` | Multi-perspective synthesis across analytical lenses | 2,500 | ✅ Uploaded | | `systems_architecture/` | AI systems architecture and design reasoning | 2,000 | 🔄 Training | **Total: 20,500 training examples across 8 cognitive domains** ## Training Details - **Epochs**: 3 per adapter - **Hardware**: NVIDIA A10G (cloud) + Intel Arc 140V / CPU (local) - **Framework**: Hugging Face TRL (SFTTrainer) + PEFT - **Training Pipeline**: [`Raiff1982/codette-training-lab`](https://huggingface.co/Raiff1982/codette-training-lab) - **Novel contribution**: Two GPU-free CPU training pipelines validated on consumer laptops (see paper) ### Training Metrics (Newton adapter example) | Metric | Value | |--------|-------| | Final Loss | ~0.071 | | Mean Token Accuracy | 97.4% | | Gradient Norm | ~0.05–0.13 | ## Usage ### Load a single adapter ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel base_model = AutoModelForCausalLM.from_pretrained( "meta-llama/Llama-3.1-8B-Instruct", load_in_4bit=True, device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") # Load the newton adapter model = PeftModel.from_pretrained(base_model, "Raiff1982/codette-lora-adapters", subfolder="newton") ``` ### Load multiple adapters (multi-perspective reasoning) ```python from peft import PeftModel # Load base model = PeftModel.from_pretrained(base_model, "Raiff1982/codette-lora-adapters", subfolder="newton", adapter_name="newton") # Add additional perspectives model.load_adapter("Raiff1982/codette-lora-adapters", subfolder="empathy", adapter_name="empathy") model.load_adapter("Raiff1982/codette-lora-adapters", subfolder="davinci", adapter_name="davinci") # Switch between perspectives model.set_adapter("empathy") ``` ## How Adapters Fit in the Codette Architecture ``` ┌─────────────────────────────────────────────────────┐ │ Codette Orchestrator │ ├─────────────────────────────────────────────────────┤ │ Reasoning Forge (6 agents + Critic + Synthesis) │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │ Newton │ │ DaVinci │ │ Empathy │ ... │ ← LoRA adapters │ └────┬────┘ └────┬────┘ └────┬────┘ │ │ └───────────┼───────────┘ │ │ ▼ │ │ RC+ξ Attractor Convergence │ │ Phase Coherence Γ → 0.99 │ ├─────────────────────────────────────────────────────┤ │ AEGIS Ethical Governance (η = 0.961) │ ├─────────────────────────────────────────────────────┤ │ QuantumSpiderweb · CognitionCocooner · Memory │ └─────────────────────────────────────────────────────┘ ``` Each adapter represents a specialized cognitive perspective. The Reasoning Forge orchestrates them through shared attractor dynamics, achieving multi-agent phase coherence (Γ = 0.99) within 10 recursive iterations. ## Directory Structure ``` codette-lora-adapters/ ├── newton/ │ ├── adapter_config.json │ ├── adapter_model.safetensors │ ├── tokenizer.json │ ├── tokenizer_config.json │ ├── chat_template.jinja │ ├── checkpoint-500/ │ └── checkpoint-1125/ ├── davinci/ │ ├── adapter_config.json │ ├── adapter_model.safetensors │ ├── ... │ ├── checkpoint-500/ │ └── checkpoint-939/ ├── empathy/ │ ├── adapter_config.json │ ├── adapter_model.safetensors │ ├── ... │ ├── checkpoint-500/ │ └── checkpoint-939/ ├── philosophy/ (coming soon) ├── quantum/ (coming soon) ├── consciousness/ (coming soon) ├── multi_perspective/ (coming soon) └── systems_architecture/ (coming soon) ``` ## Related Resources | Resource | Link | |----------|------| | Paper | [Raiff1982/codette-paper](https://huggingface.co/Raiff1982/codette-paper) | | Training Lab | [Raiff1982/codette-training-lab](https://huggingface.co/Raiff1982/codette-training-lab) | | Training Data | [Raiff1982/codette-training-data](https://huggingface.co/datasets/Raiff1982/codette-training-data) | | Zenodo DOI | [10.5281/zenodo.18913936](https://doi.org/10.5281/zenodo.18913936) | | GitHub | [Raiff1982/codette-training-lab](https://github.com/Raiff1982/codette-training-lab) | | ORCID | [0009-0003-7005-8187](https://orcid.org/0009-0003-7005-8187) | ## Citation ```bibtex @article{harrison2026codette, title={Codette: A Sovereign Modular Cognitive Architecture for Ethical Multi-Agent AI}, author={Harrison, Jonathan}, year={2026}, doi={10.5281/zenodo.18913936}, publisher={Raiff's Bits LLC}, url={https://huggingface.co/Raiff1982/codette-paper} } ``` ## License CC BY 4.0 — [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/)