/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
qwen3_vl · dense
Базовая модель
Qwen3-VL-2B-Thinking
Библиотека
transformers
Опубликована
28 сен 2026

Qwen3-VL-2B-Thinking-Pashto-Plus

Изображение и текст → текст3 профессии
110скачиваний за 30 дней0лайковвеса обновлены28 сен 2026

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

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

Экспериментальная Qwen3-VL с расширенным набором токенов арабской графики для исследований токенизации и дальнейшего обучения на языках региона.

Это экспериментальная мультимодальная модель Nassim JP на базе Qwen/Qwen3-VL-2B-Thinking с расширенным токенизатором и матрицей эмбеддингов. В словарь добавлены 31 отдельный токен для символов письма арабской графики, цифр и управляющих знаков, важных для пушту, синдхи, белуджи, урду и персидского. Архитектура — плотная Qwen3-VL для генерации текста по текстовым и визуальным входам; размер базовой модели — 2 млрд параметров. Репозиторий предназначен прежде всего для экспериментов с токенизацией и как основа для дальнейшего обучения и визуально-языковой настройки.

Расширение словаря само по себе не обучает модель языковым знаниям для новых токенов: их эмбеддинги инициализированы заново, поэтому для осмысленной генерации и понимания на этих языках требуется дополнительное обучение. Базовая модель поддерживает диалог и работу с изображениями; карточка не приводит размер контекста. Лицензия — Apache-2.0.

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

  • оценка токенизации текстов на пушту
  • эксперименты с токенизацией синдхи и белуджи
  • подготовка основы для дообучения на урду и персидском
  • измерение эффективности новых токенов в арабской графике
  • исследования OCR арабографичных документов после дополнительной настройки

Ограничения

Новые токены получили свежие эмбеддинги и не приобретают языковые знания автоматически; для качественной работы с соответствующими языками нужно продолжить обучение. README характеризует модель как экспериментальную основу, а не как готовую языковую модель для этих языков.

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

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

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

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

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

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

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

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

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Qwen3-VL-2B-Thinking-Pashto-Plus 🇦🇫

Pashto + Urdu + Persian + Balochi + Sindhi Token Surgery for Qwen/Qwen3-VL-2B-Thinking

This repository contains a tokenizer and embedding-extension version of:

Qwen/Qwen3-VL-2B-Thinking

with additional single-character tokens for Pashto, Sindhi, Balochi, and related Arabic-script characters that were still missing from the tokenizer — plus the full Eastern Arabic-Indic digit set and several bidi / harakat controls.

Model

  • Base model: Qwen/Qwen3-VL-2B-Thinking
  • Model repository: nassimjp/Qwen3-VL-2B-Thinking-Pashto-Zi
  • Original tokenizer vocabulary: 151,669
  • Extended vocabulary: 151,700
  • New tokens: 31
  • Embedding dimension: 2048
  • Embedding dtype during surgery: torch.bfloat16

The original embedding matrix had the shape:

(151936, 2048)

After tokenizer extension and resizing, the language-model embedding matrix has the shape:

(151700, 2048)

The input and output embeddings share the same storage (tied embeddings).

The vision tower of Qwen3-VL is not vocab-indexed and was not touched.


🌍 Why Token Surgery on Qwen3-VL?

Qwen3-VL already ships with very broad Arabic-script coverage. Of the 175 unique atoms audited, 144 were already single tokens — including all Pashto-specific letters, most Sindhi letters, and most Balochi vowels.

But 31 atoms were still missing and split into byte-fallback pairs. For Pashto, Sindhi, Balochi, and Persian/Urdu numeric text, this is a real tokenization inefficiency.

Examples of atoms that were previously split:

ٽ
ڇ
ڏ
ڙ
ڦ
ڻ
ۏ
۰
۱
۲
۳
۴
۵
۶
۷
۸
۹

These characters previously tokenized as multi-byte fragments such as [151, 108], [150, 237], etc.

The purpose of this project is to give them their own independent vocabulary entries.


🔬 Tokenizer Audit

A total of 175 unique atoms were audited (181 raw entries, with intentional duplicates preserved for a separate "push-all" script).

Existing single-token atoms : 144
Atoms requiring new token   :  31

The audit found 31 missing atoms requiring new vocabulary entries.

Examples of previously missing characters:

ٽ
ڇ
ڏ
ڙ
ڦ
ڻ
ۏ

Additional extended Arabic-Indic digits, bidi controls, and harakat were also added.


➕ New Vocabulary

The original vocabulary contained:

151669

After adding 31 new tokens:

151700

Exact New Token ID Map

