[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92770":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":24,"discoverSource":25},92770,"BayLing-Duplex","BayLing-Models\u002FBayLing-Duplex","BayLing-Models","Native full-duplex speech dialogue inference for BayLing-Duplex.",null,"Python",53,3,1,0,2,42.01,"Other",false,"main",[],"2026-07-22 04:02:07","# BayLing-Duplex\n\nQingkai Fang, Shoutao Guo, Yang Feng\n\n[![Code](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCode-BayLing--Duplex-blue?logo=github)](https:\u002F\u002Fgithub.com\u002FBayLing-Models\u002FBayLing-Duplex)\n[![Model](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-Hugging%20Face-yellow)](https:\u002F\u002Fhuggingface.co\u002FBayLing-Models\u002FBayLing-Duplex)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2606.14528-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2606.14528)\n\n**BayLing-Duplex: Native Full-Duplex Speech Dialogue with a Single Autoregressive LLM**\n\nBayLing-Duplex is a native full-duplex speech dialogue model. It listens and speaks at the same time, decides when to start responding, and stops when interrupted, without an external VAD or a separate turn-taking controller.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"images\u002Fbayling_duplex_model.png\" alt=\"BayLing-Duplex model figure\" width=\"100%\">\n\u003C\u002Fp>\n\n## Overview\n\nBayLing-Duplex represents user speech, assistant text, and assistant speech as a single multi-channel interleaved autoregressive sequence. Turn-taking, interruption handling, text planning, and speech-token generation are all expressed as next-token prediction.\n\nThe text channel carries dialogue-state tokens such as `[SILENCE]`, `\u003C|assistant|>`, `[PAD]`, and `[EPAD]`, so no extra classifier head, VAD, scheduler, or finite-state turn-taking controller is required at inference time.\n\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4f99649f-b517-4ce2-bdc8-c19d0d258a2a\n\n\n\n## Highlights\n\n- Native full-duplex speech dialogue: the model can listen while speaking.\n- Single autoregressive decoding path for timing decisions, text, and speech tokens.\n- Block-wise multi-channel interleaving that preserves contiguous assistant text.\n\n## Model Weights\n\nDownload the BayLing-Duplex checkpoint together with the GLM-4-Voice speech tokenizer and decoder:\n\n```bash\npip install -U huggingface_hub\n\n# Run this first if the BayLing-Duplex model repository is still private.\nhf auth login\n\nmkdir -p models\nhf download BayLing-Models\u002FBayLing-Duplex \\\n  --repo-type model \\\n  --local-dir models\u002Fbayling_duplex_model\nhf download zai-org\u002Fglm-4-voice-tokenizer \\\n  --repo-type model \\\n  --local-dir models\u002Fspeech_tokenizer\nhf download zai-org\u002Fglm-4-voice-decoder \\\n  --repo-type model \\\n  --local-dir models\u002Fspeech_decoder\n```\n\nAfter downloading, the local layout should be:\n\n```text\nmodels\u002F\n  bayling_duplex_model\u002F\n    config.json\n    configuration_chatglm.py\n    modeling_chatglm.py\n    tokenization_chatglm.py\n    tokenizer.model\n    tokenizer_config.json\n    special_tokens_map.json\n    added_tokens.json\n    model.safetensors.index.json\n    model-00001-of-0000N.safetensors\n    ...\n  speech_tokenizer\u002F\n    config.json\n    preprocessor_config.json\n    model.safetensors\n  speech_decoder\u002F\n    config.yaml\n    flow.pt\n    hift.pt\n```\n\n## Installation\n\nUse Python 3.10+ and a PyTorch build matching your CUDA runtime.\n\n```bash\npip install -r requirements.txt\npip install -e .\n```\n\nFor CPU-only smoke tests, the code works with `--device cpu`, but real-time full-duplex use should run on GPU.\n\n## Quick Start\n\n```bash\npython -m bayling_duplex.cli \\\n  --model-path models\u002Fbayling_duplex_model \\\n  --speech-tokenizer-path models\u002Fspeech_tokenizer \\\n  --decoder-path models\u002Fspeech_decoder \\\n  --input-audio examples\u002Finput.wav \\\n  --output-json outputs\u002Fresult.json \\\n  --output-audio outputs\u002Fresponse.wav \\\n  --interleave-ratio 10:5:10 \\\n  --max-duration 60 \\\n  --temperature 0.8 \\\n  --top-p 0.8\n```\n\nFor a simple interruption or composite-audio test, ask decoding to continue until the second `[EPAD]`:\n\n```bash\npython -m bayling_duplex.cli \\\n  --model-path models\u002Fbayling_duplex_model \\\n  --speech-tokenizer-path models\u002Fspeech_tokenizer \\\n  --decoder-path models\u002Fspeech_decoder \\\n  --input-audio examples\u002Finterruption.wav \\\n  --output-json outputs\u002Finterruption.json \\\n  --output-audio outputs\u002Finterruption_assistant.wav \\\n  --max-epad-count 2 \\\n  --synthesize all\n```\n\n## Python API\n\n```python\nfrom bayling_duplex import BayLingDuplex\n\nmodel = BayLingDuplex(\n    model_path=\"models\u002Fbayling_duplex_model\",\n    speech_tokenizer_path=\"models\u002Fspeech_tokenizer\",\n    decoder_path=\"models\u002Fspeech_decoder\",\n    interleave_ratio=\"10:5:10\",\n    device=\"cuda\",\n)\n\nresult = model.generate(\n    \"examples\u002Finput.wav\",\n    max_duration=60.0,\n    temperature=0.8,\n    top_p=0.8,\n)\n\nprint(result.text)\nmodel.save_audio(result.response_audio_tokens, \"outputs\u002Fresponse.wav\")\nresult.save_json(\"outputs\u002Fresult.json\")\n```\n\n## Acknowledgements\n\nBayLing-Duplex is trained based on GLM-4-Voice and uses components released by the GLM-4-Voice team. We thank the GLM-4-Voice team for making their model and code available to the community.\n\n## License\n\nSee [LICENSE](LICENSE) and [NOTICE.md](NOTICE.md).\n\n## Citation\n\n```bibtex\n@misc{fang2026baylingduplexnativefullduplexspeech,\n  title         = {BayLing-Duplex: Native Full-Duplex Speech Dialogue with a Single Autoregressive LLM},\n  author        = {Qingkai Fang and Shoutao Guo and Yang Feng},\n  year          = {2026},\n  eprint        = {2606.14528},\n  archivePrefix = {arXiv},\n  primaryClass  = {cs.CL},\n  url           = {https:\u002F\u002Farxiv.org\u002Fabs\u002F2606.14528}\n}\n```\n","BayLing-Duplex 是一个原生支持全双工语音对话的端到端大语言模型，能在用户说话的同时实时倾听、自主决定应答时机并支持自然中断响应。其核心技术是将用户语音、助手文本与助手语音统一建模为多通道交错的自回归序列，通过单一解码路径完成语音识别、文本生成、语音合成及轮转控制，无需外部VAD模块或独立调度器。适用于需要高自然度、低延迟人机语音交互的场景，如智能座舱、实时客服语音助手和沉浸式对话机器人。","2026-07-10 02:30:25","CREATED_QUERY"]