Instructions to use Toivo0/gemma-3-finetune-thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Toivo0/gemma-3-finetune-thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Toivo0/gemma-3-finetune-thinking") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Toivo0/gemma-3-finetune-thinking") model = AutoModelForCausalLM.from_pretrained("Toivo0/gemma-3-finetune-thinking", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Toivo0/gemma-3-finetune-thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Toivo0/gemma-3-finetune-thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Toivo0/gemma-3-finetune-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Toivo0/gemma-3-finetune-thinking
- SGLang
How to use Toivo0/gemma-3-finetune-thinking with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Toivo0/gemma-3-finetune-thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Toivo0/gemma-3-finetune-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Toivo0/gemma-3-finetune-thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Toivo0/gemma-3-finetune-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use Toivo0/gemma-3-finetune-thinking with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
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 Toivo0/gemma-3-finetune-thinking to start chatting
Install Unsloth Studio (Windows)
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 Toivo0/gemma-3-finetune-thinking to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Toivo0/gemma-3-finetune-thinking to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Toivo0/gemma-3-finetune-thinking", max_seq_length=2048, ) - Docker Model Runner
How to use Toivo0/gemma-3-finetune-thinking with Docker Model Runner:
docker model run hf.co/Toivo0/gemma-3-finetune-thinking
Gemma-3-1B İstatistik Fine-Tune (Türkçe Chain-of-Thought, Muhakemeli Varyant)
Bu model, Google'ın Gemma-3-1B-IT modeli üzerine Türkçe istatistik konularında görünür düşünce zinciri (chain-of-thought) üreterek cevap vermesi için fine-tune edilmiştir. Model, nihai cevabını vermeden önce <think>...</think> etiketleri arasında iç muhakeme sürecini açıkça yazar, ardından bu muhakemeye dayanan nihai açıklamasını sunar.
Bu, aynı veri setiyle eğitilmiş Toivo0/gemma-3-finetune modelinin muhakemeli (thinking) varyantıdır. Kardeş model doğrudan/kısa cevap üretirken, bu model önce düşünce sürecini görünür şekilde yazar. İki varyant, hangi yaklaşımın istatistik eğitimi senaryosu için daha uygun olduğunu karşılaştırmak amacıyla aynı veri ve aynı split ile paralel olarak eğitilmiştir.
Model Bilgileri
| Base Model | unsloth/gemma-3-1b-it-unsloth-bnb-4bit |
| Eğitim Veri Seti | Toivo0/Turkce-istatistik-reasoning (400 soru-cevap çifti) |
| Muhakeme Formatı | <think>...</think> + nihai cevap |
| Kardeş Model (thinking'siz) | Toivo0/gemma-3-finetune |
| Geliştirici | Toivo0 |
| Dil | Türkçe |
| Lisans | Apache-2.0 |
| Eğitim Aracı | Unsloth + HuggingFace TRL |
Eğitim Veri Seti Hakkında
Model, 7 istatistik modülünü kapsayan 400 soru-cevap çiftiyle eğitilmiştir. Veri setindeki her örnek, bir kullanıcı sorusu ve modelin hem iç muhakeme sürecini (thinking) hem de nihai açıklamasını (content) içeren bir asistan yanıtından oluşur. Bu varyantta, thinking alanı eğitim hedefine <think>...</think> etiketleri arasına yerleştirilerek dahil edilmiştir — yani model, cevap vermeden önce muhakeme adımlarını üretmeyi de öğrenmiştir.
Kapsanan Konular:
| Modül | Konu | Soru Sayısı |
|---|---|---|
| 1 | İstatistiğin Temelleri | 51 |
| 2 | Betimsel İstatistik | 50 |
| 3 | Olasılık | 55 |
| 4 | Olasılık Dağılımları | 51 |
| 5 | Örnekleme ve Tahmin | 59 |
| 6 | Hipotez Testleri | 89 |
| 7 | Regresyon ve Korelasyon | 45 |
Kullanım
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "Toivo0/gemma-3-finetune_deneme"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
messages = [{"role": "user", "content": "Hipotez testinde p-değeri ne anlama gelir?"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
# Not: muhakeme adimi cevaba ekleniyor, bu yuzden thinking'siz varyanta gore
# daha fazla token payi birakmak gerekir.
outputs = model.generate(**inputs, max_new_tokens=900, do_sample=False)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
Çıktı Formatı
Model, cevabını şu şekilde yapılandırır:
<think>
(modelin iç muhakeme süreci — soruyu nasıl ele aldığı, hangi kavramları
göz önünde bulundurduğu)
</think>
(nihai, kullanıcıya gösterilecek açıklama)
Sadece nihai cevabı almak isterseniz </think> etiketinden sonrasını ayıklayabilirsiniz:
if "</think>" in response:
nihai_cevap = response.split("</think>", 1)[1].strip()
else:
nihai_cevap = response.strip()
Benchmark Sonuçları
Bu varyantın genel Türkçe MMLU ve istatistiğe özel benchmark sonuçları henüz eklenmemiştir. Toivo0/gemma-3-finetune (thinking'siz kardeş model) ile karşılaştırmalı sonuçlar yakında bu bölüme eklenecektir.
Bilinen Sınırlamalar
- Muhakeme adımı, thinking'siz varyanta göre çıktı uzunluğunu ve üretim süresini belirgin şekilde artırır.
- Model 1B parametreli küçük bir dil modelidir; muhakeme adımları bazen yüzeysel veya tekrarlayıcı olabilir.
- Veri setinin bu sürümü hesaplama (sayısal problem çözme) sorularını içermez.
This gemma3_text model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 50
Model tree for Toivo0/gemma-3-finetune-thinking
Base model
google/gemma-3-1b-pt