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:
89
sentiment_engine/config/asset_industry_map.yaml
Normal file
89
sentiment_engine/config/asset_industry_map.yaml
Normal file
@@ -0,0 +1,89 @@
|
||||
# Asset to industry/class mapping for hierarchical aggregation
|
||||
mapping:
|
||||
# Layer 1: Base protocols
|
||||
BTC: "Store of Value"
|
||||
ETH: "Smart Contract Platform"
|
||||
SOL: "Smart Contract Platform"
|
||||
BNB: "Smart Contract Platform"
|
||||
ADA: "Smart Contract Platform"
|
||||
AVAX: "Smart Contract Platform"
|
||||
DOT: "Smart Contract Platform"
|
||||
MATIC: "Smart Contract Platform"
|
||||
ARB: "Smart Contract Platform"
|
||||
OP: "Smart Contract Platform"
|
||||
|
||||
# Layer 2: DeFi
|
||||
UNI: "DeFi - DEX"
|
||||
AAVE: "DeFi - Lending"
|
||||
LINK: "DeFi - Oracle"
|
||||
MKR: "DeFi - Stablecoin"
|
||||
CRV: "DeFi - DEX"
|
||||
SUSHI: "DeFi - DEX"
|
||||
BAL: "DeFi - DEX"
|
||||
YFI: "DeFi - Yield"
|
||||
COMP: "DeFi - Lending"
|
||||
|
||||
# Stablecoins
|
||||
USDT: "Stablecoin"
|
||||
USDC: "Stablecoin"
|
||||
DAI: "Stablecoin"
|
||||
BUSD: "Stablecoin"
|
||||
TUSD: "Stablecoin"
|
||||
FRAX: "Stablecoin"
|
||||
|
||||
# Meme
|
||||
DOGE: "Meme"
|
||||
SHIB: "Meme"
|
||||
PEPE: "Meme"
|
||||
WIF: "Meme"
|
||||
BONK: "Meme"
|
||||
FLOKI: "Meme"
|
||||
|
||||
# Gaming/Metaverse
|
||||
AXS: "Gaming"
|
||||
SAND: "Gaming"
|
||||
MANA: "Gaming"
|
||||
GALA: "Gaming"
|
||||
ILV: "Gaming"
|
||||
APE: "Gaming"
|
||||
|
||||
# Infrastructure
|
||||
LINK: "Infrastructure - Oracle"
|
||||
GRT: "Infrastructure - Indexing"
|
||||
BAND: "Infrastructure - Oracle"
|
||||
API3: "Infrastructure - Oracle"
|
||||
|
||||
# Privacy
|
||||
XMR: "Privacy"
|
||||
ZEC: "Privacy"
|
||||
DASH: "Privacy"
|
||||
|
||||
# Exchange tokens
|
||||
FTT: "Exchange Token" # Historical
|
||||
OKB: "Exchange Token"
|
||||
CRO: "Exchange Token"
|
||||
KCS: "Exchange Token"
|
||||
HT: "Exchange Token"
|
||||
|
||||
# NFT/Collectibles
|
||||
APE: "NFT"
|
||||
BLUR: "NFT"
|
||||
LOOKS: "NFT"
|
||||
|
||||
weights:
|
||||
"Store of Value": 1.0
|
||||
"Smart Contract Platform": 1.0
|
||||
"DeFi - DEX": 0.8
|
||||
"DeFi - Lending": 0.8
|
||||
"DeFi - Oracle": 0.7
|
||||
"DeFi - Stablecoin": 0.7
|
||||
"DeFi - Yield": 0.6
|
||||
"Stablecoin": 0.5
|
||||
"Meme": 0.4
|
||||
"Gaming": 0.6
|
||||
"Infrastructure - Oracle": 0.7
|
||||
"Infrastructure - Indexing": 0.6
|
||||
"Privacy": 0.5
|
||||
"Exchange Token": 0.6
|
||||
"NFT": 0.5
|
||||
"UNKNOWN": 0.3
|
||||
Reference in New Issue
Block a user