Text Generation
Transformers
Safetensors
Chinese
qwen3
traditional-chinese-medicine
lingdan-v2
base
conversational
text-generation-inference
Instructions to use TCMLLM/Lingdan-4B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TCMLLM/Lingdan-4B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TCMLLM/Lingdan-4B-Base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TCMLLM/Lingdan-4B-Base") model = AutoModelForCausalLM.from_pretrained("TCMLLM/Lingdan-4B-Base", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TCMLLM/Lingdan-4B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TCMLLM/Lingdan-4B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TCMLLM/Lingdan-4B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TCMLLM/Lingdan-4B-Base
- SGLang
How to use TCMLLM/Lingdan-4B-Base 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 "TCMLLM/Lingdan-4B-Base" \ --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": "TCMLLM/Lingdan-4B-Base", "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 "TCMLLM/Lingdan-4B-Base" \ --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": "TCMLLM/Lingdan-4B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TCMLLM/Lingdan-4B-Base with Docker Model Runner:
docker model run hf.co/TCMLLM/Lingdan-4B-Base
Link arXiv paper and preserve both Lingdan citations
Browse filesREADME-only: add arXiv entry points, citation metadata and versioned evaluation sources.
README.md
CHANGED
|
@@ -26,6 +26,7 @@ tags:
|
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<p align="center">
|
|
|
|
| 29 |
<a href="https://huggingface.co/collections/TCMLLM/lingdan-v2"><img src="https://img.shields.io/badge/Models-Hugging_Face-FFD21E?logo=huggingface&logoColor=black" alt="Hugging Face models" /></a>
|
| 30 |
<a href="https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2"><img src="https://img.shields.io/badge/Models-ModelScope-624AFF" alt="ModelScope models" /></a>
|
| 31 |
<a href="https://github.com/TCMAI-BJTU/LingLan"><img src="https://img.shields.io/badge/Benchmark-LingLan-2A8F5B" alt="LingLan benchmark" /></a>
|
|
@@ -33,7 +34,7 @@ tags:
|
|
| 33 |
<a href="https://github.com/TCMAI-BJTU/Lingdan-V2/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-D22128" alt="Apache License 2.0" /></a>
|
| 34 |
</p>
|
| 35 |
|
| 36 |
-
[Model](#model-details) 路 [Quickstart](#quickstart) 路 [vLLM](#vllm-deployment) 路 [Citation](#citation)
|
| 37 |
|
| 38 |
## Model Details
|
| 39 |
|
|
@@ -142,14 +143,17 @@ Lingdan-V2 model weights and project-owned documentation and images are released
|
|
| 142 |
|
| 143 |
## Citation
|
| 144 |
|
| 145 |
-
|
| 146 |
|
| 147 |
```bibtex
|
| 148 |
@misc{hua2026lingdanv2,
|
| 149 |
title = {{Lingdan-V2}: Large language models for clinically grounded reasoning in traditional Chinese medicine},
|
| 150 |
author = {Hua, Rui and Wei, Yu and Jin, Ziri and Sun, Zhuo and Chang, Kai and Xia, Jianan and Shu, Zixin and Li, Xiaodong and Jia, Dongmei and Dong, Fei and Zhang, Runshun and Yu, Jian and Xu, Hao and Yu, Haibin and Li, Jiansheng and Liu, Baoyan and Wang, Wenjia and Zhou, Xuezhong},
|
| 151 |
year = {2026},
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
| 153 |
}
|
| 154 |
|
| 155 |
@article{hua2024lingdan,
|
|
@@ -166,6 +170,6 @@ Cite Lingdan-V2 and the earlier Lingdan work:
|
|
| 166 |
|
| 167 |
## Related Links
|
| 168 |
|
| 169 |
-
[GitHub](https://github.com/TCMAI-BJTU/Lingdan-V2) 路 [Hugging Face collection](https://huggingface.co/collections/TCMLLM/lingdan-v2) 路 [ModelScope collection](https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2) 路 [LingLan benchmark](https://github.com/TCMAI-BJTU/LingLan)
|
| 170 |
|
| 171 |
For task prompts and thinking-mode chat, see the [SFT/R1 guide](https://github.com/TCMAI-BJTU/Lingdan-V2#task-prompts).
|
|
|
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<p align="center">
|
| 29 |
+
<a href="https://arxiv.org/abs/2610.14705"><img src="https://img.shields.io/badge/arXiv-2610.14705-B31B1B?logo=arxiv&logoColor=white" alt="Lingdan-V2 paper on arXiv" /></a>
|
| 30 |
<a href="https://huggingface.co/collections/TCMLLM/lingdan-v2"><img src="https://img.shields.io/badge/Models-Hugging_Face-FFD21E?logo=huggingface&logoColor=black" alt="Hugging Face models" /></a>
|
| 31 |
<a href="https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2"><img src="https://img.shields.io/badge/Models-ModelScope-624AFF" alt="ModelScope models" /></a>
|
| 32 |
<a href="https://github.com/TCMAI-BJTU/LingLan"><img src="https://img.shields.io/badge/Benchmark-LingLan-2A8F5B" alt="LingLan benchmark" /></a>
|
|
|
|
| 34 |
<a href="https://github.com/TCMAI-BJTU/Lingdan-V2/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-D22128" alt="Apache License 2.0" /></a>
|
| 35 |
</p>
|
| 36 |
|
| 37 |
+
[Paper](https://arxiv.org/abs/2610.14705) 路 [Model](#model-details) 路 [Quickstart](#quickstart) 路 [vLLM](#vllm-deployment) 路 [Citation](#citation)
|
| 38 |
|
| 39 |
## Model Details
|
| 40 |
|
|
|
|
| 143 |
|
| 144 |
## Citation
|
| 145 |
|
| 146 |
+
Please cite Lingdan-V2 and the earlier Lingdan work:
|
| 147 |
|
| 148 |
```bibtex
|
| 149 |
@misc{hua2026lingdanv2,
|
| 150 |
title = {{Lingdan-V2}: Large language models for clinically grounded reasoning in traditional Chinese medicine},
|
| 151 |
author = {Hua, Rui and Wei, Yu and Jin, Ziri and Sun, Zhuo and Chang, Kai and Xia, Jianan and Shu, Zixin and Li, Xiaodong and Jia, Dongmei and Dong, Fei and Zhang, Runshun and Yu, Jian and Xu, Hao and Yu, Haibin and Li, Jiansheng and Liu, Baoyan and Wang, Wenjia and Zhou, Xuezhong},
|
| 152 |
year = {2026},
|
| 153 |
+
eprint = {2610.14705},
|
| 154 |
+
archivePrefix = {arXiv},
|
| 155 |
+
primaryClass = {cs.CL},
|
| 156 |
+
url = {https://arxiv.org/abs/2610.14705}
|
| 157 |
}
|
| 158 |
|
| 159 |
@article{hua2024lingdan,
|
|
|
|
| 170 |
|
| 171 |
## Related Links
|
| 172 |
|
| 173 |
+
[Paper](https://arxiv.org/abs/2610.14705) 路 [GitHub](https://github.com/TCMAI-BJTU/Lingdan-V2) 路 [Hugging Face collection](https://huggingface.co/collections/TCMLLM/lingdan-v2) 路 [ModelScope collection](https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2) 路 [LingLan benchmark](https://github.com/TCMAI-BJTU/LingLan)
|
| 174 |
|
| 175 |
For task prompts and thinking-mode chat, see the [SFT/R1 guide](https://github.com/TCMAI-BJTU/Lingdan-V2#task-prompts).
|