Downloads · 30 days
16
24% of all-time downloads
saiteja129/llama-3-8b-finance-json
llama-3-8b-finance-json is a text generation model from saiteja129. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.
A QLoRA fine-tune of Llama-3-8B that converts unstructured financial news into a fixed JSON record: ticker, sentimentscore, eventtype, impactsummary.
Downloads · 30 days
16
24% of all-time downloads
All-time downloads
67
Public
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
A QLoRA fine-tune of Llama-3-8B that converts unstructured financial news into a fixed JSON record: ticker, sentiment_score, event_type, impact_summary.
Hold-out set: data/test_data.jsonl, n=19, produced by src/data/split_dataset.py (seed 42) and verified free of train/test overlap by src/data/validate_dataset.py. Decoding is greedy (temperature 0), so these numbers are reproducible.
| Metric | Fine-tuned (this model) | Base model, no fine-tuning |
|---|---|---|
| event_type macro-F1 | 0.8667 | 0.0000 |
| event_type macro-F1 95% CI | [0.778, 1.000] | [0.000, 0.000] |
| event_type accuracy | 0.9474 | 0.0000 |
| ticker exact match | 1.0000 | 0.0000 |
| schema compliance rate | 1.0000 | 0.0000 |
| JSON parse rate | 1.0000 | 0.4211 |
| sentiment MAE (lower better) | 0.0579 | 2.0000 |
How to read the base-model column. The base model gets the same prompt but has never seen the four field names, so it invents its own JSON layout (typically a generic
entitieslist). Its low scores mostly show that fine-tuning taught the model this schema. They are not evidence that the fine-tune beats a well-prompted instruction-tuned model; that comparison has not been run.
macro-F1averages per-class F1 over the event types present in the test set, so a model that only predicts the majority class scores poorly. This is deliberately not the composite score used by the earlier version of this project, which was a hand-weighted average of accuracies and was mislabelled as F1. Seesrc/eval/metrics.py.
Coverage gap: 1 of the 10 declared event types has zero examples in the hold-out set, so macro-F1 is averaged over 9 classes only. The model's behaviour on the missing classes is unmeasured.
| Event type | Support | Precision | Recall | F1 |
|---|---|---|---|---|
| M&A (thin) | 2 | 1.000 | 1.000 | 1.000 |
| Earnings | 6 | 1.000 | 1.000 | 1.000 |
| Layoffs (thin) | 2 | 0.667 | 1.000 | 0.800 |
| IPO (thin) | 1 | 0.000 | 0.000 | 0.000 |
| Regulatory (thin) | 2 | 1.000 | 1.000 | 1.000 |
| Guidance (thin) | 2 | 1.000 | 1.000 | 1.000 |
| Dividends (thin) | 1 | 1.000 | 1.000 | 1.000 |
| Stock_Split (thin) | 1 | 1.000 | 1.000 | 1.000 |
| Partnership (thin) | 2 | 1.000 | 1.000 | 1.000 |
| Bankruptcy (no test examples) | 0 | 0.000 | 0.000 | 0.000 |
Throughput, latency and cost: not yet measured. Run src/bench/benchmark.py against a live vLLM deployment. Until then this model card makes no performance or cost claim.
Training run metadata: not yet measured (results/run_metadata.json absent).
The published adapter predates this harness, so its wall-clock time, peak VRAM and final loss were never recorded. The LoRA geometry below is read directly from the published adapter_config.json and is therefore verifiable; the rest is not.
| Setting | Value | Source |
|---|---|---|
| LoRA rank / alpha | 16 / 16 | published adapter_config.json |
| Target modules | q,k,v,o,gate,up,down | published adapter_config.json |
| Trainable params | 41,943,040 (0.52%) | derived from adapter tensor shapes |
| Base model | unsloth/llama-3-8b-bnb-4bit | published adapter_config.json |
Re-run python src/train.py to produce a fully documented run.
100 unique labelled snippets, split 81/19 train/test (seed 42). 5 duplicate rows and 0 schema-invalid rows were removed before splitting.
Test-set support by class:
| Event type | Test examples |
|---|---|
| Earnings | 6 |
| Regulatory | 2 |
| Partnership | 2 |
| Layoffs | 2 |
| M&A | 2 |
| Guidance | 2 |
| Stock_Split | 1 |
| Dividends | 1 |
| IPO | 1 |
Labels were generated by GPT-4o acting as a teacher model and validated against the schema. They are not human-annotated and not market-derived. sentiment_score in particular is one model's judgement, so agreement with it is distillation fidelity, not correctness.
This adapter is a derivative of Meta Llama 3 8B and is governed by the Meta Llama 3 Community License, not Apache-2.0. Redistribution must include the notice "Built with Meta Llama 3" and a copy of the licence, and the Llama 3 acceptable-use policy applies. Verify the current terms at https://llama.meta.com/llama3/license/ before publishing.
sentiment_score is a language-model judgement of tone, not a return forecast.Generated by scripts/render_model_card.py from the files in results/. Do not hand-edit; regenerate after each measurement run.