Instructions to use iFlytekOpenSource/Domux with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iFlytekOpenSource/Domux with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iFlytekOpenSource/Domux") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("iFlytekOpenSource/Domux") model = AutoModelForMultimodalLM.from_pretrained("iFlytekOpenSource/Domux", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use iFlytekOpenSource/Domux with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iFlytekOpenSource/Domux" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iFlytekOpenSource/Domux", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/iFlytekOpenSource/Domux
- SGLang
How to use iFlytekOpenSource/Domux with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "iFlytekOpenSource/Domux" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iFlytekOpenSource/Domux", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "iFlytekOpenSource/Domux" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iFlytekOpenSource/Domux", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use iFlytekOpenSource/Domux with Docker Model Runner:
docker model run hf.co/iFlytekOpenSource/Domux
[HER Hack-Astron #4] Domux 全量 4057 条官方评测:复现 97.58% 准确率并分析失败模式
发布到:https://huggingface.co/iFlytekOpenSource/Domux/discussions
发布后把讨论编号记下来(案例 frontmatter 的 channels 要用)。
一句话结论
在 RTX 4090D(AutoDL 付费云 GPU)上以 BF16 运行 Domux 官方评测数据集,4057 条智能家居指令测试集结果:格式合规 100.00% / 结果准确率 97.58% / Slot F1 99.60% / Intent F1 98.17% / 平均延迟 0.159s(batch 8 批处理),独立复现与模型卡宣称的 98.37% 仅差 0.79 个百分点。
任务说明
Domux 将自然语言智能家居指令转换为 动作|设备|属性|值|单位|房间|楼层 的 7 字段结构化输出。本次用官方 smart_home_control_test_set.jsonl(4057 条,4 个类别)做全量评测,指标定义逐字沿用官方 eval/run_eval.py,并分析失败样例的规律。
环境(如实填写)
| 项 | 值 |
|---|---|
| 硬件 | RTX 4090D 24GB(AutoDL 按量付费云 GPU),Ubuntu |
| 框架 | transformers 5.15.1 + torch 2.13.0(本地批量推理,非 API 服务) |
| 精度 | BF16 |
| 模型 revision | 6c71a32f4d624cadfd9fce9d10240d8068e53456 |
| 推理参数 | greedy(等价 temperature=0.0),max_new_tokens=256,batch_size=8 |
| 指标来源 | iflytek/domux eval/run_eval.py(逐字复用:格式/准确率/Slot F1/Intent F1 定义一致) |
| 延迟口径 | 每 batch 墙钟时间 ÷ batch 大小,跳过前 5 条 warmup |
复现步骤
export HF_HOME=/root/autodl-tmp/hf
hf download iFlytekOpenSource/Domux --revision 6c71a32f4d624cadfd9fce9d10240d8068e53456
# 本地脚本加载模型(BF16)+ 逐批生成 + 官方指标计算(eval_direct.py,指标函数与 run_eval.py 一致)
python eval_direct.py --batch 8
结果
| 类别 | 样本数 | 格式合规 | 准确率 | Slot F1 | Intent F1 | 延迟(s) |
|---|---|---|---|---|---|---|
| multi_intent | 1641 | 100.00% | 97.75% | 99.68% | 98.65% | 0.231 |
| non_standard_naming | 559 | 100.00% | 94.81% | 99.09% | 94.91% | 0.118 |
| omitted_attribute | 735 | 100.00% | 97.14% | 99.28% | 97.14% | 0.111 |
| single_intent | 1122 | 100.00% | 99.02% | 99.82% | 99.02% | 0.105 |
| OVERALL | 4057 | 100.00% | 97.58% | 99.60% | 98.17% | 0.159 |
与模型卡宣称 98.37% 的差异(0.79pp)说明:独立复现存在微小解码差异(greedy 批处理、transformers 直连 vs 官方评测管线),但整体能力与宣称一致,Slot F1 99.60% 表明字段级解析非常稳定。
失败模式分析(98 条失败,2.42%)
| 类别 | 失败数/总数 | 失败率 |
|---|---|---|
| multi_intent | 37/1641 | 2.25% |
| non_standard_naming | 29/559 | 5.19% |
| omitted_attribute | 21/735 | 2.86% |
| single_intent | 11/1122 | 0.98% |
三类典型错误:
- 多指令楼层/房间继承丢失(multi_intent 最多):如
on the ground floor set the chandelier in the majlis ... turn on the floor lamp,第二条指令漏填Ground Floor,楼层只在该条开头声明一次时,后续指令的 floor 槽位偶发为*。 - 属性混淆(non_standard_naming 失败率最高):如
turn up the AC被解析为windSpeed而非temperature;make it warmer的colorTemperature与brightness偶发互换。 - 房间推断边界:个别非标准命名场景下房间槽位给出具体房间名而 gold 为
*(过度推断)。
局限
- 只在官方测试集上评测;未见过的真实家庭指令(方言、ASR 噪声)未覆盖
- 未做量化/延迟优化对比(本案例为 BF16 全量)
- 高风险动作的拒绝/二次确认行为未单独深挖
安全与隐私
- 评测使用公开测试集,无个人/家庭隐私数据
- 未在命令、日志、截图泄露 HF token 或个人缓存路径
链接
- 模型:https://huggingface.co/iFlytekOpenSource/Domux
- 案例 PR:<提交后补>
- 活动 issue:https://github.com/iflytek/domux/issues/20