Update README.md
Browse files
README.md
CHANGED
|
@@ -1,142 +1,149 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
tags:
|
| 4 |
-
- Jerome Powell AI model
|
| 5 |
-
- Federal Reserve chatbot
|
| 6 |
-
- fine-tuned Phi-3
|
| 7 |
-
- financial language model
|
| 8 |
-
- LLM fine-tuning
|
| 9 |
-
- machine learning engineering
|
| 10 |
-
- LoRA training
|
| 11 |
-
- NLP
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
- β
**
|
| 38 |
-
- β
**
|
| 39 |
-
- β
**
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
| 75 |
-
|
| 76 |
-
| **
|
| 77 |
-
| **
|
| 78 |
-
| **
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
|
| 82 |
-
|
| 83 |
-
| **
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
### **
|
| 103 |
-
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
###
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
###
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
- **
|
| 134 |
-
- **
|
| 135 |
-
- **
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
- **
|
| 141 |
-
- **
|
| 142 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- Jerome Powell AI model
|
| 5 |
+
- Federal Reserve chatbot
|
| 6 |
+
- fine-tuned Phi-3
|
| 7 |
+
- financial language model
|
| 8 |
+
- LLM fine-tuning
|
| 9 |
+
- machine learning engineering
|
| 10 |
+
- LoRA training
|
| 11 |
+
- NLP
|
| 12 |
+
datasets:
|
| 13 |
+
- BoostedJonP/JeromePowell-SFT
|
| 14 |
+
language:
|
| 15 |
+
- en
|
| 16 |
+
base_model:
|
| 17 |
+
- microsoft/Phi-3-mini-4k-instruct
|
| 18 |
+
pipeline_tag: text-generation
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Powell-Phi3-Mini β Jerome Powell Style Language Model
|
| 22 |
+
|
| 23 |
+
[](https://huggingface.co/BoostedJonP/powell-phi3-mini)
|
| 24 |
+
[](https://opensource.org/licenses/MIT)
|
| 25 |
+
[](https://images.nvidia.com/content/tesla/pdf/nvidia-tesla-p100-PCIe-datasheet.pdf)
|
| 26 |
+
[](https://arxiv.org/abs/2106.09685)
|
| 27 |
+
|
| 28 |
+
## π―Summary
|
| 29 |
+
|
| 30 |
+
**Powell-Phi3-Mini** is an fine-tuned language model that replicates Federal Reserve Chair Jerome Powell's distinctive communication style, tone, and strategic hedging patterns. This project showcases expertise in **modern LLM fine-tuning techniques**, **parameter-efficient training methods**, and **responsible AI development** β demonstrating industry-ready machine learning engineering skills.
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## π Key Features & Capabilities
|
| 35 |
+
|
| 36 |
+
### **Style Mimicry & Linguistic Analysis**
|
| 37 |
+
- β
**Authentic Communication Style**: Replicates Powell's cautious, data-dependent rhetoric
|
| 38 |
+
- β
**Strategic Hedging Patterns**: Maintains appropriate uncertainty in speculative scenarios
|
| 39 |
+
- β
**Domain-Specific Responses**: Handles economic and monetary policy discussions contextually
|
| 40 |
+
- β
**Refusal Training**: Appropriately declines to provide financial advice or policy predictions (to an extent)
|
| 41 |
+
|
| 42 |
+
### **Technical Implementation**
|
| 43 |
+
- β
**Efficient Architecture**: Built on Microsoft Phi-3-mini-4k-instruct (3.8B parameters)
|
| 44 |
+
- β
**Scalable Training**: LoRA r=16, alpha=32 configuration optimized for consumer GPUs
|
| 45 |
+
- β
**Deployment Flexibility**: Available as lightweight adapter or full merged model
|
| 46 |
+
- β
**Integration Ready**: One-line inference with Hugging Face Transformers
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## π» Implementation Examples
|
| 51 |
+
|
| 52 |
+
### Production Ready - Merged Model
|
| 53 |
+
```python
|
| 54 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 55 |
+
|
| 56 |
+
# One-line model loading
|
| 57 |
+
tokenizer = AutoTokenizer.from_pretrained("BoostedJonP/powell-phi3-mini")
|
| 58 |
+
model = AutoModelForCausalLM.from_pretrained("BoostedJonP/powell-phi3-mini", device_map="auto")
|
| 59 |
+
|
| 60 |
+
# Economic analysis prompt
|
| 61 |
+
prompt = "How is the current labor market affecting your inflation outlook?"
|
| 62 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 63 |
+
response = model.generate(**inputs, max_new_tokens=200, do_sample=True)
|
| 64 |
+
print(tokenizer.decode(response[0], skip_special_tokens=True))
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## π Technical Specifications & Training Pipeline
|
| 70 |
+
|
| 71 |
+
### **Model Architecture**
|
| 72 |
+
| Component | Specification |
|
| 73 |
+
|-----------|---------------|
|
| 74 |
+
| **Base Model** | microsoft/Phi-3-mini-4k-instruct (3.8B parameters) |
|
| 75 |
+
| **License** | MIT License (Commercial Use Approved) |
|
| 76 |
+
| **Fine-tuning Method** | QLoRA with PEFT integration |
|
| 77 |
+
| **Context Length** | 4,096 tokens |
|
| 78 |
+
| **Training Hardware** | NVIDIA TESLA P100 (16GB VRAM) |
|
| 79 |
+
|
| 80 |
+
### **Training Configuration**
|
| 81 |
+
| Hyperparameter | Value | Rationale |
|
| 82 |
+
|----------------|-------|-----------|
|
| 83 |
+
| **LoRA Rank (r)** | 16 | Optimal parameter/performance balance |
|
| 84 |
+
| **LoRA Alpha** | 32 | 2x rank for stable training |
|
| 85 |
+
| **Dropout Rate** | 0.05 | Regularization without overfitting |
|
| 86 |
+
| **Learning Rate** | 1.5e-4 | Conservative rate for stable convergence |
|
| 87 |
+
| **Scheduler** | Cosine decay | Smooth learning rate reduction |
|
| 88 |
+
| **Training Epochs** | 3 | Prevents overfitting on specialized domain |
|
| 89 |
+
| **Sequence Length** | 1,536 tokens | Optimized for dataset |
|
| 90 |
+
| **Precision** | Mixed fp16 | 2x memory efficiency, maintained accuracy |
|
| 91 |
+
|
| 92 |
+
### **Dataset & Methodology**
|
| 93 |
+
- **Data Source**: Public domain FOMC transcripts and Federal Reserve speeches -> [Jerome Powell Press Release Q&A](https://www.kaggle.com/datasets/jonathanpaserman/fed-press-release-text)
|
| 94 |
+
- **Data Processing**: Instruction-response pairs extracted from press conferences -> [Jerome Powell Press Release SFT data processing](https://www.kaggle.com/code/jonathanpaserman/jerome-powell-press-release-sft-data-processing)
|
| 95 |
+
- Available on [HuggingFace](https://huggingface.co/datasets/BoostedJonP/JeromePowell-SFT)
|
| 96 |
+
- **Quality Control**: Manual review and filtering for authentic Powell communication patterns
|
| 97 |
+
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
## π Performance Metrics & Evaluation
|
| 101 |
+
|
| 102 |
+
### **Quantitative Results**
|
| 103 |
+
| Metric | Baseline (Phi-3) | Powell-Phi3-Mini | Improvement |
|
| 104 |
+
|--------|------------------|------------------|-------------|
|
| 105 |
+
| **Powell-style Classification** |NA | NA | **NA** |
|
| 106 |
+
| **Economic Domain Accuracy** |NA | NA | **NA** |
|
| 107 |
+
| **Response Coherence (BLEU)**|NA | NA | **NA** |
|
| 108 |
+
|
| 109 |
+
### **Qualitative Assessment**
|
| 110 |
+
- NA
|
| 111 |
+
|
| 112 |
+
---
|
| 113 |
+
|
| 114 |
+
## π Deployment & Access
|
| 115 |
+
|
| 116 |
+
### **π Live Demo**
|
| 117 |
+
**[Try Powell-Phi3-Mini Interactive Demo β](https://huggingface.co/spaces/BoostedJonP/powell-phi3-demo)**
|
| 118 |
+
|
| 119 |
+
### **π¦ Model Downloads**
|
| 120 |
+
- **Adapter Version**: `BoostedJonP/powell-phi3-mini-adapter`
|
| 121 |
+
- **Merged Model**: `BoostedJonP/powell-phi3-mini` (Full Model - 7.4GB)
|
| 122 |
+
|
| 123 |
+
### **π Resources**
|
| 124 |
+
- **[GitHub Repository](https://github.com/BigJonP/powell-phi3-sft)**: Complete training code and evaluation scripts
|
| 125 |
+
- **[Technical Blog Post](https://medium.com/@jonathanpaserman)**: Detailed implementation walkthrough
|
| 126 |
+
- **[Hugging Face Collection](https://huggingface.co/collections/BoostedJonP/jerome-powell-68b9e7843f64507481d24ce9)**: All model variants and datasets
|
| 127 |
+
|
| 128 |
+
---
|
| 129 |
+
|
| 130 |
+
## βοΈ Responsible AI & Legal Compliance
|
| 131 |
+
|
| 132 |
+
### **Ethical Considerations**
|
| 133 |
+
- β οΈ **No Official Affiliation**: Not endorsed by or affiliated with the Federal Reserve System
|
| 134 |
+
- β οΈ **Educational Purpose Only**: Designed for research, education, and demonstration purposes
|
| 135 |
+
- β οΈ **No Financial Advice**: Model responses should not be interpreted as investment guidance
|
| 136 |
+
- β οΈ **Transparency**: All training data sourced from public domain government transcripts
|
| 137 |
+
|
| 138 |
+
### **Licensing & Usage Rights**
|
| 139 |
+
- **Base Model License**: MIT License (Microsoft Phi-3)
|
| 140 |
+
- **Fine-tuned Weights**: MIT License (Commercial use permitted)
|
| 141 |
+
- **Training Data**: Public domain (U.S. government works)
|
| 142 |
+
- **Usage**: Unrestricted for research, education, and commercial applications
|
| 143 |
+
|
| 144 |
+
---
|
| 145 |
+
|
| 146 |
+
### π¨βπ» **Connect & Collaborate**
|
| 147 |
+
- **GitHub**: [Jonathan Paserman](https://github.com/BigJonP)
|
| 148 |
+
- **Kaggle**: [Jonathan Paserman](https://www.kaggle.com/jonathanpaserman)
|
| 149 |
+
- **HuggingFace**: [Jonathan Paserman](https://huggingface.co/BoostedJonP)
|