Downloads · 30 days
6
100% of all-time downloads
ikhou/dict-xs-mlc-q4f16_1
dict-xs-mlc-q4f16_1 is a text generation model from ikhou. 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 lightweight multilingual dictionary model based on Qwen3-0.6B, fine-tuned on 1.7M dictionary-style glosses across 50+ languages.
Downloads · 30 days
6
100% of all-time downloads
All-time downloads
6
Public
Repo size
688 MB
Likes
0
Public
Click a slice to open those files.
.bin335 MB · 94%
From the Hugging Face model README
A lightweight multilingual dictionary model based on Qwen3-0.6B, fine-tuned on 1.7M dictionary-style glosses across 50+ languages.
This is the MLC-compiled version optimized for WebLLM/WebGPU inference with q4f16_1 quantization (~335 MB).
For the original PyTorch model, see: ikhou/dict-xs
This model provides short, dictionary-style translations and glosses for words and phrases in context. It's designed for:
Key Features:
English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Swedish, Danish, Norwegian Bokmål, Finnish, Czech, Romanian, Hungarian, Catalan, Greek
Russian, Ukrainian, Bulgarian, Serbian
Chinese (Mandarin), Japanese, Korean, Hindi, Bengali, Urdu, Tamil, Telugu, Marathi, Thai, Vietnamese, Indonesian, Malay, Filipino
Arabic, Persian, Turkish, Hebrew
Swahili, Amharic, Yoruba
Lithuanian, Slovenian, Estonian, Latvian, Slovak, Croatian, Azerbaijani, Kazakh, Uzbek
The model outputs grammatical information using standard linguistic abbreviations:
For conjugated verbs, the model provides:
WebGPU Library Status: The weights have been updated, but the WebGPU wasm file needs to be recompiled. Until then, please use one of these alternatives:
# Install mlc-llm
pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
# Run the model
mlc_llm chat HF://ikhou/dict-xs-mlc-q4f16_1
This model is optimized for WebLLM and can run directly in the browser once the WebGPU library is recompiled:
import * as webllm from "@mlc-ai/web-llm";
const messages = [
{
role: "system",
content: "You are a bilingual dictionary. Given a word/phrase in context, output a short gloss.\n\nRules:\n- One line only, no labels\n- Use grammar markers: nm./nf./nn. for gendered nouns, n. for others, adj., adv., verbs with tense info\n- 1-4 short translations, comma-separated\n- Apply markers based on definition language"
},
{
role: "user",
content: 'Expression: "maison"\nContext: Il habite dans une petite 【maison】 près de la mer.\nSource language: fra (French)\nDefinition language: eng (English)\n\nReturn the single-line gloss now.'
}
];
const engine = await webllm.CreateMLCEngine(
"ikhou/dict-xs-mlc-q4f16_1",
{
initProgressCallback: (progress) => {
console.log(progress);
}
}
);
const reply = await engine.chat.completions.create({
messages,
max_tokens: 50,
temperature: 0.3,
});
console.log(reply.choices[0].message.content); // Output: "nf. house, home"
Note: The above code will load but return empty outputs until the wasm is recompiled.
For the original model, see ikhou/dict-xs:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"ikhou/dict-xs",
torch_dtype="bfloat16",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("ikhou/dict-xs")
# Example: Get a French→English gloss
messages = [
{
"role": "system",
"content": "You are a bilingual dictionary. Given a word/phrase in context, output a short gloss.\n\nRules:\n- One line only, no labels\n- Use grammar markers: nm./nf./nn. for gendered nouns, n. for others, adj., adv., verbs with tense info\n- 1-4 short translations, comma-separated\n- Apply markers based on definition language"
},
{
"role": "user",
"content": 'Expression: "maison"\nContext: Il habite dans une petite 【maison】 près de la mer.\nSource language: fra (French)\nDefinition language: eng (English)\n\nReturn the single-line gloss now.'
}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=50,
temperature=0.3,
do_sample=True,
top_p=0.9
)
response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(response) # Output: "nf. house, home"
The model expects:
The model returns a single line with:
To compile the WebGPU wasm file for browser use:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
git clone --recursive https://github.com/mlc-ai/mlc-llm.git
cd mlc-llm
./web/prep_emcc_deps.sh
export MLC_LLM_SOURCE_DIR=$(pwd)
# Download this model's config
git clone https://huggingface.co/ikhou/dict-xs-mlc-q4f16_1
# Compile
python -m mlc_llm compile dict-xs-mlc-q4f16_1/mlc-chat-config.json \
--device webgpu \
--opt O3 \
-o dict-xs-q4f16_1-webgpu.wasm
# The compiled wasm can then be uploaded to replace the old one
Apache 2.0
@misc{ikhou-dict-xs,
author = {Ikhou},
title = {Ikhou Dictionary Model (dict-xs)},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/ikhou/dict-xs}}
}
For issues or questions, please open an issue on the model repository.