Downloads · 30 days
143
29% of all-time downloads
wejyy888/Qwen3.5-0.8B-PureText-ZH-EN-v5.2
Qwen3.5-0.8B-PureText-ZH-EN-v5.2 is a text generation model from wejyy888. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A text-only derivative of Qwen/Qwen3.5-0.8B optimized for Chinese and English inference.
Downloads · 30 days
143
29% of all-time downloads
All-time downloads
499
Public
Parameters
685M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 99%
From the Hugging Face model README
A text-only derivative of Qwen/Qwen3.5-0.8B optimized for Chinese and English inference.
Qwen3_5ForConditionalGeneration to Qwen3_5ForCausalLM.old2new.json for converting existing tokenized datasets.The resulting checkpoint has 685,284,160 parameters and occupies approximately 1.3 GiB in BF16 safetensors format.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "wejyy888/Qwen3.5-0.8B-PureText-ZH-EN-v5.2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto")
messages = [{"role": "user", "content": "介绍一下杭州"}]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Use a Transformers version that includes Qwen3_5ForCausalLM support.
Verified environments: transformers 5.2.0 (tokenizers 0.22.2, torch 2.14.0) and 5.17.0. Under 5.2.0 the tokenizer loads at exactly 182,684 tokens with no automatic vocabulary expansion, all 320 tensors load as Qwen3_5ForCausalLM (685,284,160 parameters), and forward/generation smoke tests pass.
The linear-attention layers fall back to a pure-torch path when causal-conv1d and flash-linear-attention are not installed; install both for faster training and inference.
Previously tokenized datasets must be remapped with old2new.json.
Chinese and English tokenization is preserved exactly after ID remapping.
Other languages still decode correctly through byte fallback, but generally use more tokens.
This checkpoint accepts text only; image, video, audio, and TTS inputs are unsupported.
A short continued-pretraining or SFT stage is recommended before production use to adapt to the reduced vocabulary.
Chinese e-commerce live-search query intent classification: 100 queries, 3 classes (LIVE / BRAND / ITEM), greedy decoding, max 256 new tokens, evaluated with transformers 5.2.0.
| Class | Precision | Recall | F1 |
|---|---|---|---|
| LIVE | 84.2% | 53.3% | 65.3% |
| BRAND | 93.1% | 90.0% | 91.5% |
| ITEM | 73.1% | 95.0% | 82.6% |
Overall accuracy 81.0%, macro-F1 79.8%, and 97/100 per-row agreement with the unpruned source model under the identical prompt. Vocabulary pruning caused no measurable degradation on this task.
prune_qwen35_zh_en.py contains the conversion procedure. The padded vocabulary rows are initialized to zero so they cannot produce invalid high logits.
AutoModelForCausalLM as Qwen3_5ForCausalLM.