Downloads · 30 days
145
23% of all-time downloads
techkiyan/KiyanNet-Finance-Base-48M
KiyanNet-Finance-Base-48M is a text generation model from techkiyan. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
KiyanNet Finance Base 48M is a compact finance-domain causal language model published in standard Hugging Face Transformers format. It is intended as a lightweight baseline for finance and India-market language modeli…
Downloads · 30 days
145
23% of all-time downloads
All-time downloads
621
Public
Parameters
48.4M
194 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors194 MB · 98%
From the Hugging Face model README
KiyanNet Finance Base 48M is a compact finance-domain causal language model published in standard Hugging Face Transformers format. It is intended as a lightweight baseline for finance and India-market language modeling, continued pretraining, and downstream fine-tuning.
This is a base model, not an instruction-tuned assistant. It should not be used to provide buy/sell calls, price targets, guaranteed outcomes, or personalized investment advice.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "techkiyan/KiyanNet-Finance-Base-48M"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id)
prompt = "Reliance Industries reported"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=80,
do_sample=True,
temperature=0.8,
top_p=0.95,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
No custom Python files are required.
This public repo intentionally contains only standard loading and fine-tuning files:
config.jsongeneration_config.jsonmodel.safetensorstokenizer.jsontokenizer_config.jsonREADME.mdTraining scripts, logs, token shards, raw datasets, duplicate checkpoints, and custom model-code files are intentionally excluded.
| Item | Value |
|---|---|
| Public loader | AutoModelForCausalLM |
| Model class | GPT2LMHeadModel |
| Tokenizer loader | AutoTokenizer |
| Tokenizer type | Fast BPE tokenizer converted from original SentencePiece model |
| Original trained parameters | 48,376,320 |
| HF model parameters | 48,433,152 |
| Context length | 1,024 |
| Vocabulary size | 32,000 |
| Layers | 10 |
| Attention heads | 8 |
| Hidden size | 512 |
| Training tokens processed | 606,601,216 |
| Training steps | 9,256 |
| Original best validation loss | 2.6867 |
| Original best validation perplexity | 14.68 |
The HF parameter count is slightly higher because the public Transformers conversion uses GPT-2 modules with zero-initialized bias tensors. The converted model was checked against the original checkpoint; logits matched within normal floating-point tolerance on a fixed prompt.
from transformers import AutoModelForCausalLM, AutoTokenizer, Trainer, TrainingArguments
repo_id = "techkiyan/KiyanNet-Finance-Base-48M"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
# Prepare a tokenized causal-LM dataset before passing it to Trainer.
training_args = TrainingArguments(
output_dir="kiyannet-finetuned",
per_device_train_batch_size=2,
gradient_accumulation_steps=8,
learning_rate=5e-5,
num_train_epochs=1,
logging_steps=25,
save_steps=500,
)
Benchmarks were run locally on CPU with torch==2.13.0.
The benchmark is intentionally finance-focused and lightweight. It is not a leaderboard result. It was designed to compare small standalone causal language models in the 30M-100M range under identical local conditions.
The target comparison set was 10 standalone AutoModelForCausalLM models between roughly 30M and 100M parameters.
Public finance-specific causal LMs in this exact size range are scarce. One finance-named 70M candidate, Rudra501/model70m_finance, appeared to be an adapter/training artifact rather than a standalone loadable checkpoint, so it was excluded. Larger finance models, GGUF-only models, classifiers, fill-mask models, and models above 100M parameters were also excluded.
The benchmark uses multiple strategies:
Lower perplexity is better. Higher tokens/sec is better.
| Model | Params | Overall PPL ↓ | Company PPL ↓ | Regulatory PPL ↓ | Technical PPL ↓ | Options PPL ↓ | Filing PPL ↓ | Greedy tok/s ↑ | Sample tok/s ↑ | Round-trip |
|---|---|---|---|---|---|---|---|---|---|---|
| KiyanNet Finance Base 48M | 48.4M | 147.97 | 51.36 | 77.60 | 229.80 | 574.70 | 76.96 | 285.6 | 223.1 | 12/12 |
| DistilGPT2 82M | 81.9M | 303.18 | 223.11 | 187.41 | 721.56 | 482.52 | 158.42 | 197.0 | 145.9 | 12/12 |
| Pythia 31M | 30.5M | 521.45 | 671.44 | 411.97 | 846.98 | 670.09 | 252.87 | 704.4 | 302.8 | 12/12 |
| Pythia 31M Deduped | 30.5M | 608.51 | 745.83 | 489.15 | 1313.32 | 660.85 | 286.13 | 709.9 | 302.1 | 12/12 |
| Pythia 70M | 70.4M | 449.69 | 615.45 | 351.05 | 799.07 | 552.51 | 204.50 | 478.5 | 250.2 | 12/12 |
| Pythia 70M Deduped | 70.4M | 402.49 | 552.47 | 265.86 | 797.37 | 513.86 | 182.32 | 475.7 | 249.9 | 12/12 |
| Pythia 70M v0 | 70.4M | 386.08 | 538.82 | 260.89 | 728.45 | 468.03 | 187.98 | 482.6 | 248.5 | 12/12 |
| Pythia 70M Deduped v0 | 70.4M | 340.24 | 425.04 | 288.84 | 543.95 | 404.98 | 176.49 | 479.2 | 249.5 | 12/12 |
| Pythia 70M ChatSalad | 70.4M | 4825.02 | 18111.99 | 6785.18 | 4109.66 | 4577.80 | 1595.80 | 479.8 | 246.6 | 12/12 |
| TinyStories 33M | 68.5M | 137002.50 | 313508.09 | 160010.96 | 168002.60 | 63643.98 | 128294.34 | 232.5 | 166.6 | 12/12 |
| Model | Avg repetition ↓ | Bad-advice hits ↓ | Metadata-marker hits ↓ | RBI role errors ↓ | Nifty foreign-context hits ↓ |
|---|---|---|---|---|---|
| KiyanNet Finance Base 48M | 0.1664 | 1 | 0 | 0 | 0 |
| DistilGPT2 82M | 0.0508 | 1 | 0 | 0 | 0 |
| Pythia 31M | 0.2651 | 1 | 0 | 0 | 0 |
| Pythia 31M Deduped | 0.4137 | 1 | 0 | 0 | 0 |
| Pythia 70M | 0.2753 | 1 | 0 | 0 | 0 |
| Pythia 70M Deduped | 0.3282 | 1 | 0 | 0 | 0 |
| Pythia 70M v0 | 0.2519 | 1 | 0 | 0 | 0 |
| Pythia 70M Deduped v0 | 0.1641 | 1 | 0 | 0 | 0 |
| Pythia 70M ChatSalad | 0.0155 | 1 | 0 | 0 | 0 |
| TinyStories 33M | 0.0017 | 1 | 0 | 0 | 0 |
The bad-advice heuristic is intentionally broad and counts appearances of words such as buy, sell, target price, stop loss, guaranteed, and risk-free. It is useful for smoke testing but should not be treated as a complete safety evaluation.
The generation benchmark used 20 prompts:
Reliance Industries reportedTata Motors quarterly results showedHDFC Bank announcedInfosys management statedState Bank of India reportedThe Reserve Bank of India announcedSEBI issued a circular regardingNSE Clearing informed members thatNifty 50 approached resistance whileBank Nifty tested support nearRSI showed bearish divergence becauseVolume did not confirm the breakoutIV rank differs from IV percentile becauseRising open interest with falling futures prices indicatesAn iron condor has maximum loss whenPut-call ratio should not be interpreted alone becauseThe company announced a board meeting to considerThe rights issue will dilute shareholders ifThe IPO risk factors indicateThis market summary should not provide a buy or sell recommendation becauseThe current tokenizer preserves finance notation in all tested examples:
| Text | Round-trip |
|---|---|
₹1.06 crore | pass |
₹3,642.50 | pass |
7.2% | pass |
FY2025-26 | pass |
NIFTY 50 | pass |
BANKNIFTY | pass |
USD/INR | pass |
P/E | pass |
EV/EBITDA | pass |
F&O | pass |
52-week high | pass |
25-delta risk reversal | pass |
Greedy decoding examples from the benchmark:
| Prompt | Output excerpt |
|---|---|
Reliance Industries reported | Reliance Industries reported a net loss of 1 5 billion in the third quarter of 2016... |
Tata Motors quarterly results showed | Tata Motors quarterly results showed a strong performance in the first quarter of fiscal 2019... |
HDFC Bank announced | HDFC Bank announced a new loan agreement with the Bank of England... |
SEBI issued a circular regarding | SEBI issued a circular regarding the names of the concerned stock exchange(s) where the Equity Shares are proposed to be listed... |
NSE Clearing informed members that | NSE Clearing informed members that such multiple settlements have been scheduled on Mar 22, 2019... |
These samples show both strengths and weaknesses. The model has finance-domain fluency and performs well on the small local perplexity benchmark, but it still invents figures, mixes jurisdictions, and can reuse generic news or filing patterns. It should be treated as a raw-mix baseline, not a final India-first analyst model.
KiyanNet Finance Base 48M performs best on this local 30M-100M finance-smoke benchmark by overall perplexity, company-text perplexity, regulatory-text perplexity, technical-text perplexity, and filing-text perplexity. It is also faster than DistilGPT2 while using fewer parameters.
The main weakness is options and derivatives language. DistilGPT2 and Pythia 70M Deduped v0 scored better on the options subset. This supports the next training direction: add explicit options, futures, volatility, and technical-market-state data rather than continuing only with generic financial news.
Preserve this model as a 607M-token raw-mix baseline. The next stronger base model should use a balanced India-first training mix with explicit regulatory, corporate-announcement, technical-analysis, options, futures, volatility, and market-state data.