SwahiliGPT_v0.1 / README.md
mwitiderrick's picture
Create README.md
2c2de6e
metadata
base_model: mistralai/Mistral-7B-v0.1
datasets:
  - wikimedia/wikipedia
inference: true
model_type: mistral
created_by: mwitiderrick
tags:
  - transformers
license: apache-2.0
language:
  - en
library_name: transformers
pipeline_tag: text-generation

SwahiliGPT

This is a Mistral model that has been fine-tuned on the Wikipedia Swahili dataset.

Usage

# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/SwahiliGPT_v0.1")
model = AutoModelForCausalLM.from_pretrained("mwitiderrick/SwahiliGPT_v0.1", device_map="auto")
inputs = tokenizer("Hapo zamani za kale", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200,  do_sample=True, repetition_penalty=1.1)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))


"""
Hapo zamani za kale katika historia ya jamii, ambavyo sehemu moja hutazama historia ile inayopendekezwa au inayojulikana, na sehemu nyingine inafanya history  ambalai hainajulikana. 
Utaifishaji unaleta utata kwanza mambo ya karne zilizoandamana, na seconda matokeo yanatokana na vipitio vya maisha muhimu ambavyo haivyo vitakuva mahitaji katika jamii hiyo (hunajua wakiweka mitindo katakatani). Ni kinyume kingine kwamba kuna sifa ambayo umechukizwa vitu hivi vilitengenezwa zaidi.

Katika Afrika Magharibi, historia huitwa ngan
"""