KiyanNet 100M
A compact language model for structured financial information extraction.
Overview
KiyanNet 100M is a custom-trained, 100,092,672-parameter decoder-only Transformer specialized for structured information extraction from financial-news titles and descriptions. It is version 1.0, a research proof of concept in the KiyanNet family. It is not a general-purpose chatbot, financial analyst, OCR system, or production-grade extraction service.
The separately published KiyanNet Finance Base 48M checkpoint is an earlier, independent model. KiyanNet 100M was not trained from that checkpoint.
Capabilities
The model experimentally supports:
- financial named-entity extraction and entity type classification;
- financial event identification, sentiment, metadata, and evidence spans;
- directional relationships between entities;
- experimental financial datapoint extraction; and
- nested JSON generation with
entitiesandrelationships.
Architecture
| Property | Value |
|---|---|
| Parameters | 100,092,672 |
| Vocabulary | 32,000 tokens |
| Layers | 12 |
| Hidden size | 768 |
| Query heads / KV heads | 12 / 4 |
| Head size | 64 |
| Feed-forward size | 2,048 |
| Positional encoding | RoPE, theta 10,000 |
| Normalization | Pre-norm RMSNorm, epsilon 1e-6 |
| Activation | SwiGLU (SiLU gate) |
| Attention | Causal scaled dot-product grouped-query attention |
| Weight tying | Input embedding and LM head |
| Architectural maximum | 1,024 tokens |
| Structured-task window | 512 tokens, prompt and generated response combined |
The bundled inference uses full-sequence greedy decoding. It does not implement a KV cache and is not claimed to support transformers.AutoModelForCausalLM.
Model development
Development proceeded through (1) base causal-language-model pretraining, (2) instruction supervised fine-tuning, and (3) financial-news structured-extraction fine-tuning. Project artifacts confirm a 20,000-example structured stage followed by 100,000 additional distinct training examples. The final release weights come from structured_mvp1_100k_mb8/instruction_best.pt.
Reference extraction annotations were produced by an earlier model-based pipeline. The repository does not include training or evaluation articles.
Input format
Use this exact training-compatible template:
### Instruction
Extract entities, financial events and relationships from the news. Return ONLY one valid JSON object with keys entities and relationships. Use only facts in the context; do not invent information.
### Context
Title: {title}
Description: {description}
### Response
Whitespace inside the title and description is normalized. Inputs are not silently truncated. Because the task window is 512 tokens, prompt tokens and generated tokens must fit together within that limit.
Output schema
The top-level object contains entities and relationships. Each entity has a name, type, and event list; optional entity fields include sector and primary-entity status. Events can include category, sentiment, evidence, confidence, importance, and financial datapoints. Relationships identify a relation and its source and target entities.
Illustrative schema example (not a measured checkpoint output):
{
"entities": [
{
"entity_name": "Example Industries",
"entity_type": "Public Company",
"sector": "Industrials",
"is_primary": true,
"events": [
{
"news_category": "Earnings Growth",
"sentiment": "Bullish",
"evidence_span": "quarterly revenue rose 12%",
"confidence_score": 0.9,
"importance_score": 3,
"datapoints": [
{
"metric": "Revenue Growth",
"value": 12.0,
"unit": "percentage",
"direction": "up",
"timeframe": "quarterly",
"context": "quarterly revenue rose 12%",
"normalized_value": 12.0
}
]
}
]
}
],
"relationships": []
}
Fields outside the minimum envelope are generated by the model and can be absent, incorrect, or unsupported. The loader validates structure; it does not silently repair or invent semantic content.
Installation and usage
pip install torch safetensors tokenizers huggingface_hub
Download this repository or place inference.py on the Python path, then run:
from inference import KiyanNetExtractor
model = KiyanNetExtractor.from_pretrained(
"techkiyan/kiyannet-100M",
device="cuda",
precision="amp",
)
result = model.extract(
title="Company reports strong quarterly earnings",
description="The company reported higher revenue and profit.",
)
print(result["data"])
print(result["raw_text"])
print(result["errors"])
For CPU FP32, use device="cpu", precision="fp32". For CUDA FP32, use device="cuda", precision="fp32". CUDA AMP uses FP16 autocasting. Generation is deterministic greedy decoding and stops at tokenizer EOS (<|endoftext|>, token ID 1) or the requested/task token limit.
Loading from a local directory works with the same API:
model = KiyanNetExtractor.from_pretrained("./kiyannet-100M-HF", device="cpu")
Evaluation
The selected checkpoint was evaluated with greedy decoding on 1,000 held-out structured-extraction records:
| Metric | Result |
|---|---|
| Valid JSON | 100.00% |
| Exact output match | 12.80% |
| Entity micro-F1 | 55.88% |
| Event micro-F1 | 31.51% |
| Relationship micro-F1 | 22.14% |
| Datapoint micro-F1 | 4.26% |
| Entity-type accuracy on matched names | 88.44% |
These results measure agreement with model-generated reference annotations, not human-adjudicated gold labels. Duplicate or near-duplicate articles may affect the estimate. JSON validity does not imply factual correctness, and accuracy varies substantially by field.
Measured inference optimization
On one RTX 2060 run over the same 100 financial-news records in each mode:
| Metric | FP32 | AMP |
|---|---|---|
| Average latency | 2.3049 s | 1.5721 s |
| Valid JSON | 97% | 97% |
| Entity F1 | 51.83% | 51.83% |
| Event F1 | 20.74% | 20.90% |
| Relationship F1 | 20.34% | 20.69% |
| Datapoint F1 | 2.35% | 2.35% |
FP32 and AMP produced identical raw outputs for 96 of 100 examples. AMP reduced mean latency by approximately 31.8% on that tested setup. This is a hardware- and workload-specific observation, not a general speed or accuracy guarantee.
Live-news qualitative audit
A qualitative test used the titles and RSS descriptions—not full articles—of 15 CNBC-TV18 items fetched on October 30, 2026. Fourteen generations were valid JSON. The model recognized financial companies and some broad earnings events, while manual review found company misattribution, incorrect event binding, numeric-scale and metric errors, unsupported evidence, incorrect relationship direction, duplicate entities, sentiment errors, and one incomplete response for a longer multi-company item. This was not a human-annotated benchmark.
Limitations and responsible use
KiyanNet 100M can hallucinate facts, attribute one company's result to another, mislabel an entity or metric, alter numeric values or scales, reverse relationships, duplicate entities, and emit incomplete JSON. Its specialization is narrow, and evidence spans or confidence-like fields are generated text rather than factual guarantees.
Do not use unverified outputs for trading, investment advice, regulatory or compliance decisions, accounting, or publication as trustworthy financial data. Validate every material extraction against the source.
License and attribution
The model weights, tokenizer, configuration, and bundled inference code are released under the Apache License 2.0. See LICENSE. No third-party news text or evaluation records are included in this repository.
KiyanNet 100M is a KiyanNet research proof of concept. Version 1.0.
- Downloads last month
- 272