πŸ’Ό LexGen β€” LoRA Adapter for Legal Document Generation (Board Resolutions)

LexGen is a lightweight, fine-tuned adapter for Mistral-7B that generates legally sound Board Resolutions from structured input fields like company name, purpose, meeting date, etc.

This adapter is trained using PEFT (LoRA) for efficient and low-resource fine-tuning and deployment.


🧠 Model Details

Property Value
Base Model Mistral-7B (load separately)
Adapter Type LoRA (via HuggingFace PEFT)
Output Format Formal English, board resolution structure
Use Case Auto-generation of legal Board Resolutions
Performance High factual and syntactic consistency

⚠️ The base model (mistralai/Mistral-7B-v0.1) is not included β€” load it separately.


πŸš€ Example Use Case

Convert structured form data into polished board resolutions. Output 1 Output 2

πŸ›  Usage (Python)

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")

peft_model = PeftModel.from_pretrained(base_model, "./checkpoint-200")

prompt = "Generate a board resolution for approval of branch expansion for Aretoss Ltd."
inputs = tokenizer(prompt, return_tensors="pt").to(base_model.device)
outputs = peft_model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

πŸ“¦ Files Included

  • adapter_config.json – LoRA adapter config
  • adapter_model.safetensors – Fine-tuned adapter weights

🏷 Tags

generative-ai Β· legal Β· text-generation Β· lora Β· mistral Β· peft Β· llm Β· contract-generation


πŸ“„ License

Licensed under Apache 2.0. Free to use, modify, and distribute with attribution.


Github: https://github.com/Aryan-Jadhav3009 Linkedin: https://www.linkedin.com/in/batmann/

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support