alphaedge-ai/Qwen3.5-4B-deu-16384

🤗 On Hugging Facetext-generationapache-2.03.9B params7.9 GBsafetensors✓ Checksum-verifiedupdated 0d ago
Magnet

Qwen3.5-4B-deu-16384

This model is a 13.08% smaller version of Qwen/Qwen3.5-4B optimized for German language via vocabulary size reduction using the trimming method.

This trimmed model should perform similarly to the original model with only 16,384 tokens and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in the selected languages were removed from the vocabulary.

Model Statistics

| Metric | Original | Trimmed | Reduction |

|--------|----------|---------|-----------|

| Vocabulary size | 248,320 tokens | 16,384 tokens | 93.40% |

| Model size | 4,539,265,536 params | 3,945,509,376 params | 13.08% |

!image

Mining Dataset Statistics

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "alphaedge-ai/Qwen.5-4B-deu-32768"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
    trust_remote_code=True
)

# prepare the model input
prompt = "Your prompt in German."
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=32768
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]
content = tokenizer.decode(output_ids, skip_special_tokens=True)

print("content:", content)

Citations

Qwen3

@misc{qwen3.5,
    title  = {Qwen3.5: Towards Native Multimodal Agents},
    author = {Qwen Team},
    month  = {February},
    year   = {2026},
    url    = {https://qwen.ai/blog?id=qwen3.5}
}

Trimming blog post

@misc{hf_blogpost_trimming,
      title={Introduction to Trimming}, 
      author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
      year={2026},
      url={https://huggingface.co/blog/lbourdois/introduction-to-trimming}, 
}