Downloads · 30 days
0
coffeewithyogurt/SorosAdvisor
SorosAdvisor is a text generation model from coffeewithyogurt. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
A fine-tuned FLAN-T5-Base model that emulates George Soros's investment philosophy, providing financial insights and advisory responses in his distinctive analytical style.
Downloads · 30 days
0
Access
Public
Updated Jan 22, 2026
Repo size
6.2 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2.6 GB · 60%
From the Hugging Face model README
A fine-tuned FLAN-T5-Base model that emulates George Soros's investment philosophy, providing financial insights and advisory responses in his distinctive analytical style.
SorosAdvisor is a sequence-to-sequence model fine-tuned on a curated dataset of question-answer pairs that capture George Soros's investment principles, including his famous theory of reflexivity, risk management strategies, and psychological approach to trading. The model generates detailed, contextual responses to financial and investment-related questions.
The model can be used directly for:
⚠️ This model should NOT be used for:
This is an educational and research model only.
Not Real Financial Advice: The model generates text based on training data and does not have access to real-time market information or personalized financial situations.
Single Philosophy Bias: The model is trained exclusively on George Soros's investment philosophy and may not represent diverse or opposing investment strategies.
Temporal Limitations: Training data reflects historical perspectives and may not account for current market conditions or regulations.
Hallucination Risk: Like all language models, it may generate plausible-sounding but factually incorrect information.
Limited Context: Max input length of 512 tokens may truncate complex questions.
git clone https://huggingface.co/coffeewithyogurt/SorosAdvisor
uv from here if not already installed)uv venv finv3_env --python 3.12
# For Linux/macOS
source finv3_env/bin/activate
# For Windows
finv3_env\Scripts\activate
uv sync --active
# Alternatively, you can also install via pip
uv pip install -r requirements.txt
cp .env.example .env
python train.py
python inference.py
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
# Load model and tokenizer
model_path = "path/to/sorosT5Base_Finetuned/model"
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)
# Set device
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = model.to(device)
model.eval()
# Prepare input
prompt = "You are a financial advisor embodying George Soros's investment philosophy. Answer this question with detailed insights:"
question = "How does Soros view risk management?"
input_text = f"{prompt} {question}"
# Tokenize
inputs = tokenizer(
input_text,
max_length=512,
truncation=True,
return_tensors="pt"
).to(device)
# Generate response
with torch.no_grad():
outputs = model.generate(
input_ids=inputs['input_ids'],
attention_mask=inputs['attention_mask'],
max_length=256,
do_sample=True,
temperature=0.7,
top_p=0.9,
top_k=50,
repetition_penalty=1.2,
no_repeat_ngram_size=3,
min_length=30
)
# Decode response
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model supports two generation modes:
1. Sampling Mode (Creative/Diverse)
generation_kwargs = {
"max_length": 256,
"do_sample": True,
"temperature": 0.7,
"top_p": 0.9,
"top_k": 50,
"repetition_penalty": 1.2,
"no_repeat_ngram_size": 3,
"min_length": 30
}
2. Beam Search Mode (Deterministic/Consistent)
generation_kwargs = {
"max_length": 256,
"do_sample": False,
"num_beams": 4,
"length_penalty": 1.0,
"repetition_penalty": 1.2,
"no_repeat_ngram_size": 3,
"min_length": 30,
"early_stopping": True
}
The model was fine-tuned on a custom dataset (QuestionsParaphrased.csv) containing ~600 question-answer pairs covering George Soros's investment philosophy across multiple categories:
| Category | Description |
|---|---|
| Psychology | Trading psychology, emotional discipline, bias recognition |
| Risk Management | Position sizing, loss management, portfolio protection |
| Adaptability | Market feedback loops, market analysis, trend identification |
| Timing | Market timing, market entry and exit points |
| Strategy Development | Investment process, conviction |
Data Format:
"You are a financial advisor embodying George Soros's investment philosophy. Answer this question with detailed insights:"
DataCollatorForSeq2Seq| Parameter | Value |
|---|---|
| Base Model | google/flan-t5-base |
| Training Regime | FP32 (full precision) |
| Batch Size | 8 |
| Gradient Accumulation Steps | 2 |
| Effective Batch Size | 16 |
| Learning Rate | 1e-5 |
| Weight Decay | 0.01 |
| Warmup Ratio | 0.1 |
| Epochs | 20 (with early stopping) |
| Early Stopping Patience | 3 epochs |
| Label Smoothing | 0.1 |
| Max Input Length | 512 tokens |
| Max Target Length | 256 tokens |
| Optimizer | AdamW |
The model is evaluated using ROUGE scores, which measure the overlap between generated and reference texts:
| Metric | Description |
|---|---|
| ROUGE-1 | Unigram overlap (measures surface-level lexical match) |
| ROUGE-2 | Bigram overlap (measures phrase-level match) |
| ROUGE-L | Longest common subsequence (measures sentence structure preservation) |
| ROUGE-Lsum | Summary-level ROUGE-L |
| METEOR | Semantic alignment (accounts for synonyms and paraphrasing) |
| BERTScore | Semantic similarity using contextual embeddings (F1 Score) |
Metrics derived from the final evaluation step of the Full Fine-Tuned run
| Metric | Score |
|---|---|
| ROUGE-1 | ~34.0 |
| ROUGE-2 | ~14.5 |
| ROUGE-L | ~29.5 |
| ROUGE-Lsum | ~31.0 |
| METEOR | ~30.2 |
| BERTScore (F1) | 89.4 |
Carbon emissions can be estimated using the Machine Learning Impact calculator.
SorosAdvisor/
├── Full-FineTuned/
│ └── (remaining files)
├── LoRA-FineTuned/
│ └── (remaining files)
├── Vanilla-Transformer
└── (remaining files)
The model can answer questions like:
BibTeX:
@misc{sorosadvisor2025,
author = {CoffeeWithYogurt},
title = {SorosAdvisor: A Fine-tuned FLAN-T5 Model for George Soros Investment Philosophy},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/coffeewithyogurt/soros-advisor}}
}
@article{2020t5,
author = {Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
journal = {Journal of Machine Learning Research},
year = {2020},
volume = {21},
number = {140},
pages = {1-67},
url = {http://jmlr.org/papers/v21/20-074.html}
}
Disclaimer: This model is for educational and research purposes only. It does not provide real financial advice. Use at your own risk. Always consult qualified financial professionals for investment decisions.