Downloads · 30 days
0
dineth9d/qwen2.5-1.5b-earnings-risk-extractor
qwen2.5-1.5b-earnings-risk-extractor is a machine learning model from dineth9d. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
Fine-tuned to extract a structured risk register from earnings-call and MD&A commentary. Built for the CDAZZDEV Senior ML Engineer technical assessment (Task 2).
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2026
Parameters
1.5B
3.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
From the Hugging Face model README
Fine-tuned to extract a structured risk register from earnings-call and MD&A commentary. Built for the CDAZZDEV Senior ML Engineer technical assessment (Task 2).
Input: a passage of management commentary plus the sector. Output: JSON — a list of disclosed risks, each with a category from a closed 10-item taxonomy, a severity, a time horizon, and an evidence span quoted verbatim from the passage.
| Base | Qwen/Qwen2.5-1.5B-Instruct |
| Method | QLoRA, 4-bit NF4 + double quantisation, fp16 compute |
| LoRA | r=16, alpha=32, dropout=0.05, all attention + MLP projections |
| Optimiser | paged_adamw_8bit, lr=0.0002, cosine schedule, warm-up 3% of steps |
| Schedule | 3 epochs, effective batch 16, max_seq_len 1024 |
| Loss | completion-only (prompt tokens masked to -100) |
| Data | 83 train / 10 validation / 11 test, labelled by openai/gpt-oss-120b as teacher across 11 sectors |
| Hardware | single Colab T4 |
The model was trained and evaluated with this exact system prompt; use it unchanged.
from transformers import AutoModelForCausalLM, AutoTokenizer
SYSTEM_PROMPT = '''You extract a structured risk register from earnings-call commentary.
Return ONLY a JSON object: {"risks": [{"risk_category", "description", "severity", "time_horizon", "evidence_span"}], "overall_risk_tone"}.
risk_category must be one of: SUPPLY_CHAIN, DEMAND, COMPETITION, REGULATORY, FX_MACRO, LIQUIDITY, TALENT, TECHNOLOGY, CYBER_SECURITY, LEGAL_LITIGATION.
evidence_span must be copied verbatim from the passage.
severity: high | medium | low. time_horizon: near_term | medium_term | long_term.
overall_risk_tone: elevated | moderate | contained.'''
tok = AutoTokenizer.from_pretrained("dineth9d/qwen2.5-1.5b-earnings-risk-extractor")
model = AutoModelForCausalLM.from_pretrained("dineth9d/qwen2.5-1.5b-earnings-risk-extractor", device_map="auto")
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "Sector: semiconductors\n\nPASSAGE:\n\"\"\"\n<management commentary>\n\"\"\"\n\nExtract the risk register."},
]
enc = tok.apply_chat_template(messages, add_generation_prompt=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=640, do_sample=False)
print(tok.decode(out[0][enc["input_ids"].shape[-1]:], skip_special_tokens=True))
Trained on synthetic passages generated by a teacher model, not on real filings. It inherits the teacher's stylistic register and its blind spots, and it has not been validated against SEC documents. Evidence spans are grounded by construction but should still be verified against source before any downstream use. Not investment advice.