/ Модель

Характеристики

Контекст
131 072 токена
Параметры
1,4 млрд
Лицензия
Apache 2.0
Архитектура
gemma4_text · dense
Базовая модель
gemma-4-E2B-it-text-only-128k-pruned
Библиотека
transformers
Опубликована
27 окт 2026

sindhi-gemma-4-E2B-it-128k-sft

Генерация текстаТекст → текст5 профессий
106скачиваний за 30 дней1лайквеса обновлены1 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Текстовая Gemma 4, дообученная для диалога, ответов и перевода с акцентом на синди и уменьшенным словарём токенизатора.

Kashif786/sindhi-gemma-4-E2B-it-128k-sft — текстовая инструкция-модель Gemma 4, дообученная методом SFT на датасете Sindhi-Assistant-IFT-1500 для работы прежде всего с синди. В метаданных указаны 1,4 млрд параметров, контекст до 131 072 токенов, формат safetensors и лицензия Apache-2.0.

Модель предназначена для диалога и следования инструкциям: она отвечает на вопросы, помогает с учебными заданиями и пишет тексты на синди. Также подходит для перевода между английским, урду и синди, а README сообщает об улучшениях на тестах перевода, суммаризации и морфосинтаксической разметки. В README описано удаление мультимодальных слоёв и сокращение словаря токенизатора вдвое; модель принимает и генерирует текст.

По заявлению авторов, сокращение словаря уменьшило размер чекпойнта и расход видеопамяти, сохранив результат на тесте чтения Belebele на прежнем уровне. Ограничения: модель ориентирована на литературный синди на персо-арабской графике, и качество может снижаться на местных разговорных диалектах; для актуальных сведений README рекомендует подключать внешний поиск или RAG.

Сценарии применения

  • ответы на вопросы и диалог на синди
  • перевод с английского на синди
  • перевод с урду на синди
  • суммаризация текстов на синди
  • помощь в изучении грамматики и литературы на синди
  • генерация текстов на синди при локальном запуске

Ограничения

Оптимизирована для литературного синди на персо-арабской графике; качество на разговорных диалектах, включая ласи и качи, может быть ниже. Для ответов о недавних событиях может потребоваться внешний поиск или RAG.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

🌸 Sindhi Gemma 4 E2B IT (128k Pruned, SFT)

Hugging Face Model Dataset License: Apache 2.0 Vocabulary VRAM Footprint Precision

sindhi-gemma-4-E2B-it-128k-sft is a state-of-the-art, instruction-fine-tuned, lightweight language model engineered specifically for the Sindhi language (سنڌي).

Built upon Google's Gemma 4 2B architecture, this model introduces two groundbreaking milestones for low-resource NLP:

  1. Structural Vocabulary & Modality Pruning: The vocabulary was cleanly pruned by 50.0% (from 262,144 down to 131,072 tokens) while completely removing multimodal/vision parameters, reducing VRAM usage by 36.3% and active GPU power by 28.9% with zero degradation on strict reasoning benchmarks.
  2. Culturally Grounded Supervised Fine-Tuning (SFT): Fine-tuned on the audited dataset Kashif786/Sindhi-Assistant-IFT-1500 covering 380+ distinct academic, legal, cultural, and everyday domains in authentic Perso-Arabic Sindhi script with strict ASCII numerals (0-9).

⚡ Key Highlights & Benchmark Victories

  • Universal Dependencies (UD_Sindhi-Isra): Achieved 73.00% UPOS zero-shot grammatical accuracy on the official Sindhi treebank (curated by Dr. Mutee U Rahman), outperforming the standard Gemma baseline (66.00%) by +10.61% relative (+7.00% absolute).
  • Strict Semantic Parity (Belebele snd_Arab): Maintained an identical 45.00% reading comprehension accuracy on the standardized 100-question test set, demonstrating that reducing the vocabulary by 50% incurred zero cognitive or reasoning loss.
  • Dramatic Cross-Lingual Translation & Purity Boost:
    • English to Sindhi translation ChrF++ skyrocketed from 14.88 (Base collapsed into English commentary) to 52.08 (+249.9% gain).
    • Urdu to Sindhi translation ChrF++ jumped from 52.74 to 72.63.
    • Text summarization ChrF++ advanced from 38.78 to 58.08.
  • Green AI & Resource Efficiency:
    • Disk Checkpoint Footprint: Reduced from 10.20 GB → 6.51 GB (-36.2%).
    • Static VRAM Footprint: Reduced from 9.51 GB → 6.06 GB (-36.3%, saving 3.53 GB), enabling deployment on accessible 8GB VRAM consumer GPUs (RTX 3070/4060).
    • Energy per Generated Token: Dropped by 30.8% (4.64 J/token → 3.21 J/token).
    • Active GPU Power: Reduced by 28.9% (55.47 W → 39.43 W).

