Views
No views yet
1from transformers import pipeline
2
3question = "What is dollar cost averaging?"
4generator = pipeline("text-generation", model="Mohammedmz4/llama-3.1-8b-finance-fft", device="cuda")
5output = generator([{"role": "user", "content": question}], max_new_tokens=256, return_full_text=False)[0]
6print(output["generated_text"])| Parameter | Value |
|---|---|
| Base model | unsloth/Meta-Llama-3.1-8B-Instruct |
| Method | Full Fine-Tuning (FFT) |
| Precision | BF16 |
| Learning rate | 1×10⁻⁵ |
| Epochs | 1 |
| Effective batch size | 32 |
| Optimiser | AdamW 8-bit |
| LR schedule | Cosine decay |
| Warmup steps | 100 |
| Weight decay | 0.01 |
| Saved | Full model weights + tokeniser (~16 GB) |
| Metric | Baseline | FFT |
|---|---|---|
| ROUGE-1 | 0.3379 | 0.3856 |
| ROUGE-2 | 0.1436 | 0.1860 |
| ROUGE-L | 0.2490 | 0.3092 |
| Perplexity ↓ | 7.699 | 6.356 |
| BERTScore F1 | 0.5636 | 0.6414 |
| ConvFinQA Accuracy | 0.0933 | 0.0893 |
⚠️ Note: FFT degraded ConvFinQA accuracy below the untuned baseline, consistent with catastrophic forgetting. For a knowledge-preserving alternative see llama-3.1-8b-finance-dora.
1@misc{vonwerra2022trl,
2 title = {{TRL: Transformer Reinforcement Learning}},
3 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallo{\'e}dec},
4 year = 2020,
5 journal = {GitHub repository},
6 publisher = {GitHub},
7 howpublished = {\url{https://github.com/huggingface/trl}}
8}