Downloads · 30 days
14
47% of all-time downloads
shravankotagi/SmartVest
SmartVest is a text generation model from shravankotagi. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
[](https://opensource.org/licenses/Apache-2.0) [](https://huggingface.co/sarvamai/sarvam-1) [](https://huggingface.co/datasets/shravankotagi/hinglish-finance-sft-v5-fixed)
Downloads · 30 days
14
47% of all-time downloads
All-time downloads
30
Public
Repo size
10.9 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 99%
From the Hugging Face model README
A QLoRA fine-tune of Sarvam-1 underlying SmartVest, an interactive web application designed for Indian retail investors. SmartVest allows users to text or speak their financial, tax, and trading queries in conversational Hinglish (Hindi in Latin script mixed with English financial terms) and receive real-time, safety-verified responses.
SmartVest is deployed as a full-stack financial assistant with an integrated safety verification engine:
PASS) in real time.User: Bajaj Housing Finance ka aaj ka bhav kya hai?
SmartVest: Bajaj Housing Finance (BAJAJHFL) ka aaj ka live NSE price hai Rs 86.52 (change neeche -1.27% aaj). Invest karne se pehle apne broker app pe confirm karein. Yeh sirf informational data hai. SEBI registered advisor se zaroor milein.
User: loss ho raha hai portfolio mein kya karein?
SmartVest: Bear market mein ghabrana zaroori nahi. Historically markets hamesha recover karte hain - long term investors ke liye yeh buying opportunity hoti hai. SIP jaari rakho, quality stocks hold karo, panic mein mat becho. Yeh sirf educational info hai. SEBI registered advisor se zaroor milein.
User: FD vs mutual fund konsa better hai long term ke liye?
SmartVest: FD (Fixed Deposit) mein guaranteed returns milte hain aur risk bahut low hota hai, jabki Mutual Funds market-linked hote hain aur unme high returns ka potential hota hai. Long term wealth creation ke liye Mutual Funds behtar hain, par short term safety ke liye FD secure hai. Apne goal ke hisab se allocate karein. Yeh sirf educational info hai. SEBI registered advisor se zaroor milein.
sarvamai/sarvam-1SmartVest acts as a friendly, concise AI assistant for Indian stock market queries:
BAJAJHFL, RELIANCE, INFY) and Hinglish financial slang (bhav, mandi, munafa, profit book).| Parameter | Value |
|---|---|
| Base Model | sarvamai/sarvam-1 |
| Method | QLoRA (4-bit quantization via bitsandbytes) |
| Dataset | shravankotagi/hinglish-finance-sft-v5-fixed |
| Hardware | Kaggle T4 GPU (15.6 GB VRAM) |
| LoRA Rank / Alpha | r=16 / alpha=32 (dropout=0.05) |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable Parameters | 23,969,792 / 2,549,463,040 (0.94%) |
| Vocabulary Size | Expanded to 68,195 tokens |
| Epochs / Total Steps | 2 Epochs / 1,174 Steps |
| Optimizer / LR | paged_adamw_8bit / 1e-4 (Cosine Scheduler) |
The model was fine-tuned on shravankotagi/hinglish-finance-sft-v5-fixed, an instruction dataset consisting of 5,521 instruction-response pairs covering:
| Step | Training Loss | Validation Loss |
|---|---|---|
| 150 | 0.7084 | 0.7169 |
| 300 | 0.6150 | 0.6206 |
| 450 | 0.5472 | 0.5872 |
| 600 | 0.5373 | 0.5665 |
| 750 | 0.4852 | 0.5523 |
| 900 | 0.5248 | 0.5426 |
| 1050 | 0.5042 | 0.5376 |
To run inference, load sarvamai/sarvam-1 in 4-bit mode, resize its embedding layer to match the expanded tokenizer, and apply the PEFT adapter:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
MODEL_ID = "shravankotagi/SmartVest"
# 1. Configure 4-bit quantization
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
)
# 2. Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"sarvamai/sarvam-1",
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
)
# 3. Load tokenizer and resize embeddings
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
tokenizer.pad_token = tokenizer.eos_token
base_model.resize_token_embeddings(len(tokenizer))
# 4. Load SmartVest LoRA adapter
model = PeftModel.from_pretrained(
base_model,
MODEL_ID,
ignore_mismatched_sizes=True
)
model.eval()
# 5. Generate
SYSTEM = """You are SmartVest, an AI assistant for Indian retail investors.
You understand Hinglish and answer finance questions clearly and factually."""
user_query = "FD vs mutual fund konsa better hai long term ke liye?"
prompt = f"<s>[INST] {SYSTEM}\n\nUser query: {user_query} [/INST]"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=120,
temperature=0.5,
do_sample=True,
repetition_penalty=1.1
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response.split("[/INST]")[-1].strip())

Educational Purpose Only: SmartVest is an experimental AI assistant and does not provide certified financial, legal, or tax advice.
Dynamic Data: Stock prices, tax slabs (LTCG/STCG), and exchange fees change frequently. Always verify live rates via official SEBI/NSE/BSE sources or consult a SEBI-registered financial advisor.
Scope: Optimized specifically for Indian retail market contexts and Hinglish terminology; may underperform on non-Indian or purely technical corporate finance queries.
Developer: Shravan Kotagi
Hugging Face: @shravankotagi