Downloads · 30 days
11
14% of all-time downloads
hajili/zephyr-7b-beta-azerbaijani-dolly-instruct
zephyr-7b-beta-azerbaijani-dolly-instruct is a machine learning model from hajili. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as mit.
This model was built via parameter-efficient finetuning of the HuggingFaceH4/zephyr-7b-beta base model on the first 8k rows in w95/databricks-dolly-15k-az.
Downloads · 30 days
11
14% of all-time downloads
All-time downloads
77
Public
Repo size
605 MB
Likes
2
Public
Click a slice to open those files.
.safetensors604 MB · 100%
From the Hugging Face model README
This model was built via parameter-efficient finetuning of the HuggingFaceH4/zephyr-7b-beta base model on the first 8k rows in w95/databricks-dolly-15k-az.
The following bitsandbytes quantization config was used during training:
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM
config = PeftConfig.from_pretrained("hajili/zephyr-7b-beta-dolly-azerbaijani")
model = AutoModelForCausalLM.from_pretrained("HuggingFaceH4/zephyr-7b-beta", device_map='auto', torch_dtype=torch.bfloat16)
model = PeftModel.from_pretrained(model, "hajili/zephyr-7b-beta-dolly-azerbaijani")
tokenizer = transformers.AutoTokenizer.from_pretrained(
"hajili/zephyr-7b-beta-dolly-azerbaijani",
)
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = 'right'
system_message = "Bakı şəhərinin əhalisi neçə milyondur?"
user_message = "Azərbaycanın paytaxtı Bakı şəhəridir. Onun əhalisi 3 milyondur. Bakı Xəzər dənizi sahilində yerləşir."
prompt = f"<|system|>\n{system_message}\n<|user|>\n{user_message}\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors='pt', return_attention_mask=False)
output_ids = model.generate(**inputs, max_length=200)
answer = tokenizer.batch_decode(output_ids)[0]
print(answer) #Bakı şəhərinin əhalisi 3 milyondur.
system_message = "Təbiət haqqında şeir yaz."
user_message = ""
prompt = f"<|system|>\n{system_message}\n<|user|>\n{user_message}\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors='pt', return_attention_mask=False)
output_ids = model.generate(**inputs, max_length=200)
answer = tokenizer.batch_decode(output_ids)[0]
print(answer)
#Günəşin yanında, göy qurşağının rəngləri,
#Yeni bir günün doğulması,
#Həyat başlayır,
#Bir yeni səyahətə başlayın.
#
#Günəşin yanında, göy qurşağının rəngləri,
#Rənglər dəyiş,
#Həyat dəyişir,
#Və məni tərk edir.