Text Generation
Transformers
Safetensors
Turkish
English
gemma4
image-text-to-text
turkish
türkçe
Mixture of Experts
pruned
gemma
bf16
conversational
Instructions to use esokullu/gemma4-turkish-26b-a4b-pruned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use esokullu/gemma4-turkish-26b-a4b-pruned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="esokullu/gemma4-turkish-26b-a4b-pruned") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("esokullu/gemma4-turkish-26b-a4b-pruned") model = AutoModelForImageTextToText.from_pretrained("esokullu/gemma4-turkish-26b-a4b-pruned") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use esokullu/gemma4-turkish-26b-a4b-pruned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "esokullu/gemma4-turkish-26b-a4b-pruned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "esokullu/gemma4-turkish-26b-a4b-pruned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/esokullu/gemma4-turkish-26b-a4b-pruned
- SGLang
How to use esokullu/gemma4-turkish-26b-a4b-pruned 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 "esokullu/gemma4-turkish-26b-a4b-pruned" \ --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": "esokullu/gemma4-turkish-26b-a4b-pruned", "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 "esokullu/gemma4-turkish-26b-a4b-pruned" \ --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": "esokullu/gemma4-turkish-26b-a4b-pruned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use esokullu/gemma4-turkish-26b-a4b-pruned with Docker Model Runner:
docker model run hf.co/esokullu/gemma4-turkish-26b-a4b-pruned
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,7 +23,7 @@ korundu** (~%21 küçülme), ardından Türkçe + kod + matematik karışık tal
|
|
| 23 |
veriseti üzerinde LoRA ile iyileştirildi.
|
| 24 |
|
| 25 |
GGUF (llama.cpp / Ollama / LM Studio) versiyonu için:
|
| 26 |
-
**[gemma4-
|
| 27 |
|
| 28 |
## Donanım Gereksinimleri
|
| 29 |
|
|
@@ -32,7 +32,7 @@ GGUF (llama.cpp / Ollama / LM Studio) versiyonu için:
|
|
| 32 |
|
| 33 |
## Kullanım
|
| 34 |
|
| 35 |
-
|
| 36 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 37 |
import torch
|
| 38 |
|
|
@@ -51,7 +51,7 @@ enc = tok.apply_chat_template(msgs, return_tensors="pt", add_generation_prompt=T
|
|
| 51 |
out = model.generate(**enc, max_new_tokens=400, do_sample=True,
|
| 52 |
temperature=0.7, top_p=0.9, repetition_penalty=1.1)
|
| 53 |
print(tok.decode(out[0][enc["input_ids"].shape[-1]:], skip_special_tokens=True))
|
| 54 |
-
|
| 55 |
|
| 56 |
## Eğitim Detayları
|
| 57 |
|
|
|
|
| 23 |
veriseti üzerinde LoRA ile iyileştirildi.
|
| 24 |
|
| 25 |
GGUF (llama.cpp / Ollama / LM Studio) versiyonu için:
|
| 26 |
+
**[gemma4-turkish-26b-a4b-pruned-gguf](https://huggingface.co/esokullu/gemma4-turkish-26b-a4b-pruned-gguf)**
|
| 27 |
|
| 28 |
## Donanım Gereksinimleri
|
| 29 |
|
|
|
|
| 32 |
|
| 33 |
## Kullanım
|
| 34 |
|
| 35 |
+
```python
|
| 36 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 37 |
import torch
|
| 38 |
|
|
|
|
| 51 |
out = model.generate(**enc, max_new_tokens=400, do_sample=True,
|
| 52 |
temperature=0.7, top_p=0.9, repetition_penalty=1.1)
|
| 53 |
print(tok.decode(out[0][enc["input_ids"].shape[-1]:], skip_special_tokens=True))
|
| 54 |
+
```
|
| 55 |
|
| 56 |
## Eğitim Detayları
|
| 57 |
|