rezanaltjetlink commited on
Commit
3d3ca76
·
verified ·
1 Parent(s): 1b03833

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +663 -0
README.md ADDED
@@ -0,0 +1,663 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ tags:
5
+ - gemma
6
+ - gemma4
7
+ - multimodal
8
+ - vision-language
9
+ - conversational
10
+ - transformers
11
+ - vllm
12
+ - sglang
13
+ - function-calling
14
+ - reasoning
15
+ pipeline_tag: image-text-to-text
16
+ base_model: google/gemma-4-31b-it
17
+ ---
18
+
19
+ # JetLLMLite-4.0
20
+
21
+ **JetLLMLite-4.0** is a multimodal instruction-tuned model published by **Jetlink**, built on top of [google/gemma-4-31b-it](https://huggingface.co/google/gemma-4-31b-it) as its base model.
22
+
23
+ It is intended for teams that want to manage deployment, access, and internal distribution from their own namespace while preserving compatibility with the original upstream model ecosystem.
24
+
25
+ ## Model Summary
26
+
27
+ JetLLMLite-4.0 is a 31B dense multimodal model with:
28
+
29
+ - **31B total parameters (dense architecture)**
30
+ - **Instruction-tuned (IT) variant**
31
+ - **256,144 tokens context length**
32
+ - **Multimodal: text + image input, text output**
33
+ - **Video understanding support (up to 60 seconds at 1 fps)**
34
+ - **Built-in reasoning / thinking mode**
35
+ - **Native function calling support**
36
+ - **Support for 140+ languages**
37
+ - Compatibility with **Transformers**, **vLLM**, **SGLang**, **llama.cpp**, **MLX**, **Ollama**
38
+
39
+ ## Intended Use
40
+
41
+ This model is suitable for advanced workloads such as:
42
+
43
+ - multimodal chat assistants
44
+ - long-context document and PDF understanding
45
+ - reasoning and step-by-step problem solving
46
+ - agentic workflows with function calling
47
+ - coding assistants and code generation
48
+ - image, chart, and OCR tasks
49
+ - multilingual enterprise assistants
50
+ - research and benchmarking
51
+
52
+ ## Model Details
53
+
54
+ ### Architecture
55
+
56
+ - **Model type:** Dense Causal Language Model with Vision Encoder
57
+ - **Training stage:** Pre-training & Post-training (Instruction-tuned)
58
+ - **Total parameters:** 31B
59
+ - **Architecture style:** Dense (not MoE)
60
+ - **Attention mechanism:** Hybrid — alternating local sliding-window (1024 tokens) and global full-context attention
61
+ - **RoPE:** Dual config — standard RoPE for sliding layers, Proportional RoPE (p-RoPE) for global layers
62
+ - **Per-Layer Embeddings (PLE):** Yes
63
+ - **Shared KV Cache:** Yes (last N layers reuse KV states from earlier layers)
64
+ - **Native context length:** 256,144 tokens
65
+ - **Vision encoder:** Variable aspect ratio; configurable token budgets (70 / 140 / 280 / 560 / 1120 tokens)
66
+ - **Thinking mode:** Configurable via `<|think|>` token in system prompt
67
+
68
+ ### Ecosystem Compatibility
69
+
70
+ - Hugging Face Transformers
71
+ - vLLM
72
+ - SGLang
73
+ - llama.cpp
74
+ - MLX
75
+ - Ollama
76
+ - mistral.rs
77
+ - LM Studio
78
+
79
+ ## Hardware Requirements
80
+
81
+ > JetLLMLite-4.0 is a **single-GPU capable** model at full precision (bfloat16), making it significantly more accessible than large MoE or 100B+ scale models.
82
+
83
+ ### Reference Hardware
84
+
85
+ Approximate GPU memory requirements (bfloat16 / full precision):
86
+
87
+ - **Unquantized (bfloat16):** fits on a single 80GB NVIDIA H100/H200 GPU
88
+ - **4-bit quantized:** runs on consumer GPUs with 24GB+ VRAM (e.g. RTX 3090, RTX 4090)
89
+ - **Multi-GPU:** tensor parallelism supported via vLLM and SGLang for higher throughput
90
+
91
+ > Note: requirements vary based on context length, batch size, and KV cache settings. The above are practical reference points, not universal minimums.
92
+
93
+ ### Practical Guidance
94
+
95
+ #### Single GPU deployment
96
+
97
+ Unlike large-scale MoE models, JetLLMLite-4.0 can be served from a **single 80GB datacenter GPU** at full precision — making it an excellent fit for single-node or cost-conscious deployment scenarios.
98
+
99
+ For consumer-grade hardware, quantized variants (GGUF, GPTQ, AWQ) significantly reduce memory requirements with minimal quality loss.
100
+
101
+ #### Text-only deployment
102
+
103
+ Use the `--language-model-only` flag in vLLM to skip vision encoder profiling and free additional KV cache memory when your workload is purely text-based.
104
+
105
+ ### Recommendation
106
+
107
+ For most production teams:
108
+
109
+ 1. start with **vLLM** or **SGLang** for serving
110
+ 2. use a **single H100/H200** for unquantized bfloat16 deployment
111
+ 3. use **4-bit quantization** for consumer GPU or cost-optimized deployments
112
+ 4. disable vision if not needed via `--language-model-only`
113
+
114
+ ## Software Requirements
115
+
116
+ Recommended environment:
117
+
118
+ - Python 3.10+
119
+ - Linux
120
+ - CUDA-enabled GPU infrastructure
121
+ - One of the following runtimes:
122
+ - Transformers (`>= 4.51.0` required for Gemma 4)
123
+ - vLLM
124
+ - SGLang
125
+ - llama.cpp
126
+
127
+ Common dependencies:
128
+
129
+ - `torch`
130
+ - `transformers >= 4.51.0`
131
+ - `torchvision`
132
+ - `pillow`
133
+ - `accelerate`
134
+
135
+ ## Quickstart
136
+
137
+ Install Transformers:
138
+
139
+ pip install "transformers>=4.51.0"
140
+
141
+ ### Basic text inference
142
+
143
+ from transformers import pipeline
144
+ import torch
145
+
146
+ pipe = pipeline(
147
+ "image-text-to-text",
148
+ model="Jetlink/JetLLMLite-4.0",
149
+ device="cuda",
150
+ torch_dtype=torch.bfloat16
151
+ )
152
+
153
+ messages = [
154
+ {"role": "user", "content": [{"type": "text", "text": "What is the capital of France?"}]}
155
+ ]
156
+
157
+ output = pipe(messages, max_new_tokens=200)
158
+ print(output[0]["generated_text"][-1]["content"])
159
+
160
+ ### Multimodal inference (image + text)
161
+
162
+ from transformers import AutoProcessor, AutoModelForImageTextToText
163
+ import torch
164
+ from PIL import Image
165
+
166
+ model_id = "Jetlink/JetLLMLite-4.0"
167
+
168
+ processor = AutoProcessor.from_pretrained(model_id)
169
+ model = AutoModelForImageTextToText.from_pretrained(
170
+ model_id,
171
+ torch_dtype=torch.bfloat16,
172
+ device_map="auto"
173
+ )
174
+
175
+ image = Image.open("image.jpg")
176
+ messages = [
177
+ {
178
+ "role": "user",
179
+ "content": [
180
+ {"type": "image", "image": image},
181
+ {"type": "text", "text": "Describe this image in detail."}
182
+ ]
183
+ }
184
+ ]
185
+
186
+ inputs = processor.apply_chat_template(
187
+ messages,
188
+ add_generation_prompt=True,
189
+ tokenize=True,
190
+ return_tensors="pt"
191
+ ).to(model.device)
192
+
193
+ output = model.generate(**inputs, max_new_tokens=512)
194
+ print(processor.decode(output[0], skip_special_tokens=True))
195
+
196
+ ### Reasoning / Thinking mode
197
+
198
+ Enable thinking mode by adding `<|think|>` to the system prompt:
199
+
200
+ messages = [
201
+ {"role": "system", "content": "<|think|>"},
202
+ {"role": "user", "content": [{"type": "text", "text": "Solve: If x² + 5x + 6 = 0, what are the values of x?"}]}
203
+ ]
204
+
205
+ ## Serving Examples
206
+
207
+ ### vLLM
208
+
209
+ vllm serve Jetlink/JetLLMLite-4.0 \
210
+ --port 8000 \
211
+ --tensor-parallel-size 1 \
212
+ --max-model-len 32768 \
213
+ --dtype bfloat16
214
+
215
+ ### vLLM with Tool Use
216
+
217
+ vllm serve Jetlink/JetLLMLite-4.0 \
218
+ --port 8000 \
219
+ --tensor-parallel-size 1 \
220
+ --max-model-len 32768 \
221
+ --dtype bfloat16 \
222
+ --enable-auto-tool-choice \
223
+ --tool-call-parser gemma
224
+
225
+ ### vLLM text-only mode
226
+
227
+ vllm serve Jetlink/JetLLMLite-4.0 \
228
+ --port 8000 \
229
+ --tensor-parallel-size 1 \
230
+ --max-model-len 32768 \
231
+ --dtype bfloat16 \
232
+ --language-model-only
233
+
234
+ ### SGLang
235
+
236
+ python -m sglang.launch_server \
237
+ --model-path Jetlink/JetLLMLite-4.0 \
238
+ --port 8000 \
239
+ --tp-size 1 \
240
+ --mem-fraction-static 0.85 \
241
+ --context-length 32768 \
242
+ --dtype bfloat16
243
+
244
+ ### SGLang with Tool Use
245
+
246
+ python -m sglang.launch_server \
247
+ --model-path Jetlink/JetLLMLite-4.0 \
248
+ --port 8000 \
249
+ --tp-size 1 \
250
+ --mem-fraction-static 0.85 \
251
+ --context-length 32768 \
252
+ --dtype bfloat16 \
253
+ --tool-call-parser gemma4
254
+
255
+ ### llama.cpp
256
+
257
+ llama-server \
258
+ -m JetLLMLite-4.0.Q4_K_M.gguf \
259
+ --port 8080 \
260
+ -ngl 99 \
261
+ -c 8192
262
+
263
+ ## Long Context Notes
264
+
265
+ JetLLMLite-4.0 natively supports **256,144 tokens** of context.
266
+
267
+ The hybrid attention mechanism (alternating sliding-window and global attention) with Proportional RoPE (p-RoPE) enables efficient long-context processing without degradation. For most practical deployments, setting `--max-model-len` to a lower value (e.g. 32768) is recommended to manage KV cache memory pressure.
268
+
269
+ ## Thinking Mode Notes
270
+
271
+ JetLLMLite-4.0 supports configurable thinking mode inherited from the Gemma 4 architecture:
272
+
273
+ - **Thinking enabled:** add `<|think|>` token to the system prompt
274
+ - **Thinking disabled:** omit `<|think|>` from the system prompt
275
+
276
+ When thinking is enabled, the model outputs internal reasoning using `<|channel>thought\n[reasoning]<channel|>` before the final answer. In multi-turn conversations, thought content from previous turns should not be included before the next user turn.
277
+
278
+ ## Strengths
279
+
280
+ - single-GPU deployable at full precision (80GB H100/H200)
281
+ - strong multimodal capabilities (image, video, OCR, document parsing)
282
+ - built-in reasoning / thinking mode
283
+ - native function calling support
284
+ - 256K token context window
285
+ - 140+ language support
286
+ - broad compatibility with inference frameworks
287
+ - dense architecture — predictable and consistent performance
288
+
289
+ ## Limitations
290
+
291
+ - requires at least one high-memory GPU for unquantized deployment
292
+ - long context significantly increases KV cache memory pressure
293
+ - video understanding limited to 60 seconds at 1 fps
294
+ - multimodal usage adds memory overhead compared to text-only
295
+ - deployment characteristics depend on framework and quantization settings
296
+
297
+ ## Out-of-Scope / Cautionary Use
298
+
299
+ As with other frontier-scale multimodal models, outputs should be reviewed before use in:
300
+
301
+ - medical decision-making
302
+ - legal advice
303
+ - safety-critical automation
304
+ - high-stakes financial decisions
305
+ - fully autonomous customer actions without guardrails
306
+
307
+ Human review, policy controls, and tool-level validation are strongly recommended.
308
+
309
+ ## License
310
+
311
+ This repository follows the same license as the upstream release.
312
+
313
+ - **License:** Apache-2.0
314
+ - See the upstream Google Gemma repository and included license text for the governing terms.
315
+
316
+ If you redistribute, fine-tune, quantize, or otherwise modify this model, make sure your usage remains compliant with the upstream license and attribution requirements.
317
+
318
+ ## Attribution
319
+
320
+ Original model and research release by **Google DeepMind**.
321
+
322
+ Upstream model:
323
+ - `google/gemma-4-31b-it`
324
+
325
+ This repository is an organization-managed copy and is **not the original upstream source**.
326
+
327
+ ## Citation
328
+
329
+ Please cite the original Gemma 4 release when using this model in research, evaluation, or production documentation.
330
+
331
+ ```bibtex
332
+ @misc{gemma4,
333
+ title = {Gemma 4 Technical Report},
334
+ author = {Google DeepMind},
335
+ year = {2026},
336
+ publisher = {Google DeepMind},
337
+ howpublished = {\url{https://huggingface.co/google/gemma-4-31b-it}}
338
+ }
339
+ ```
340
+
341
+ ---
342
+
343
+ # JetLLMLite-4.0 (Türkçe)
344
+
345
+ **JetLLMLite-4.0**, **Jetlink** tarafından yayınlanan multimodal bir instruction-tuned modeldir. Base model olarak [google/gemma-4-31b-it](https://huggingface.co/google/gemma-4-31b-it) kullanılmıştır.
346
+
347
+ Bu depo; modeli kendi namespace'i altında yönetmek, erişimi kontrol etmek ve dağıtımı kolaylaştırmak isteyen ekipler için hazırlanmıştır.
348
+
349
+ ## Model Özeti
350
+
351
+ JetLLMLite-4.0, aşağıdaki özelliklere sahip 31B parametreli dense bir multimodal modeldir:
352
+
353
+ - **31B toplam parametre (dense mimari)**
354
+ - **Instruction-tuned (IT) varyant**
355
+ - **256.144 token bağlam uzunluğu**
356
+ - **Multimodal: metin + görüntü girişi, metin çıkışı**
357
+ - **Video anlama desteği (saniyede 1 kare, 60 saniyeye kadar)**
358
+ - **Yerleşik reasoning / thinking modu**
359
+ - **Native function calling desteği**
360
+ - **140+ dil desteği**
361
+ - **Transformers**, **vLLM**, **SGLang**, **llama.cpp**, **MLX**, **Ollama** ile uyumluluk
362
+
363
+ ## Kullanım Amacı
364
+
365
+ Bu model aşağıdaki gelişmiş kullanım senaryoları için uygundur:
366
+
367
+ - multimodal sohbet asistanları
368
+ - uzun bağlamlı doküman ve PDF anlama
369
+ - adım adım akıl yürütme ve problem çözme
370
+ - function calling ile agentic workflow yapıları
371
+ - kodlama asistanları ve kod üretimi
372
+ - görüntü, grafik ve OCR görevleri
373
+ - çok dilli kurumsal asistanlar
374
+ - araştırma ve benchmark çalışmaları
375
+
376
+ ## Model Detayları
377
+
378
+ ### Mimari
379
+
380
+ - **Model tipi:** Vision Encoder içeren Dense Causal Language Model
381
+ - **Eğitim aşaması:** Pre-training ve Post-training (Instruction-tuned)
382
+ - **Toplam parametre:** 31B
383
+ - **Mimari stili:** Dense (MoE değil)
384
+ - **Dikkat mekanizması:** Hibrit — local sliding-window (1024 token) ve global full-context attention
385
+ - **RoPE:** Çift konfigürasyon — sliding katmanlar için standart RoPE, global katmanlar için Proportional RoPE (p-RoPE)
386
+ - **Per-Layer Embeddings (PLE):** Evet
387
+ - **Paylaşılan KV Cache:** Evet
388
+ - **Yerel bağlam uzunluğu:** 256.144 token
389
+ - **Vision encoder:** Değişken en-boy oranı; yapılandırılabilir token bütçeleri (70 / 140 / 280 / 560 / 1120 token)
390
+ - **Thinking modu:** System prompt'a `<|think|>` token eklenerek etkinleştirilir
391
+
392
+ ### Ekosistem Uyumluluğu
393
+
394
+ - Hugging Face Transformers
395
+ - vLLM
396
+ - SGLang
397
+ - llama.cpp
398
+ - MLX
399
+ - Ollama
400
+ - mistral.rs
401
+ - LM Studio
402
+
403
+ ## Donanım Gereksinimleri
404
+
405
+ > JetLLMLite-4.0, tam hassasiyetle (bfloat16) **tek GPU'da çalışabilen** bir modeldir. Bu özelliği, büyük ölçekli MoE veya 100B+ modellerine kıyasla çok daha erişilebilir kılar.
406
+
407
+ ### Referans Donanım
408
+
409
+ Tahmini GPU bellek gereksinimleri (bfloat16 / tam hassasiyet):
410
+
411
+ - **Quantize edilmemiş (bfloat16):** tek bir 80GB NVIDIA H100/H200 GPU'ya sığar
412
+ - **4-bit quantize:** 24GB+ VRAM'li consumer GPU'larda çalışır (ör. RTX 3090, RTX 4090)
413
+ - **Çoklu GPU:** daha yüksek throughput için vLLM ve SGLang üzerinden tensor parallelism desteklenir
414
+
415
+ > Not: gereksinimler bağlam uzunluğu, batch size ve KV cache ayarlarına göre değişir. Yukarıdakiler pratik referans noktaları olup evrensel minimum değildir.
416
+
417
+ ### Pratik Rehber
418
+
419
+ #### Tek GPU dağıtımı
420
+
421
+ Büyük ölçekli MoE modellerinin aksine JetLLMLite-4.0, tam hassasiyetle **tek bir 80GB datacenter GPU'dan** servis edilebilir. Bu özellik, single-node veya maliyet odaklı dağıtım senaryoları için mükemmel bir seçenek sunar.
422
+
423
+ Consumer GPU'lar için quantize varyantlar (GGUF, GPTQ, AWQ) minimal kalite kaybıyla bellek gereksinimini önemli ölçüde azaltır.
424
+
425
+ #### Sadece metin kullanımı
426
+
427
+ vLLM'de `--language-model-only` bayrağını kullanarak vision encoder profiling'i atlayabilir ve KV cache için ek bellek açabilirsiniz.
428
+
429
+ ### Öneri
430
+
431
+ Çoğu production ekip için en mantıklı yaklaşım:
432
+
433
+ 1. serving için **vLLM** veya **SGLang** ile başlamak
434
+ 2. quantize edilmemiş bfloat16 dağıtım için **tek H100/H200** kullanmak
435
+ 3. consumer GPU veya maliyet optimize edilmiş dağıtımlar için **4-bit quantization** uygulamak
436
+ 4. vision gerekmiyorsa `--language-model-only` ile devre dışı bırakmak
437
+
438
+ ## Yazılım Gereksinimleri
439
+
440
+ Önerilen ortam:
441
+
442
+ - Python 3.10+
443
+ - Linux
444
+ - CUDA destekli GPU altyapısı
445
+ - Şu runtime'lardan biri:
446
+ - Transformers (`>= 4.51.0` — Gemma 4 için zorunlu)
447
+ - vLLM
448
+ - SGLang
449
+ - llama.cpp
450
+
451
+ Yaygın bağımlılıklar:
452
+
453
+ - `torch`
454
+ - `transformers >= 4.51.0`
455
+ - `torchvision`
456
+ - `pillow`
457
+ - `accelerate`
458
+
459
+ ## Hızlı Başlangıç
460
+
461
+ Transformers kurulumu:
462
+
463
+ pip install "transformers>=4.51.0"
464
+
465
+ ### Temel metin çıkarımı
466
+
467
+ from transformers import pipeline
468
+ import torch
469
+
470
+ pipe = pipeline(
471
+ "image-text-to-text",
472
+ model="Jetlink/JetLLMLite-4.0",
473
+ device="cuda",
474
+ torch_dtype=torch.bfloat16
475
+ )
476
+
477
+ messages = [
478
+ {"role": "user", "content": [{"type": "text", "text": "Fransa'nın başkenti neresidir?"}]}
479
+ ]
480
+
481
+ output = pipe(messages, max_new_tokens=200)
482
+ print(output[0]["generated_text"][-1]["content"])
483
+
484
+ ### Multimodal çıkarım (görüntü + metin)
485
+
486
+ from transformers import AutoProcessor, AutoModelForImageTextToText
487
+ import torch
488
+ from PIL import Image
489
+
490
+ model_id = "Jetlink/JetLLMLite-4.0"
491
+
492
+ processor = AutoProcessor.from_pretrained(model_id)
493
+ model = AutoModelForImageTextToText.from_pretrained(
494
+ model_id,
495
+ torch_dtype=torch.bfloat16,
496
+ device_map="auto"
497
+ )
498
+
499
+ image = Image.open("goruntu.jpg")
500
+ messages = [
501
+ {
502
+ "role": "user",
503
+ "content": [
504
+ {"type": "image", "image": image},
505
+ {"type": "text", "text": "Bu görseli detaylı olarak açıkla."}
506
+ ]
507
+ }
508
+ ]
509
+
510
+ inputs = processor.apply_chat_template(
511
+ messages,
512
+ add_generation_prompt=True,
513
+ tokenize=True,
514
+ return_tensors="pt"
515
+ ).to(model.device)
516
+
517
+ output = model.generate(**inputs, max_new_tokens=512)
518
+ print(processor.decode(output[0], skip_special_tokens=True))
519
+
520
+ ### Reasoning / Thinking modu
521
+
522
+ Thinking modunu etkinleştirmek için system prompt'a `<|think|>` ekleyin:
523
+
524
+ messages = [
525
+ {"role": "system", "content": "<|think|>"},
526
+ {"role": "user", "content": [{"type": "text", "text": "x² + 5x + 6 = 0 denkleminin kökleri nelerdir?"}]}
527
+ ]
528
+
529
+ ## Serving Örnekleri
530
+
531
+ ### vLLM
532
+
533
+ vllm serve Jetlink/JetLLMLite-4.0 \
534
+ --port 8000 \
535
+ --tensor-parallel-size 1 \
536
+ --max-model-len 32768 \
537
+ --dtype bfloat16
538
+
539
+ ### vLLM Tool Use ile
540
+
541
+ vllm serve Jetlink/JetLLMLite-4.0 \
542
+ --port 8000 \
543
+ --tensor-parallel-size 1 \
544
+ --max-model-len 32768 \
545
+ --dtype bfloat16 \
546
+ --enable-auto-tool-choice \
547
+ --tool-call-parser gemma
548
+
549
+ ### vLLM sadece metin modu
550
+
551
+ vllm serve Jetlink/JetLLMLite-4.0 \
552
+ --port 8000 \
553
+ --tensor-parallel-size 1 \
554
+ --max-model-len 32768 \
555
+ --dtype bfloat16 \
556
+ --language-model-only
557
+
558
+ ### SGLang
559
+
560
+ python -m sglang.launch_server \
561
+ --model-path Jetlink/JetLLMLite-4.0 \
562
+ --port 8000 \
563
+ --tp-size 1 \
564
+ --mem-fraction-static 0.85 \
565
+ --context-length 32768 \
566
+ --dtype bfloat16
567
+
568
+ ### SGLang Tool Use ile
569
+
570
+ python -m sglang.launch_server \
571
+ --model-path Jetlink/JetLLMLite-4.0 \
572
+ --port 8000 \
573
+ --tp-size 1 \
574
+ --mem-fraction-static 0.85 \
575
+ --context-length 32768 \
576
+ --dtype bfloat16 \
577
+ --tool-call-parser gemma4
578
+
579
+ ### llama.cpp
580
+
581
+ llama-server \
582
+ -m JetLLMLite-4.0.Q4_K_M.gguf \
583
+ --port 8080 \
584
+ -ngl 99 \
585
+ -c 8192
586
+
587
+ ## Uzun Bağlam Notları
588
+
589
+ JetLLMLite-4.0 yerel olarak **256.144 token** destekler.
590
+
591
+ Hibrit dikkat mekanizması (alternatif sliding-window ve global attention) ve Proportional RoPE (p-RoPE) sayesinde verimli uzun bağlam işleme sağlanır. Çoğu production dağıtımında KV cache bellek baskısını yönetmek için `--max-model-len` değerini daha düşük tutmak (ör. 32768) önerilir.
592
+
593
+ ## Thinking Modu Notları
594
+
595
+ JetLLMLite-4.0, Gemma 4 mimarisinden gelen yapılandırılabilir thinking modunu destekler:
596
+
597
+ - **Thinking etkin:** system prompt'a `<|think|>` token ekleyin
598
+ - **Thinking devre dışı:** `<|think|>` tokenını system prompt'tan çıkarın
599
+
600
+ Thinking etkinleştirildiğinde model, nihai yanıttan önce `<|channel>thought\n[akıl yürütme]<channel|>` yapısıyla iç mantığını çıktılar. Çok turlu konuşmalarda önceki turların thought içeriği bir sonraki kullanıcı turuna dahil edilmemelidir.
601
+
602
+ ## Güçlü Yönler
603
+
604
+ - tam hassasiyetle tek GPU'da dağıtılabilir (80GB H100/H200)
605
+ - güçlü multimodal yetenekler (görüntü, video, OCR, doküman ayrıştırma)
606
+ - yerleşik reasoning / thinking modu
607
+ - native function calling desteği
608
+ - 256K token bağlam penceresi
609
+ - 140+ dil desteği
610
+ - inference framework'leriyle geniş uyumluluk
611
+ - dense mimari — öngörülebilir ve tutarlı performans
612
+
613
+ ## Sınırlamalar
614
+
615
+ - quantize edilmemiş dağıtım için en az bir yüksek belleğe sahip GPU gerektirir
616
+ - uzun bağlam KV cache bellek baskısını ciddi ölçüde artırır
617
+ - video anlama, saniyede 1 kare hızında 60 saniyeyle sınırlıdır
618
+ - multimodal kullanım metin çıkarımına kıyasla ek bellek maliyeti getirir
619
+ - deployment karakteristiği framework ve quantization ayarlarına göre değişir
620
+
621
+ ## Kapsam Dışı / Dikkat Gerektiren Kullanımlar
622
+
623
+ Diğer frontier-scale multimodal modellerde olduğu gibi, model çıktıları şu alanlarda insan denetimi olmadan kullanılmamalıdır:
624
+
625
+ - tıbbi karar verme
626
+ - hukuki tavsiye
627
+ - güvenlik kritik otomasyon
628
+ - yüksek riskli finansal kararlar
629
+ - korumasız tam otonom müşteri aksiyonları
630
+
631
+ İnsan incelemesi, politika kontrolleri ve tool seviyesinde doğrulama güçlü şekilde önerilir.
632
+
633
+ ## Lisans
634
+
635
+ Bu depo, upstream sürümle aynı lisansı takip eder.
636
+
637
+ - **Lisans:** Apache-2.0
638
+ - Geçerli şartlar için upstream Google Gemma deposu ve lisans metni incelenmelidir.
639
+
640
+ Modeli yeniden dağıtıyor, fine-tune ediyor, quantize ediyor veya başka şekilde değiştiriyorsan; kullanımının upstream lisans ve attribution gereklilikleriyle uyumlu olduğundan emin olmalısın.
641
+
642
+ ## Atıf
643
+
644
+ Orijinal model ve araştırma yayını **Google DeepMind** ekibine aittir.
645
+
646
+ Upstream model:
647
+ - `google/gemma-4-31b-it`
648
+
649
+ Bu depo, kurum tarafından yönetilen bir kopyadır ve **orijinal upstream kaynak değildir**.
650
+
651
+ ## Atıf / Citation
652
+
653
+ Bu modeli araştırma, değerlendirme veya production dokümantasyonunda kullanıyorsan, lütfen orijinal Gemma 4 sürümüne atıf yap.
654
+
655
+ ```bibtex
656
+ @misc{gemma4,
657
+ title = {Gemma 4 Technical Report},
658
+ author = {Google DeepMind},
659
+ year = {2026},
660
+ publisher = {Google DeepMind},
661
+ howpublished = {\url{https://huggingface.co/google/gemma-4-31b-it}}
662
+ }
663
+ ```