Instructions to use Efe2898/gemma3-1b-moe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Efe2898/gemma3-1b-moe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Efe2898/gemma3-1b-moe") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Efe2898/gemma3-1b-moe", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Efe2898/gemma3-1b-moe with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Efe2898/gemma3-1b-moe" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Efe2898/gemma3-1b-moe", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Efe2898/gemma3-1b-moe
- SGLang
How to use Efe2898/gemma3-1b-moe 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 "Efe2898/gemma3-1b-moe" \ --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": "Efe2898/gemma3-1b-moe", "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 "Efe2898/gemma3-1b-moe" \ --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": "Efe2898/gemma3-1b-moe", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Efe2898/gemma3-1b-moe with Docker Model Runner:
docker model run hf.co/Efe2898/gemma3-1b-moe
Gemma 3 MoE Base
Bu repo, Efe2898/gemma3-1b-sft-reasoning-2 tabanlı dense modelin MoE yapısına çevrilmiş base sürümünü içerir.
Kısaca: dense MLP katmanları MoE ile değiştirildi, 4 expert kullanıldı ve top-1 routing tercih edildi. Expert ağırlıkları sıfırdan rastgele başlatılmadı; dense modelin MLP ağırlıklarından türetildi. Amaç, sıfırdan yeni bir model sunmak değil, devam eğitimi için düzgün bir MoE başlangıç noktası oluşturmaktı.
Bu model ne için var?
Bu model doğrudan son kullanıcıya hitap eden bir chat modeli değil. Daha çok şu işler için uygun:
- continued pretraining
- SFT / reasoning fine-tuning
- Türkçe-İngilizce adaptasyon
- MoE mimarisi denemeleri
- router / expert davranışı inceleme
Mimari
- expert sayısı: 4
- routing: top-1
- tür: base model
Önemli not
Bu checkpoint bir base MoE checkpointi.
Yani doğrudan “hazır asistan” gibi kullanılmak için hazırlanmadı. Eğitim almadan çıktılar dengesiz, tekrar eden veya zayıf olabilir. Gerçek performans için üstüne CPT ve/veya SFT yapılması gerekir.
Kullanım
Custom config/model dosyaları varsa trust_remote_code=True gerekebilir.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "Efe2898/REPO_ADI"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto"
)
prompt = "Türkiye hakkında kısa bir paragraf yaz."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(out[0], skip_special_tokens=True))
- Downloads last month
- 4
Model tree for Efe2898/gemma3-1b-moe
Base model
Efe2898/gemma3-1b-sft-reasoning-2