malhajar/arc-tr
Viewer • Updated • 7.78k • 241 • 8
How to use uisikdag/gemma3-1b-arc-tr with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("uisikdag/gemma3-1b-arc-tr", dtype="auto")How to use uisikdag/gemma3-1b-arc-tr with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for uisikdag/gemma3-1b-arc-tr to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for uisikdag/gemma3-1b-arc-tr to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for uisikdag/gemma3-1b-arc-tr to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="uisikdag/gemma3-1b-arc-tr",
max_seq_length=2048,
)This gemma3_text model was trained 2x faster with Unsloth
from unsloth import FastModel
from unsloth.chat_templates import get_chat_template
# Load model
model, tokenizer = FastModel.from_pretrained(
"uisikdag/gemma3-1b-arc-tr",
max_seq_length=2048,
load_in_4bit=True,
)
tokenizer = get_chat_template(tokenizer, chat_template="gemma-3")
FastModel.for_inference(model)
# Predict
question = "Fotosentez sırasında bitkiler hangi gazı üretir?"
options = ["A Karbondioksit", "B Oksijen", "C Azot", "D Hidrojen"]
prompt = f"Soru: {question}\n\nSecenekler:\n" + "\n".join(options) + "\n\nDogru cevap hangisi?"
messages = [{"role": "user", "content": [{"type": "text", "text": prompt}]}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**inputs, max_new_tokens=64, temperature=1.0, top_p=0.95)
response = tokenizer.decode(outputs[0], skip_special_tokens=True).split("model")[-1].strip()
print(f"Cevap: {response}")
Base model
google/gemma-3-1b-pt