Edit model card

How to Use

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftMode

model_name_or_path = "bigscience/bloomz-7b1-mt"

peft_model_id = "acul3/bloomz-7b-instructions-lora"

model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto")

model = PeftModel.from_pretrained(model, peft_model_id)

text = "Bagaimana Merebus Telur ?"
tokenizer = AutoTokenizer.from_pretrained("bigscience/bloomz-7b1-mt")
text = "User: " + text + "\n\Asisten: "
input_ids = tokenizer(text, return_tensors="pt").input_ids
generated_ids = model.generate(input_ids=input_ids.to("cuda"), max_length=400, pad_token_id=tokenizer.eos_token_id, do_sample=True, top_p=0.95, temperature=0.5, penalty_alpha=0.6, top_k=4, repetition_penalty=1.03, num_return_sequences=1)

res = tokenizer.decode(generated_ids[0], skip_special_tokens=True)

print(res)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Unable to determine this model's library. Check the docs .