Downloads · 30 days
0
gokulalex/BrahmaNet
BrahmaNet is a text generation model from gokulalex. Use it when you need the model to write or continue text. The card lists the license as mit.
Downloads · 30 days
0
Access
Public
Updated Oct 24, 2025
Repo size
55.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors54.6 MB · 93%
From the Hugging Face model README
BrahmaNet is a specialized language model fine-tuned from Microsoft's Phi-3-mini-4k-instruct for extracting structured information from invoice documents. The model is optimized to understand invoice formats and convert unstructured text into well-structured JSON output.
This model is designed for extracting structured information from invoice documents including:
The model can be fine-tuned further for:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load model and tokenizer
model_name = "gokulalex/BrahmaNet"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype=torch.bfloat16,
trust_remote_code=True
)
# Prepare prompt
prompt = """Extract invoice information as JSON:
Document: Invoice Number: INV-2023-001, Date: 2023-10-15, Supplier: ABC Corporation, Total Amount: $1,250.00
JSON:"""
# Generate response
inputs = tokenizer(prompt, return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(
inputs.input_ids,
max_new_tokens=150,
do_sample=True,
temperature=0.3,
top_p=0.9,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)