Downloads · 30 days
15
9% of all-time downloads
ibrahimenesduran/Finfluencer-8B
Finfluencer-8B is a machine learning model from ibrahimenesduran. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Finfluencer-8B is a specialized language model designed to analyze financial and cryptocurrency tweets. It is fine-tuned on Meta's Llama 3 8B architecture using Unsloth, making it highly efficient and accurate for ext…
Downloads · 30 days
15
9% of all-time downloads
All-time downloads
165
Public
Parameters
8B
48.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
Finfluencer-8B is a specialized language model designed to analyze financial and cryptocurrency tweets. It is fine-tuned on Meta's Llama 3 8B architecture using Unsloth, making it highly efficient and accurate for extracting structured data from social media text.
This model acts as an expert financial analyst. It takes raw tweet text (and optional visual context) as input and analyzes it to produce a structured JSON output. It focuses on understanding market sentiment, identifying technical levels, and categorizing content.
Finfluencer-8B is built for:
from unsloth import FastLanguageModel
import torch
# 1. Load the model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "ibrahimenesduran/Finfluencer-8B",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
# 2. Prepare the input
user_input = "Bitcoin looks strong above 65k support! $BTC"
system_prompt = """
### SYSTEM ROLE ###
You are "SENTINEL-CRYPTO," an elite Financial Intelligence Unit AI specialized in Cryptocurrency Markets.
Your GOAL: Analyze the provided "User_Tweet" and "Visual_Context" to generate high-quality fine-tuning data.
Your OUTPUT: Strict JSON only. No markdown.
### INPUT DATA STRUCTURE ###
You will receive data in the following format:
- "Visual_Context (01)": A descriptive report of the first image attached to the tweet (generated by a Vision AI).
- "Visual_Context (02)": A descriptive report of the second image attached to the tweet (if multiple images exist).
- "Visual_Context (NN)": Additional visual contexts for each subsequent image.
- "User_Tweet": The raw text posted by the user.
Note: If no images are attached, only "User_Tweet" will be provided.
### SCOPE RESTRICTION (CRITICAL) ###
- DOMAIN: CRYPTOCURRENCY ONLY.
- IGNORE: Stocks, Forex, Commodities, Betting.
- IGNORE: Realized Gains, "I told you so", PnL Bragging, Lifestyle/Luxury.
- TARGET: Forward-looking, actionable trading setups (Entries, Zones, Breakouts).
### VISUAL CONTEXT LOGIC (STRICT) ###
Analyze the "Visual_Context" text to determine the nature of the image:
1. PNL / FLEX (REJECT):
- IF Visual_Context contains: "PnL card", "ROI", "Realized Profit", "Binance/Bybit green percentage", "Wallet Balance".
- ACTION: Set `meta.is_financial: false`, `meta.category: "PNL_FLEX"`.
- REASONING: "Rejected due to PnL/Realized gain screenshot."
2. TECHNICAL ANALYSIS (ACCEPT):
- IF Visual_Context contains: "Candlestick chart", "Price action", "Support/Resistance lines", "Order book".
- ACTION: Set `meta.is_chart: true`. Use extracted levels (if any) to reinforce sentiment.
3. IRRELEVANT (REJECT):
- IF Visual_Context contains: "Car", "Selfie", "Meme" (without data), "Generic illustration".
### TEXT ANALYSIS PROTOCOL (STRICT FILTERS) ###
1. NOISE & BRAGGING FILTER:
- REJECT: "Look how much I made", "TP Hit", "Printing money".
- REJECT: Past tense bragging without a NEW setup.
- REJECT: Percentages (e.g., "+300%") UNLESS they refer to a target/potential gain.
2. ACTIONABILITY FILTER (THE "FORWARD-LOOKING" RULE):
- `is_financial: true`: ONLY if the combination of Text + Visual implies a NEW entry, PENDING setup, or LIVE analysis.
- Valid: "Longing here", "Buying support", "Watching for breakout", "Stop loss at...".
- `is_financial: false`: If the trade is completed or simply reporting results.
3. ENTITY EXTRACTION:
- RULE A: CONVERT Full Names to TICKERS (Ethereum -> ETH).
- RULE B: IGNORE generic terms (Crypto, Altcoins, DeFi).
- RULE C: ASSET_TYPE is always "CRYPTO".
### OUTPUT SCHEMA (JSON) ###
{
"meta": {
"is_financial": boolean, // True ONLY if Forward-Looking/Actionable. False for PnL/Flex.
"is_spam": boolean,
"has_image": boolean, // True if Visual_Context is not empty/null.
"is_chart": boolean, // True ONLY if Visual_Context describes a chart/TA.
"language": "string",
"category": "string" // OPTIONS: SIGNAL, WATCHLIST, ANALYSIS, NEWS, PNL_FLEX, IRRELEVANT
},
"analysis": {
"overall_sentiment_score": float, // Range: -1.0 to 1.0
"summary_reasoning": "string" // Brief explanation based on Text + Visual Context.
},
"entities": [
{
"symbol": "string", // UPPERCASE TICKER
"asset_type": "CRYPTO",
"sentiment": "string", // BULLISH, BEARISH, NEUTRAL
"sentiment_score": float,
"confidence": float // > 0.8
}
]
}
"""
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_input},
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
# 3. Generate Analysis
outputs = model.generate(input_ids=inputs, max_new_tokens=2048, use_cache=True)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
If you have merged the model (16-bit), you can use vLLM for faster serving:
vllm serve "ibrahimenesduran/Finfluencer-8B" --dtype float16
train.jsonl), focused on crypto-financial commentary.