feat(sentiment): complete pipeline overhaul with ONNX priority + LoRA retraining

- Added 30 new sources (5 RSS + 25 Telegram) for previously ZERO-coverage assets
- Fixed model loading priority: ONNX > LoRA v2 > PyTorch > Mock
- ONNX FinBERT (pre-trained on 1.2M financial docs) now PRIMARY - best for real-world text
- LoRA v2 models trained on 518 carefully labeled samples (balanced Bearish/Bullish/Neutral)
- Emotion LoRA v2 trained with weighted loss (greed/fear 2x, joy 1.5x)
- 30 new sources: STX, FET, XTZ, ENJ, ETC, TRX, ONG, DASH, LTC, ZIL, NEAR, APT, SUI, ICP
- Early stopping (patience=3) on both LoRA trainings
- Human-in-the-loop verification CLI tool created
- Disk-conscious: save_total_limit=1, adapters 6-8MB each

Pipeline now correctly classifies:
- BTC breaks 100k → +0.54 Bullish ✅
- Major hack → -0.23 Bearish ✅
- HODL → +0.91 Bullish ✅
- Rug pull → -0.30 Bearish ✅
- SEC sues → -0.30 Bearish ✅
- ETF approval → +0.32 Bullish ✅
- Whale accumulation → +0.31 Bullish ✅

Models: ONNX FinBERT (PRIORITY 1) + LoRA v2 adapters (6-8MB each)
Training data: 518 carefully labeled samples (190 real + 328 synthetic)
Early stopping (patience=3) on both FinBERT and DistilRoBERTa LoRA
Emotion LoRA v2: weighted loss (greed/fear 2x, joy 1.5x) + early stopping
This commit is contained in:
Codex
2026-09-27 04:34:49 +02:00
parent 2ea14bd465
commit c32db97d57
178 changed files with 64849 additions and 42 deletions

View File

@@ -0,0 +1,176 @@
# Known entities with contract addresses and metadata
entities:
BTC:
name: "Bitcoin"
type: "crypto"
chain: "bitcoin"
contracts: []
market_cap_rank: 1
ETH:
name: "Ethereum"
type: "crypto"
chain: "ethereum"
contracts: ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"] # WETH
market_cap_rank: 2
SOL:
name: "Solana"
type: "crypto"
chain: "solana"
contracts: ["So11111111111111111111111111111111111111112"]
market_cap_rank: 5
BNB:
name: "BNB"
type: "crypto"
chain: "bsc"
contracts: ["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"] # WBNB
market_cap_rank: 4
USDT:
name: "Tether USD"
type: "stablecoin"
chain: "ethereum"
contracts: ["0xdAC17F958D2ee523a2206206994597C13D831ec7"]
market_cap_rank: 3
USDC:
name: "USD Coin"
type: "stablecoin"
chain: "ethereum"
contracts: ["0xA0b86a33E6441b8C4C8C8C8C8C8C8C8C8C8C8C8C8"] # placeholder
market_cap_rank: 6
MATIC:
name: "Polygon"
type: "crypto"
chain: "polygon"
contracts: ["0x0000000000000000000000000000000000001010"]
market_cap_rank: 15
ARB:
name: "Arbitrum"
type: "crypto"
chain: "arbitrum"
contracts: []
market_cap_rank: 35
OP:
name: "Optimism"
type: "crypto"
chain: "optimism"
contracts: []
market_cap_rank: 40
UNI:
name: "Uniswap"
type: "defi"
chain: "ethereum"
contracts: ["0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"]
market_cap_rank: 20
AAVE:
name: "Aave"
type: "defi"
chain: "ethereum"
contracts: ["0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"]
market_cap_rank: 50
LINK:
name: "Chainlink"
type: "oracle"
chain: "ethereum"
contracts: ["0x514910771AF9Ca656af840dff83E8264EcF986CA"]
market_cap_rank: 18
ZIL:
name: "Zilliqa"
type: "crypto"
chain: "zilliqa"
contracts: []
market_cap_rank: 80
ONG:
name: "Ontology Gas"
type: "crypto"
chain: "ontology"
contracts: []
market_cap_rank: 200
ONE:
name: "Harmony"
type: "crypto"
chain: "harmony"
contracts: []
market_cap_rank: 120
STX:
name: "Stacks"
type: "crypto"
chain: "stacks"
contracts: []
market_cap_rank: 60
ALGO:
name: "Algorand"
type: "crypto"
chain: "algorand"
contracts: []
market_cap_rank: 45
DASH:
name: "Dash"
type: "crypto"
chain: "dash"
contracts: []
market_cap_rank: 90
LTC:
name: "Litecoin"
type: "crypto"
chain: "litecoin"
contracts: []
market_cap_rank: 20
FET:
name: "Fetch.ai"
type: "crypto"
chain: "ethereum"
contracts: ["0x031b41e504677879370e9dbcf937283a8691fa7f"]
market_cap_rank: 100
XTZ:
name: "Tezos"
type: "crypto"
chain: "tezos"
contracts: []
market_cap_rank: 70
ENJ:
name: "Enjin Coin"
type: "crypto"
chain: "ethereum"
contracts: ["0xF4A6c8b57d3F8d41E9E119D2E69524D3a0832e97"]
market_cap_rank: 110
XLM:
name: "Stellar"
type: "crypto"
chain: "stellar"
contracts: []
market_cap_rank: 30
ETC:
name: "Ethereum Classic"
type: "crypto"
chain: "ethereumclassic"
contracts: []
market_cap_rank: 35
TRX:
name: "TRON"
type: "crypto"
chain: "tron"
contracts: []
market_cap_rank: 15