✂️ Architectural Breakdown & Vocabulary Pruning

Standard multimodal Gemma 4 checkpoints allocate immense parameter overhead to multi-modal visual projection matrices and an oversized 262,144-token multilingual tokenizer containing millions of dead embedding weights irrelevant to Perso-Arabic text.

How Vocabulary Pruning Was Implemented:

  1. Multimodal Weight Elimination: All non-text layers (vision encoders, spatial resamplers, multimodal projection bridges) were excised, yielding a streamlined, text-only transformer backbone.
  2. Embedding & Head Dimension Slicing: The input embedding matrix (embed_tokens.weight) and output classification projection (lm_head.weight) were truncated from [262144, d_model] to [131072, d_model] (exact 128k size).
  3. Sindhi & Cross-Lingual Token Preservation: Full retention of all ASCII characters, standard English, Urdu, Arabic diacritics, and all 16 unique Sindhi Perso-Arabic glyphs (ڄ, ڃ, ڪ, ڳ, ڱ, ٻ, ڌ, ڇ, ٽ, ڊ, ڦ, ٺ, ڙ, ڍ, ڏ).
  4. ChatML / Gemma 4 Jinja Template Alignment: The fast tokenizer preserves official Gemma 4 turn delimiters (<start_of_turn>, <end_of_turn>, user, model).
Original Gemma 4 (262,144 Vocab + Vision) -> 10.20 GB Disk / 9.51 GB VRAM
                                 │
                         [Pruning Pipeline]
          - Remove Vision Encoders & Projections
          - Truncate Embedding / LM Head to 131,072
          - Retain Complete Perso-Arabic & Latin Unicode
                                 │
                                 ▼
Base Pruned Backbone: Kashif786/gemma-4-E2B-it-text-only-128k-pruned -> 6.51 GB Disk / 6.06 GB VRAM
                                 │
                   [LoRA SFT on Sindhi-Assistant-IFT-1500]
                                 │
                                 ▼
Standalone Merged Model: Kashif786/sindhi-gemma-4-E2B-it-128k-sft

📊 Comprehensive Empirical Benchmarks

1. Hardware, Latency & Energy Consumption Benchmarks

Evaluated on server-grade hardware comparing baseline google/gemma-4-E2B-it vs pruned sindhi-gemma-4-E2B-it-128k-sft:

Performance DimensionBaseline (google/gemma-4-E2B-it)Pruned SFT (sindhi-gemma-4-E2B-it-128k-sft)Net Gain / Delta
Vocabulary Size262,144 tokens131,072 tokens-50.0% (Pruned)
Checkpoint Disk Size10.20 GB6.51 GB-36.2% Footprint
Static VRAM (Model Weights)9,736.17 MB (~9.51 GB)6,204.32 MB (~6.06 GB)-36.3% VRAM (-3.53 GB)
Average Peak Active VRAM9,826.16 MB (~9.60 GB)6,252.55 MB (~6.11 GB)-36.4% Peak VRAM
Time-To-First-Token (TTFT)203.93 ms188.10 ms7.8% Faster Prefill
Decoding Throughput11.94 tokens/sec12.30 tokens/sec+3.0% Throughput
Average Active GPU Power55.47 W39.43 W-28.9% Lower Power (-16W)
Average Energy Consumption4.64 J/token3.21 J/token-30.8% Energy Reduction

2. Universal Dependencies Morphosyntax (UD_Sindhi-Isra)

Tested on the official Sindhi treebank UD_Sindhi-Isra (curated by Dr. Mutee U Rahman) under zero-shot Universal Part-of-Speech (UPOS) sequence labeling:

Metric / TaskGemma Baseline (google/gemma-4-E2B-it)Pruned SFT Model (Kashif786/sindhi-gemma-4-E2B-it-128k-sft)Absolute Gain (Δ)Relative Improvement
UPOS Tagging Accuracy66.00% (66/100)73.00% (73/100)+7.00%+10.61%
Target TreebankUD_Sindhi-Isra (Test)UD_Sindhi-Isra (Test)——
Evaluation TypeZero-Shot UPOS ClassificationZero-Shot UPOS Classification——

3. Natural Language Understanding & Reasoning (Belebele snd_Arab)

Evaluated across 100 questions from the standardized Belebele benchmark (snd_Arab.jsonl):

ModelEvaluatedCorrectAccuracy
google/gemma-4-E2B-it (Baseline)1004545.00%
Kashif786/sindhi-gemma-4-E2B-it-128k-sft (Ours)1004545.00%

Key Finding: Despite removing 131,072 vocabulary tokens and stripping all multimodal projections, the model maintained 100% semantic parity on high-level reading comprehension, disproving the common hypothesis that vocabulary pruning impairs linguistic cognition.


