seyabde's picture
Update README.md
4a68eb8
metadata
license: afl-3.0
language:
  - yo
datasets:
  - afriqa
  - xlsum
  - menyo20k_mt
  - alpaca-gpt4

Model Description

mistral_7b_yo_instruct is a text generation model in Yorùbá.

Intended uses & limitations

How to use


from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "seyabde/mistral_7b_yo_instruct"

tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
    model_path,
    device_map="auto",
    torch_dtype='auto'
).eval()

# Prompt content: "Pẹlẹ o. Bawo ni o se wa?" ("Hello. How are you?")
messages = [
    {"role": "user", "content": "Pẹlẹ o. Bawo ni o se wa?"}
]

input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
output_ids = model.generate(input_ids.to('cuda'))
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)

# Model response:
print(response)

Example outputs

Ilana (Instruction): '...'

mistral_7b_yo_instruct: '...'

Eval results

Coming soon

Limitations and bias

This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains.

Training data

This model is fine-tuned on 60k+ instruction-following demonstrations built from an aggregation of datasets (AfriQA, XLSum, MENYO-20k), and translations of Alpaca-gpt4).

Use and safety

We emphasize that mistral_7b_yo_instruct is intended only for research purposes and is not ready to be deployed for general use, namely because we have not designed adequate safety measures.