Downloads · 30 days
10
4% of all-time downloads
lokpalai/lokpalgpt-falcon-7b-lora-4.5
lokpalgpt-falcon-7b-lora-4.5 is a text generation model from lokpalai. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-4.0.
LokPalAI is an advanced language model finetuned for Indian scenarios, specifically designed to bridge the gap between individuals and legal empowerment. With LokPalAI, users can interact with a powerful query box to…
Downloads · 30 days
10
4% of all-time downloads
All-time downloads
265
Public
Repo size
13.8 GB
Likes
0
Public
Click a slice to open those files.
.bin13.8 GB · 100%
From the Hugging Face model README
LokPalAI is an advanced language model finetuned for Indian scenarios, specifically designed to bridge the gap between individuals and legal empowerment. With LokPalAI, users can interact with a powerful query box to seek information and guidance related to Indian law.
The dataset is being curated and created using judgements available in IndianKanoon.com. You can refer the whole process here. Soon, we will be releasing our dataset and the training process.
💥 Falcon LLMs require PyTorch 2.0 for use with transformers!
For fast inference with Falcon, check-out Text Generation Inference! Read more in this [blogpost]((https://huggingface.co/blog/falcon).
You will need at least 16GB of memory to swiftly run inference with LokpalGPT-Instruct-Falcon-7b.
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
model = "lokpalai/lokpalgpt-falcon-7b-lora-4.5"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto",
)
sequences = pipeline(
"Can you analyze the legal implications of the Ayodhya Verdict by the Supreme Court of India?",
max_length=200,
do_sample=True,
top_k=10,
num_return_sequences=1,
temperature=0.5,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")