Downloads · 30 days
77
6% of all-time downloads
summykai/Qwen3-14B-chem-dyn-tokenizer
Qwen3-14B-chem-dyn-tokenizer is a text generation model from summykai. 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 Qwen3-14B model augmented with the InternS1 dynamic tokenizer for chemistry/biomolecular text. No full fine-tune was performed; we adapted tokenization and warmed the new token rows so the model is ready for downstr…
Downloads · 30 days
77
6% of all-time downloads
All-time downloads
1.3K
Public
Parameters
14.8B
29.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors29.6 GB · 100%
From the Hugging Face model README
A Qwen3-14B model augmented with the InternS1 dynamic tokenizer for chemistry/biomolecular text. No full fine-tune was performed; we adapted tokenization and warmed the new token rows so the model is ready for downstream SFT/RL on chemistry tasks.
<p align="center"> <img src="figures/compression_interns1.png" alt="InternS1 tokenizer compression" width="550"/> </p>Figure: Tokenization efficiency from the InternS1 technical report — SMILES/IUPAC compression ~2.64× vs ~1.44–1.51× for common LLM tokenizers.
Dynamic tokenizer integration (InternS1)
We ship tokenization_interns1.py and three SentencePiece models:
tokenizer_SMILES.model (SMILES/SELFIES)tokenizer_IUPAC.model (IUPAC names)tokenizer_FASTA.model (protein sequences)The tokenizer auto-detects long chemistry/biomolecular spans and switches to the SP model, or you can wrap with explicit tags:
<SMILES> CC(=O)OC1=CC=CC=C1C(=O)O </SMILES>
<IUPAC> 2-acetoxybenzoic acid </IUPAC>
Logical auto-detect tokens (e.g., <SMILES_AUTO_DETECT>…</SMILES_AUTO_DETECT>) do not consume ids.
Effective vocabulary size: 152,971.
Warm-up of new rows (no full finetune):
lm_head rows if untied).Initialization strategy (better than random):
New rows were not left random. We projected domain embeddings into Qwen3’s space (ridge-regularized linear map) to give chemistry tokens meaningful initial locations. After merging, test_merge.py verified max |Δ| emb/head = 0.0.
Install: RDKit is strongly recommended for high-quality SMILES auto-detection.
pip install rdkit-pypi sentencepiece transformers
# or via conda:
# conda install -c conda-forge rdkit
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "summykai/Qwen3-14B-chem-dyn-tokenizer"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, torch_dtype="auto")
prompt = "Name and SMILES for aspirin: <SMILES>CC(=O)OC1=CC=CC=C1C(=O)O</SMILES>"
out = model.generate(**tok(prompt, return_tensors="pt"), max_new_tokens=64)
print(tok.decode(out[0], skip_special_tokens=True))
model-*.safetensors, model.safetensors.index.json, config.json, generation_config.jsonvocab.json, merges.txt, tokenizer_config.json, special_tokens_map.json,
tokenization_interns1.py, tokenizer_SMILES.model, tokenizer_IUPAC.model, tokenizer_FASTA.modelfigures/compression_interns1.pngSummykai (HF & GitHub): https://github.com/Summykai