4. Cross-Lingual Translation & Text Summarization Benchmarks

TaskMetricBase GemmaPruned SFT ModelDeltaObservations
EN → SD TranslationChrF++ ROUGE-L Sindhi Purity14.88 0.00% 1.54%52.08 28.57% 8.93%+37.20 — +7.39%Base model hallucinated English disclaimers and Urdu transliterations; SFT model output concise, native Sindhi syntax.
UR → SD TranslationChrF++ ROUGE-L Sindhi Purity52.74 0.00% 5.24%72.63 42.11% 2.99%+19.89 — —Baseline output conversational alternatives; SFT model translated with direct grammatical precision.
Text SummarizationChrF++ ROUGE-L Sindhi Purity38.78 12.50% 4.69%58.08 31.58% 7.55%+19.30 — +2.86%SFT model produced succinct executive summaries without English formatting artifacts.
Aggregate ScoreChrF++ BLEU20.45 2.7726.48 3.44+6.03 (+29.49%) +0.67 (+24.19%)Consistent high-fidelity generation in native script.

5. Qualitative 20-Domain Sindhi Instruction Benchmark

Tested across 20 distinct categories in native Sindhi:

  1. Conversation & Persona: Authentic polite greeting (وعليڪم اسلام) without English boilerplate.
  2. Sindhi Culture & Heritage: Accurate historical exposition on Ajrak (اجرڪ) and Sindhi Topi (سنڌي ٽوپي).
  3. Sindhi Literature & Sufism: Philosophical analysis of Shah Abdul Latif Bhittai's Sur Marui (سُر مارئي).
  4. History & Archaeology: 4 verified facts on Mohenjo-daro (موئن جو دڙو) including drainage and lower town.
  5. Instructional Recipe: Step-by-step culinary preparation of Bajhre ji Maani & Sarhanh jo Saag (ٻاجهري جي ماني ۽ سرنهن جو ساڳ).
  6. Technical Coding in Sindhi: Complete Python function implementation explained with native Sindhi terminology.
  7. English to Sindhi Translation: Standard translation without lexical borrowings.
  8. Mathematical Reasoning: Word problem solved step-by-step with standard ASCII digits (120 - 25 + 40 = 135).
  9. Formal Letter Writing: Authentic academic leave request formatted for school headmasters.
  10. Sindhi Proverbs & Idioms: Interpretation of 'جهڙي نيت تهڙي مراد'.
  11. Science Explanation: Spheroid celestial mechanics and seasonal cycles explained in accessible Sindhi.
  12. Roleplay & Empathy: Student exam stress counseling and cognitive hygiene tips.
  13. Geography & Hydrology: River Indus (Sindhu Darya / Mehran) agrarian significance.
  14. Creative Moral Story: Short narrative centered on an honest farmer.
  15. Urdu to Sindhi Translation: Clean translation with grammatical decomposition.
  16. Text Summarization: Core points distilled from regional cultural text.
  17. Sindhi Linguistics & Grammar: Detailed distinction between Noun (اسم) and Pronoun (ضمير) with examples.
  18. Health & Nutrition: Hydration and circadian sleep physiology.
  19. Sindhi Music & Folk Instruments: Descriptions of Yaktaro (يڪتارو), Chanh (چنگ), and Alghuzo (الڳوزو).
  20. AI for Low-Resource Languages: Strategic analysis on building open digital corpora for Sindhi.

🛠️ Training Methodology & Hyperparameters

The model was fine-tuned on Modal Cloud utilizing an NVIDIA L40S GPU (48GB VRAM) in native bfloat16 precision.

Training Configuration

  • Base Checkpoint: Kashif786/gemma-4-E2B-it-text-only-128k-pruned
  • Dataset: Kashif786/Sindhi-Assistant-IFT-1500 (Config: all, 1,500 conversations)
  • Training Framework: Hugging Face TRL (SFTTrainer 0.16+) + PEFT
  • LoRA Target Modules: Explicitly bound to ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"] (Safely bypassing internal Gemma4ClippableLinear modules to avoid PEFT dimension mismatch errors).
  • LoRA Rank ($r$): 16
  • LoRA Alpha ($\alpha$): 32
  • LoRA Dropout: 0.05
  • Trainable Parameters: 24,158,208 (0.7372% of 3,276,995,840 total params)
  • Batch Size: 4 per device × 4 gradient accumulation steps = Effective Batch Size: 16
  • Learning Rate: 2e-4 with Cosine Annealing schedule
  • Warmup Ratio: 0.08
  • Optimizer: adamw_torch_fused (Weight Decay: 0.01)
  • Epochs: 3 (282 total optimizer steps)
  • Max Sequence Length: 4096 tokens
  • Total Training Runtime: 2,263.2 seconds (~37.7 minutes)
  • Total Tokens Trained: ~4,936,000 tokens
  • Weight Merge: Standalone parameter merge into clean FP16/BF16 safetensors shards.