TokenID
ٽ151669
ڇ151670
ڏ151671
ڙ151672
ڦ151673
ڻ151674
ۏ151675
۰151676
۱151677
۲151678
۳151679
۴151680
۵151681
۶151682
۷151683
۸151684
۹151685
؉151686
U+200D151687
U+200F151688
U+202A151689
U+202B151690
U+202C151691
U+202D151692
U+202E151693
ٌ151694
ٍ151695
ٓ151696
ٔ151697
ٕ151698
ٰ151699

🧬 Embedding Initialization

Each of the 31 new vocabulary entries receives its own independent embedding row.

The new embeddings were initialized independently with:

Initializer range: 0.02
Embedding dimension: 2048

The forensic audit confirmed:

Expected shape: (31, 2048)
Actual shape:   (31, 2048)

Each new token therefore owns an independent 2048-dimensional embedding vector.


🔎 Embedding Forensics

An exact duplicate search was performed across the new embedding rows.

Result:

NO EXACT DUPLICATE EMBEDDING ROWS

A pairwise cosine similarity analysis was also performed.

The maximum cosine similarity between distinct new-token embeddings was:

0.075313299894

The corresponding pair was:

۲  <->  ٔ

This confirms that the newly initialized embedding rows are distinct rather than duplicated copies.


📊 Embedding Distribution

Original vocabulary

mean      = -0.0000267930
std       =  0.0322032236
norm mean =  1.43841958

New tokens

mean      =  0.0000779270
std       =  0.0200125575
norm mean =  0.90553617

The new-token embeddings were independently initialized and have their own embedding distribution. They are intentionally initialized slightly tighter than the pretrained rows, so that continued pretraining can draw them into the model's existing distribution naturally.


🧠 Why Qwen Needed Fewer Tokens Than LFM2.5

For comparison, the same surgery on LiquidAI/LFM2.5-2.6B added 56 new tokens. Qwen3-VL-2B-Thinking already covered 25 of those atoms as single tokens, because the Qwen tokenizer has broader Arabic-script coverage out of the box.

Atom familyLFM2.5-2.6BQwen3-VL-2B-Thinking
Pashto lettersmissing✅ already single
Sindhi lettersmissingmostly ✅, 6 missing
Balochi vowelsmissingmostly ✅, 1 missing
Arabic-Indic digitspartially missing❌ all 10 missing
Harakatpartially missingmostly ✅, 6 missing
Bidi controlsmostly missingmostly missing

🔐 Forensic Gate

The final forensic checks confirmed:

✓ Input/output embeddings share storage (tied)
✓ Every new atom owns an independent embedding row
✓ No exact duplicate embedding rows
✓ No tokenizer-ID/indexing corruption detected
✓ Embedding matrix successfully resized
✓ Vision tower untouched (not vocab-indexed)
✓ Model successfully saved
✓ Tokenizer successfully saved
✓ Model successfully loaded again from Hugging Face

🧪 Verification

After uploading the model, it was loaded again from:

nassimjp/Qwen3-VL-2B-Thinking-Pashto-Zi

The loaded model reported:

Vocab size:
151700
Embedding shape:
torch.Size([151700, 2048])

The newly added tokens were also verified after reloading.

Examples:

ٽ -> 151669
ڇ -> 151670
ڏ -> 151671
ڙ -> 151672
ڦ -> 151673
ڻ -> 151674

Existing tokens that were already present in the original tokenizer retain their original IDs.

For example:

ښ -> 147996
ځ -> 148519
ږ -> 150389
ټ -> 148249
ډ -> 148967
ړ -> 148871
ګ -> 150392

These are existing tokenizer entries, not newly added vocabulary entries.


🧠 Important Note

This repository represents a tokenizer and embedding vocabulary extension.

The 31 newly added token embeddings were freshly initialized during the vocabulary surgery.

This does not by itself mean that the model has already learned full Pashto (or Sindhi, Balochi, …) language knowledge for these new atoms.

For the newly introduced tokens to acquire meaningful linguistic representations, further training such as continued pretraining / causal language modeling on multilingual Arabic-script data is required.

In other words:

Tokenizer surgery
        ↓
31 new Pashto + Sindhi + Balochi + Arabic-script atoms
        ↓
Independent embedding rows
        ↓
Continued pretraining
        ↓
Learned representations

🛠️ Intended Use

This model is intended as an experimental foundation for further Arabic-script language-model development on top of Qwen3-VL.

Potential next steps include:

  • Pashto continued pretraining
  • Urdu continued pretraining
  • Sindhi continued pretraining
  • Balochi continued pretraining
  • Multilingual Arabic-script causal language modeling
  • Vision-language instruction tuning
  • OCR experiments on Arabic-script documents
  • Tokenizer evaluation
  • Token efficiency evaluation
  • Language generation experiments

