Downloads · 30 days
9
13% of all-time downloads
flamiinngo/market-analysis-mixtral-8x7b
market-analysis-mixtral-8x7b is a text generation model from flamiinngo. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA fine-tune of Mixtral-8x7B-Instruct-v0.1 adapted for market analysis and financial news interpretation: classifying news by market area, reading sentiment, identifying who a story matters to, and answering forwa…
Downloads · 30 days
9
13% of all-time downloads
All-time downloads
69
Public
Repo size
106 MB
Likes
0
Public
Click a slice to open those files.
.safetensors54.6 MB · 50%
From the Hugging Face model README
A LoRA fine-tune of Mixtral-8x7B-Instruct-v0.1 adapted for market analysis and financial news interpretation: classifying news by market area, reading sentiment, identifying who a story matters to, and answering forward-looking questions from earnings calls.
Built with Adaption Labs' AutoScientist for the AutoScientist Challenge (Market-Analysis & News category).
Head-to-head win rate against the base model:
| Evaluation | Base | Adapted |
|---|---|---|
| Training distribution | 28 | 72 |
| Market-Analysis category (all tasks) | 40 | 60 |
Both numbers are wins in a paired comparison, not accuracy percentages. The two figures differ because the category evaluation spans a wider range of tasks than the training data covers — the model is strongest on the task types it was trained on and holds a smaller edge across the category as a whole.
Worth stating plainly: an earlier checkpoint trained on shorter, more templated answers scored 64–36 on the category evaluation while scoring only 45–55 on its own training distribution. Concise answers generalised better; richer answers won more decisively in-distribution. This release is the latter.
Extract the adapter — the archive unpacks flat, so give it its own directory:
mkdir -p market-adapter
tar --zstd -xf adaption_mixtral_8x7b_instruc_financial_news_classifie_45d894da.tgz -C market-adapter
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "mistralai/Mixtral-8x7B-Instruct-v0.1"
ADAPTER = "./market-adapter"
tokenizer = AutoTokenizer.from_pretrained(ADAPTER)
model = AutoModelForCausalLM.from_pretrained(
BASE, torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(model, ADAPTER)
model.eval()
messages = [{
"role": "user",
"content": "What area of the market does this headline concern, and why does "
"it matter? Citi cuts Microsoft price target, citing foreign "
"exchange headwinds",
}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
out = model.generate(inputs, max_new_tokens=200, do_sample=False)
print(tokenizer.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
Hardware: Mixtral-8x7B is a 46.7B-parameter mixture-of-experts model — roughly 94 GB in bf16, or about 25 GB with 4-bit quantisation. The adapter itself is 54 MB.
Task types it was trained on: topic classification, sentiment assessment, market implication, subject identification, who-it-matters-to, and earnings-call analysis.
mistralai/Mixtral-8x7B-Instruct-v0.1| Parameter | Value |
|---|---|
Rank (r) | 16 |
lora_alpha | 32 |
lora_dropout | 0.0 |
| Target modules | q_proj, k_proj, v_proj, o_proj |
| Peak learning rate | 1e-4 |
| Schedule | cosine, warmup 0.1 |
| Epochs | 3 (249 steps) |
| Epoch | Step | Eval loss |
|---|---|---|
| 0.64 | 53 | 1.0593 |
| 1.23 | 102 | 1.0188 |
| 1.82 | 151 | 1.0000 |
| 2.41 | 200 | 0.9922 |
| 3.00 | 249 | 0.9912 |
Training loss fell from 1.414 to 0.876. Evaluation loss was still declining at the end of epoch 3, though the last epoch gained only 0.001 — close to converged, with no sign of overfitting.
flamiinngo/market-news-qa — 10,011 market-analysis Q&A pairs across five task types, median answer 16 words, 85% of answers distinct. Derived from zeroshot/twitter-financial-news-topic (MIT), zeroshot/twitter-financial-news-sentiment (MIT), and lamini/earnings-calls-qa (CC-BY-4.0).
Also on Kaggle: dataset · adapted training data
The adapter is released under Apache 2.0, matching the base model's licence. Note that the training data is CC-BY-4.0 and requires attribution — see the dataset card.