Downloads · 30 days
21
1% of all-time downloads
Metin/gemma-2b-tr-inst
gemma-2b-tr-inst is a text generation model from Metin. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
gemma-2b-tr fine-tuned with Turkish Instruction-Response pairs.
Downloads · 30 days
21
1% of all-time downloads
All-time downloads
2.7K
Public
Repo size
10 GB
Likes
4
Public
Click a slice to open those files.
.bin5 GB · 100%
From the Hugging Face model README
gemma-2b-tr fine-tuned with Turkish Instruction-Response pairs.
The model is designed for Turkish instruction following and question answering. Its current response quality is limited, likely due to the small instruction set and model size. It is not recommended for real-world applications at this stage.
Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms Please refer to the gemma use restrictions before start using the model. https://ai.google.dev/gemma/terms#3.2-use
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Metin/gemma-2b-tr-inst")
model = AutoModelForCausalLM.from_pretrained("Metin/gemma-2b-tr-inst")
system_prompt = "You are a helpful assistant. Always reply in Turkish."
instruction = "Ankara hangi ülkenin başkentidir?"
prompt = f"{system_prompt} [INST] {instruction} [/INST]"
input_ids = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**input_ids)
print(tokenizer.decode(outputs[0]))
As it can be seen from the above example instructions should be framed within the following structure:
SYSTEM_PROMPT [INST] <Your instruction here> [/INST]