Downloads · 30 days
34
6% of all-time downloads
sayhan/Qwen1.5-7B-turkish-lora
Qwen1.5-7B-turkish-lora is a text generation model from sayhan. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
Downloads · 30 days
34
6% of all-time downloads
All-time downloads
532
Public
Parameters
7.7B
30.9 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin15.4 GB · 50%
From the Hugging Face model README

Orijinal model: Qwen1.5-7B-chat
Bu model, Alibaba Cloud tarafından geliştirilen Qwen1.5-7B-chat modelinin, TFLai/Turkish-Alpaca veri seti ve LoRA tekniği kullanılarak ince ayar çekilmiş versiyonudur.
Sistem mesajı: Sen yardımsever bir asistansın.
İstem: DNA'nın ne olduğunu kısaca açıkla.
Yanıt: DNA, Dünya'da yaşam için temel olan bir molekül türüdür ve genetik bilginin kodlaması için kullanılır. Genetik bilgiyi taşıyan çift sarmallı bir molekül olarak düşünülebilir. Her canlı organizmanın DNA'sı farklıdır, ancak her ikisi de aynı talimatları içeren benzersiz bir kimlik kodu içerir. DNA ayrıca hücrelerdeki protein üretimini yönlendiren en önemli moleküldür.
Modeli aşağıdaki düğmeye tıklayarak Google Colab'de çalıştırabilirsiniz.
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto
model = AutoModelForCausalLM.from_pretrained(
"sayhan/Qwen1.5-7B-turkish-lora",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("sayhan/Qwen1.5-7B-turkish-lora")
prompt = "DNA'nın ne olduğunu kısaca açıkla." # "İsteminizi buraya girin"
messages = [
{"role": "system", "content": "Sen yardımsever bir asistansın."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response) # Cevabı görüntüleyin