Llama3-8b-Naija_v1 / README.md
saheedniyi's picture
Update README.md
39b30c9 verified
|
raw
history blame
2.06 kB
metadata
library_name: transformers
license: llama3
datasets:
  - saheedniyi/Nairaland_v1_instruct_512QA
language:
  - en
pipeline_tag: text-generation

Excited to announce the release of Llama3-8b-Naija_v1 a finetuned version of Meta-Llama-3-8B trained on a Question - Answer dataset from Nairaland. The model was built in an attempt to "Nigerialize" Llama-3, giving it a Nigerian - like behavior.

Model Details

Model Description

Model Sources

How to Get Started with the Model

Use the code below to get started with the model.

#necessary installations
!pip install bitsandbytes peft accelerate

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("saheedniyi/Llama3-8b-Naija_v1")
model = AutoModelForCausalLM.from_pretrained("saheedniyi/Llama3-8b-Naija_v1")

input_text = "What are the top locations for tourism in Nigeria?"
formatted_prompt=input_text=f"### BEGIN CONVERSATION ###\n\n## User: ##\n{input_text}\n\n## Assistant: ##\n"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs.to("cuda"), max_new_tokens=512,pad_token_id=tokenizer.pad_token_id,do_sample=True,temperature=0.6,top_p=0.9,)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))