📦 Repository Contents

The repository contains the model, tokenizer, configuration, generation configuration, chat template, and forensic report.

Important files include:

config.json
model.safetensors
generation_config.json
tokenizer_config.json
tokenizer.json
vocab.json
merges.txt
chat_template.jinja
pashto_urdu_fresh_embedding_forensics_Qwen_Qwen3-VL-2B-Thinking.json

The forensic report records the tokenizer audit, vocabulary additions, embedding checks, and verification results.


📋 Base Model

This project is based on:

Qwen/Qwen3-VL-2B-Thinking

Base model:

Qwen — Qwen3-VL-2B-Thinking

This repository does not claim to reproduce or replace the original base model. It provides an extended tokenizer vocabulary and corresponding resized embedding matrix.


🚀 Loading the Model

from transformers import AutoTokenizer, Qwen3VLForConditionalGeneration
model_id = "nassimjp/Qwen3-VL-2B-Thinking-Pashto-Zi"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = Qwen3VLForConditionalGeneration.from_pretrained(
    model_id,
    dtype="auto",
    device_map="auto"
)
print("Vocabulary:", len(tokenizer))
print("Embedding:", model.get_input_embeddings().weight.shape)

Expected output:

Vocabulary: 151700
Embedding: torch.Size([151700, 2048])

🔤 Testing Newly Added Characters

You can inspect the newly added atoms with:

new_atoms = [
    # Sindhi
    "ٽ", "ڇ", "ڏ", "ڙ", "ڦ", "ڻ",
    # Balochi
    "ۏ",
    # Extended Arabic-Indic digits
    "۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹",
    # Symbol
    "؉",
    # Bidi controls
    "\u200d", "\u200f",
    "\u202a", "\u202b", "\u202c", "\u202d", "\u202e",
    # Harakat
    "ٌ", "ٍ", "ٓ", "ٔ", "ٕ", "ٰ",
]
for char in new_atoms:
    token_id = tokenizer.convert_tokens_to_ids(char)
    print(repr(char), "->", token_id)

Expected IDs run from 151669 through 151699 (see the table above).


📈 Token Efficiency

After the surgery, the following text categories tokenize more efficiently:

CategoryBeforeAfter
Eastern Arabic-Indic digits (۰۱۲۳۴۵۶۷۸۹)2 tokens each1 token each
Sindhi consonants ٽ ڇ ڏ ڙ ڦ ڻ2 tokens each1 token each
Balochi vowel ۏ2 tokens1 token
Bidi controls2 tokens each1 token each
Select harakat2 tokens each1 token each

Approximate efficiency gains on Pashto, Sindhi, Balochi, and Persian/Urdu numeric text: ~10–20% fewer tokens for text that uses these atoms.


⚠️ Status

Tokenizer surgery: ✅ Complete

Vocabulary resize: ✅ Complete

Embedding forensic audit: ✅ Passed

Model save: ✅ Complete

Tokenizer save: ✅ Complete

Hugging Face upload: ✅ Complete

Reload verification: ✅ Complete

Continued pretraining: ⏳ Not performed as part of this surgery

SFT / instruction tuning: ⏳ Not performed as part of this surgery


📜 Forensic Report

A complete forensic report was generated during the surgery:

pashto_urdu_fresh_embedding_forensics_Qwen_Qwen3-VL-2B-Thinking.json

The report contains:

  • tokenizer audit
  • missing-token inventory
  • new token IDs
  • embedding shapes
  • embedding fingerprints
  • duplicate detection
  • pairwise cosine analysis
  • old/new embedding distribution
  • final forensic gate
  • model verification

👤 Author

nassimjp

Pashto AI / Pashto NLP experiments


📄 License

Please refer to the license of the original base model and repository configuration before redistributing modified model weights.


⭐ Project

Qwen3-VL-2B-Thinking-Pashto-Zi

A focused tokenizer surgery on top of an already multilingual base:

Qwen/Qwen3-VL-2B-Thinking
          +
31 new Pashto + Sindhi + Balochi + Arabic-script atoms
          ↓
151,669 → 151,700 vocabulary
          ↓
Multilingual Arabic-script tokenizer foundation
          +
Vision tower preserved intact

The tokenizer now has dedicated vocabulary entries for the missing Pashto, Sindhi, Balochi, and related Arabic-script characters that Qwen3-VL previously split into byte fragments.

---

Related

  • 🇦🇫 nassimjp/LFM2.5-2.6B-Pashto-Zi-b — same surgery, 56 new tokens, on LiquidAI/LFM2.5-2.6B

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3VLForConditionalGeneration
Ревизия весов
436bc48

0 моделей