Text Generation
Transformers
Safetensors
English
mistral
insurance
actuarial
accounting
legal
cpa
cfa
bar-exam
finance
wealth-management
estate-planning
conversational
text-generation-inference
Instructions to use h3ir/morbi-v022 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use h3ir/morbi-v022 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="h3ir/morbi-v022") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("h3ir/morbi-v022") model = AutoModelForCausalLM.from_pretrained("h3ir/morbi-v022") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use h3ir/morbi-v022 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "h3ir/morbi-v022" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3ir/morbi-v022", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/h3ir/morbi-v022
- SGLang
How to use h3ir/morbi-v022 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "h3ir/morbi-v022" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3ir/morbi-v022", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "h3ir/morbi-v022" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3ir/morbi-v022", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use h3ir/morbi-v022 with Docker Model Runner:
docker model run hf.co/h3ir/morbi-v022
Morbi v0.2.2 🏛️
Professional Domain AI for Insurance, Accounting & Legal
Overview
Morbi v0.2.2 is a fine-tuned Mistral-Small model specialized for professional domains including insurance, actuarial science, accounting (CPA/CFA), and legal (California Bar Exam). Built by HEIR for wealth management and estate planning applications.
🎯 Capabilities
📊 Insurance & Actuarial
- Life insurance products (term, whole, universal, variable)
- Health insurance (medical, dental, disability, LTC)
- Actuarial mathematics (mortality tables, interest theory, reserving)
- Risk analysis and underwriting
- Premium calculations and projections
- Regulatory compliance (state, federal, NAIC)
📈 Accounting & Finance (NEW in v0.2.2)
| CPA Exam Topics | CFA Exam Topics |
|---|---|
| FAR - Financial Accounting | Ethics & Standards |
| AUD - Auditing | Quantitative Methods |
| REG - Regulation & Tax | Economics |
| BEC - Business Environment | Financial Statement Analysis |
| GAAP & IFRS Standards | Corporate Finance |
| Internal Controls | Equity & Fixed Income |
Financial Calculations:
- Net Present Value (NPV)
- Weighted Average Cost of Capital (WACC)
- Bond pricing and duration
- Depreciation methods
- Ratio analysis
⚖️ Legal (NEW in v0.2.2)
| Bar Exam Subject | Key Topics |
|---|---|
| Contracts | UCC Article 2, Formation, Breach, Remedies |
| Evidence | Hearsay, Privileges, FRE Rules |
| Torts | Negligence, Intentional Torts, Strict Liability |
| Real Property | Estates, Easements, Conveyancing |
| Civil Procedure | Jurisdiction, Erie, Pleading, Discovery |
| Constitutional Law | Due Process, Equal Protection, Powers |
| Criminal Law | Crimes, Defenses, 4th/5th/6th Amendments |
📊 Training Details
| Parameter | Value |
|---|---|
| Base Model | Mistral-Small-Instruct-2409 (22B) |
| Training Method | QLoRA (4-bit quantization) |
| LoRA Rank | 32 |
| LoRA Alpha | 64 |
| Learning Rate | 5e-5 |
| Training Steps | 2,000 |
| Batch Size | 8 (effective) |
Dataset Composition
Total Examples: 19,374
├── Insurance/Actuarial: 19,080 (98.5%)
├── Accounting (CPA/CFA): 62 (0.3%)
├── Legal (Bar Exam): 85 (0.4%)
└── Validation: 1,068
🚀 Usage
Basic Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"h3ir/morbi-v022",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("h3ir/morbi-v022")
# Insurance question
prompt = """<s>[INST] You are Morbi, an expert AI assistant specializing in insurance, actuarial science, accounting, and legal matters.
Calculate the present value of an annuity paying $1,000 per year for 15 years at 4% interest. [/INST]"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=500, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Accounting Example
prompt = """<s>[INST] You are Morbi, an expert AI assistant specializing in insurance, actuarial science, accounting, and legal matters.
Explain when UCC Article 2 applies instead of common law for contracts. [/INST]"""
Legal Example
prompt = """<s>[INST] You are Morbi, an expert AI assistant specializing in insurance, actuarial science, accounting, and legal matters.
Analyze hearsay and its exceptions under the Federal Rules of Evidence. [/INST]"""
📋 Version History
| Version | Date | Changes |
|---|---|---|
| v0.2.2 | Jan 2026 | Added accounting (CPA/CFA) and legal (Bar Exam) data |
| v0.2.1 | Jan 2026 | Improved insurance responses, lower LR |
| v0.2.0 | Jan 2026 | Initial release with insurance focus |
⚠️ Limitations
- This model is for educational and informational purposes only
- Not a substitute for professional legal, financial, or insurance advice
- Verify all calculations and legal interpretations with qualified professionals
- May not reflect the most recent regulatory changes
🏢 About HEIR
HEIR is a wealth management and estate planning platform that combines AI with blockchain technology for inheritance planning. Morbi powers the AI swarm of professional advisors.
📄 License
Apache 2.0
📚 Citation
@misc{morbi-v022,
author = {HEIR},
title = {Morbi v0.2.2: Professional Domain LLM for Insurance, Accounting & Legal},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/h3ir/morbi-v022}
}
Built with ❤️ by HEIR
- Downloads last month
- 8
Model tree for h3ir/morbi-v022
Base model
mistralai/Mistral-Small-Instruct-2409