Edit model card

Uploaded model

  • Developed by: Mollel
  • License: apache-2.0
  • Finetuned from model : unsloth/gemma-7b-bnb-4bit

This gemma model was trained 2x faster with Unsloth and Huggingface's TRL library.

Inference With Inference with HuggingFace transformers


!pip install transformers peft accelerate bitsandbytes

from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer

model = AutoPeftModelForCausalLM.from_pretrained(
    "Mollel/Gemma_Swahili_Mollel_1_epoch",
    load_in_4bit = False
)

tokenizer = AutoTokenizer.from_pretrained("Mollel/Gemma_Swahili_Mollel_1_epoch")


input_prompt = """
### Instruction:
{}

### Input:
{}

### Response:
{}"""



input_text = input_prompt.format(
        "Andika aya fupi kuhusu mada iliyotolewa.", # instruction
        "Umuhimu wa kutumia nishati inayoweza kurejeshwa", # input
        "", # output - leave this blank for generation!
    )

inputs = tokenizer([input_text], return_tensors = "pt").to("cuda")

outputs = model.generate(**inputs, max_new_tokens = 300, use_cache = True)
response = tokenizer.batch_decode(outputs)[0]

print(response)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Model tree for Mollel/Gemma_Swahili_Mollel_1_epoch

Finetuned
(211)
this model