Downloads · 30 days
0
liuchanghf/bloomz-3b-mmlu-lora
bloomz-3b-mmlu-lora is a text generation model from liuchanghf. Use it when you need the model to write or continue text. The card lists the license as bigscience-bloom-rail-1.0.
bloomz-3b-mmlu-lora is a LORA model which fine-tuned on mmlu dataset. The base model is bigscience/bloomz-3b .
Downloads · 30 days
0
Access
Public
Updated Apr 11, 2024
Repo size
9.8 MB
Likes
0
Public
Click a slice to open those files.
.safetensors9.8 MB · 100%
From the Hugging Face model README
bloomz-3b-mmlu-lora is a LORA model which fine-tuned on mmlu dataset. The base model is bigscience/bloomz-3b .
import torch
from transformers import AutoTokenizer
from peft import AutoPeftModelForCausalLM
torch.set_default_device("cuda")
model = AutoPeftModelForCausalLM.from_pretrained("liuchanghf/bloomz-3b-mmlu-lora")
tokenizer = AutoTokenizer.from_pretrained("bigscience/bloomz-3b")
inputs = tokenizer('''def print_prime(n):
"""
Print all primes between 1 and n
"""''', return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=200)
text = tokenizer.batch_decode(outputs)[0]
print(text)