📉 Training Loss & Convergence Trajectory

The model exhibited exceptional convergence stability, dropping from an initial cross-entropy loss of 4.466 to 1.629, while token accuracy climbed from 41.98% to 63.32%:

StepEpochLearning RateTraining LossToken AccuracyEntropyGrad Norm
200.117.20e-054.46641.98%0.9402.967
400.211.52e-042.97545.08%2.3780.884
600.321.99e-042.44252.10%2.2060.435
800.431.98e-042.28953.38%2.2960.465
1000.531.95e-042.18654.87%2.1850.385
1200.751.85e-042.04956.27%2.0270.483
1400.961.70e-041.98557.56%1.9620.617
1601.171.51e-041.85559.22%1.8600.564
1801.381.29e-041.78960.78%1.7945.706
2001.709.32e-051.78360.42%1.7710.611
2201.926.93e-051.77260.61%1.7690.614
2402.134.72e-051.63563.24%1.6190.729
2602.452.02e-051.68162.10%1.6820.600
2702.668.02e-061.64563.32%1.6300.594
2802.773.92e-061.62963.29%1.6200.607
2823.006.72e-081.65162.81%1.6430.615
  • Final Cumulative Train Loss: 1.979
  • Final Mean Token Accuracy: 62.08%
Loss
 4.5 ┼*
 4.0 ┼
 3.5 ┼
 3.0 ┼  *
 2.5 ┼    *  *
 2.0 ┼          *  *  *
 1.5 ┼                   *  *  *  *  *  *  *  *
     └─────────────────────────────────────────► Steps (0 → 282)

💻 Quickstart: How to Use

Install required packages:

pip install -q transformers torch accelerate huggingface_hub

1. Generating Responses with Chat Template

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

MODEL_ID = "Kashif786/sindhi-gemma-4-E2B-it-128k-sft"

# Load tokenizer and model in bfloat16 (or float16)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# Format your conversation
messages = [
    {"role": "user", "content": "سنڌ جي ثقافت، اجرڪ ۽ سنڌي ٽوپي بابت مختصر ٻڌايو۔"}
]

prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=300,
    temperature=0.6,
    top_p=0.9,
    repetition_penalty=1.1,
    do_sample=True,
    eos_token_id=tokenizer.eos_token_id
)

response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)

2. Using Transformers Pipeline

from transformers import pipeline
import torch

generator = pipeline(
    "text-generation",
    model="Kashif786/sindhi-gemma-4-E2B-it-128k-sft",
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

messages = [
    {"role": "user", "content": "شاهه عبداللطيف ڀٽائي جي شاعريءَ جو مرڪزي پيغام ڇا آهي؟"}
]

output = generator(messages, max_new_tokens=256, temperature=0.6)
print(output[0]['generated_text'][-1]['content'])

⚖️ Intended Use & Best Practices

Recommended Use Cases:

  • Interactive Sindhi Assistant: Question answering, information synthesis, creative writing, and dialogue.
  • Cross-Lingual Translation: High-fidelity translation between English, Urdu, and Sindhi.
  • Educational Tutoring: Grammar, literature, historical analysis, and introductory programming instruction in Sindhi.
  • Low-Resource & Edge Deployment: Lightweight footprint (6.06 GB VRAM) suitable for consumer GPUs, cloud containers, and local offline inference.

Limitations:

  • Current Affairs / Knowledge Cutoff: Like all base models, knowledge of real-time post-training events may require external retrieval-augmented generation (RAG).
  • Dialectal Variation: Optimized for standard Perso-Arabic literary Sindhi; performance may vary on localized colloquial sub-dialects (e.g. Lasi, Kachi).

📜 Citation & Credits

If you utilize this model or its evaluation benchmarks in your research or application, please cite:

@misc{sindhi_gemma_4_128k_sft_2026,
  author = {Kashif Ali},
  title = {Sindhi Gemma 4 E2B IT 128k SFT: A Vocab-Pruned, Culturally Grounded Sindhi Large Language Model},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/Kashif786/sindhi-gemma-4-E2B-it-128k-sft}},
  note = {Fine-tuned on Kashif786/Sindhi-Assistant-IFT-1500 using Modal Cloud NVIDIA L40S}
}

Acknowledgements

  • Dr. Mutee U Rahman for curating the UD_Sindhi-Isra treebank under Universal Dependencies.
  • Google DeepMind for the Gemma 4 base architecture.
  • Modal Labs for cloud compute acceleration.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Gemma4ForCausalLM
Ревизия весов
1c1203e

0 моделей