Downloads · 30 days
2
4% of all-time downloads
IndusYash/investo-llama-3.2-3b-finance-lora
investo-llama-3.2-3b-finance-lora is a text generation model from IndusYash. Use it when you need the model to write or continue text. It is set up for peft.
Investo Bot is a finance domain assistant fine-tuned on top of the base model Llama 3.2 3B Instruct (specifically the quantized version unsloth/Llama-3.2-3B-Instruct-bnb-4bit) using QLoRA. It is optimized to act as a…
Downloads · 30 days
2
4% of all-time downloads
All-time downloads
52
Public
Repo size
115 MB
Likes
0
Public
Click a slice to open those files.
.safetensors97.3 MB · 85%
From the Hugging Face model README
Investo Bot is a finance domain assistant fine-tuned on top of the base model Llama 3.2 3B Instruct (specifically the quantized version unsloth/Llama-3.2-3B-Instruct-bnb-4bit) using QLoRA. It is optimized to act as a personal financial planner, answer investment-related queries, analyze market concepts, and explain personal finance strategies.
Investo Bot is designed to be used as a conversational agent for answering questions related to personal finance, stocks, ETFs, mutual funds, taxation, compounding, and basic portfolio construction.
This model is not a licensed financial advisor. Its outputs should not be taken as professional financial advice, stock trading recommendations, or investment mandates.
You can load this model along with its base model using the code snippet below:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Base model and adapter paths
base_model_name = "unsloth/Llama-3.2-3B-Instruct" # Or the bnb-4bit version on GPU
adapter_model_id = "YOUR_USERNAME/investo-llama-3.2-3b-finance-lora"
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Load base model
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
device_map="auto" if device == "cuda" else None
)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, adapter_model_id)
model.to(device)
# Inference Example
prompt = "Explain the difference between actively managed mutual funds and index funds."
inputs = tokenizer(prompt, return_tensors="pt").to(device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))