Downloads · 30 days
9
4% of all-time downloads
Elsephire/Qwen3.5-0.8B-vocabulary-trimming
Qwen3.5-0.8B-vocabulary-trimming is a image-text-to-text model from Elsephire. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
A vocabulary-trimmed version of Qwen3.5-0.8B with 41.3% fewer tokens, keeping only Latin (EN, FR, DE, ES, IT, PT, NL, PL, RO, HU) and Greek scripts while preserving all original capabilities in those languages.
Downloads · 30 days
9
4% of all-time downloads
All-time downloads
216
Public
Repo size
1.8 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.8 GB · 99%
From the Hugging Face model README
A vocabulary-trimmed version of Qwen3.5-0.8B with 41.3% fewer tokens, keeping only Latin (EN, FR, DE, ES, IT, PT, NL, PL, RO, HU) and Greek scripts while preserving all original capabilities in those languages.
| Metric | Original | Trimmed | Gain |
|---|---|---|---|
| Vocabulary size | 248,077 tokens | 145,572 tokens | −41.3% |
| File size | 3,876.2 MB | 3,475.8 MB | −400.4 MB (10.33%) |
| Parameters | 2,032.2 M | 2,032.2 M | unchanged |
| Architecture | Dense | Dense | unchanged |
| Script / Language | Tokens | % of vocabulary | Status |
|---|---|---|---|
| Latin (EN, FR, DE, ES, IT, PT, NL, PL, RO, HU) | 144,029 | 58.1% | ✅ Kept |
| Chinese / Japanese / Korean | 65,722 | 26.5% | ❌ Removed |
| Cyrillic (RU, UK, BG, SR, MK) | 18,580 | 7.5% | ❌ Removed |
| Arabic | 8,817 | 3.6% | ❌ Removed |
| Thai | 5,741 | 2.3% | ❌ Removed |
| Greek | 1,543 | 0.6% | ✅ Kept |
| Devanagari (Hindi, Nepali, Marathi) | 959 | 0.4% | ❌ Removed |
| Bengali | 531 | 0.2% | ❌ Removed |
| Hebrew | 520 | 0.2% | ❌ Removed |
| Tamil | 268 | 0.1% | ❌ Removed |
| Malayalam | 205 | 0.1% | ❌ Removed |
| Telugu | 188 | 0.1% | ❌ Removed |
| Georgian | 186 | 0.1% | ❌ Removed |
| Burmese | 147 | 0.1% | ❌ Removed |
| Kannada | 144 | 0.1% | ❌ Removed |
| Gujarati | 116 | 0.0% | ❌ Removed |
| Armenian | 88 | 0.0% | ❌ Removed |
| Khmer | 79 | 0.0% | ❌ Removed |
| Sinhala | 77 | 0.0% | ❌ Removed |
| Gurmukhi (Punjabi) | 65 | 0.0% | ❌ Removed |
| Lao | 37 | 0.0% | ❌ Removed |
| Ethiopic (Ge'ez) | 25 | 0.0% | ❌ Removed |
| Tibetan | 10 | 0.0% | ❌ Removed |
One of the most common issues with general multilingual models is the sporadic appearance of Chinese, Japanese, or Korean characters in outputs meant for Latin-script languages — even when the prompt has nothing to do with those languages. This happens because the model occasionally explores parts of the vocabulary that are never actively used for the target task. By permanently removing those tokens, this issue is resolved at a structural level: the model simply cannot generate them anymore, as they no longer exist in its output space.
Reducing the vocabulary size has a direct and measurable impact on speed:
lm_head + embed_tokens) occupies proportionally less memory. On systems with tight memory constraints, this reduction can make it possible to run the model where it previously wouldn't fit, or free up memory for other processes.Trimming the vocabulary may lead to a slight improvement in overall model performance on the retained languages. The hypothesis is that reducing the output space concentrates probability mass more effectively on relevant tokens, reducing the statistical noise introduced by thousands of tokens that are never used in the task context. Gains in the range of 1–3% may be observed on Latin-language benchmarks (perplexity, answer accuracy, coherence).
Trimming was performed using the [vocab-trimmer] (release soon) tool, which follows this pipeline:
old_id → new_id mapping is built to compact the vocabulary with no gaps.lm_head and embed_tokens layers are recalibrated.tokenizer_config.json, tokenizer.json, config.json, and the vocabulary are rebuilt with the new IDs. Chat templates and special tokens are preserved verbatim.from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "your-namespace/Qwen3.5-0.8B-Trimmed"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
inputs = tokenizer("Explain quantum computing in simple terms.", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model is derived from Qwen/Qwen3.5-0.8B and follows its original license. The trimming tool [vocab-trimmer]release soon is available under the MIT License.