Downloads · 30 days
8
11% of all-time downloads
menikev/Llama-3.1-8B-NigerianLegalBot
Llama-3.1-8B-NigerianLegalBot is a text generation model from menikev. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.1.
This is a LoRA adapter for Meta-Llama-3.1-8B-Instruct, fine-tuned for Nigerian legal assistance in multiple languages.
Downloads · 30 days
8
11% of all-time downloads
All-time downloads
75
Public
Repo size
168 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 100%
From the Hugging Face model README
This is a LoRA adapter for Meta-Llama-3.1-8B-Instruct, fine-tuned for Nigerian legal assistance in multiple languages.
from unsloth import FastLanguageModel
import torch
# Load base model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="unsloth/Meta-Llama-3.1-8B-Instruct",
max_seq_length=2048,
dtype=None,
load_in_4bit=True,
device_map="auto", # Use this if you have memory issues
)
# Load this adapter
model.load_adapter("menikev/Llama-3.1-8B-NigerianLegalBot", adapter_name="default")
# Enable inference
FastLanguageModel.for_inference(model)
# Use the model
system_prompt = "You are a helpful and knowledgeable legal assistant in Nigeria. Respond to queries in the language of the user's question."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "What are the requirements for business registration in Nigeria?"}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
input_ids=inputs.to("cuda"),
max_new_tokens=512,
temperature=0.7,
do_sample=True,
)
response = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
print(response)
This model is for informational purposes only. Always consult qualified legal professionals for actual legal advice.
This adapter follows the LLaMA 3.1 license terms.